From: lasgoutt@fantomas.inria.fr (Jean-Marc Lasgouttes)
Subject: Possible bug in cxx 6.00-010
Date: 1998/09/11 [thread overview]
Message-ID: <6tatao$3mb@news-rocq.inria.fr> (raw)
Hello,
I came over a problem with cxx which puzzles me a bit. Consider the
following C++ file:
-----bug2.C----------------------------------
struct Bar {
int foo;
};
template < class T > void foo(T t);
void baz () {
Bar bar;
bar.foo = 10;
if (bar.foo < 0)
bar.foo = -bar.foo;
}
---------------------------------------------
While gcc 2.7.2 accepts it without problem, cxx spits:
fantomas: cxx -c bug2.C
cxx: Error: bug2.C, line 10: expected a ">"
if (bar.foo < 0)
-----------------^
cxx: Error: bug2.C, line 10: explicit function template argument lists are not supported yet in expression
contexts
if (bar.foo < 0)
----------^
2 errors detected in the compilation of "bug2.C".
It seems that it mixes the template function foo() with the Bar struct
member foo. Is that a bug? Is there a workaround?
Any help appreciated.
JMarc
--
-------------------------------------------------
Jean-Marc Lasgouttes, Projet MEVAL, INRIA, France
e-mail : jean-marc.lasgouttes@inria.fr
next reply other threads:[~1998-09-11 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-11 4:00 Jean-Marc Lasgouttes [this message]
1998-09-11 4:00 ` Possible bug in cxx 6.00-010 Ken Block USG
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox