c-parser.c (c_parser_struct_declaration): Check for a null return.
authorRichard Sandiford <richard@codesourcery.com>
Thu, 13 Sep 2007 12:27:00 +0000 (12:27 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 13 Sep 2007 12:27:00 +0000 (12:27 +0000)
gcc/
* c-parser.c (c_parser_struct_declaration): Check for a null return.

From-SVN: r128459

gcc/ChangeLog
gcc/c-parser.c

index e2032f23d9712c9b2e0a1261a526cffcbe0e973b..c9facbd57bbece9f13e888985b1ed807c4ac66c1 100644 (file)
@@ -1,3 +1,7 @@
+2007-09-13  Richard Sandiford  <richard@codesourcery.com>
+
+       * c-parser.c (c_parser_struct_declaration): Check for a null return.
+
 2007-09-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
        PR driver/33309
index 4bbc39d32d8ea3f3df11afeaabf2966c3a704739..91ba8500cb3d73c22f6fe750ce42d5caed42c0b4 100644 (file)
@@ -2033,7 +2033,8 @@ c_parser_struct_declaration (c_parser *parser)
          tree attrs = NULL;
          ret = grokfield (build_id_declarator (NULL_TREE), specs,
                           NULL_TREE, &attrs);
-         decl_attributes (&ret, attrs, 0);
+         if (ret)
+           decl_attributes (&ret, attrs, 0);
        }
       return ret;
     }