OSDN Git Service

PR c++/52906
[pf3gnuchains/gcc-fork.git] / gcc / cp / decl.c
index 0955a2d..1cf78b0 100644 (file)
@@ -4216,7 +4216,7 @@ check_tag_decl (cp_decl_specifier_seq *declspecs)
         error ("%<constexpr%> cannot be used for type declarations");
     }
 
-  if (declspecs->attributes)
+  if (declspecs->attributes && declared_type)
     {
       location_t loc = input_location;
       if (!CLASS_TYPE_P (declared_type)