if Ident_Node /= Error then
Change_Identifier_To_Defining_Identifier (Ident_Node);
+
+ -- Warn if standard redefinition, except that we never warn on a
+ -- record field definition (since this is always a harmless case).
+
+ if not Inside_Record_Definition then
+ Warn_If_Standard_Redefinition (Ident_Node);
+ end if;
end if;
return Ident_Node;
-- SUBTYPE_DECLARATION ::=
-- subtype DEFINING_IDENTIFIER is [NULL_EXCLUSION] SUBTYPE_INDICATION
- -- {ASPECT_SPECIFICATIONS];
+ -- [ASPECT_SPECIFICATIONS];
-- The caller has checked that the initial token is SUBTYPE
Rec_Node : Node_Id;
begin
+ Inside_Record_Definition := True;
Rec_Node := New_Node (N_Record_Definition, Token_Ptr);
-- Null record case
end loop;
end if;
+ Inside_Record_Definition := False;
return Rec_Node;
end P_Record_Definition;