diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 15:15:51 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 15:15:51 +0100 |
commit | cca5ded0939249809c40e5365016757575b12a1e (patch) | |
tree | 58392f634fbd738dab8482428c64bf74d1f7c955 /gcc | |
parent | 509f7fdc0e4ae68b9be0d526fe3ca1a04edfcf39 (diff) | |
download | gcc-cca5ded0939249809c40e5365016757575b12a1e.zip gcc-cca5ded0939249809c40e5365016757575b12a1e.tar.gz gcc-cca5ded0939249809c40e5365016757575b12a1e.tar.bz2 |
[multiple changes]
2009-11-30 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Remove list of warning letters, and refer instead to
using gnatmake to get a brief list.
* debug.adb: Document -gnatd.i to disable pragma Warnings
* par-prag.adb, sem_prag.adb: Recognize -gnatd.i to disable Warnings
pragma.
* vms_data.ads: Add /NOWARNINGS_PRAGMS for -gnatd.i
2009-11-30 Geert Bosch <bosch@adacore.com>
* a-ngelfu.adb (Sin): Correct spelling of sine in comment.
2009-11-30 Vincent Celier <celier@adacore.com>
* gnatls.adb: Do not call Get_Target_Parameters in Verbose_Mode, as it
is not needed and gnatls fails when called with -v -nostdinc.
2009-11-30 Emmanuel Briot <briot@adacore.com>
* osint.adb, osint.ads (File_Time_Stamp): new subprogram.
From-SVN: r154807
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 23 | ||||
-rw-r--r-- | gcc/ada/a-ngelfu.adb | 2 | ||||
-rw-r--r-- | gcc/ada/debug.adb | 6 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 79 | ||||
-rw-r--r-- | gcc/ada/gnatls.adb | 3 | ||||
-rw-r--r-- | gcc/ada/osint.adb | 14 | ||||
-rw-r--r-- | gcc/ada/osint.ads | 3 | ||||
-rw-r--r-- | gcc/ada/par-prag.adb | 5 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 8 | ||||
-rw-r--r-- | gcc/ada/vms_data.ads | 8 |
10 files changed, 73 insertions, 78 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a735c07..fb729dc 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,26 @@ +2009-11-30 Robert Dewar <dewar@adacore.com> + + * gnat_rm.texi: Remove list of warning letters, and refer instead to + using gnatmake to get a brief list. + + * debug.adb: Document -gnatd.i to disable pragma Warnings + * par-prag.adb, sem_prag.adb: Recognize -gnatd.i to disable Warnings + pragma. + * vms_data.ads: Add /NOWARNINGS_PRAGMS for -gnatd.i + +2009-11-30 Geert Bosch <bosch@adacore.com> + + * a-ngelfu.adb (Sin): Correct spelling of sine in comment. + +2009-11-30 Vincent Celier <celier@adacore.com> + + * gnatls.adb: Do not call Get_Target_Parameters in Verbose_Mode, as it + is not needed and gnatls fails when called with -v -nostdinc. + +2009-11-30 Emmanuel Briot <briot@adacore.com> + + * osint.adb, osint.ads (File_Time_Stamp): new subprogram. + 2009-11-30 Ed Schonberg <schonberg@adacore.com> * gnat_rm.texi, gnat_ugn.texi: Document new syntax for pragma Annotate diff --git a/gcc/ada/a-ngelfu.adb b/gcc/ada/a-ngelfu.adb index fcc08d4..b615f9d 100644 --- a/gcc/ada/a-ngelfu.adb +++ b/gcc/ada/a-ngelfu.adb @@ -807,7 +807,7 @@ package body Ada.Numerics.Generic_Elementary_Functions is -- The following two reductions reduce the argument to the interval -- [-0.25 * Cycle, 0.25 * Cycle]. This reduction is exact and is needed - -- to prevent inaccuracy that may result if the sinus function uses a + -- to prevent inaccuracy that may result if the sine function uses a -- different (more accurate) value of Pi in its reduction than is used -- in the multiplication with Two_Pi. diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index f60a67b..ca207b2 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -99,7 +99,7 @@ package body Debug is -- d.f Inhibit folding of static expressions -- d.g Enable conversion of raise into goto -- d.h - -- d.i + -- d.i Ignore Warnings pragmas -- d.j -- d.k -- d.l Use Ada 95 semantics for limited function returns @@ -513,6 +513,10 @@ package body Debug is -- this if this debug flag is set. Later we will enable this more -- generally by default. + -- d.i Ignore all occurrences of pragma Warnings in the sources. This can + -- be used in particular to disable Warnings (Off) to check if any of + -- these statements are inappropriate. + -- d.l Use Ada 95 semantics for limited function returns. This may be -- used to work around the incompatibility introduced by AI-318-2. -- It is useful only in -gnat05 mode. diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 1c7f64e..2f09ddc 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -5197,80 +5197,12 @@ The form with a single static_string_EXPRESSION argument provides more precise control over which warnings are active. The string is a list of letters specifying which warnings are to be activated and which deactivated. The code for these letters is the same as the string used in the command -line switch controlling warnings. The following is a brief summary. For +line switch controlling warnings. For a brief summary, use the gnatmake +command with no arguments, which will generate usage information containing +the list of warnings switches supported. For full details see @ref{Warning Message Control,,, gnat_ugn, @value{EDITION} User's Guide}. -@smallexample -a turn on all optional warnings (except d h l .o) -A turn off all optional warnings -.a* turn on warnings for failing assertions -.A turn off warnings for failing assertions -b turn on warnings for bad fixed value (not multiple of small) -B* turn off warnings for bad fixed value (not multiple of small) -.b* turn on warnings for biased representation -.B turn off warnings for biased representation -c turn on warnings for constant conditional -C* turn off warnings for constant conditional -.c turn on warnings for unrepped components -.C* turn off warnings for unrepped components -d turn on warnings for implicit dereference -D* turn off warnings for implicit dereference -e treat all warnings as errors -.e turn on every optional warning -f turn on warnings for unreferenced formal -F* turn off warnings for unreferenced formal -g* turn on warnings for unrecognized pragma -G turn off warnings for unrecognized pragma -h turn on warnings for hiding variable -H* turn off warnings for hiding variable -i* turn on warnings for implementation unit -I turn off warnings for implementation unit -j turn on warnings for obsolescent (annex J) feature -J* turn off warnings for obsolescent (annex J) feature -k turn on warnings on constant variable -K* turn off warnings on constant variable -l turn on warnings for missing elaboration pragma -L* turn off warnings for missing elaboration pragma -m turn on warnings for variable assigned but not read -M* turn off warnings for variable assigned but not read -n* normal warning mode (cancels -gnatws/-gnatwe) -o* turn on warnings for address clause overlay -O turn off warnings for address clause overlay -.o turn on warnings for out parameters assigned but not read -.O* turn off warnings for out parameters assigned but not read -p turn on warnings for ineffective pragma Inline in frontend -P* turn off warnings for ineffective pragma Inline in frontend -.p turn on warnings for parameter ordering -.P* turn off warnings for parameter ordering -q* turn on warnings for questionable missing parentheses -Q turn off warnings for questionable missing parentheses -r turn on warnings for redundant construct -R* turn off warnings for redundant construct -.r turn on warnings for object renaming function -.R* turn off warnings for object renaming function -s suppress all warnings -t turn on warnings for tracking deleted code -T* turn off warnings for tracking deleted code -u turn on warnings for unused entity -U* turn off warnings for unused entity -v* turn on warnings for unassigned variable -V turn off warnings for unassigned variable -w* turn on warnings for wrong low bound assumption -W turn off warnings for wrong low bound assumption -.w turn on warnings for unnecessary Warnings Off pragmas -.W* turn off warnings for unnecessary Warnings Off pragmas -x* turn on warnings for export/import -X turn off warnings for export/import -.x turn on warnings for non-local exceptions -.X* turn off warnings for non-local exceptions -y* turn on warnings for Ada 2005 incompatibility -Y turn off warnings for Ada 2005 incompatibility -z* turn on convention/size/align warnings for unchecked conversion -Z turn off convention/size/align warnings for unchecked conversion -* indicates default in above list -@end smallexample - @noindent The specified warnings will be in effect until the end of the program or another pragma Warnings is encountered. The effect of the pragma is @@ -5308,6 +5240,11 @@ pragma Warnings (On, Pattern); In this usage, the pattern string must match in the Off and On pragmas, and at least one matching warning must be suppressed. +Note: the debug flag -gnatd.i (@code{/NOWARNINGS_PRAGMAS} in VMS) can be +used to cause the compiler to entirely ignore all WARNINGS pragmas. This can +be useful in checking whether obsolete pragmas in existing programs are hiding +real problems. + @node Pragma Weak_External @unnumberedsec Pragma Weak_External @findex Weak_External diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb index 5b43318..b5a3f49 100644 --- a/gcc/ada/gnatls.adb +++ b/gcc/ada/gnatls.adb @@ -40,7 +40,6 @@ with Rident; use Rident; with Sdefault; with Snames; with Switch; use Switch; -with Targparm; use Targparm; with Types; use Types; with GNAT.Case_Util; use GNAT.Case_Util; @@ -1574,8 +1573,6 @@ begin Osint.Add_Default_Search_Dirs; if Verbose_Mode then - Targparm.Get_Target_Parameters; - Write_Eol; Display_Version ("GNATLS", "1997"); Write_Eol; diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb index 5aa8458..510e1e9 100644 --- a/gcc/ada/osint.adb +++ b/gcc/ada/osint.adb @@ -1079,6 +1079,20 @@ package body Osint is return Internal (Name, Attr.all'Address); end File_Time_Stamp; + function File_Time_Stamp + (Name : Path_Name_Type; + Attr : access File_Attributes) return Time_Stamp_Type is + begin + if Name = No_Path then + return Empty_Time_Stamp; + end if; + + Get_Name_String (Name); + Name_Buffer (Name_Len + 1) := ASCII.NUL; + return OS_Time_To_GNAT_Time + (File_Time_Stamp (Name_Buffer'Address, Attr)); + end File_Time_Stamp; + ---------------- -- File_Stamp -- ---------------- diff --git a/gcc/ada/osint.ads b/gcc/ada/osint.ads index f4993ef..faeaf10 100644 --- a/gcc/ada/osint.ads +++ b/gcc/ada/osint.ads @@ -273,6 +273,9 @@ package Osint is function File_Time_Stamp (Name : C_File_Name; Attr : access File_Attributes) return OS_Time; + function File_Time_Stamp + (Name : Path_Name_Type; + Attr : access File_Attributes) return Time_Stamp_Type; -- Return the time stamp of the file function Is_Readable_File diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb index 6775690..8d823ce 100644 --- a/gcc/ada/par-prag.adb +++ b/gcc/ada/par-prag.adb @@ -974,10 +974,11 @@ begin -- The one argument ON/OFF case is processed by the parser, since it may -- control parser warnings as well as semantic warnings, and in any case -- we want to be absolutely sure that the range in the warnings table is - -- set well before any semantic analysis is performed. + -- set well before any semantic analysis is performed. Note that we + -- ignore this pragma if debug flag -gnatd.i is set. when Pragma_Warnings => - if Arg_Count = 1 then + if Arg_Count = 1 and then not Debug_Flag_Dot_I then Check_No_Identifier (Arg1); declare diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index fd1a377..7343986 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -12006,6 +12006,14 @@ package body Sem_Prag is Check_At_Least_N_Arguments (1); Check_No_Identifiers; + -- If debug flag -gnatd.i is set, pragma is ignored + + if Debug_Flag_Dot_I then + return; + end if; + + -- Process various forms of the pragma + declare Argx : constant Node_Id := Get_Pragma_Arg (Arg1); diff --git a/gcc/ada/vms_data.ads b/gcc/ada/vms_data.ads index aac1c78..5b3fa77 100644 --- a/gcc/ada/vms_data.ads +++ b/gcc/ada/vms_data.ads @@ -1933,6 +1933,13 @@ package VMS_Data is -- -- Do not look for library files in the system default directory. + S_GCC_NoWarnP : aliased constant S := "/NOWARNING_PRAGMAS " & + "-gnatd.i"; + -- /NOWARNING_PRAGMAS + -- + -- Causes all Warnings pragmas to be ignored. Useful to check if the + -- program has obsolete warnings pragmas that are hiding problems. + S_GCC_Opt : aliased constant S := "/OPTIMIZE=" & "ALL " & "-O2,!-O0,!-O1,!-O3 " & @@ -3473,6 +3480,7 @@ package VMS_Data is S_GCC_Noload 'Access, S_GCC_Nostinc 'Access, S_GCC_Nostlib 'Access, + S_GCC_NoWarnP 'Access, S_GCC_Opt 'Access, S_GCC_OptX 'Access, S_GCC_Pointer 'Access, |