@@ -1340,7 +1340,7 @@ atomic_specifier:
1340
1340
{
1341
1341
$$ =$1 ;
1342
1342
parser_stack ($$).id(ID_atomic_type_specifier);
1343
- stack_type ($$).subtype ()=stack_type($3 );
1343
+ stack_type ($$).add_subtype ()=stack_type($3 );
1344
1344
}
1345
1345
;
1346
1346
@@ -1530,7 +1530,7 @@ elaborated_type_name:
1530
1530
1531
1531
array_of_construct :
1532
1532
TOK_ARRAY_OF ' <' type_name ' >'
1533
- { $$ =$1 ; stack_type($$ ).subtype ().swap(parser_stack($2 )); }
1533
+ { $$ =$1 ; stack_type($$ ).add_subtype ().swap(parser_stack($2 )); }
1534
1534
;
1535
1535
1536
1536
pragma_packed :
@@ -1787,7 +1787,7 @@ member_declarator:
1787
1787
| bit_field_size gcc_type_attribute_opt
1788
1788
{
1789
1789
$$ =$1 ;
1790
- stack_type ($$).subtype ()=typet(ID_abstract);
1790
+ stack_type ($$).add_subtype ()=typet(ID_abstract);
1791
1791
1792
1792
if (parser_stack($2 ).is_not_nil()) // type attribute
1793
1793
$$ =merge($2 , $$ );
@@ -1807,7 +1807,7 @@ member_identifier_declarator:
1807
1807
| bit_field_size gcc_type_attribute_opt
1808
1808
{
1809
1809
$$ =$1 ;
1810
- stack_type ($$).subtype ()=typet(ID_abstract);
1810
+ stack_type ($$).add_subtype ()=typet(ID_abstract);
1811
1811
1812
1812
if (parser_stack($2 ).is_not_nil()) // type attribute
1813
1813
$$ =merge($2 , $$ );
@@ -1828,7 +1828,7 @@ bit_field_size:
1828
1828
$$ =$1 ;
1829
1829
set ($$, ID_c_bit_field);
1830
1830
stack_type ($$).set(ID_size, parser_stack($2 ));
1831
- stack_type ($$).subtype ().id(ID_abstract);
1831
+ stack_type ($$).add_subtype ().id(ID_abstract);
1832
1832
}
1833
1833
;
1834
1834
@@ -3235,7 +3235,7 @@ unary_identifier_declarator:
3235
3235
// The below is deliberately not using pointer_type();
3236
3236
// the width is added during conversion.
3237
3237
stack_type ($1 ).id (ID_frontend_pointer);
3238
- stack_type ($1 ).subtype ()=typet (ID_abstract);
3238
+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
3239
3239
$2 =merge ($2 , $1 ); // dest=$2
3240
3240
make_subtype ($3 , $2 ); // dest=$3
3241
3241
$$=$3 ;
@@ -3431,7 +3431,7 @@ postfixing_abstract_declarator:
3431
3431
{
3432
3432
$$=$1 ;
3433
3433
set ($$, ID_code);
3434
- stack_type ($$).subtype ()=typet (ID_abstract);
3434
+ stack_type ($$).add_subtype ()=typet (ID_abstract);
3435
3435
stack_type ($$).add (ID_parameters);
3436
3436
stack_type ($$).set (ID_C_KnR, true );
3437
3437
}
@@ -3448,7 +3448,7 @@ postfixing_abstract_declarator:
3448
3448
{
3449
3449
$$=$1 ;
3450
3450
set ($$, ID_code);
3451
- stack_type ($$).subtype ()=typet (ID_abstract);
3451
+ stack_type ($$).add_subtype ()=typet (ID_abstract);
3452
3452
stack_type ($$).add (ID_parameters).get_sub ().
3453
3453
swap ((irept::subt &)(to_type_with_subtypes (stack_type ($3 )).subtypes ()));
3454
3454
PARSER.pop_scope ();
@@ -3476,7 +3476,7 @@ parameter_postfixing_abstract_declarator:
3476
3476
{
3477
3477
set ($1 , ID_code);
3478
3478
stack_type ($1 ).add (ID_parameters);
3479
- stack_type ($1 ).subtype ()=typet (ID_abstract);
3479
+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
3480
3480
PARSER.pop_scope ();
3481
3481
3482
3482
// Clear function name in source location after parsing if
@@ -3506,7 +3506,7 @@ parameter_postfixing_abstract_declarator:
3506
3506
cprover_function_contract_sequence_opt
3507
3507
{
3508
3508
set ($1 , ID_code);
3509
- stack_type ($1 ).subtype ()=typet (ID_abstract);
3509
+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
3510
3510
stack_type ($1 ).add (ID_parameters).get_sub ().
3511
3511
swap ((irept::subt &)(to_type_with_subtypes (stack_type ($3 )).subtypes ()));
3512
3512
PARSER.pop_scope ();
@@ -3532,7 +3532,7 @@ array_abstract_declarator:
3532
3532
{
3533
3533
$$=$1 ;
3534
3534
set ($$, ID_array);
3535
- stack_type ($$).subtype ()=typet (ID_abstract);
3535
+ stack_type ($$).add_subtype ()=typet (ID_abstract);
3536
3536
stack_type ($$).add (ID_size).make_nil ();
3537
3537
}
3538
3538
| ' [' attribute_type_qualifier_storage_class_list ' ]'
@@ -3541,7 +3541,7 @@ array_abstract_declarator:
3541
3541
// The type qualifier belongs to the array, not the
3542
3542
// contents of the array, nor the size.
3543
3543
set ($1 , ID_array);
3544
- stack_type ($1 ).subtype ()=typet (ID_abstract);
3544
+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
3545
3545
stack_type ($1 ).add (ID_size).make_nil ();
3546
3546
$$=merge ($2 , $1 );
3547
3547
}
@@ -3550,23 +3550,23 @@ array_abstract_declarator:
3550
3550
// these should be allowed in prototypes only
3551
3551
$$=$1 ;
3552
3552
set ($$, ID_array);
3553
- stack_type ($$).subtype ()=typet (ID_abstract);
3553
+ stack_type ($$).add_subtype ()=typet (ID_abstract);
3554
3554
stack_type ($$).add (ID_size).make_nil ();
3555
3555
}
3556
3556
| ' [' constant_expression ' ]'
3557
3557
{
3558
3558
$$=$1 ;
3559
3559
set ($$, ID_array);
3560
3560
stack_type ($$).add (ID_size).swap (parser_stack ($2 ));
3561
- stack_type ($$).subtype ()=typet (ID_abstract);
3561
+ stack_type ($$).add_subtype ()=typet (ID_abstract);
3562
3562
}
3563
3563
| ' [' attribute_type_qualifier_storage_class_list constant_expression ' ]'
3564
3564
{
3565
3565
// The type qualifier belongs to the array, not the
3566
3566
// contents of the array, nor the size.
3567
3567
set ($1 , ID_array);
3568
3568
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);
3570
3570
$$=merge ($2 , $1 ); // dest=$2
3571
3571
}
3572
3572
| array_abstract_declarator ' [' constant_expression ' ]'
@@ -3575,7 +3575,7 @@ array_abstract_declarator:
3575
3575
$$=$1 ;
3576
3576
set ($2 , ID_array);
3577
3577
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);
3579
3579
make_subtype ($1 , $2 );
3580
3580
}
3581
3581
| array_abstract_declarator ' [' ' *' ' ]'
@@ -3585,7 +3585,7 @@ array_abstract_declarator:
3585
3585
$$=$1 ;
3586
3586
set ($2 , ID_array);
3587
3587
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);
3589
3589
make_subtype ($1 , $2 );
3590
3590
}
3591
3591
;
@@ -3597,7 +3597,7 @@ unary_abstract_declarator:
3597
3597
// The below is deliberately not using pointer_type();
3598
3598
// the width is added during conversion.
3599
3599
stack_type ($$).id (ID_frontend_pointer);
3600
- stack_type ($$).subtype ()=typet (ID_abstract);
3600
+ stack_type ($$).add_subtype ()=typet (ID_abstract);
3601
3601
}
3602
3602
| ' *' attribute_type_qualifier_list
3603
3603
{
@@ -3606,7 +3606,7 @@ unary_abstract_declarator:
3606
3606
// The below is deliberately not using pointer_type();
3607
3607
// the width is added during conversion.
3608
3608
stack_type ($1 ).id (ID_frontend_pointer);
3609
- stack_type ($1 ).subtype ()=typet (ID_abstract);
3609
+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
3610
3610
$$=merge ($2 , $1 );
3611
3611
}
3612
3612
| ' *' abstract_declarator
@@ -3621,7 +3621,7 @@ unary_abstract_declarator:
3621
3621
// The below is deliberately not using pointer_type();
3622
3622
// the width is added during conversion.
3623
3623
stack_type ($1 ).id (ID_frontend_pointer);
3624
- stack_type ($1 ).subtype ()=typet (ID_abstract);
3624
+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
3625
3625
$2 =merge ($2 , $1 ); // dest=$2
3626
3626
make_subtype ($3 , $2 ); // dest=$3
3627
3627
$$=$3 ;
@@ -3632,7 +3632,7 @@ unary_abstract_declarator:
3632
3632
// http://en.wikipedia.org/wiki/Blocks_(C_language_extension)
3633
3633
$$=$1 ;
3634
3634
set ($$, ID_block_pointer);
3635
- stack_type ($$).subtype ()=typet (ID_abstract);
3635
+ stack_type ($$).add_subtype ()=typet (ID_abstract);
3636
3636
}
3637
3637
;
3638
3638
@@ -3643,7 +3643,7 @@ parameter_unary_abstract_declarator:
3643
3643
// The below is deliberately not using pointer_type();
3644
3644
// the width is added during conversion.
3645
3645
stack_type ($$).id (ID_frontend_pointer);
3646
- stack_type ($$).subtype ()=typet (ID_abstract);
3646
+ stack_type ($$).add_subtype ()=typet (ID_abstract);
3647
3647
}
3648
3648
| ' *' attribute_type_qualifier_list
3649
3649
{
@@ -3652,7 +3652,7 @@ parameter_unary_abstract_declarator:
3652
3652
// The below is deliberately not using pointer_type();
3653
3653
// the width is added during conversion.
3654
3654
stack_type ($1 ).id (ID_frontend_pointer);
3655
- stack_type ($1 ).subtype ()=typet (ID_abstract);
3655
+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
3656
3656
$$=merge ($2 , $1 );
3657
3657
}
3658
3658
| ' *' parameter_abstract_declarator
@@ -3667,7 +3667,7 @@ parameter_unary_abstract_declarator:
3667
3667
// The below is deliberately not using pointer_type();
3668
3668
// the width is added during conversion.
3669
3669
stack_type ($1 ).id (ID_frontend_pointer);
3670
- stack_type ($1 ).subtype ()=typet (ID_abstract);
3670
+ stack_type ($1 ).add_subtype ()=typet (ID_abstract);
3671
3671
$2 =merge ($2 , $1 ); // dest=$2
3672
3672
make_subtype ($3 , $2 ); // dest=$3
3673
3673
$$=$3 ;
@@ -3678,7 +3678,7 @@ parameter_unary_abstract_declarator:
3678
3678
// http://en.wikipedia.org/wiki/Blocks_(C_language_extension)
3679
3679
$$=$1 ;
3680
3680
set ($$, ID_block_pointer);
3681
- stack_type ($$).subtype ()=typet (ID_abstract);
3681
+ stack_type ($$).add_subtype ()=typet (ID_abstract);
3682
3682
}
3683
3683
;
3684
3684
0 commit comments