Commit 5d81e3d3 by Richard Sandiford Committed by Richard Sandiford

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
parent 60bca132
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> 2004-06-23 Nathan Sidwell <nathan@codesourcery.com>
* doc/extend.texi (Function Attributes): Alphabetize. * doc/extend.texi (Function Attributes): Alphabetize.
......
...@@ -282,8 +282,11 @@ option: ID ...@@ -282,8 +282,11 @@ option: ID
{ $$ = create_option ($1, adjust_field_type ($3, NULL)); } { $$ = create_option ($1, adjust_field_type ($3, NULL)); }
| NESTED_PTR '(' type ',' stringseq ',' stringseq ')' | NESTED_PTR '(' type ',' stringseq ',' stringseq ')'
{ {
struct nested_ptr_data d = struct nested_ptr_data d;
{ adjust_field_type ($3, NULL), $5, $7 };
d.type = adjust_field_type ($3, NULL);
d.convert_to = $5;
d.convert_from = $7;
$$ = create_option ("nested_ptr", $$ = create_option ("nested_ptr",
xmemdup (&d, sizeof (d), sizeof (d))); xmemdup (&d, sizeof (d), sizeof (d)));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment