------- Comment #2 from pinskia at gmail dot com 2010-03-13 03:59 ------- Subject: Re: New: keyword 'and' defined when even in the absence of iso646
Sent from my iPhone On Mar 12, 2010, at 7:54 PM, "mdjones0978-gcc at yahoo dot com" <gcc-bugzi...@gcc.gnu.org > wrote: > ========= test.cpp ========== > #include <string> > > std::string and(" AND "); > > #ifdef and > #undef and > #endif > #define and > > ======== error msgs ============= > test.cpp:5:8: error: "and" cannot be used as a macro name as it is > an operator > in C++ > test.cpp:8:9: error: "and" cannot be used as a macro name as it is > an operator > in C++ > test.cpp:3: error: expected unqualified-id before â&&â token > > > Several comments along this theme. > http://stackoverflow.com/questions/2419805/when-did-and-become-an-operator-in-c > http://en.wikipedia.org/wiki/Iso646.h > C++ is not C. The C++ standard says these are keywords and not defines which is unlike the C standard. > > -- > Summary: keyword 'and' defined when even in the absence of > iso646 > Product: gcc > Version: 4.4.1 > Status: UNCONFIRMED > Severity: minor > Priority: P3 > Component: c++ > AssignedTo: unassigned at gcc dot gnu dot org > ReportedBy: mdjones0978-gcc at yahoo dot com > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43352 > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43352