------- Comment #3 from dj2con at gmail dot com 2009-07-03 14:42 ------- (In reply to comment #1) > (In reply to comment #0) > > , but it does not seem to recognize that the following is also a valid > > prototype: > > > > int count * ( demo_counter * self, int count_amt ); > > It isn't. > > > 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... >
I don't know where you've been hiding for these past twenty years, Ken. But the "right left rule" has been around longer than you've been working (and longer than Microsoft has been in business!). I would take the time to explain it to you, but you can google the terms "right left rule" C as easily as I can. My experience on Windows is also weak. But I don't see what that has to do with the problem at hand. In another comment Richard Guenther also claimed it is not a valid prototype. Richard typically knows what he's talking about, so I'll take his word for it and assume that the "right left rule" does not apply for some reason in this particular case. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40627