public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18140] New: C++ parser bug when using shr (>>) in templates
@ 2004-10-25 9:42 markus at oberhumer dot com
2004-10-25 11:31 ` [Bug c++/18140] [3.4/4.0 regression] C++ parser bug when using >> " bangerth at dealii dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: markus at oberhumer dot com @ 2004-10-25 9:42 UTC (permalink / raw)
To: gcc-bugs
gcc incorrectly rejects the following template code - seems to be a bug in the
new (gcc 3.4) C++ parser.
> g++-4.0 -Wall -W x.cpp
x.cpp:6: error: spurious '>>', use '>' to terminate a template argument list
x.cpp:6: error: expected primary-expression before "S"
x.cpp:6: error: expected %<;%> before "S"
template <int N> struct IntHolder {
static const int value = N;
};
template <int N, int S> struct ShrIntHolder {
static const int value = IntHolder< N>>S >::value;
};
--
Summary: C++ parser bug when using shr (>>) in templates
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: markus at oberhumer dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18140
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/18140] [3.4/4.0 regression] C++ parser bug when using >> in templates
2004-10-25 9:42 [Bug c++/18140] New: C++ parser bug when using shr (>>) in templates markus at oberhumer dot com
@ 2004-10-25 11:31 ` bangerth at dealii dot org
2004-10-25 11:45 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2004-10-25 11:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-10-25 11:31 -------
Confirmed, a regression in 3.4 and mainline.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Known to fail| |3.4.3 4.0.0
Known to work| |3.3.4
Summary|C++ parser bug when using |[3.4/4.0 regression] C++
|shr (>>) in templates |parser bug when using >> in
| |templates
Target Milestone|--- |3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18140
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/18140] [3.4/4.0 regression] C++ parser bug when using >> in templates
2004-10-25 9:42 [Bug c++/18140] New: C++ parser bug when using shr (>>) in templates markus at oberhumer dot com
2004-10-25 11:31 ` [Bug c++/18140] [3.4/4.0 regression] C++ parser bug when using >> " bangerth at dealii dot org
@ 2004-10-25 11:45 ` pinskia at gcc dot gnu dot org
2004-10-27 4:41 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-25 11:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-25 11:45 -------
Looks like caused by the new parser
: Search converges between 2003-12-18-trunk (#431) and 2003-12-24-trunk (#432).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-10-25 11:45:05
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18140
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/18140] [3.4/4.0 regression] C++ parser bug when using >> in templates
2004-10-25 9:42 [Bug c++/18140] New: C++ parser bug when using shr (>>) in templates markus at oberhumer dot com
2004-10-25 11:31 ` [Bug c++/18140] [3.4/4.0 regression] C++ parser bug when using >> " bangerth at dealii dot org
2004-10-25 11:45 ` pinskia at gcc dot gnu dot org
@ 2004-10-27 4:41 ` mmitchel at gcc dot gnu dot org
2004-10-28 5:17 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-10-27 4:41 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=18140
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/18140] [3.4/4.0 regression] C++ parser bug when using >> in templates
2004-10-25 9:42 [Bug c++/18140] New: C++ parser bug when using shr (>>) in templates markus at oberhumer dot com
` (2 preceding siblings ...)
2004-10-27 4:41 ` mmitchel at gcc dot gnu dot org
@ 2004-10-28 5:17 ` cvs-commit at gcc dot gnu dot org
2004-10-28 5:28 ` cvs-commit at gcc dot gnu dot org
2004-10-28 5:28 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-28 5:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-28 05:17 -------
Subject: Bug 18140
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-10-28 05:17:15
Modified files:
gcc/cp : ChangeLog parser.c call.c
gcc/testsuite : ChangeLog
gcc/testsuite/g++.dg/template: error10.C
Added files:
gcc/testsuite/g++.dg/template: shift1.C
gcc/testsuite/g++.dg/init: ref12.C
Log message:
PR c++/17435
* call.c (convert_like_real): Fix formatting.
(initialize_reference): When binding a temporary to a base class,
ensure that the nominal copy made is to the derived class, not the
base class.
PR c++/18140
* parser.c (cp_parser_next_token_ends_template_argument_p): Do not
include ">>".
PR c++/17435
* g++.dg/init/ref12.C: New test.
PR c++/18140
* g++.dg/template/shift1.C: New test.
* g++.dg/template/error10.C: Adjust error markers.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4458&r2=1.4459
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.272&r2=1.273
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.516&r2=1.517
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4508&r2=1.4509
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/shift1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/error10.C.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ref12.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18140
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/18140] [3.4/4.0 regression] C++ parser bug when using >> in templates
2004-10-25 9:42 [Bug c++/18140] New: C++ parser bug when using shr (>>) in templates markus at oberhumer dot com
` (3 preceding siblings ...)
2004-10-28 5:17 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-28 5:28 ` cvs-commit at gcc dot gnu dot org
2004-10-28 5:28 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-28 5:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-28 05:28 -------
Subject: Bug 18140
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: mmitchel@gcc.gnu.org 2004-10-28 05:28:24
Modified files:
gcc/cp : ChangeLog parser.c
gcc/testsuite : ChangeLog
gcc/testsuite/g++.dg/template: error10.C
Added files:
gcc/testsuite/g++.dg/template: shift1.C
Log message:
PR c++/18140
* parser.c (cp_parser_next_token_ends_template_argument_p): Do not
include ">>".
PR c++/18140
* g++.dg/template/shift1.C: New test.
* g++.dg/template/error10.C: Adjust error markers.
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.174&r2=1.3892.2.175
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.44&r2=1.157.2.45
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.298&r2=1.3389.2.299
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/shift1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/error10.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1&r2=1.1.10.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18140
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/18140] [3.4/4.0 regression] C++ parser bug when using >> in templates
2004-10-25 9:42 [Bug c++/18140] New: C++ parser bug when using shr (>>) in templates markus at oberhumer dot com
` (4 preceding siblings ...)
2004-10-28 5:28 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-28 5:28 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-10-28 5:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-10-28 05:28 -------
Fixed in GCC 3.4.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18140
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-10-28 5:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-25 9:42 [Bug c++/18140] New: C++ parser bug when using shr (>>) in templates markus at oberhumer dot com
2004-10-25 11:31 ` [Bug c++/18140] [3.4/4.0 regression] C++ parser bug when using >> " bangerth at dealii dot org
2004-10-25 11:45 ` pinskia at gcc dot gnu dot org
2004-10-27 4:41 ` mmitchel at gcc dot gnu dot org
2004-10-28 5:17 ` cvs-commit at gcc dot gnu dot org
2004-10-28 5:28 ` cvs-commit at gcc dot gnu dot org
2004-10-28 5:28 ` mmitchel 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).