@@ -3065,8 +3065,7 @@ unary_identifier_declarator:
30653065 {
30663066 // the type_qualifier_list is for the pointer,
30673067 // and not the identifier_declarator
3068- stack_type ($1 ).id(ID_pointer);
3069- stack_type ($1 ).subtype()=typet(ID_abstract);
3068+ stack_type ($1 )=pointer_type(typet(ID_abstract));
30703069 $2 =merge($2 , $1 ); // dest=$2
30713070 make_subtype ($3 , $2 ); // dest=$3
30723071 $$ =$3 ;
@@ -3250,15 +3249,13 @@ unary_abstract_declarator:
32503249 ' *'
32513250 {
32523251 $$ =$1 ;
3253- set ($$, ID_pointer);
3254- stack_type ($$).subtype()=typet(ID_abstract);
3252+ stack_type ($$)=pointer_type(typet(ID_abstract));
32553253 }
32563254 | ' *' attribute_type_qualifier_list
32573255 {
32583256 // The type_qualifier_list belongs to the pointer,
32593257 // not to the (missing) abstract declarator.
3260- set ($1 , ID_pointer);
3261- stack_type ($1 ).subtype()=typet(ID_abstract);
3258+ stack_type ($1 )=pointer_type(typet(ID_abstract));
32623259 $$ =merge($2 , $1 );
32633260 }
32643261 | ' *' abstract_declarator
@@ -3270,8 +3267,7 @@ unary_abstract_declarator:
32703267 {
32713268 // The type_qualifier_list belongs to the pointer,
32723269 // not to the abstract declarator.
3273- stack_type ($1 ).id(ID_pointer);
3274- stack_type ($1 ).subtype()=typet(ID_abstract);
3270+ stack_type ($1 )=pointer_type(typet(ID_abstract));
32753271 $2 =merge($2 , $1 ); // dest=$2
32763272 make_subtype ($3 , $2 ); // dest=$3
32773273 $$ =$3 ;
@@ -3290,15 +3286,13 @@ parameter_unary_abstract_declarator:
32903286 ' *'
32913287 {
32923288 $$ =$1 ;
3293- set ($$, ID_pointer);
3294- stack_type ($$).subtype()=typet(ID_abstract);
3289+ stack_type ($$)=pointer_type(typet(ID_abstract));
32953290 }
32963291 | ' *' attribute_type_qualifier_list
32973292 {
32983293 // The type_qualifier_list belongs to the pointer,
32993294 // not to the (missing) abstract declarator.
3300- set ($1 , ID_pointer);
3301- stack_type ($1 ).subtype()=typet(ID_abstract);
3295+ stack_type ($1 )=pointer_type(typet(ID_abstract));
33023296 $$ =merge($2 , $1 );
33033297 }
33043298 | ' *' parameter_abstract_declarator
@@ -3310,8 +3304,7 @@ parameter_unary_abstract_declarator:
33103304 {
33113305 // The type_qualifier_list belongs to the pointer,
33123306 // not to the (missing) abstract declarator.
3313- stack ($1 ).id(ID_pointer);
3314- stack_type ($1 ).subtype()=typet(ID_abstract);
3307+ stack_type ($1 )=pointer_type(typet(ID_abstract));
33153308 $2 =merge($2 , $1 ); // dest=$2
33163309 make_subtype ($3 , $2 ); // dest=$3
33173310 $$ =$3 ;
0 commit comments