diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-12 13:00:42 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-12 13:00:42 +0200 |
commit | beacce027435fb068f0edcb0a0e094ab6630ff01 (patch) | |
tree | 7e0cd7e0a9942df3ea3c59ba7deec6900d9f0a80 /gcc/ada/erroutc.adb | |
parent | a4feaa716751d9755b7c0420cd8845089c6d6d3a (diff) | |
download | gcc-beacce027435fb068f0edcb0a0e094ab6630ff01.zip gcc-beacce027435fb068f0edcb0a0e094ab6630ff01.tar.gz gcc-beacce027435fb068f0edcb0a0e094ab6630ff01.tar.bz2 |
[multiple changes]
2010-10-12 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Clarify that 'Old can be used in preconditions and
postcondition pragmas.
2010-10-12 Robert Dewar <dewar@adacore.com>
* errout.ads, erroutc.adb: The # insertion now handles from in place of
at.
* exp_prag.adb (Expand_Pragma_Check): Suppress generated default
message if new switch Exception_Locations_Suppressed is set.
(Expand_Pragma_Check): Revised wording for default message for case
of precondition or postcondition.
* namet.ads, namet.adb (Build_Location_String): New procedure.
* opt.ads (List_Inherited_Pre_Post): New flag.
* sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Add call to
list inherited pre/post aspects.
* sem_ch13.adb (Analyze_Aspect_Specification): Improve generation of
messages for precondition/postcondition cases.
* sem_ch6.adb (Process_PPCs): General cleanup, and list inherited PPC's
if flag List_Inherited_Pre_Post is set True.
(Process_PPCs): Add initial handling for inherited preconditions
(List_Inherited_Pre_Post_Aspects): New procedure
* sem_ch6.ads (List_Inherited_Pre_Post_Aspects): New procedure
* sem_disp.adb (Inherited_Subprograms): New function
* sem_disp.ads (Inherited_Subprograms): New function
* sem_prag.adb (Check_Duplicate_Pragma): Clean up handling of
pre/postcondition.
(Check_Precondition_Postcondition): Check for inherited aspects
* sem_warn.adb: Process -gnatw.l/w.L setting List_Inherited_Pre_Post
* sinfo.ads, sinfo.adb (Split_PPC): New flag.
* sinput.ads, sinput.adb (Build_Location_String): New function.
* usage.adb: Add line for -gnatw.l/-gnatw.L
2010-10-12 Javier Miranda <miranda@adacore.com>
* exp_util.adb (Remove_Side_Effects): Remove wrong code.
2010-10-12 Arnaud Charlet <charlet@adacore.com>
* xref_lib.adb: Add handling of j/J letters.
From-SVN: r165361
Diffstat (limited to 'gcc/ada/erroutc.adb')
-rw-r--r-- | gcc/ada/erroutc.adb | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/gcc/ada/erroutc.adb b/gcc/ada/erroutc.adb index 040fac7..e023f31 100644 --- a/gcc/ada/erroutc.adb +++ b/gcc/ada/erroutc.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2010, 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- -- @@ -717,11 +717,31 @@ package body Erroutc is Sindex_Loc : Source_File_Index; Sindex_Flag : Source_File_Index; + procedure Set_At; + -- Outputs "at " unless last characters in buffer are " from ". Certain + -- messages read better with from than at. + + ------------ + -- Set_At -- + ------------ + + procedure Set_At is + begin + if Msglen < 6 + or else Msg_Buffer (Msglen - 5 .. Msglen) /= " from " + then + Set_Msg_Str ("at "); + end if; + end Set_At; + + -- Start of processing for Set_Msg_Insertion_Line_Number + begin Set_Msg_Blank; if Loc = No_Location then - Set_Msg_Str ("at unknown location"); + Set_At; + Set_Msg_Str ("unknown location"); elsif Loc = System_Location then Set_Msg_Str ("in package System"); @@ -743,7 +763,7 @@ package body Erroutc is Sindex_Flag := Get_Source_File_Index (Flag); if Full_File_Name (Sindex_Loc) /= Full_File_Name (Sindex_Flag) then - Set_Msg_Str ("at "); + Set_At; Get_Name_String (Reference_Name (Get_Source_File_Index (Loc))); Set_Msg_Name_Buffer; @@ -752,7 +772,8 @@ package body Erroutc is -- If in current file, add text "at line " else - Set_Msg_Str ("at line "); + Set_At; + Set_Msg_Str ("line "); end if; -- Output line number for reference |