diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-29 10:56:44 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-29 10:56:44 +0000 |
commit | 6e3a4232952006335b80cbd867af58f00c293cc0 (patch) | |
tree | 910788a359ee7d5cadc748af3e41a98d7eb5dc6c /gcc/ada/par-ch3.adb | |
parent | 9a6a413284032d3ca0ceea2ced284fcd08504978 (diff) | |
download | gcc-6e3a4232952006335b80cbd867af58f00c293cc0.tar.gz |
2012-10-29 Arnaud Charlet <charlet@adacore.com>
* warnsw.adb (Set_GNAT_Mode_Warnings): Unset
Warn_On_Standard_Redefinition.
2012-10-29 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Derive_Progenitor_Subprograms): Complete documentation.
2012-10-29 Robert Dewar <dewar@adacore.com>
* par-ch11.adb (Warn_If_Standard_Redefinition): Add calls.
* par-ch3.adb (P_Defining_Identifier): Call
Warn_If_Standard_Redefinition if not inside record definition.
* par-ch6.adb (Warn_If_Standard_Redefinition): Add calls.
* par-util.adb (Warn_If_Standard_Redefinition): New procedure.
* par.adb (Inside_Record_Definition): New flag.
(Warn_If_Standard_Redefinition): New procedure.
* sinfo-cn.adb (Change_Identifier_To_Defining_Identifier): Remove
handling of warning for redefining standard name (moved to Par*).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192927 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-ch3.adb')
-rw-r--r-- | gcc/ada/par-ch3.adb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb index bfc4f592bf3..728a704f5f6 100644 --- a/gcc/ada/par-ch3.adb +++ b/gcc/ada/par-ch3.adb @@ -243,6 +243,13 @@ package body Ch3 is 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; @@ -3191,6 +3198,7 @@ package body Ch3 is Rec_Node : Node_Id; begin + Inside_Record_Definition := True; Rec_Node := New_Node (N_Record_Definition, Token_Ptr); -- Null record case @@ -3235,6 +3243,7 @@ package body Ch3 is end loop; end if; + Inside_Record_Definition := False; return Rec_Node; end P_Record_Definition; |