This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13637] New: "or" "xor" "and" identifiers like || ^ && macroses
- From: "linux4sin at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jan 2004 00:24:21 -0000
- Subject: [Bug c++/13637] New: "or" "xor" "and" identifiers like || ^ && macroses
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
class Reg{
public:
Reg(){};
Reg( const Reg& r ) {};
Reg& xor( const Reg &r ){return *this;};
};
int main(){
int and;
Reg r;
int a = 1 and 4;
return 0;
}
Reg& or(Reg& r){return r;};
[sin@localhost fire]$ g++ -o si si.cc
si.cc:5: syntax error before `^' token
si.cc:6: syntax error before `}' token
si.cc: In function `int main()':
si.cc:8: syntax error before `&&' token
si.cc: At global scope:
si.cc:13: syntax error before `||' token
Reading specs from /usr/lib/gcc-lib/i586-alt-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking --enable-long-long
--enable-__cxa_atexit --enable-languages=c,c++,f77,objc,java
--program-suffix=-3.2 --enable-objc-gc --with-system-zlib
--without-included-gettext --host=i586-alt-linux --build=i586-alt-linux
--target=i586-alt-linux
Thread model: posix
gcc version 3.2.3 (ALT Linux, build 3.2.3-alt2)
Linux 2.4.22-std-up-alt12 i686 GNU/Linux
So, I can reload operators, but can't functions
Is it normal?
--
Summary: "or" "xor" "and" identifiers like || ^ && macroses
Product: gcc
Version: 3.2.3
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: linux4sin at mail dot ru
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13637