public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31923]  New: g++ accepts a storage-class-specifier on a template explicit specialization
@ 2007-05-14 19:47 simon_baldwin at yahoo dot com
  2007-05-29 22:54 ` [Bug c++/31923] " patchapp at dberlin dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: simon_baldwin at yahoo dot com @ 2007-05-14 19:47 UTC (permalink / raw)
  To: gcc-bugs

The following test program compiles without error or warning on g++ (versions
2.95.3, 3.4.5, 4.0.2, 4.1.0, 4.1.1, and 4.3-20070323):

template<class T>
static void F();

template<>
static void F<int>();  // Explicit specialization with storage class specifier

The C++ standard seems to disallow this.  From 7.1.1 - Storage class specifiers
[dcl.stc], para 1:

...  A storage-class-specifier shall not be specified in an explicit
specialization (temp.expl.spec) or an explicit instantiation (temp.explicit)
directive.

I couldn't find an existing report of this, but may well have missed one.


-- 
           Summary: g++ accepts a storage-class-specifier on a template
                    explicit specialization
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: simon_baldwin at yahoo dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31923


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-05-22 23:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-14 19:47 [Bug c++/31923] New: g++ accepts a storage-class-specifier on a template explicit specialization simon_baldwin at yahoo dot com
2007-05-29 22:54 ` [Bug c++/31923] " patchapp at dberlin dot org
2007-06-14 21:29 ` simon_baldwin at yahoo dot com
2007-06-18 22:09 ` simonb at gcc dot gnu dot org
2007-06-23 19:52 ` mmitchel at gcc dot gnu dot org
2007-06-25 17:24 ` simon_baldwin at yahoo dot com
2008-05-22 23:01 ` 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).