PR c++/12989
* typeck.c (cxx_sizeof_or_alignof_expr): Robustify.
PR c++/12989
* g++.dg/expr/sizeof1.C: New test.
From-SVN: r74660
2003-12-15 Mark Mitchell <mark@codesourcery.com>
+ PR c++/12989
+ * typeck.c (cxx_sizeof_or_alignof_expr): Robustify.
+
PR c++/13310
* pt.c (dependent_template_p): Handle OVERLOADs.
}
if (TREE_CODE (e) == COMPONENT_REF
+ && TREE_CODE (TREE_OPERAND (e, 1)) == FIELD_DECL
&& DECL_C_BIT_FIELD (TREE_OPERAND (e, 1)))
{
error ("invalid application of `%s' to a bit-field", op_name);
2003-12-15 Mark Mitchell <mark@codesourcery.com>
+ PR c++/12989
+ * g++.dg/expr/sizeof1.C: New test.
+
PR c++/13310
* g++.dg/template/crash15.C: New test.
--- /dev/null
+// PR c++/12989
+
+struct A
+{
+ int foo() { return sizeof(bar); } // { dg-error "" }
+ int bar();
+};