Re: [AD] xor problem with Red Hat's 7.0 compiler and 3.9.33

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> The problem is that although gcc may have an extension to support this,
> it is not standard. In the book `The C++ Programming Language, 3rd
> Edition', Bjarne Stroustrup tells us, under a section entitled "C
> programs which are not C++", that any C programs using `xor' as a
> variable/type name are not valid C++.
> 
> The best solution would be renaming `xor' to `xor_val' or something
> similar.

However, the conflict only exists in the headers and since the
variable names aren't needed in the declaration of a function, simple
deleting the name would suffice as I suggested.

BTW, I'm still not sure that it isn't the compilers fault since the
declaration of the function is inside an extern "C" { }
construction. And the compiler Red Hat shipped with 7.0 isn't a proper
release but just a snapshot.

-- 
Ole Laursen 
http://sunsite.auc.dk/olau/



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/