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]

Was I sleeping when 'and' became a c++ keyword?



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]