This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15595] New: wierd compilation error
- From: "eranti at aol dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 May 2004 19:48:16 -0000
- Subject: [Bug c++/15595] New: wierd compilation error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
sample program
#include <string>
class strlessss {
public:
bool operator () (int _X, int _Y) const
{
return (_X < _Y);
}
};
Eranti1 (12:41 PM): and tried to compile it
Eranti1 (12:42 PM): this is the error i get
Eranti1 (12:42 PM): nibster:/tmp/ =) g++ -c -
I/h/nibster.nscp.aoltw.net/export/home/vijay/sam/thirdparty/boost/include/ t.cpp
t.cpp:4: error: parse error before numeric constant
t.cpp: In member function `bool strlessss::operator()(...) const':
t.cpp:6: error: `_Y' undeclared (first use this function)
t.cpp:6: error: (Each undeclared identifier is reported only once for each
function it appears in.)
nibster:/tmp/ =)
Eranti1 (12:42 PM): when i see preprocessor output with -E option, i am amazed
Eranti1 (12:42 PM): #
58 "/export/home/vijay/gcc33/usr/local/include/c++/3.3.2/string" 2 3
# 2 "t.cpp" 2
class strlessss {
public:
bool operator () (int 0x00000080, int _Y) const
{
return (0x00000080 < _Y);
}
};
nibster:/tmp/ =)
Eranti1 (12:42 PM): so, string.h is defining _X to numeric constant
i am using 3.3.2 gcc which is fairly new. I am going to change all references
to _X to _XX
--
Summary: wierd compilation error
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eranti at aol dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15595