public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/32056] New: Storage classes on template parameters
@ 2007-05-23 12:04 andrew dot stubbs at st dot com
2007-09-19 13:55 ` [Bug c++/32056] " pcarlini at suse dot de
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: andrew dot stubbs at st dot com @ 2007-05-23 12:04 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]
None of the following should be accepted.
template <auto int T> struct A {};
template <extern int T> struct B {};
template <static int T> struct C {};
template <register int T> struct D {};
template <mutable int T> struct E {};
The extern, static and mutable are rejected with this message:
t.cxx:2: error: storage class specifiers invalid in parameter declarations
t.cxx:2: error: storage class specified for parameter T
t.cxx:3: error: storage class specifiers invalid in parameter declarations
t.cxx:3: error: storage class specified for parameter T
t.cxx:5: error: non-member T cannot be declared mutable
But static and register have been accepted.
Clause 14.1/2 of the C++ standard says that storage classes should not be used
here.
--
Summary: Storage classes on template parameters
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andrew dot stubbs at st dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32056
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/32056] Storage classes on template parameters
2007-05-23 12:04 [Bug c++/32056] New: Storage classes on template parameters andrew dot stubbs at st dot com
@ 2007-09-19 13:55 ` pcarlini at suse dot de
2009-11-16 8:31 ` paolo at gcc dot gnu dot org
2009-11-16 8:33 ` paolo dot carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: pcarlini at suse dot de @ 2007-09-19 13:55 UTC (permalink / raw)
To: gcc-bugs
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pcarlini at suse dot de
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-09-19 13:54:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32056
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/32056] Storage classes on template parameters
2007-05-23 12:04 [Bug c++/32056] New: Storage classes on template parameters andrew dot stubbs at st dot com
2007-09-19 13:55 ` [Bug c++/32056] " pcarlini at suse dot de
@ 2009-11-16 8:31 ` paolo at gcc dot gnu dot org
2009-11-16 8:33 ` paolo dot carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo at gcc dot gnu dot org @ 2009-11-16 8:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from paolo at gcc dot gnu dot org 2009-11-16 08:31 -------
Subject: Bug 32056
Author: paolo
Date: Mon Nov 16 08:31:26 2009
New Revision: 154198
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154198
Log:
cp/
2009-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/32056
* decl.h (enum decl_context): Add TPARM enumerator.
* decl.c (grokdeclarator): Per 14.1/2, error out if a storage class
is specified in a template parameter declaration.
* parser.c (cp_parser_template_parameter): Call grokdeclarator with
TPARM as third argument.
testsuite/
2009-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/32056
* testsuite/g++.dg/template/error44.C: New.
Added:
trunk/gcc/testsuite/g++.dg/template/error44.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/decl.h
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32056
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/32056] Storage classes on template parameters
2007-05-23 12:04 [Bug c++/32056] New: Storage classes on template parameters andrew dot stubbs at st dot com
2007-09-19 13:55 ` [Bug c++/32056] " pcarlini at suse dot de
2009-11-16 8:31 ` paolo at gcc dot gnu dot org
@ 2009-11-16 8:33 ` paolo dot carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-11-16 8:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2009-11-16 08:33 -------
Fixed for 4.5.0.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32056
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-16 8:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-23 12:04 [Bug c++/32056] New: Storage classes on template parameters andrew dot stubbs at st dot com
2007-09-19 13:55 ` [Bug c++/32056] " pcarlini at suse dot de
2009-11-16 8:31 ` paolo at gcc dot gnu dot org
2009-11-16 8:33 ` paolo dot 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).