public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: Gabriel Dos Reis <Gabriel.Dos-Reis@dptmaths.ens-cachan.fr> To: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> Cc: Karl JH Millar <kmillar@mit.edu>, egcs-bugs@cygnus.com, Mark Mitchell <mark@markmitchell.com>, Jason Merrill <jason@cygnus.com> Subject: Re: Explict typename Date: Fri, 11 Dec 1998 05:11:00 -0000 [thread overview] Message-ID: <v8v90geu8zp.fsf@piano.dptmaths.ens-cachan.fr> (raw) In-Reply-To: <Pine.GSO.4.05.9812110010480.18351-100000@alphard.dbai.tuwien.ac.at> >>>>> Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> wrote: > On Thu, 10 Dec 1998, Karl JH Millar wrote: >> template<class T> >> void foo(T a) { >> Map<int, T>::iterator i; >> } >> >> gcc -c -v template.cc -pedantic >> >> I don't get the error compiling without -pedantic. > Your code is in error but this bug is only detected with -pedantic. > Correctly you should have written: typename Map<int, T>::iterator i. > To our C++ experts: This is reported over and over again, so I strongly > suggest that > o the implicit typename extension issues a warning whenever it comes > into play. I recall having made suggestions along these lines a long time ago but... > o a better error message is issued instead of "parse error" when > -pedantic is used. I agree. -- Gaby
prev parent reply other threads:[~1998-12-11 5:11 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 1998-12-10 12:43 Bug report Karl JH Millar 1998-12-10 15:55 ` Alexandre Oliva 1998-12-10 15:55 ` Explict typename Gerald Pfeifer 1998-12-11 5:11 ` Gabriel Dos Reis [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=v8v90geu8zp.fsf@piano.dptmaths.ens-cachan.fr \ --to=gabriel.dos-reis@dptmaths.ens-cachan.fr \ --cc=egcs-bugs@cygnus.com \ --cc=jason@cygnus.com \ --cc=kmillar@mit.edu \ --cc=mark@markmitchell.com \ --cc=pfeifer@dbai.tuwien.ac.at \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).