public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: pfeifer@dbai.tuwien.ac.at (Gerald Pfeifer) To: gcc-gnats@gcc.gnu.org Subject: c++/9801: [3.4 regression] new parser: confusing error message for missing typename Date: Sat, 22 Feb 2003 08:26:00 -0000 [thread overview] Message-ID: <200302220824.h1M8OQp6038541@acrux.dbai.tuwien.ac.at> (raw) >Number: 9801 >Category: c++ >Synopsis: [3.4 regression] new parser: confusing error message for missing typename >Confidential: no >Severity: non-critical >Priority: high >Responsible: unassigned >State: open >Class: change-request >Submitter-Id: net >Arrival-Date: Sat Feb 22 08:26:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: >Release: 3.4 20030221 (experimental) >Organization: >Environment: System: FreeBSD acrux.dbai.tuwien.ac.at 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Thu Jan 9 09:25:29 CET 2003 root@aludra.dbai.tuwien.ac.at:/usr/src/sys/compile/DBAI-MP i386 host: i386-unknown-freebsd4.7 build: i386-unknown-freebsd4.7 target: i386-unknown-freebsd4.7 configured with: /sw/test/gcc/cvs/configure --prefix=/sw/gcc-current --enable-languages=c,c++ --disable-checking >Description: Given the following program (which lacks typename in line 12) #include <vector> using namespace std; template <class T> class TCONJUNCTION { typedef int iterator; public: void get() { for( /*typename*/ TCONJUNCTION<T>::iterator i = 1; // line 12 i != 10; i++ ) { } } }; the new parser issues the following hard error: x.cc: In member function `void TCONJUNCTION<T>::get()': x.cc:12: error: expected `;' x.cc:13: error: `i' has not been declared x.cc:14: error: `i' has not been declared This is correct per se, but confusing for the average user, especially as previous versions of GCC did _not_ issue the "implicit typename" warning, or any warning for that matter, even with -ansi -pedantic -W -Wall. >How-To-Repeat: Save program as x.cc and `g++ x.cc`. >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2003-02-22 8:26 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-02-22 8:26 Gerald Pfeifer [this message] 2003-02-22 8:30 gerald 2003-05-05 0:02 c++/9801: [3.4 regression][New parser] Confusing " giovannibajo
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=200302220824.h1M8OQp6038541@acrux.dbai.tuwien.ac.at \ --to=pfeifer@dbai.tuwien.ac.at \ --cc=gcc-gnats@gcc.gnu.org \ /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).