public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18738] New: typename not allowed with non-dependent qualified name
@ 2004-11-30 13:45 belz at kolumbus dot fi
2004-11-30 14:04 ` [Bug c++/18738] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: belz at kolumbus dot fi @ 2004-11-30 13:45 UTC (permalink / raw)
To: gcc-bugs
namespace foo {
typedef int my_type;
}
template<typename T>
struct A {
typename foo::my_type bar();
};
$ g++ typename.cpp
typename.cpp:8: error: 'my_type' in namespace 'foo' does not name a type
with
$ g++ -v
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --enable-languages=c++,c --enable-
threads=posix
Thread model: posix
gcc version 4.0.0 20041130 (experimental)
The qualified name does not need to be dependent according to the std03 14.6/5.
This seems to be regression from the versions before new parser.
Mikael
--
Summary: typename not allowed with non-dependent qualified name
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: belz at kolumbus dot fi
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4/4.0 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
@ 2004-11-30 14:04 ` pinskia at gcc dot gnu dot org
2004-12-01 16:30 ` reichelt at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-30 14:04 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Summary|typename not allowed with |[3.4/4.0 Regression]
|non-dependent qualified name|typename not allowed with
| |non-dependent qualified name
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4/4.0 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
2004-11-30 14:04 ` [Bug c++/18738] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-12-01 16:30 ` reichelt at gcc dot gnu dot org
2004-12-14 19:52 ` mmitchel at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-12-01 16:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-12-01 16:30 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |monitored
Last reconfirmed|0000-00-00 00:00:00 |2004-12-01 16:30:03
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4/4.0 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
2004-11-30 14:04 ` [Bug c++/18738] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2004-12-01 16:30 ` reichelt at gcc dot gnu dot org
@ 2004-12-14 19:52 ` mmitchel at gcc dot gnu dot org
2004-12-15 0:43 ` cvs-commit at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-14 19:52 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4/4.0 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
` (2 preceding siblings ...)
2004-12-14 19:52 ` mmitchel at gcc dot gnu dot org
@ 2004-12-15 0:43 ` cvs-commit at gcc dot gnu dot org
2004-12-15 0:45 ` mmitchel at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-15 0:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-15 00:42 -------
Subject: Bug 18738
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-12-15 00:42:36
Modified files:
gcc/testsuite : ChangeLog
gcc/testsuite/g++.dg/parse: friend2.C
gcc/cp : ChangeLog decl.c parser.c
Added files:
gcc/testsuite/g++.dg/template: typename8.C
Log message:
PR c++/18738
* decl.c (make_typename_type): Do not handle namespace-scoped
names here.
(tag_name): Handle typename_type.
(check_elaborated_type_specifier): Handle typenames.
* parser.c (cp_parser_diagnose_invalid_type_name): Improve
comment.
(cp_parser_elaborated_type_specifier): Use
cp_parser_diagnose_invalid_type_name.
PR c++/18738
* g++.dg/template/typename8.C: New test.
* g++.dg/parse/friend2.C: Tweak error message.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4757&r2=1.4758
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/typename8.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/friend2.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4535&r2=1.4536
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1340&r2=1.1341
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.294&r2=1.295
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4/4.0 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
` (3 preceding siblings ...)
2004-12-15 0:43 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-15 0:45 ` mmitchel at gcc dot gnu dot org
2004-12-15 1:51 ` [Bug c++/18738] [3.4 " mmitchel at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-15 0:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-12-15 00:45 -------
Fixed in GCC 4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
` (4 preceding siblings ...)
2004-12-15 0:45 ` mmitchel at gcc dot gnu dot org
@ 2004-12-15 1:51 ` mmitchel at gcc dot gnu dot org
2005-01-30 15:07 ` nefercheprure at gmail dot com
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-15 1:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-12-15 01:50 -------
Reopening, just for 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
Summary|[3.4/4.0 Regression] |[3.4 Regression] typename
|typename not allowed with |not allowed with non-
|non-dependent qualified name|dependent qualified name
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
` (5 preceding siblings ...)
2004-12-15 1:51 ` [Bug c++/18738] [3.4 " mmitchel at gcc dot gnu dot org
@ 2005-01-30 15:07 ` nefercheprure at gmail dot com
2005-01-30 15:10 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: nefercheprure at gmail dot com @ 2005-01-30 15:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From nefercheprure at gmail dot com 2005-01-30 15:07 -------
This issue also affects template parameters: see also: 14.1/2, 14.6/5
namespace N { typedef int my_typedef }
template < typename N::my_typedef > class X {};
X<3> variable;
Neither the other comments nor the proposed solution mentions this situation.
Could you please check this against the proposed solution? In any case the test
could be added.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
` (6 preceding siblings ...)
2005-01-30 15:07 ` nefercheprure at gmail dot com
@ 2005-01-30 15:10 ` pinskia at gcc dot gnu dot org
2005-01-30 15:11 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-30 15:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-30 15:10 -------
(In reply to comment #5)
> This issue also affects template parameters: see also: 14.1/2, 14.6/5
>
> namespace N { typedef int my_typedef }
> template < typename N::my_typedef > class X {};
> X<3> variable;
>
> Neither the other comments nor the proposed solution mentions this situation.
> Could you please check this against the proposed solution? In any case the test
> could be added.
Yes the "proposed" (well it has been committed already on the mainline) works for this test.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
| |dot org
Status|REOPENED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
` (7 preceding siblings ...)
2005-01-30 15:10 ` pinskia at gcc dot gnu dot org
@ 2005-01-30 15:11 ` pinskia at gcc dot gnu dot org
2005-05-19 17:22 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-30 15:11 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
` (8 preceding siblings ...)
2005-01-30 15:11 ` pinskia at gcc dot gnu dot org
@ 2005-05-19 17:22 ` mmitchel at gcc dot gnu dot org
2005-09-06 10:41 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:22 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.4 |3.4.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
` (9 preceding siblings ...)
2005-05-19 17:22 ` mmitchel at gcc dot gnu dot org
@ 2005-09-06 10:41 ` reichelt at gcc dot gnu dot org
2005-09-06 15:26 ` cvs-commit at gcc dot gnu dot org
2005-09-06 15:27 ` reichelt at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-06 10:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-09-06 10:41 -------
Taking care of the backport to the 3.4 branch.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|mark at codesourcery dot com|reichelt at gcc dot gnu dot
| |org
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |09/msg00316.html
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
` (10 preceding siblings ...)
2005-09-06 10:41 ` reichelt at gcc dot gnu dot org
@ 2005-09-06 15:26 ` cvs-commit at gcc dot gnu dot org
2005-09-06 15:27 ` reichelt at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-06 15:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-06 15:25 -------
Subject: Bug 18738
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: reichelt@gcc.gnu.org 2005-09-06 15:25:13
Modified files:
gcc/cp : ChangeLog decl.c parser.c
gcc/testsuite : ChangeLog
gcc/testsuite/g++.dg/parse: friend2.C
Added files:
gcc/testsuite/g++.dg/template: typename8.C
Log message:
Backport:
2004-12-14 Mark Mitchell <mark@codesourcery.com>
PR c++/18738
* decl.c (make_typename_type): Do not handle namespace-scoped
names here.
(tag_name): Handle typename_type.
(check_elaborated_type_specifier): Handle typenames.
* parser.c (cp_parser_diagnose_invalid_type_name): Do not call
make_typename_type for namespace-scoped names here.
(cp_parser_elaborated_type_specifier): Use
cp_parser_diagnose_invalid_type_name.
* g++.dg/template/typename8.C: New test.
* g++.dg/parse/friend2.C: Tweak error message.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.239&r2=1.3892.2.240
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1174.2.39&r2=1.1174.2.40
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.157.2.61&r2=1.157.2.62
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.432&r2=1.3389.2.433
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/typename8.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.46.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/friend2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1&r2=1.1.28.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/18738] [3.4 Regression] typename not allowed with non-dependent qualified name
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
` (11 preceding siblings ...)
2005-09-06 15:26 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-06 15:27 ` reichelt at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-06 15:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-09-06 15:27 -------
Fixed also on the 3.4 branch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2005-09-06 15:27 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-30 13:45 [Bug c++/18738] New: typename not allowed with non-dependent qualified name belz at kolumbus dot fi
2004-11-30 14:04 ` [Bug c++/18738] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2004-12-01 16:30 ` reichelt at gcc dot gnu dot org
2004-12-14 19:52 ` mmitchel at gcc dot gnu dot org
2004-12-15 0:43 ` cvs-commit at gcc dot gnu dot org
2004-12-15 0:45 ` mmitchel at gcc dot gnu dot org
2004-12-15 1:51 ` [Bug c++/18738] [3.4 " mmitchel at gcc dot gnu dot org
2005-01-30 15:07 ` nefercheprure at gmail dot com
2005-01-30 15:10 ` pinskia at gcc dot gnu dot org
2005-01-30 15:11 ` pinskia at gcc dot gnu dot org
2005-05-19 17:22 ` mmitchel at gcc dot gnu dot org
2005-09-06 10:41 ` reichelt at gcc dot gnu dot org
2005-09-06 15:26 ` cvs-commit at gcc dot gnu dot org
2005-09-06 15:27 ` reichelt 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).