typedef bug in egcs 1.1.2 on Solaris 7.0

Alexandre Oliva oliva@dcc.unicamp.br
Thu Apr 29 05:40:00 GMT 1999


On Apr 29, 1999, Johannes Behr <jbehr@igd.fhg.de> wrote:

> So it seams to be an new _feature_ of 1.1.2.

Indeed.  If you compile with -pedantic, you're asking g++ to be picky
about the C++ Standard.  You'll notice that, without -pedantic, it
will only complain because intA.begin() is not defined (rename
valueBegin to begin and it will compile).

The C++ Standard requires qualified template-dependent names to be
preceded by the `typename' keyword, otherwise must be considered
non-type names.  g++ is smart enough to find out what you mean even
when you don't comply with the Standard, but if you ask it to be
picky, it will be.

Mumit has already told you where you're supposed to insert `typename'
in order for your code to be real C++, I'm not going to repeat it.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists



More information about the Gcc-bugs mailing list