This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]