Commit 9c4cb3a3 by Mark Mitchell Committed by Mark Mitchell

convert.c (convert_to_integer): Issue an error on conversions to incomplete types.

	* convert.c (convert_to_integer): Issue an error on conversions to
	incomplete types.

From-SVN: r22102
parent 3103b7db
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.
......
......@@ -121,6 +121,14 @@ convert_to_integer (type, expr)
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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment