gengtype-yacc.y (option): Avoid use of non-constant struct initializer.
authorRichard Sandiford <rsandifo@redhat.com>
Wed, 23 Jun 2004 09:08:21 +0000 (09:08 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 23 Jun 2004 09:08:21 +0000 (09:08 +0000)
* gengtype-yacc.y (option): Avoid use of non-constant struct
initializer.

From-SVN: r83546

gcc/ChangeLog
gcc/gengtype-yacc.y

index 4068b8d23ffde28282bcd08247019e7ef1b24b10..8bcc51ea9cb35c6cf1aba62f2b5a25bc5791891f 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-23  Richard Sandiford  <rsandifo@redhat.com>
+
+       * gengtype-yacc.y (option): Avoid use of non-constant struct
+       initializer.
+
 2004-06-23  Nathan Sidwell  <nathan@codesourcery.com>
 
        * doc/extend.texi (Function Attributes): Alphabetize.
index 2e7b6a7057514ed4382613974b750d0c1c630079..449a515e0836413be278f6f1b163da7261fb3452 100644 (file)
@@ -282,8 +282,11 @@ option:   ID
            { $$ = create_option ($1, adjust_field_type ($3, NULL)); }
        | NESTED_PTR '(' type ',' stringseq ',' stringseq ')'
            {
-             struct nested_ptr_data d =
-               { adjust_field_type ($3, NULL), $5, $7 };
+             struct nested_ptr_data d;
+
+             d.type = adjust_field_type ($3, NULL);
+             d.convert_to = $5;
+             d.convert_from = $7;
              $$ = create_option ("nested_ptr",
                                  xmemdup (&d, sizeof (d), sizeof (d)));
            }