* Re: Possible bug in cxx 6.00-010
1998-09-11 4:00 Possible bug in cxx 6.00-010 Jean-Marc Lasgouttes
@ 1998-09-11 4:00 ` Ken Block USG
0 siblings, 0 replies; 2+ messages in thread
From: Ken Block USG @ 1998-09-11 4:00 UTC (permalink / raw)
To: Jean-Marc Lasgouttes
You have encountered a bug in the parser. It sees "foo <" and thinks it is at the beginning of a template.
This has been fixed in the v6.1 compiler which just went to manufacturing and should be available on 10/9/98.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Possible bug in cxx 6.00-010
@ 1998-09-11 4:00 Jean-Marc Lasgouttes
1998-09-11 4:00 ` Ken Block USG
0 siblings, 1 reply; 2+ messages in thread
From: Jean-Marc Lasgouttes @ 1998-09-11 4:00 UTC (permalink / 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-09-11 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-09-11 4:00 Possible bug in cxx 6.00-010 Jean-Marc Lasgouttes
1998-09-11 4:00 ` Ken Block USG
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox