8sa1-gcc/gcc/testsuite/gcc.dg/Wlarger-than.c
Neil Booth e9770d5120 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
2001-01-30 19:19:40 +00:00

11 lines
284 B
C

/* Copyright (C) 2000 Free Software Foundation, Inc. */
/* { dg-do compile } */
/* { dg-options "-Wlarger-than-32768" } */
/* -Wlarger-than with functions returning void used to segfault.
Source: PR 602, testsuite-ized by Neil Booth 21 Jan 2000. */
static void foo (void) {}