Newbie: C++ Frontend Lexical Analysis Issue, <::abs(n) does not parse
Thierry Moreau
thierry.moreau@connotech.com
Sat Mar 27 15:20:00 GMT 2004
The following sample fails to compile by GCC, and I am surprised:
===========================
// sample.cpp
int abs(int x)
{ return (x>=0)?x:-x; }
class A {
protected:
int m,n;
public:
int g(void);
int h(void);
};
int A::g(void)
{ return ::abs(m) < ::abs(n); }
int A::h(void)
{ return ::abs(m)<::abs(n); } /* parse error here (!) */
===========================
Obviously, there is a simple work-around.
Please excuse my reluctance to file an official bug report in another problem reporting service.
Again and again, many many thanks to all those who brings the GCC technology to life!
--
- Thierry Moreau
CONNOTECH Experts-conseils inc.
9130 Place de Montgolfier
Montreal, Qc
H2M 2A1
Tel.: (514)385-5691
Fax: (514)385-5900
web site: http://www.connotech.com
e-mail: thierry.moreau@connotech.com
More information about the Gcc-bugs
mailing list