* convert.c (convert_to_integer): Issue an error on conversions to
incomplete types.
From-SVN: r22102
+Sun Aug 30 16:05:45 1998 Mark Mitchell <mark@markmitchell.com>
+
+ * convert.c (convert_to_integer): Issue an error on conversions to
+ incomplete types.
+
Sun Aug 30 16:47:20 1998 Martin von Lvwis <loewis@informatik.hu-berlin.de>
* Makefile.in: Add lang_tree_files and gencheck.h.
int inprec = TYPE_PRECISION (intype);
int outprec = TYPE_PRECISION (type);
+ /* An INTEGER_TYPE cannot be incomplete, but an ENUMERAL_TYPE can
+ be. Consider `enum E = { a, b = (enum E) 3 };'. */
+ if (!TYPE_SIZE (type))
+ {
+ error ("conversion to incomplete type");
+ return error_mark_node;
+ }
+
switch (TREE_CODE (intype))
{
case POINTER_TYPE: