+2001-01-30 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * 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.
+
2001-01-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.c (pa_init_machine_status): Initialize pic_offset_table_save_rtx
{
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))
{
+2001-01-30 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * gcc.dg/Wlarger-than.c: New test.
+
2001-01-29 Neil Booth <neil@daikokuya.demon.co.uk>
* gcc.dg/cpp/avoidpaste1.c: Fix typos.
--- /dev/null
+/* 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) {}
+
{
larger_than_size = read_integral_parameter (option_value, arg - 2, -1);
- if (larger_than_size != -1)
- warn_larger_than = 1;
+ warn_larger_than = larger_than_size != -1;
}
else if (!strcmp (arg, "unused"))
{