Was I sleeping when 'and' became a c++ keyword?
Andrew Pinski
pinskia@physics.uc.edu
Sun Mar 3 08:19:00 GMT 2002
Yes you were asleep when `and', `or', and `xor' became c++ keywords.
Thanks,
Andrew Pinski
On Sunday, March 3, 2002, at 11:16 , linguist-gcc@rich-paul.net wrote:
>
> I just got a shiney new gcc-3.0.4 running ( on slackware, if
> anybody cares ) and it rejected by use of 'and' as a member
> function name.
>
> Upon investigation, I found that this program compiles in c++,
> but not in c:
>
>
> int main(int argc, char**argv) {
> 1 and 2;
> };
>
>
> another little test indicates that it is indeed performing a
> logical and, and that a logical 'or' works as (un)expected, as
> well.
>
> note that there are no include files that might be #defining
> something. I'll feel silly if this is a new feature of standard
> c++, but I would have thought I'd have heard, if so.
>
> What's the verdict?
>
> --
> Got freedom? Vote Libertarian: http://www.lp.org
>
>
More information about the Gcc
mailing list