diff options
author | obrien <obrien@FreeBSD.org> | 1999-10-16 06:09:09 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-10-16 06:09:09 +0000 |
commit | cae8fa8120c70195f34a2456f18c4c848a2d3e0c (patch) | |
tree | f7d3a3ab9c32694206552e767626366f016f2062 /contrib/gcc/convert.c | |
parent | 84656b55b6e25e30322dc903a05de53706361d3d (diff) | |
download | FreeBSD-src-cae8fa8120c70195f34a2456f18c4c848a2d3e0c.zip FreeBSD-src-cae8fa8120c70195f34a2456f18c4c848a2d3e0c.tar.gz |
Virgin import of the GCC 2.95.1 compilers
Diffstat (limited to 'contrib/gcc/convert.c')
-rw-r--r-- | contrib/gcc/convert.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/gcc/convert.c b/contrib/gcc/convert.c index e03d39b..bfcb5db 100644 --- a/contrib/gcc/convert.c +++ b/contrib/gcc/convert.c @@ -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: |