OSDN Git Service

2005-11-14 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Nov 2005 13:51:09 +0000 (13:51 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Nov 2005 13:51:09 +0000 (13:51 +0000)
commit38f5559fd6bb31438a619828fe363fea2e34d17b
tree0efbfab4fb3d55403546ebeaa30ac64cbc05ef81
parent02747205c562d60e12b1c96b8cd6d3ee6eedea3a
2005-11-14  Robert Dewar  <dewar@adacore.com>
    Ed Schonberg  <schonberg@adacore.com>

PR ada/18434

* types.ads: Include All_Checks in Suppress_Array

* checks.adb (Check_Needed): Remove kludge for a/=b rewritten as
not(a=b), since we no longer do this rewriting, and hence it is not
needed.
(Elaboration_Checks_Suppressed): Add special casing to
deal with different cases of static and dynamic elaboration checks (all
checks does not count in the first case, but does in the second).
(Expr_Known_Valid): Do not assume that the result of any arbitrary
function call is valid, since this is not the case.
(Ensure_Valid): Do not apply validity check to a real literal
in a universal or fixed context

* exp_ch4.adb (Expand_N_Op_Ne): Don't expand a/=b to not(a=b) for
elementary types using the operator in standard. It is cleaner not to
modify the programmers intent, especially in the case of floating-point.
(Rewrite_Comparison): Fix handling of /= (this was always wrong, but
it did not matter because we always rewrote a/=b to not(a=b).
(Expand_Allocator_Expression): For an allocator expression whose nominal
subtype is an unconstrained packed type, convert the expression to its
actual constrained subtype.
Implement warning for <= or >= where < or > not possible
Fix to Vax_Float tests (too early in many routines, causing premature
Vax_Float expansions.

* sem_prag.adb (Analyze_Pragma, case Obsolescent): Allow this pragma
to be used with packages and generic packages as well as with
subprograms.
(Suppress): Set All_Checks, but not Elaboration_Check, for case
of pragma Suppress (All_Checks)
(Analyze_Pragma, case Warnings): Implement first argument allowed to be
a string literal for precise control over warnings.
Avoid raise of pragma in case of unrecognized pragma and just return
instead.

* sem_prag.ads: Minor reformatting

* switch-c.adb (Scan_Front_End_Switches): Replace "raise Bad_Switch;"
with call to new procedure Bad_Switch. Call Scan_Pos with new parameter
Switch. Do not handle any exception.
Include -gnatwx as part of -gnatg (warn on redundant parens)
Allow optional = after -gnatm
(Scan_Front_End_Switches): The -gnatp switch sets All_Checks, but no
longer sets Elaboration_Checks.
Code to set warning mode moved to Sem_Warn
so that it can be shared by pragma processing.

* s-mastop-tru64.adb (Pop_Frame): Remove redundant parentheses in if
statement.

* s-taprop-solaris.adb:
Change some <= to =, to avoid new warning

* a-exexda.adb, prj-proc.adb:
Fix obvious typo (Num_Tracebacks compared <= 0 instead of < 0)
Fix obvious typo (Total_Errors_Detected <= 0 should be = 0)

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106950 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/a-exexda.adb
gcc/ada/checks.adb
gcc/ada/exp_ch4.adb
gcc/ada/prj-proc.adb
gcc/ada/s-mastop-tru64.adb
gcc/ada/s-taprop-solaris.adb
gcc/ada/sem_prag.adb
gcc/ada/sem_prag.ads
gcc/ada/switch-c.adb
gcc/ada/types.ads