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 e2032f2..c9facbd 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 4bbc39d..91ba850 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;
     }