+2006-12-07 Lee Millward <lee.millward@codesourcery.com>
+
+ PR c++/29980
+ * cp_parser_elaborated_type_specifier: Check
+ the return value of check_elaborated_type_specifier.
+
2006-12-06 Mark Mitchell <mark@codesourcery.com>
PR c++/29730
}
if (TREE_CODE (TREE_TYPE (decl)) != TYPENAME_TYPE)
- check_elaborated_type_specifier
- (tag_type, decl,
- (parser->num_template_parameter_lists
- || DECL_SELF_REFERENCE_P (decl)));
+ {
+ bool allow_template = (parser->num_template_parameter_lists
+ || DECL_SELF_REFERENCE_P (decl));
+ type = check_elaborated_type_specifier (tag_type, decl,
+ allow_template);
+
+ if (type == error_mark_node)
+ return error_mark_node;
+ }
type = TREE_TYPE (decl);
}
+2006-12-07 Lee Millward <lee.millward@codesourcery.com>
+
+ PR c++/29980
+ * g++.dg/ext/attrib27.C: New test.
+ * g++.dg/parse/struct-as-enum1.C: Adjust error markers.
+ * g++.dg/parse/typedef5.C: Likewise.
+
2006-12-07 Mike Stump <mrs@apple.com>
* treelang/compile/var_defs.tree: Adjust.
--- /dev/null
+//PR c++/29980
+
+struct A { typedef int X; }; // { dg-error "previous declaration" }
+
+struct __attribute__((unused)) A::X; // { dg-error "typedef-name" }
struct A {}; // { dg-error "previous declaration" }
}
-typedef enum N::A B; // { dg-error "enum" }
+typedef enum N::A B; // { dg-error "enum|invalid type" }
typedef int T; // { dg-error "previous declaration" }
}
-class A::T x; // { dg-error "using typedef-name" }
+class A::T x; // { dg-error "using typedef-name|invalid type" }