* c-typeck.c (c_expr_sizeof_type): Handle invalid types.
* gcc.dg/sizeof-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114234
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-05-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c/27718
+ * c-typeck.c (c_expr_sizeof_type): Handle invalid types.
+
2006-05-30 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/27779
type = groktypename (t);
ret.value = c_sizeof (type);
ret.original_code = ERROR_MARK;
- pop_maybe_used (C_TYPE_VARIABLE_SIZE (type));
+ pop_maybe_used (type != error_mark_node
+ ? C_TYPE_VARIABLE_SIZE (type) : false);
return ret;
}
+2006-05-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c/27718
+ * gcc.dg/sizeof-1.c: New test.
+
2006-05-30 Uros Bizjak <uros@kss-loka.si>
PR target/27790
--- /dev/null
+/* PR c/27718 */
+/* { dg-do compile } */
+
+int i = sizeof(struct A[]); /* { dg-error "incomplete" } */