gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash ChangeLog server/types.h libbase/test_ogl...


From: Benjamin Wolsey
Subject: Re: [Gnash-commit] gnash ChangeLog server/types.h libbase/test_ogl...
Date: Thu, 05 Jun 2008 08:29:30 +0200

Am Donnerstag, den 05.06.2008, 09:18 +0800 schrieb zou lunkai: 
> >                * server/types.h: __TYPES_H__ is a likely candidate for a 
> > name
> >                  conflict (using a double underscore in an identifier is 
> > undefined
> >                  behaviour). Make macros into inlines for better compile 
> > time
> >                  checking, and so that the compiler (which knows best) can
> >                  decide what to do with them.
> 
> __TYPES_H__ is just a name for the preprocessor, isn't it?  Compiler
> shouldn't have a chance to meet this 'name'.
> 
> --zou

From the draft C++ standard: 

"Each name that contains a double underscore ("__") or begins with an
underscore followed by an uppercase letter (lex.key) is reserved to the
implementation for any use."

That includes preprocessor macros, as to define a macro with the same
name as a variable / class / function would change its meaning. More
likely in this case: standard header file header guards may only use
reserved names. If we use them too, we can't be sure whether Gnash will
work with all standard library implementations, or that it will continue
to work when a library implementation is changed.

-bwy

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


reply via email to

[Prev in Thread] Current Thread [Next in Thread]