This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: typedef bug in egcs 1.1.2 on Solaris 7.0


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]