On Fri, 6 Jul 2012, [email protected] wrote:
> > On 2012/07/06, at 19:04, Arie Middelkoop wrote: > > This is toplevel code, right? > > Yes, it is. > > > Then the #define and #undef are toplevel elements, but "FOO(i)" is not (it > > would require macro expansion). > > > I guess that "FOO(i) static long l;" is interpreted as some toplevel > > declaration of "l", where "FOO(i)" has become part of the declaration > > somehow. > > The parser also parses the following code without entering recovery mode. > > #define FOO(X) static int X; > #define BAR 1 > FOO(i) > > FOO is not expanded in this case. Hmm... FOO is never expanded. It probably just runs ito the end of the file and doesn't complain. If uses of FOO are posing a problem, you can add the following to your standard.h file: #define FOO(x) MACROSTATEMENT Then it will consider calls to FOO to be statements without expecting a ; Of course in your case you are at top level, so I am not completely sure it will work either... julia _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
