This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR56480 aka DR374. Allow explicit specialization in enclosing namespace.


On 11/11/2014 03:06 PM, Markus Trippelsdorf wrote:
On 2014.11.11 at 13:39 -0500, Jason Merrill wrote:
On 11/11/2014 10:37 AM, Markus Trippelsdorf wrote:
On 2014.11.11 at 10:11 -0500, Jason Merrill wrote:
On 11/08/2014 06:57 AM, Markus Trippelsdorf wrote:
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit73.C
@@ -7,9 +7,9 @@
   // the template

   namespace N {
-  template <class T> class foo;	// { dg-error "" } referenced below
+  template <class T> class foo;	// { dg-error "" "" { target { ! c++11 } } } referenced below
   }

   using namespace N;

-template <> class foo<void>; // { dg-error "" } invalid specialization
+template <> class foo<void>; // { dg-error "" "" { target { ! c++11 } } } invalid specialization

This should still get an error in C++11 mode.

Both EGG and clang currently accept it.

EDG rejects it in strict mode.

They also reject g++.dg/template/spec36.C and
g++.old-deja/g++.pt/lookup10.C with "-strict-ansi -std=c++11".
Which is kind of ironical given that two of their employees worked on
the issue:

Yeah, sometimes implementation lags behind drafting... :)

In any case, I think the standard is clear that this should get an error, and the EDG and Clang implementers agree with me.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]