From 810241a5bfdbe0a3921916d3287eba6ef59ab575 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 11 Jun 2014 14:25:22 +0200 Subject: [PATCH] 2014-06-11 Sergey Rybin * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W option to specify the result file encoding. 2014-06-11 Robert Dewar * errout.ads, sem_ch12.adb: Minor reformatting. * debug.adb, erroutc.adb: Remove -gnatd.q debug switch. * lib-xref.adb: Minor reformatting. * restrict.adb: Minor code reorganization (put routines in alpha order). From-SVN: r211455 --- gcc/ada/ChangeLog | 13 +++++ gcc/ada/debug.adb | 8 +-- gcc/ada/errout.ads | 3 +- gcc/ada/erroutc.adb | 12 ++-- gcc/ada/gnat_ugn.texi | 28 ++++++++- gcc/ada/lib-xref.adb | 1 - gcc/ada/restrict.adb | 132 +++++++++++++++++++++--------------------- gcc/ada/sem_ch12.adb | 21 +++---- gcc/ada/vms_data.ads | 37 +++++++++++- 9 files changed, 161 insertions(+), 94 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index c45ca093dcf..6575396f96d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,16 @@ +2014-06-11 Sergey Rybin + + * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W + option to specify the result file encoding. + +2014-06-11 Robert Dewar + + * errout.ads, sem_ch12.adb: Minor reformatting. + * debug.adb, erroutc.adb: Remove -gnatd.q debug switch. + * lib-xref.adb: Minor reformatting. + * restrict.adb: Minor code reorganization (put routines in + alpha order). + 2014-06-11 Yannick Moy * einfo.ads: Minor typo in comment diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index 49fae93306b..8399a2c9900 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -107,7 +107,7 @@ package body Debug is -- d.n Print source file names -- d.o Generate .NET listing of CIL code -- d.p Enable the .NET CIL verifier - -- d.q Quit on badly tagged warning message + -- d.q -- d.r Enable OK_To_Reorder_Components in non-variant records -- d.s Disable expansion of slice move, use memmove -- d.t Disable static allocation of library level dispatch tables @@ -561,12 +561,6 @@ package body Debug is -- disabled by default and this flag is used to enable it. In the -- future we will reverse this functionality. - -- d.q All warning and info messages are supposed to be tagged with one - -- of the extended warning sequences such as ?? or &`#", Id); - end if; - end Check_Restriction_No_Use_Of_Pragma; - ----------------------------------- -- Check_Obsolescent_2005_Entity -- ----------------------------------- @@ -696,6 +630,72 @@ package body Restrict is end if; end Check_Restriction_No_Specification_Of_Aspect; + ------------------------------------------- + -- Check_Restriction_No_Use_Of_Attribute -- + -------------------------------------------- + + procedure Check_Restriction_No_Use_Of_Attribute (N : Node_Id) is + Id : constant Name_Id := Chars (N); + A_Id : constant Attribute_Id := Get_Attribute_Id (Id); + + begin + -- Ignore call if node N is not in the main source unit, since we only + -- give messages for the main unit. This avoids giving messages for + -- aspects that are specified in withed units. + + if not In_Extended_Main_Source_Unit (N) then + return; + end if; + + -- If nothing set, nothing to check + + if not No_Use_Of_Attribute_Set then + return; + end if; + + Error_Msg_Sloc := No_Use_Of_Attribute (A_Id); + + if Error_Msg_Sloc /= No_Location then + Error_Msg_Node_1 := N; + Error_Msg_Warn := No_Use_Of_Attribute_Warning (A_Id); + Error_Msg_N + ("<* &`#", Id); + end if; + end Check_Restriction_No_Use_Of_Pragma; + -------------------------------------- -- Check_Wide_Character_Restriction -- -------------------------------------- diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index acb267e7946..7456ac4bc71 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -9965,11 +9965,11 @@ package body Sem_Ch12 is Uninit_Var := Uninitialized_Variable (Decl); elsif Nkind (Decl) = N_Formal_Type_Declaration - and then Nkind (Formal_Type_Definition (Decl)) - = N_Formal_Private_Type_Definition + and then Nkind (Formal_Type_Definition (Decl)) = + N_Formal_Private_Type_Definition then - Uninit_Var := Uninitialized_Variable - (Formal_Type_Definition (Decl)); + Uninit_Var := + Uninitialized_Variable (Formal_Type_Definition (Decl)); end if; if Present (Uninit_Var) then @@ -9979,8 +9979,8 @@ package body Sem_Ch12 is -- For each formal there is a subtype declaration that renames -- the actual and has the same name as the formal. Locate the -- formal for warning message about uninitialized variables - -- in the generic, for which the actual type should be a - -- fully initialized type. + -- in the generic, for which the actual type should be a fully + -- initialized type. while Present (Actual) loop exit when Ekind (Actual) = E_Package @@ -9993,10 +9993,11 @@ package body Sem_Ch12 is then Error_Msg_Node_2 := Formal; Error_Msg_NE - ("generic unit has uninitialzed variable& of " - & " formal private type &?v?", Actual, Uninit_Var); - Error_Msg_NE ("actual type for& should be " - & "fully initialized type?v?", Actual, Formal); + ("generic unit has uninitialized variable& of " + & "formal private type &?v?", Actual, Uninit_Var); + Error_Msg_NE + ("actual type for& should be fully initialized type?v?", + Actual, Formal); exit; end if; diff --git a/gcc/ada/vms_data.ads b/gcc/ada/vms_data.ads index f28b9bf0732..ac07c620b88 100644 --- a/gcc/ada/vms_data.ads +++ b/gcc/ada/vms_data.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1996-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -7155,6 +7155,40 @@ package VMS_Data is -- -- Look for source, library or object files in the default directory. + S_Stub_Encoding : aliased constant S := "/RESULT_ENCODING=" & + "BRACKETS " & + "-Wb " & + "HEX " & + "-Wh " & + "UPPER " & + "-Wu " & + "SHIFT_JIS " & + "-Ws " & + "EUC " & + "-We " & + "UTF8 " & + "-W8"; + -- /RESULT_ENCODING[=encoding-type] + -- + -- Specify the wide character encoding method used when writing the + -- generated body in the result file. 'encoding-type' is one of the + -- following: + -- + -- BRACKETS (D) Brackets encoding. + -- + -- HEX Hex ESC encoding. + -- + -- UPPER Upper half encoding. + -- + -- SHIFT_JIS Shift-JIS encoding. + -- + -- EUC EUC Encoding. + -- + -- UTF8 UTF-8 encoding. + -- + -- See 'HELP GNAT COMPILE /WIDE_CHARACTER_ENCODING' for an explanation + -- about the different character encoding methods. + S_Stub_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' & "-X" & '"'; -- /EXTERNAL_REFERENCE="name=val" @@ -7349,6 +7383,7 @@ package VMS_Data is (S_Stub_Add 'Access, S_Stub_Config 'Access, S_Stub_Current 'Access, + S_Stub_Encoding 'Access, S_Stub_Ext 'Access, S_Stub_Follow 'Access, S_Stub_Full 'Access,