This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: typedef bug in egcs 1.1.2 on Solaris 7.0
- To: Johannes Behr <jbehr at igd dot fhg dot de>
- Subject: Re: typedef bug in egcs 1.1.2 on Solaris 7.0
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 29 Apr 1999 09:40:09 -0300
- Cc: egcs-bugs at egcs dot cygnus dot com
- References: <Pine.SOL.3.94.990429142907.1366B-100000@brainbug>
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