This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Was I sleeping when 'and' became a c++ keyword?
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: linguist-gcc at rich-paul dot net
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 3 Mar 2002 11:19:24 -0500
- Subject: Re: Was I sleeping when 'and' became a c++ keyword?
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
>
>