public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Newbie: C++ Frontend Lexical Analysis Issue, <::abs(n) does not parse
@ 2004-03-27 15:20 Thierry Moreau
  2004-03-27 17:53 ` Alexandre Oliva
  2004-03-27 23:35 ` Zack Weinberg
  0 siblings, 2 replies; 5+ messages in thread
From: Thierry Moreau @ 2004-03-27 15:20 UTC (permalink / raw)
  To: gcc-bugs

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-03-29 16:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-27 15:20 Newbie: C++ Frontend Lexical Analysis Issue, <::abs(n) does not parse Thierry Moreau
2004-03-27 17:53 ` Alexandre Oliva
2004-03-27 23:35 ` Zack Weinberg
2004-03-29 15:58   ` Thierry Moreau
2004-03-29 16:49     ` Zack Weinberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).