public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30863] New: Unsigned templatized struct treated as unsigned int
@ 2007-02-19 20:25 stonebone at planetunreal dot com
2007-02-19 20:39 ` [Bug c++/30863] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: stonebone at planetunreal dot com @ 2007-02-19 20:25 UTC (permalink / raw)
To: gcc-bugs
test.cc:
#include <stdio.h>
template<typename T>
struct s {
s() {
printf("Print me, please!\n");
}
};
int main(){
s<int> x;
unsigned s<int> y;
}
% g++ -Wall test.cc -o test &&./test
test.cc: In function 'int main()':
test.cc:12: warning: unused variable 'y'
Print me, please!
First of all, I find it surprising that this even compiles. Secondly, the
"unsigned s<int>" is treated as "unsigned int" (note that "Print me, please!"
is only printed once).
--
Summary: Unsigned templatized struct treated as unsigned int
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: stonebone at planetunreal dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30863
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/30863] [4.1/4.2/4.3 Regression] Unsigned templatized struct treated as unsigned int
2007-02-19 20:25 [Bug c++/30863] New: Unsigned templatized struct treated as unsigned int stonebone at planetunreal dot com
@ 2007-02-19 20:39 ` pinskia at gcc dot gnu dot org
2007-03-05 3:59 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-19 20:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-02-19 20:39 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |accepts-invalid
Known to fail| |4.0.0 4.1.2 4.2.0
Known to work| |3.4.0
Last reconfirmed|0000-00-00 00:00:00 |2007-02-19 20:39:08
date| |
Summary|Unsigned templatized struct |[4.1/4.2/4.3 Regression]
|treated as unsigned int |Unsigned templatized struct
| |treated as unsigned int
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30863
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/30863] [4.1/4.2/4.3 Regression] Unsigned templatized struct treated as unsigned int
2007-02-19 20:25 [Bug c++/30863] New: Unsigned templatized struct treated as unsigned int stonebone at planetunreal dot com
2007-02-19 20:39 ` [Bug c++/30863] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-03-05 3:59 ` mmitchel at gcc dot gnu dot org
2007-03-23 1:08 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-03-05 3:59 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30863
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/30863] [4.1/4.2/4.3 Regression] Unsigned templatized struct treated as unsigned int
2007-02-19 20:25 [Bug c++/30863] New: Unsigned templatized struct treated as unsigned int stonebone at planetunreal dot com
2007-02-19 20:39 ` [Bug c++/30863] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2007-03-05 3:59 ` mmitchel at gcc dot gnu dot org
@ 2007-03-23 1:08 ` mmitchel at gcc dot gnu dot org
2007-03-23 4:37 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-03-23 1:08 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
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=30863
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/30863] [4.1/4.2/4.3 Regression] Unsigned templatized struct treated as unsigned int
2007-02-19 20:25 [Bug c++/30863] New: Unsigned templatized struct treated as unsigned int stonebone at planetunreal dot com
` (2 preceding siblings ...)
2007-03-23 1:08 ` mmitchel at gcc dot gnu dot org
@ 2007-03-23 4:37 ` mmitchel at gcc dot gnu dot org
2007-03-23 4:38 ` [Bug c++/30863] [4.1 " mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-03-23 4:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from mmitchel at gcc dot gnu dot org 2007-03-23 04:36 -------
Subject: Bug 30863
Author: mmitchel
Date: Fri Mar 23 04:36:33 2007
New Revision: 123151
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123151
Log:
PR c++/30863
* parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
not consume tokens when failing.
PR c++/30863
* g++.dg/template/error24.C: New test.
* g++.dg/parse/tmpl-outside1.C: Tweak error markers.
Added:
branches/gcc-4_2-branch/gcc/testsuite/g++.dg/template/error24.C
Modified:
branches/gcc-4_2-branch/gcc/cp/ChangeLog
branches/gcc-4_2-branch/gcc/cp/parser.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
branches/gcc-4_2-branch/gcc/testsuite/g++.dg/parse/tmpl-outside1.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30863
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/30863] [4.1 Regression] Unsigned templatized struct treated as unsigned int
2007-02-19 20:25 [Bug c++/30863] New: Unsigned templatized struct treated as unsigned int stonebone at planetunreal dot com
` (3 preceding siblings ...)
2007-03-23 4:37 ` mmitchel at gcc dot gnu dot org
@ 2007-03-23 4:38 ` mmitchel at gcc dot gnu dot org
2007-03-23 4:38 ` [Bug c++/30863] [4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
2008-07-04 16:01 ` [Bug c++/30863] [4.1 " jsm28 at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-03-23 4:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mmitchel at gcc dot gnu dot org 2007-03-23 04:37 -------
Fixed in 4.2.0, 4.3.0.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.1/4.2/4.3 Regression] |[4.1 Regression] Unsigned
|Unsigned templatized struct |templatized struct treated
|treated as unsigned int |as unsigned int
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30863
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/30863] [4.1/4.2/4.3 Regression] Unsigned templatized struct treated as unsigned int
2007-02-19 20:25 [Bug c++/30863] New: Unsigned templatized struct treated as unsigned int stonebone at planetunreal dot com
` (4 preceding siblings ...)
2007-03-23 4:38 ` [Bug c++/30863] [4.1 " mmitchel at gcc dot gnu dot org
@ 2007-03-23 4:38 ` mmitchel at gcc dot gnu dot org
2008-07-04 16:01 ` [Bug c++/30863] [4.1 " jsm28 at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-03-23 4:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mmitchel at gcc dot gnu dot org 2007-03-23 04:37 -------
Subject: Bug 30863
Author: mmitchel
Date: Fri Mar 23 04:37:40 2007
New Revision: 123152
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123152
Log:
PR c++/30863
* parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
not consume tokens when failing.
PR c++/30863
* g++.dg/template/error24.C: New test.
* g++.dg/parse/tmpl-outside1.C: Tweak error markers.
Added:
trunk/gcc/testsuite/g++.dg/template/error24.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/parse/tmpl-outside1.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30863
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/30863] [4.1 Regression] Unsigned templatized struct treated as unsigned int
2007-02-19 20:25 [Bug c++/30863] New: Unsigned templatized struct treated as unsigned int stonebone at planetunreal dot com
` (5 preceding siblings ...)
2007-03-23 4:38 ` [Bug c++/30863] [4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
@ 2008-07-04 16:01 ` jsm28 at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 16:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jsm28 at gcc dot gnu dot org 2008-07-04 16:00 -------
Closing 4.1 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail|4.0.0 4.1.2 4.2.0 |4.0.0 4.1.2 4.1.3
Known to work|3.4.0 |3.4.0 4.2.0 4.3.0
Resolution| |FIXED
Target Milestone|4.1.3 |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30863
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-07-04 16:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-19 20:25 [Bug c++/30863] New: Unsigned templatized struct treated as unsigned int stonebone at planetunreal dot com
2007-02-19 20:39 ` [Bug c++/30863] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2007-03-05 3:59 ` mmitchel at gcc dot gnu dot org
2007-03-23 1:08 ` mmitchel at gcc dot gnu dot org
2007-03-23 4:37 ` mmitchel at gcc dot gnu dot org
2007-03-23 4:38 ` [Bug c++/30863] [4.1 " mmitchel at gcc dot gnu dot org
2007-03-23 4:38 ` [Bug c++/30863] [4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
2008-07-04 16:01 ` [Bug c++/30863] [4.1 " jsm28 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).