diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2004-06-23 09:08:21 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2004-06-23 09:08:21 +0000 |
commit | 5d81e3d373876ebbea7ff5133c4762be95be6c30 (patch) | |
tree | b5ff138503c4031cdd33fb0a5c1fd4c6bc81cb38 | |
parent | 60bca1329b31cdbc0feab8d9a2b5f617aee670de (diff) | |
download | gcc-5d81e3d373876ebbea7ff5133c4762be95be6c30.zip gcc-5d81e3d373876ebbea7ff5133c4762be95be6c30.tar.gz gcc-5d81e3d373876ebbea7ff5133c4762be95be6c30.tar.bz2 |
gengtype-yacc.y (option): Avoid use of non-constant struct initializer.
* gengtype-yacc.y (option): Avoid use of non-constant struct
initializer.
From-SVN: r83546
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/gengtype-yacc.y | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4068b8d..8bcc51e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/gengtype-yacc.y b/gcc/gengtype-yacc.y index 2e7b6a7..449a515 100644 --- a/gcc/gengtype-yacc.y +++ b/gcc/gengtype-yacc.y @@ -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))); } |