odd use of preprocessor

Michel Fortin michel.fortin at michelf.com
Sun Nov 6 14:44:07 PST 2011


On 2011-11-06 19:43:15 +0000, Ellery Newcomer 
<ellery-newcomer at utulsa.edu> said:

> /* Error values.  */
> enum
>   {
>     DW_TAG_invalid = 0
> #define DW_TAG_invalid  DW_TAG_invalid
>   };

It's strange all right. The only reason I can come with is that they 
want to prevent someone else from defining DW_TAG_invalid as a 
preprocessor value that would shadow the enum value.

Just ignore it, D has no preprocessor. :-)

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d-learn mailing list