diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-10-10 13:01:42 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-10-10 13:01:42 +0200 |
commit | 11d59a86830fe41e96a652762c210649bdb549a2 (patch) | |
tree | 31eec373b3d31c6c1f3aa8047deeb53c6ad5a2bb /gcc/ada/sem_warn.adb | |
parent | 27a8f1502021f7d789a6d6970c73ba7ca703e0fd (diff) | |
download | gcc-11d59a86830fe41e96a652762c210649bdb549a2.zip gcc-11d59a86830fe41e96a652762c210649bdb549a2.tar.gz gcc-11d59a86830fe41e96a652762c210649bdb549a2.tar.bz2 |
[multiple changes]
2013-10-10 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Minor fix.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
Address): Remove the Comes_From_Source test for the overlap
warning.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_util.adb: Minor code reorganization (use Nkind_In).
* sem_warn.adb: Minor code reorganization (optimization in
Check_Unset_Reference).
* exp_ch9.adb, exp_ch4.adb, sinfo.ads: Minor reformatting.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch7.adb (Install_Parent_Private_Declarations): When
instantiating a child unit, do not install private declaration of
a non-generic ancestor of the generic that is also an ancestor
of the current unit: its private part will be installed when
private part of ancestor itself is analyzed.
2013-10-10 Thomas Quinot <quinot@adacore.com>
* freeze.adb (Check_Component_Storage_Order): Retrieve component
aliased status from type entities directly instead of going back
to original component definition.
* sem_ch7.adb: Minor reformatting.
From-SVN: r203349
Diffstat (limited to 'gcc/ada/sem_warn.adb')
-rw-r--r-- | gcc/ada/sem_warn.adb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index 68c3ca8..8315e65 100644 --- a/gcc/ada/sem_warn.adb +++ b/gcc/ada/sem_warn.adb @@ -1674,6 +1674,15 @@ package body Sem_Warn is return; end if; + -- Nothing to do for numeric or string literal. Do this test early to + -- save time in a common case (it does not matter that we do not include + -- character literal here, since that will be caught later on in the + -- when others branch of the case statement). + + if Nkind (N) in N_Numeric_Or_String_Literal then + return; + end if; + -- Ignore reference unless it comes from source. Almost always if we -- have a reference from generated code, it is bogus (e.g. calls to init -- procs to set default discriminant values). @@ -1707,7 +1716,7 @@ package body Sem_Warn is and then (No (Unset_Reference (E)) or else Earlier_In_Extended_Unit - (Sloc (N), Sloc (Unset_Reference (E)))) + (Sloc (N), Sloc (Unset_Reference (E)))) and then not Has_Pragma_Unmodified_Check_Spec (E) and then not Warnings_Off_Check_Spec (E) then |