> probably, example from @codebrainz could be resolved if we collect detected 
> function definition in some list.
> so that only local functions will be in that list, then pointers of that 
> functions also will be highlighted 

That wouldn't help, because in the `GCallback cb = &some_function;` case, I 
guess you want to highlight both `cb` and `some_function` -- or none.  They are 
both callable, but there's no syntactic way to know it, short of figuring out 
`GCallback` is a function type -- and even then, only `cb` really is a 
callable, the RHS should be but what if the author was nasty…
```C
  const char *p = "hello";
  void(*cb)(void) = p;
```

This will compile just fine -- even more so if you'd explicitly casted `p` 
appropriately --, but `p` isn't a callable.


PS: BTW, GitHub highlighting is confused by function pointer type apparently, 
and highlights `void` as a function call.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1231#issuecomment-247288471

Reply via email to