From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,f41356e9fe2c1114,start X-Google-Attributes: gid1164f8,public From: lasgoutt@fantomas.inria.fr (Jean-Marc Lasgouttes) Subject: Possible bug in cxx 6.00-010 Date: 1998/09/11 Message-ID: <6tatao$3mb@news-rocq.inria.fr>#1/1 X-Deja-AN: 390054315 Content-Transfer-Encoding: 8bit Organization: I.N.R.I.A Rocquencourt Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 Newsgroups: comp.sys.dec 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