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 ]


In reply to Vincent Penquerc'h (Vincent Penquerc'h
<vincent@xxxxxxxxxx>):

[snip - using `xor' as variable name]
>gcc has a switch to stop considering those as keywords. i don't know if 
>they are standard, but if it is default gcc behavior, i guess they are. 
>can't tell you what the switch is, though, but I am pretty sure there is 
>one (if info wasn't lying :)) it might be worth adding that to Allegro's 
>configure script, since it can be automagically detected by it...

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.

Bye for now,
-- 
Laurence Withers, lwithers@xxxxxxxxxx
                http://www.lwithers.demon.co.uk/

Attachment: signature.asc
Description: PGP signature



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