------- Comment #6 from raeburn at raeburn dot org 2009-07-03 20:06 ------- Subject: Re: not following "right-then-left" rule when compiling function pointers
On Jul 3, 2009, at 10:42, dj2con at gmail dot com wrote: > 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. I've seen it. What I haven't seen is the declaration you were trying to use, and that you were claiming was valid. > My experience on Windows is also weak. But I don't see what that > has to do > with the problem at hand. From your phrasing, I assumed that you had used the construct before, but it would've had to have been in an environment where extensions were added to the language and where I wouldn't have been familiar with them. Looking back, you described the rule as traditional and in long use, not the specific construct; my mistake. And, you appeared to be using cygwin in your preprocessed example; hence my (wrong) guess about Windows experience. > 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. I'd say the "right then left" rule is a guide to reading valid C declarations, more than constructing them. The standard tells you how you can construct valid C declarations. Ken -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40627