[Bug c/40627] not following "right-then-left" rule when compiling function pointers
raeburn at raeburn dot org
Fri Jul 3 06:46:00 GMT 2009
------- Comment #1 from raeburn at raeburn dot org 2009-07-03 06:45 -------
(In reply to comment #0)
> , but it does not seem to recognize that the following is also a valid
> int count * ( demo_counter * self, int count_amt );
> Following the traditional "right-then-left" rule, BOTH of these should be
> parsed as: "count is a pointer to a function which accepts a demo_counter
> pointer and an int and returns an int.". But the second one results in a
> compilation error with gcc.
After more than 20 years working with C (and with the C language
specification), I've never seen this supposed "traditional" construct. My
experience on Windows is weak; maybe it's some strange Microsoft extension?
It's not part of the C language specification. If you believe otherwise,
please find a reference for it...
More information about the Gcc-bugs