Re: [AD] Proposed END_OF_MAIN documentation.

[ Thread Index | Date Index | More Archives ]

> AFAIK, the docs don't actually say whether the semicolon should be
> included. I always put it in, on this and other macros, because it looks
> more consistent with function calls. The compiler certainly accepts it.

Yes, but END_OF_* macros are special since they are outside any function. 
It seems that all compilers accept it in default mode, but gcc does reject it 
with -ansi -pedantic as being non ISO C compliant:

gfxmode.c:19: warning: ISO C does not allow extra `;' outside of a function

> Note also the following quote from the docs:
>       void my_timer_handler()
>       {
>          counter++;
>       }
>       END_OF_FUNCTION(my_timer_handler);
> I agree it would be a good idea to document whether one should put a
> semicolon after these macros, to encourage consistency if nothing else.

Yes, ideally we should remove all these trailing semi-colons from the docs.

Eric Botcazou

Mail converted by MHonArc 2.6.19+