+2007-03-11 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/31038
+ * parser.c (cp_parser_postfix_expression): Disallow compound
+ literals in constant expressions.
+
+ PR c++/30328
+ * semantics.c (finish_typeof): Use unlowered_expr_type.
+
2007-03-10 Mark Mitchell <mark@codesourcery.com>
PR c++/30274
allowed in standard C++. */
if (pedantic)
pedwarn ("ISO C++ forbids compound-literals");
+ /* For simplicitly, we disallow compound literals in
+ constant-expressions for simpliicitly. We could
+ allow compound literals of integer type, whose
+ initializer was a constant, in constant
+ expressions. Permitting that usage, as a further
+ extension, would not change the meaning of any
+ currently accepted programs. (Of course, as
+ compound literals are not part of ISO C++, the
+ standard has nothing to say.) */
+ if (cp_parser_non_integral_constant_expression
+ (parser, "non-constant compound literals"))
+ {
+ postfix_expression = error_mark_node;
+ break;
+ }
/* Form the representation of the compound-literal. */
postfix_expression
= finish_compound_literal (type, initializer_list);
+2007-03-11 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/31038
+ * g++.dg/template/complit2.C: New test.
+
+ PR c++/30328
+ * g++.dg/ext/bitfield1.C: New test.
+
2007-03-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30883