aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-01-30 19:19:40 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-01-30 19:19:40 +0000
commite9770d5120e4f26b56d820ceb363497e3c724297 (patch)
treed8f79081ba49b8c1fd91e83b95f8c1ca69877c3e /gcc/c-decl.c
parentd966ae60665c7dbe90121db5304b4328feb0eb04 (diff)
downloadgcc-e9770d5120e4f26b56d820ceb363497e3c724297.zip
gcc-e9770d5120e4f26b56d820ceb363497e3c724297.tar.gz
gcc-e9770d5120e4f26b56d820ceb363497e3c724297.tar.bz2
c-decl.c (c_expand_body): Check TYPE_SIZE_UNIT (ret_type) is not NULL.
* c-decl.c (c_expand_body): Check TYPE_SIZE_UNIT (ret_type) is not NULL. * toplev.c (decode_W_option): Update warn_larger_than unconditionally for each processed switch. * testsuite/gcc.dg/Wlarger-than.c: New test. From-SVN: r39352
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index d5558db..edbe9ce 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -6728,7 +6728,8 @@ c_expand_body (fndecl, nested_p)
{
tree ret_type = TREE_TYPE (TREE_TYPE (fndecl));
- if (ret_type && TREE_CODE (TYPE_SIZE_UNIT (ret_type)) == INTEGER_CST
+ if (ret_type && TYPE_SIZE_UNIT (ret_type)
+ && TREE_CODE (TYPE_SIZE_UNIT (ret_type)) == INTEGER_CST
&& 0 < compare_tree_int (TYPE_SIZE_UNIT (ret_type),
larger_than_size))
{