diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-09 14:56:05 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-09 14:56:05 +0000 |
commit | 752e18336ccfbe2a25d896f7283716d3bef6733c (patch) | |
tree | 9d8577ad0140661a3b83d8e92d9d61821ae41213 /gcc/ada/bcheck.adb | |
parent | e24657dbcf23b08aafdddfea61c9f0b5a84ef685 (diff) | |
download | gcc-752e18336ccfbe2a25d896f7283716d3bef6733c.tar.gz |
2004-02-09 Ed Schonberg <schonberg@gnat.com>
* exp_ch4.adb (Expand_N_Op_Eq): When looking for the primitive equality
for a tagged type, verify that both formals have the same type.
* exp_ch6.adb (Add_Call_By_Copy_Code): Initialize properly the
temporary when the formal is an in-parameter and the actual a possibly
unaligned slice.
* exp_ch9.adb (Expand_Entry_Barrier): Resolve barrier expression even
when expansion is disabled, to ensure proper name capture with
overloaded literals. Condition can be of any boolean type, resolve
accordingly.
* sem_ch8.adb (Analyze_Subprogram_Renaming): Emit warning if the
renaming is for a formal subprogram with a default operator name, and
there is a usable operator that is visible at the point of
instantiation.
2004-02-09 Robert Dewar <dewar@gnat.com>
* ali.adb (Scan_Ali) Add Ignore_Errors argument. This is a major
rewrite to ignore errors in ali files, intended to allow tools downward
compatibility with new versions of ali files.
* ali.ads: Add new parameter Ignore_Errors
* bcheck.adb (Check_Consistent_Restrictions): Fix error of sometimes
duplicating the error message giving the file with restrictions.
* debug.adb: Add debug flag I for gnatbind
* errout.adb (Set_Msg_Insertion_Node): Suppress extra quotes around
operators for the case where the operator is a defining operator.
* exp_ch3.adb: Minor reformatting (new function spec format).
* exp_ch4.adb: Add comment for previous change, and make minor
adjustment to loop to always check for improper loop termination.
Minor reformatting throughout (new function spec format).
* gnatbind.adb: Implement -di debug flag for gnatbind
* gnatlink.adb: Call Scan_ALI with Ignore_Errors set to True
* gnatls.adb: Call Scan_ALI with Ignore_Errors set to True
* lib-load.adb: Fix bad assertion.
Found by testing and code reading.
Minor reformatting.
* lib-load.ads: Minor reformatting.
* lib-writ.adb: There is only one R line now.
* lib-writ.ads: Add documentation on making downward compatible changes
to ali files so old tools work with new ali files.
There is only one R line now.
Add documentation on format incompatibilities (with special GPS note)
* namet.ads, namet.adb: (Is_Operator_Name): New procedure
* par-load.adb: Minor reformatting
* sem_ch8.adb: Fix to error message from last update
Minor reformatting and restructuring of code from last update
* par-prag.adb, snames.adb, snames.ads, snames.h,
sem_prag.adb: Implement pragma Profile.
* stylesw.adb: Implement -gnatyN switch to turn off all style check
options.
* usage.adb: Add line for -gnatyN switch
* vms_data.ads: Add entry STYLE_CHECKS=NONE for -gnatyN
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77537 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/bcheck.adb')
-rw-r--r-- | gcc/ada/bcheck.adb | 71 |
1 files changed, 42 insertions, 29 deletions
diff --git a/gcc/ada/bcheck.adb b/gcc/ada/bcheck.adb index ff534ba8d13..e2a5c7ae6eb 100644 --- a/gcc/ada/bcheck.adb +++ b/gcc/ada/bcheck.adb @@ -424,7 +424,7 @@ package body Bcheck is if not Restriction_File_Output then Restriction_File_Output := True; - -- Find the ali file specifying the restriction + -- Find an ali file specifying the restriction for A in ALIs.First .. ALIs.Last loop if ALIs.Table (A).Restrictions.Set (R) @@ -463,6 +463,7 @@ package body Bcheck is Consistency_Error_Msg (M2 (1 .. P - 1)); Consistency_Error_Msg ("but the following files violate this restriction:"); + return; end; end if; end loop; @@ -491,38 +492,50 @@ package body Bcheck is -- Loop through files looking for violators for A2 in ALIs.First .. ALIs.Last loop - if ALIs.Table (A2).Restrictions.Violated (R) then - - -- We exclude predefined files from the list of - -- violators. This should be rethought. It is not - -- clear that this is the right thing to do, that - -- is particularly the case for restricted runtimes. - - if not Is_Internal_File_Name (ALIs.Table (A2).Sfile) then - Print_Restriction_File (R); - - Error_Msg_Name_1 := ALIs.Table (A2).Sfile; - - if R in All_Boolean_Restrictions then - Consistency_Error_Msg (" %"); + declare + T : ALIs_Record renames ALIs.Table (A2); - elsif R in Checked_Add_Parameter_Restrictions - or else ALIs.Table (A2).Restrictions.Count (R) > - Cumulative_Restrictions.Value (R) - then - Error_Msg_Nat_1 := - Int (ALIs.Table (A2).Restrictions.Count (R)); - - if ALIs.Table (A2).Restrictions.Unknown (R) then - Consistency_Error_Msg - (" % (count = at least #)"); - else - Consistency_Error_Msg - (" % (count = #)"); + begin + if T.Restrictions.Violated (R) then + + -- We exclude predefined files from the list of + -- violators. This should be rethought. It is not + -- clear that this is the right thing to do, that + -- is particularly the case for restricted runtimes. + + if not Is_Internal_File_Name (T.Sfile) then + + -- Case of Boolean restriction, just print file name + + if R in All_Boolean_Restrictions then + Print_Restriction_File (R); + Error_Msg_Name_1 := T.Sfile; + Consistency_Error_Msg (" %"); + + -- Case of Parameter restriction where violation + -- count exceeds restriction value, print file + -- name and count, adding "at least" if the + -- exact count is not known. + + elsif R in Checked_Add_Parameter_Restrictions + or else T.Restrictions.Count (R) > + Cumulative_Restrictions.Value (R) + then + Print_Restriction_File (R); + Error_Msg_Name_1 := T.Sfile; + Error_Msg_Nat_1 := Int (T.Restrictions.Count (R)); + + if T.Restrictions.Unknown (R) then + Consistency_Error_Msg + (" % (count = at least #)"); + else + Consistency_Error_Msg + (" % (count = #)"); + end if; end if; end if; end if; - end if; + end; end loop; end if; end loop; |