OSDN Git Service

PR c++/28235
[pf3gnuchains/gcc-fork.git] / gcc / gengtype-yacc.y
index 403e23f..8bdf983 100644 (file)
@@ -16,8 +16,8 @@ for more details.
 
 You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.  */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA.  */
 
 %{
 #include "bconfig.h"
@@ -232,17 +232,11 @@ type: SCALAR
       | type '*'
          { $$ = create_pointer ($1); }
       | STRUCT ID '{' struct_fields '}'
-         {
-          new_structure ($2, 0, &lexer_line, $4, NULL);
-           $$ = find_structure ($2, 0);
-        }
+         { $$ = new_structure ($2, 0, &lexer_line, $4, NULL); }
       | STRUCT ID
          { $$ = find_structure ($2, 0); }
       | UNION ID '{' struct_fields '}'
-         {
-          new_structure ($2, 1, &lexer_line, $4, NULL);
-           $$ = find_structure ($2, 1);
-        }
+         { $$ = new_structure ($2, 1, &lexer_line, $4, NULL); }
       | UNION ID
          { $$ = find_structure ($2, 1); }
       | ENUM ID
@@ -275,11 +269,11 @@ type_option : ALIAS
              ;
 
 option:   ID
-           { $$ = create_option ($1, (void *)""); }
+           { $$ = create_option (NULL, $1, (void *)""); }
         | ID '(' stringseq ')'
-            { $$ = create_option ($1, (void *)$3); }
+            { $$ = create_option (NULL, $1, (void *)$3); }
        | type_option '(' type ')'
-           { $$ = create_option ($1, adjust_field_type ($3, NULL)); }
+           { $$ = create_option (NULL, $1, adjust_field_type ($3, NULL)); }
        | NESTED_PTR '(' type ',' stringseq ',' stringseq ')'
            {
              struct nested_ptr_data d;
@@ -287,7 +281,7 @@ option:   ID
              d.type = adjust_field_type ($3, NULL);
              d.convert_to = $5;
              d.convert_from = $7;
-             $$ = create_option ("nested_ptr",
+             $$ = create_option (NULL, "nested_ptr",
                                  xmemdup (&d, sizeof (d), sizeof (d)));
            }
        ;