public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/15946] New: Unhelpful error message when "typename" is omitted @ 2004-06-11 17:17 pkoning at equallogic dot com 2004-06-11 17:26 ` [Bug c++/15946] " pinskia at gcc dot gnu dot org 2004-11-12 14:12 ` pinskia at gcc dot gnu dot org 0 siblings, 2 replies; 10+ messages in thread From: pkoning at equallogic dot com @ 2004-06-11 17:17 UTC (permalink / raw) To: gcc-bugs Consider this test case: template <class T> class Foo { public: typedef T bar; int x; T z; }; template <class T> class Test: public Foo<T> { public: typedef T * t2; typedef Foo<T> F; t2 t; F f; typename F::bar b; typename Foo<T>::bar b2; F::bar b3; Foo<T>::bar b4; }; Test<int> T2; GCC 3.3.3 complains about the declarations of b3 and b4, saying that it's an implicit typename and that's deprecated. GCC 3.4.0 rejects the code outright. Given that it's the next version, and it was deprecated, that's ok. What's not ok is the error message: foo.cc:18: error: expected `;' before "b3" foo.cc:19: error: expected `;' before "b4" This gives no clue at all about what the problem is or how to correct it. -- Summary: Unhelpful error message when "typename" is omitted Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pkoning at equallogic dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i386-unknown-netbsdelf1.6.2 GCC host triplet: i386-unknown-netbsdelf1.6.2 GCC target triplet: i386-unknown-netbsdelf1.6.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15946 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/15946] Unhelpful error message when "typename" is omitted 2004-06-11 17:17 [Bug c++/15946] New: Unhelpful error message when "typename" is omitted pkoning at equallogic dot com @ 2004-06-11 17:26 ` pinskia at gcc dot gnu dot org 2004-11-12 14:12 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 10+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-06-11 17:26 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-11 17:26 ------- Confirmed. -- What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Status|UNCONFIRMED |NEW Ever Confirmed| |1 Keywords| |diagnostic Last reconfirmed|0000-00-00 00:00:00 |2004-06-11 17:26:40 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15946 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/15946] Unhelpful error message when "typename" is omitted 2004-06-11 17:17 [Bug c++/15946] New: Unhelpful error message when "typename" is omitted pkoning at equallogic dot com 2004-06-11 17:26 ` [Bug c++/15946] " pinskia at gcc dot gnu dot org @ 2004-11-12 14:12 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 10+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-11-12 14:12 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-12 14:11 ------- *** Bug 18451 has been marked as a duplicate of this bug. *** -- What |Removed |Added ---------------------------------------------------------------------------- CC| |sschunck at pdf dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15946 ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <bug-15946-8722@http.gcc.gnu.org/bugzilla/>]
* [Bug c++/15946] Unhelpful error message when "typename" is omitted [not found] <bug-15946-8722@http.gcc.gnu.org/bugzilla/> @ 2008-05-28 8:01 ` pinskia at gcc dot gnu dot org 2009-10-14 4:08 ` pinskia at gcc dot gnu dot org ` (5 subsequent siblings) 6 siblings, 0 replies; 10+ messages in thread From: pinskia at gcc dot gnu dot org @ 2008-05-28 8:01 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from pinskia at gcc dot gnu dot org 2008-05-28 08:00 ------- *** Bug 36353 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wim dot yedema at gmail dot | |com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15946 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/15946] Unhelpful error message when "typename" is omitted [not found] <bug-15946-8722@http.gcc.gnu.org/bugzilla/> 2008-05-28 8:01 ` pinskia at gcc dot gnu dot org @ 2009-10-14 4:08 ` pinskia at gcc dot gnu dot org 2009-11-06 21:19 ` jason at gcc dot gnu dot org ` (4 subsequent siblings) 6 siblings, 0 replies; 10+ messages in thread From: pinskia at gcc dot gnu dot org @ 2009-10-14 4:08 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from pinskia at gcc dot gnu dot org 2009-10-14 04:08 ------- *** Bug 40738 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bkoz at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15946 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/15946] Unhelpful error message when "typename" is omitted [not found] <bug-15946-8722@http.gcc.gnu.org/bugzilla/> 2008-05-28 8:01 ` pinskia at gcc dot gnu dot org 2009-10-14 4:08 ` pinskia at gcc dot gnu dot org @ 2009-11-06 21:19 ` jason at gcc dot gnu dot org 2009-11-08 3:10 ` jason at gcc dot gnu dot org ` (3 subsequent siblings) 6 siblings, 0 replies; 10+ messages in thread From: jason at gcc dot gnu dot org @ 2009-11-06 21:19 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from jason at gcc dot gnu dot org 2009-11-06 21:18 ------- Subject: Bug 15946 Author: jason Date: Fri Nov 6 21:18:42 2009 New Revision: 153978 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153978 Log: PR c++/15946 * parser.c (cp_parser_check_template_parameters): Don't talk about specialization at function scope. (cp_parser_diagnose_invalid_type_name): Handle dependent scope. (cp_parser_parse_and_diagnose_invalid_type_name): Likewise. (cp_parser_expression_statement): Suggest typename. * error.c (dump_decl) [SCOPE_REF]: Print the type here. (dump_expr) [SCOPE_REF]: Call it. (dump_type) [UNBOUND_CLASS_TEMPLATE]: Check TFF_UNQUALIFIED_NAME. * cxx-pretty-print.c (pp_cxx_unqualified_id): Print class template args. Added: trunk/gcc/testsuite/g++.dg/parse/error36.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cxx-pretty-print.c trunk/gcc/cp/error.c trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/template/error26.C trunk/gcc/testsuite/g++.old-deja/g++.other/typename1.C -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15946 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/15946] Unhelpful error message when "typename" is omitted [not found] <bug-15946-8722@http.gcc.gnu.org/bugzilla/> ` (2 preceding siblings ...) 2009-11-06 21:19 ` jason at gcc dot gnu dot org @ 2009-11-08 3:10 ` jason at gcc dot gnu dot org 2009-11-08 4:02 ` jason at gcc dot gnu dot org ` (2 subsequent siblings) 6 siblings, 0 replies; 10+ messages in thread From: jason at gcc dot gnu dot org @ 2009-11-08 3:10 UTC (permalink / raw) To: gcc-bugs ------- Comment #6 from jason at gcc dot gnu dot org 2009-11-08 03:10 ------- *** Bug 35228 has been marked as a duplicate of this bug. *** -- jason at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |igodard at pacbell dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15946 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/15946] Unhelpful error message when "typename" is omitted [not found] <bug-15946-8722@http.gcc.gnu.org/bugzilla/> ` (3 preceding siblings ...) 2009-11-08 3:10 ` jason at gcc dot gnu dot org @ 2009-11-08 4:02 ` jason at gcc dot gnu dot org 2009-11-08 4:03 ` jason at gcc dot gnu dot org 2009-11-08 4:03 ` jason at gcc dot gnu dot org 6 siblings, 0 replies; 10+ messages in thread From: jason at gcc dot gnu dot org @ 2009-11-08 4:02 UTC (permalink / raw) To: gcc-bugs ------- Comment #7 from jason at gcc dot gnu dot org 2009-11-08 04:02 ------- *** Bug 15179 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15946 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/15946] Unhelpful error message when "typename" is omitted [not found] <bug-15946-8722@http.gcc.gnu.org/bugzilla/> ` (4 preceding siblings ...) 2009-11-08 4:02 ` jason at gcc dot gnu dot org @ 2009-11-08 4:03 ` jason at gcc dot gnu dot org 2009-11-08 4:03 ` jason at gcc dot gnu dot org 6 siblings, 0 replies; 10+ messages in thread From: jason at gcc dot gnu dot org @ 2009-11-08 4:03 UTC (permalink / raw) To: gcc-bugs ------- Comment #8 from jason at gcc dot gnu dot org 2009-11-08 04:03 ------- Fixed for 4.5. -- jason at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15946 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/15946] Unhelpful error message when "typename" is omitted [not found] <bug-15946-8722@http.gcc.gnu.org/bugzilla/> ` (5 preceding siblings ...) 2009-11-08 4:03 ` jason at gcc dot gnu dot org @ 2009-11-08 4:03 ` jason at gcc dot gnu dot org 6 siblings, 0 replies; 10+ messages in thread From: jason at gcc dot gnu dot org @ 2009-11-08 4:03 UTC (permalink / raw) To: gcc-bugs -- jason at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2005-05-16 02:29:27 |2009-11-08 04:03:24 date| | Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15946 ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-11-08 4:03 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-06-11 17:17 [Bug c++/15946] New: Unhelpful error message when "typename" is omitted pkoning at equallogic dot com 2004-06-11 17:26 ` [Bug c++/15946] " pinskia at gcc dot gnu dot org 2004-11-12 14:12 ` pinskia at gcc dot gnu dot org [not found] <bug-15946-8722@http.gcc.gnu.org/bugzilla/> 2008-05-28 8:01 ` pinskia at gcc dot gnu dot org 2009-10-14 4:08 ` pinskia at gcc dot gnu dot org 2009-11-06 21:19 ` jason at gcc dot gnu dot org 2009-11-08 3:10 ` jason at gcc dot gnu dot org 2009-11-08 4:02 ` jason at gcc dot gnu dot org 2009-11-08 4:03 ` jason at gcc dot gnu dot org 2009-11-08 4:03 ` jason at gcc dot gnu dot org
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).