public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29084] New: parser error, reject valid code.
@ 2006-09-14 13:32 pluto at agmk dot net
2006-09-14 13:49 ` [Bug c++/29084] " pluto at agmk dot net
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: pluto at agmk dot net @ 2006-09-14 13:32 UTC (permalink / raw)
To: gcc-bugs
#include <utility>
template < typename T > struct X { };
struct A
{
void f( X< std::pair< int, int > > v = X< std::pair< int, int > >() );
};
$ g++ tmp.cpp -Wall -c
tmp.cpp:5: error: expected ‘,’ or ‘...’ before
‘>’ token
tmp.cpp:5: error: wrong number of template arguments (1, should be 2)
/usr/include/c++/4.1.2/bits/stl_pair.h:68: error: provided for
‘template<class _T1, class _T2> struct std::pair’
tmp.cpp:5: error: template argument 1 is invalid
tmp.cpp:5: error: default argument missing for parameter 2 of ‘void
A::f(X<std::pair<int, int> >, int)’
online comeau compiler accepts this testcase.
--
Summary: parser error, reject valid code.
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC target triplet: *-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29084
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/29084] parser error, reject valid code.
2006-09-14 13:32 [Bug c++/29084] New: parser error, reject valid code pluto at agmk dot net
@ 2006-09-14 13:49 ` pluto at agmk dot net
2006-09-14 14:59 ` pinskia at gcc dot gnu dot org
2006-09-14 15:00 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pluto at agmk dot net @ 2006-09-14 13:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pluto at agmk dot net 2006-09-14 13:49 -------
reduced testcase:
template < typename T > struct X { };
template < typename T, typename U > struct Y { };
struct A
{
void f( X< Y< int, int > > v = X< Y< int, int > >() );
};
tmp.cpp:5: error: expected ‘,’ or ‘...’ before
‘>’ token
tmp.cpp:5: error: wrong number of template arguments (1, should be 2)
tmp.cpp:2: error: provided for ‘template<class T, class U> struct
Y’
tmp.cpp:5: error: template argument 1 is invalid
tmp.cpp:5: error: default argument missing for parameter 2 of ‘void
A::f(X<Y<int, int> >, int)’
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29084
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/29084] parser error, reject valid code.
2006-09-14 13:32 [Bug c++/29084] New: parser error, reject valid code pluto at agmk dot net
2006-09-14 13:49 ` [Bug c++/29084] " pluto at agmk dot net
@ 2006-09-14 14:59 ` pinskia at gcc dot gnu dot org
2006-09-14 15:00 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-14 14:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-09-14 14:59 -------
There is a Defect report about the comma in default arguments.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29084
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/29084] parser error, reject valid code.
2006-09-14 13:32 [Bug c++/29084] New: parser error, reject valid code pluto at agmk dot net
2006-09-14 13:49 ` [Bug c++/29084] " pluto at agmk dot net
2006-09-14 14:59 ` pinskia at gcc dot gnu dot org
@ 2006-09-14 15:00 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-14 15:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-09-14 15:00 -------
In fact this is a dup of bug 57 which is still SUSPENDED because the defect
report has not been resolved yet.
*** This bug has been marked as a duplicate of 57 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29084
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-09-14 15:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-14 13:32 [Bug c++/29084] New: parser error, reject valid code pluto at agmk dot net
2006-09-14 13:49 ` [Bug c++/29084] " pluto at agmk dot net
2006-09-14 14:59 ` pinskia at gcc dot gnu dot org
2006-09-14 15:00 ` pinskia 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).