@@ -1340,7 +1340,7 @@ atomic_specifier:
13401340 {
13411341 $$ =$1 ;
13421342 parser_stack ($$).id(ID_atomic_type_specifier);
1343- stack_type ($$).subtype ()=stack_type($3 );
1343+ stack_type ($$).add_subtype ()=stack_type($3 );
13441344 }
13451345 ;
13461346
@@ -1530,7 +1530,7 @@ elaborated_type_name:
15301530
15311531array_of_construct :
15321532 TOK_ARRAY_OF ' <' type_name ' >'
1533- { $$ =$1 ; stack_type($$ ).subtype ().swap(parser_stack($2 )); }
1533+ { $$ =$1 ; stack_type($$ ).add_subtype ().swap(parser_stack($2 )); }
15341534 ;
15351535
15361536pragma_packed :
@@ -1787,7 +1787,7 @@ member_declarator:
17871787 | bit_field_size gcc_type_attribute_opt
17881788 {
17891789 $$ =$1 ;
1790- stack_type ($$).subtype ()=typet(ID_abstract);
1790+ stack_type ($$).add_subtype ()=typet(ID_abstract);
17911791
17921792 if (parser_stack($2 ).is_not_nil()) // type attribute
17931793 $$ =merge($2 , $$ );
@@ -1807,7 +1807,7 @@ member_identifier_declarator:
18071807 | bit_field_size gcc_type_attribute_opt
18081808 {
18091809 $$ =$1 ;
1810- stack_type ($$).subtype ()=typet(ID_abstract);
1810+ stack_type ($$).add_subtype ()=typet(ID_abstract);
18111811
18121812 if (parser_stack($2 ).is_not_nil()) // type attribute
18131813 $$ =merge($2 , $$ );
@@ -1828,7 +1828,7 @@ bit_field_size:
18281828 $$ =$1 ;
18291829 set ($$, ID_c_bit_field);
18301830 stack_type ($$).set(ID_size, parser_stack($2 ));
1831- stack_type ($$).subtype ().id(ID_abstract);
1831+ stack_type ($$).add_subtype ().id(ID_abstract);
18321832 }
18331833 ;
18341834
@@ -3235,7 +3235,7 @@ unary_identifier_declarator:
32353235 // The below is deliberately not using pointer_type();
32363236 // the width is added during conversion.
32373237 stack_type ($1 ).id (ID_frontend_pointer);
3238- stack_type ($1 ).subtype ()=typet (ID_abstract);
3238+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
32393239 $2 =merge ($2 , $1 ); // dest=$2
32403240 make_subtype ($3 , $2 ); // dest=$3
32413241 $$=$3 ;
@@ -3431,7 +3431,7 @@ postfixing_abstract_declarator:
34313431 {
34323432 $$=$1 ;
34333433 set ($$, ID_code);
3434- stack_type ($$).subtype ()=typet (ID_abstract);
3434+ stack_type ($$).add_subtype ()=typet (ID_abstract);
34353435 stack_type ($$).add (ID_parameters);
34363436 stack_type ($$).set (ID_C_KnR, true );
34373437 }
@@ -3448,7 +3448,7 @@ postfixing_abstract_declarator:
34483448 {
34493449 $$=$1 ;
34503450 set ($$, ID_code);
3451- stack_type ($$).subtype ()=typet (ID_abstract);
3451+ stack_type ($$).add_subtype ()=typet (ID_abstract);
34523452 stack_type ($$).add (ID_parameters).get_sub ().
34533453 swap ((irept::subt &)(to_type_with_subtypes (stack_type ($3 )).subtypes ()));
34543454 PARSER.pop_scope ();
@@ -3476,7 +3476,7 @@ parameter_postfixing_abstract_declarator:
34763476 {
34773477 set ($1 , ID_code);
34783478 stack_type ($1 ).add (ID_parameters);
3479- stack_type ($1 ).subtype ()=typet (ID_abstract);
3479+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
34803480 PARSER.pop_scope ();
34813481
34823482 // Clear function name in source location after parsing if
@@ -3506,7 +3506,7 @@ parameter_postfixing_abstract_declarator:
35063506 cprover_function_contract_sequence_opt
35073507 {
35083508 set ($1 , ID_code);
3509- stack_type ($1 ).subtype ()=typet (ID_abstract);
3509+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
35103510 stack_type ($1 ).add (ID_parameters).get_sub ().
35113511 swap ((irept::subt &)(to_type_with_subtypes (stack_type ($3 )).subtypes ()));
35123512 PARSER.pop_scope ();
@@ -3532,7 +3532,7 @@ array_abstract_declarator:
35323532 {
35333533 $$=$1 ;
35343534 set ($$, ID_array);
3535- stack_type ($$).subtype ()=typet (ID_abstract);
3535+ stack_type ($$).add_subtype ()=typet (ID_abstract);
35363536 stack_type ($$).add (ID_size).make_nil ();
35373537 }
35383538 | ' [' attribute_type_qualifier_storage_class_list ' ]'
@@ -3541,7 +3541,7 @@ array_abstract_declarator:
35413541 // The type qualifier belongs to the array, not the
35423542 // contents of the array, nor the size.
35433543 set ($1 , ID_array);
3544- stack_type ($1 ).subtype ()=typet (ID_abstract);
3544+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
35453545 stack_type ($1 ).add (ID_size).make_nil ();
35463546 $$=merge ($2 , $1 );
35473547 }
@@ -3550,23 +3550,23 @@ array_abstract_declarator:
35503550 // these should be allowed in prototypes only
35513551 $$=$1 ;
35523552 set ($$, ID_array);
3553- stack_type ($$).subtype ()=typet (ID_abstract);
3553+ stack_type ($$).add_subtype ()=typet (ID_abstract);
35543554 stack_type ($$).add (ID_size).make_nil ();
35553555 }
35563556 | ' [' constant_expression ' ]'
35573557 {
35583558 $$=$1 ;
35593559 set ($$, ID_array);
35603560 stack_type ($$).add (ID_size).swap (parser_stack ($2 ));
3561- stack_type ($$).subtype ()=typet (ID_abstract);
3561+ stack_type ($$).add_subtype ()=typet (ID_abstract);
35623562 }
35633563 | ' [' attribute_type_qualifier_storage_class_list constant_expression ' ]'
35643564 {
35653565 // The type qualifier belongs to the array, not the
35663566 // contents of the array, nor the size.
35673567 set ($1 , ID_array);
35683568 stack_type ($1 ).add (ID_size).swap (parser_stack ($3 ));
3569- stack_type ($1 ).subtype ()=typet (ID_abstract);
3569+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
35703570 $$=merge ($2 , $1 ); // dest=$2
35713571 }
35723572 | array_abstract_declarator ' [' constant_expression ' ]'
@@ -3575,7 +3575,7 @@ array_abstract_declarator:
35753575 $$=$1 ;
35763576 set ($2 , ID_array);
35773577 stack_type ($2 ).add (ID_size).swap (parser_stack ($3 ));
3578- stack_type ($2 ).subtype ()=typet (ID_abstract);
3578+ stack_type ($2 ).add_subtype ()=typet (ID_abstract);
35793579 make_subtype ($1 , $2 );
35803580 }
35813581 | array_abstract_declarator ' [' ' *' ' ]'
@@ -3585,7 +3585,7 @@ array_abstract_declarator:
35853585 $$=$1 ;
35863586 set ($2 , ID_array);
35873587 stack_type ($2 ).add (ID_size).make_nil ();
3588- stack_type ($2 ).subtype ()=typet (ID_abstract);
3588+ stack_type ($2 ).add_subtype ()=typet (ID_abstract);
35893589 make_subtype ($1 , $2 );
35903590 }
35913591 ;
@@ -3597,7 +3597,7 @@ unary_abstract_declarator:
35973597 // The below is deliberately not using pointer_type();
35983598 // the width is added during conversion.
35993599 stack_type ($$).id (ID_frontend_pointer);
3600- stack_type ($$).subtype ()=typet (ID_abstract);
3600+ stack_type ($$).add_subtype ()=typet (ID_abstract);
36013601 }
36023602 | ' *' attribute_type_qualifier_list
36033603 {
@@ -3606,7 +3606,7 @@ unary_abstract_declarator:
36063606 // The below is deliberately not using pointer_type();
36073607 // the width is added during conversion.
36083608 stack_type ($1 ).id (ID_frontend_pointer);
3609- stack_type ($1 ).subtype ()=typet (ID_abstract);
3609+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
36103610 $$=merge ($2 , $1 );
36113611 }
36123612 | ' *' abstract_declarator
@@ -3621,7 +3621,7 @@ unary_abstract_declarator:
36213621 // The below is deliberately not using pointer_type();
36223622 // the width is added during conversion.
36233623 stack_type ($1 ).id (ID_frontend_pointer);
3624- stack_type ($1 ).subtype ()=typet (ID_abstract);
3624+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
36253625 $2 =merge ($2 , $1 ); // dest=$2
36263626 make_subtype ($3 , $2 ); // dest=$3
36273627 $$=$3 ;
@@ -3632,7 +3632,7 @@ unary_abstract_declarator:
36323632 // http://en.wikipedia.org/wiki/Blocks_(C_language_extension)
36333633 $$=$1 ;
36343634 set ($$, ID_block_pointer);
3635- stack_type ($$).subtype ()=typet (ID_abstract);
3635+ stack_type ($$).add_subtype ()=typet (ID_abstract);
36363636 }
36373637 ;
36383638
@@ -3643,7 +3643,7 @@ parameter_unary_abstract_declarator:
36433643 // The below is deliberately not using pointer_type();
36443644 // the width is added during conversion.
36453645 stack_type ($$).id (ID_frontend_pointer);
3646- stack_type ($$).subtype ()=typet (ID_abstract);
3646+ stack_type ($$).add_subtype ()=typet (ID_abstract);
36473647 }
36483648 | ' *' attribute_type_qualifier_list
36493649 {
@@ -3652,7 +3652,7 @@ parameter_unary_abstract_declarator:
36523652 // The below is deliberately not using pointer_type();
36533653 // the width is added during conversion.
36543654 stack_type ($1 ).id (ID_frontend_pointer);
3655- stack_type ($1 ).subtype ()=typet (ID_abstract);
3655+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
36563656 $$=merge ($2 , $1 );
36573657 }
36583658 | ' *' parameter_abstract_declarator
@@ -3667,7 +3667,7 @@ parameter_unary_abstract_declarator:
36673667 // The below is deliberately not using pointer_type();
36683668 // the width is added during conversion.
36693669 stack_type ($1 ).id (ID_frontend_pointer);
3670- stack_type ($1 ).subtype ()=typet (ID_abstract);
3670+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
36713671 $2 =merge ($2 , $1 ); // dest=$2
36723672 make_subtype ($3 , $2 ); // dest=$3
36733673 $$=$3 ;
@@ -3678,7 +3678,7 @@ parameter_unary_abstract_declarator:
36783678 // http://en.wikipedia.org/wiki/Blocks_(C_language_extension)
36793679 $$=$1 ;
36803680 set ($$, ID_block_pointer);
3681- stack_type ($$).subtype ()=typet (ID_abstract);
3681+ stack_type ($$).add_subtype ()=typet (ID_abstract);
36823682 }
36833683 ;
36843684
0 commit comments