public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51666] New: NSDMI parse fails for template'd intializer
@ 2011-12-23 14:25 miles at gnu dot org
2011-12-30 6:32 ` [Bug c++/51666] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: miles at gnu dot org @ 2011-12-23 14:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51666
Bug #: 51666
Summary: NSDMI parse fails for template'd intializer
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: miles@gnu.org
The following code:
template<typename T, typename U>
struct tuple
{
tuple(T, U) { }
};
struct Y
{
tuple<int, int> tt = tuple<int, int>{1, 2}; // *error*
};
Fails with a parse error in gcc 4.7 20111210:
$ g++-snapshot -c -std=c++11 nsdmi3.cc
nsdmi3.cc:9:36: error: expected unqualified-id before 'int'
nsdmi3.cc:9:31: error: wrong number of template arguments (1, should be 2)
nsdmi3.cc:2:9: error: provided for 'template<class T, class U> struct tuple'
$ g++-snapshot --version
g++ (Debian 20111210-1) 4.7.0 20111210 (experimental) [trunk revision
182188]
Thanks,
-miles
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/51666] NSDMI parse fails for template'd intializer
2011-12-23 14:25 [Bug c++/51666] New: NSDMI parse fails for template'd intializer miles at gnu dot org
@ 2011-12-30 6:32 ` pinskia at gcc dot gnu.org
2011-12-30 12:53 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-30 6:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51666
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu.org
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-30 06:30:47 UTC ---
I bet a beer this is related to PR 57 (one of the most duplicated bugs in
bugzilla). In fact the same work around fixes this testcase.
Jason can you comment if DR 325 applies to NSDMI and not just default
arguments?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/51666] NSDMI parse fails for template'd intializer
2011-12-23 14:25 [Bug c++/51666] New: NSDMI parse fails for template'd intializer miles at gnu dot org
2011-12-30 6:32 ` [Bug c++/51666] " pinskia at gcc dot gnu.org
@ 2011-12-30 12:53 ` redi at gcc dot gnu.org
2012-01-02 4:42 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2011-12-30 12:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51666
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-30 12:36:56 UTC ---
Ah yes, the latest note on DR 325 confirms the same issue exists with NSDMIs
http://open-std.org/JTC1/SC22/WG21/docs/cwg_active.html#325
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/51666] NSDMI parse fails for template'd intializer
2011-12-23 14:25 [Bug c++/51666] New: NSDMI parse fails for template'd intializer miles at gnu dot org
2011-12-30 6:32 ` [Bug c++/51666] " pinskia at gcc dot gnu.org
2011-12-30 12:53 ` redi at gcc dot gnu.org
@ 2012-01-02 4:42 ` jason at gcc dot gnu.org
2012-01-02 17:53 ` jason at gcc dot gnu.org
2012-01-03 16:41 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-02 4:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51666
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-01-02
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/51666] NSDMI parse fails for template'd intializer
2011-12-23 14:25 [Bug c++/51666] New: NSDMI parse fails for template'd intializer miles at gnu dot org
` (2 preceding siblings ...)
2012-01-02 4:42 ` jason at gcc dot gnu.org
@ 2012-01-02 17:53 ` jason at gcc dot gnu.org
2012-01-03 16:41 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-02 17:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51666
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-02 17:53:23 UTC ---
Author: jason
Date: Mon Jan 2 17:53:16 2012
New Revision: 182809
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182809
Log:
DR 325
PR c++/51666
* parser.c (cp_parser_cache_defarg): Split out...
(cp_parser_parameter_declaration): ...from here.
(cp_parser_save_nsdmi): Use it.
(cp_parser_cache_group): Remove CPP_COMMA support.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer5.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/51666] NSDMI parse fails for template'd intializer
2011-12-23 14:25 [Bug c++/51666] New: NSDMI parse fails for template'd intializer miles at gnu dot org
` (3 preceding siblings ...)
2012-01-02 17:53 ` jason at gcc dot gnu.org
@ 2012-01-03 16:41 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-01-03 16:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51666
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
CC|jason at gcc dot gnu.org |
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-03 16:40:24 UTC ---
I suppose this can be closed as fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-03 16:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-23 14:25 [Bug c++/51666] New: NSDMI parse fails for template'd intializer miles at gnu dot org
2011-12-30 6:32 ` [Bug c++/51666] " pinskia at gcc dot gnu.org
2011-12-30 12:53 ` redi at gcc dot gnu.org
2012-01-02 4:42 ` jason at gcc dot gnu.org
2012-01-02 17:53 ` jason at gcc dot gnu.org
2012-01-03 16:41 ` paolo.carlini at oracle dot com
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).