diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-24 14:27:57 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-24 14:27:57 +0000 |
commit | cf428c6cdd5b5d0454a13bca01295dce0eb5b6f3 (patch) | |
tree | 0a12ec5ac120be7136240c0da374db97ce907515 /gcc/ada/par-load.adb | |
parent | b22984b606f05457b09bf5d31dd9888818eadc5e (diff) | |
download | gcc-cf428c6cdd5b5d0454a13bca01295dce0eb5b6f3.tar.gz |
2003-11-24 Jose Ruiz <ruiz@act-europe.fr>
* Makefile.in:
Use 5zintman.ads for VxWorks targets. This file avoid confusion between
signals and interrupts.
* 5zintman.ads: New File.
* 5zintman.adb: Replace Exception_Interrupts by Exception_Signals, and
add exception signals to the set of unmasked signals.
* 5ztaprop.adb:
Use Abort_Task_Signal instead of Abort_Task_Interrupt to avoid confusion
between signals and interrupts.
Add to Unblocked_Signal_Mask the set of signals that are in
Keep_Unmasked.
* 7sinmaop.adb:
Adding a check to see whether the Interrupt_ID we want to unmask is in
the range of Keep_Unmasked (in procedure Interrupt_Self_Process). The
reason is that the index type of the Keep_Unmasked array is not always
Interrupt_ID; it may be a subtype of Interrupt_ID.
2003-11-24 Gary Dismukes <dismukes@gnat.com>
* exp_util.adb:
(Remove_Side_Effects): Condition constantness of object created for a
an unchecked type conversion on the constantness of the expression
to ensure the correct value for 'Constrained when passing components
of view-converted class-wide objects.
2003-11-24 Robert Dewar <dewar@gnat.com>
* par-load.adb (Load): Improve handling of misspelled and missing units
Removes several cases of compilation abandoned messages
* lib.adb: (Remove_Unit): New procedure
* lib.ads: (Remove_Unit): New procedure
* lib-load.adb: Minor reformatting
2003-11-24 Vincent Celier <celier@gnat.com>
* make.adb:
(Gnatmake, Initialize): Call Usage instead of Makeusg directly
(Marking_Label): Label to mark processed source files. Incremented for
each executable.
(Gnatmake): Increase Marking_Labet for each executable
(Is_Marked): Compare against marking label
(Mark): Mark with marking label
2003-11-24 Jerome Guitton <guitton@act-europe.fr>
* s-thread.ads:
Move the declaration of the TSD for System.Threads to System.Soft_Links.
Add some comments.
* Makefile.in: Added target pair for s-thread.adb for cert runtime.
(rts-cert): build a single relocatable object for the run-time lib.
Fix perms.
2003-11-24 Vasiliy Fofanov <fofanov@act-europe.fr>
* Make-lang.in:
Use gnatls rather than gcc to obtain the location of GNAT RTL for
crosstools build.
2003-11-24 Sergey Rybin <rybin@act-europe.fr>
* opt.adb (Tree_Write): Gnat_Version_String is now a function, so we
can not use it as before (that is, as a variable) when dumping it into
the tree file. Add a local variable to store the result of this
function and to be used as the string to be written into the tree.
* scn.adb (Initialize_Scanner): Add comments explaining the recent
changes.
* sinput.adb (Source_First, Source_Last): In case of
Internal_Source_File, replace returning attributes of
Internal_Source_Ptr (which is wrong) with returning attributes of
Internal_Source.
2003-11-24 Ed Schonberg <schonberg@gnat.com>
* sem_ch3.adb:
(New_Concatenation_Op): Proper name for New_Binary_Operator, only
used for implicit concatenation operators.
Code cleanup.
* sem_elab.adb:
(Check_Elab_Call): Set No_Elaboration_Check appropriately on calls in
task bodies that are in the scope of a Suppress pragma.
(Check_A Call): Use the flag to prevent spurious elaboration checks.
* sinfo.ads, sinfo.adb:
New flag No_Elaboration_Check on function/procedure calls, to properly
suppress checks on calls in task bodies that are within a local suppress
pragma.
* exp_ch4.adb:
(Expand_Concatenate_Other): Use the proper integer type for the
expression for the upper bound, to avoid universal_integer computations
when possible.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73874 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-load.adb')
-rw-r--r-- | gcc/ada/par-load.adb | 66 |
1 files changed, 45 insertions, 21 deletions
diff --git a/gcc/ada/par-load.adb b/gcc/ada/par-load.adb index fb0f2684f6c..163fb0b13e8 100644 --- a/gcc/ada/par-load.adb +++ b/gcc/ada/par-load.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2002 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2003 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- -- @@ -42,6 +42,8 @@ with Sinput.L; use Sinput.L; with Stylesw; use Stylesw; with Validsw; use Validsw; +with GNAT.Spelling_Checker; use GNAT.Spelling_Checker; + separate (Par) procedure Load is @@ -188,26 +190,45 @@ begin or else Name_Buffer (1) = 'g') then - -- In the predefined file case, we know the user did not construct - -- their own package, but we got the wrong one. This means that the - -- name supplied by the user crunched to something we recognized, - -- but then the file did not contain the unit expected. Most likely - -- this is due to a misspelling, e.g. - - -- with Ada.Calender; - - -- This crunches to a-calend, which indeed contains the unit - -- Ada.Calendar, and we can diagnose the misspelling. This is - -- a simple heuristic, but it catches many common cases of - -- misspelling of predefined unit names without needing a full - -- list of them. - - Error_Msg_Name_1 := Expected_Unit (Cur_Unum); - Error_Msg ("% is not a predefined library unit!", Loc); - Error_Msg_Name_1 := Unit_Name (Cur_Unum); - Error_Msg ("possible misspelling of %!", Loc); + declare + Expect_Name : constant Name_Id := Expected_Unit (Cur_Unum); + Actual_Name : constant Name_Id := Unit_Name (Cur_Unum); + + begin + Error_Msg_Name_1 := Expect_Name; + Error_Msg ("% is not a predefined library unit!", Loc); + + -- In the predefined file case, we know the user did not + -- construct their own package, but we got the wrong one. + -- This means that the name supplied by the user crunched + -- to something we recognized, but then the file did not + -- contain the unit expected. Most likely this is due to + -- a misspelling, e.g. + + -- with Ada.Calender; + + -- This crunches to a-calend, which indeed contains the unit + -- Ada.Calendar, and we can diagnose the misspelling. This + -- is a simple heuristic, but it catches many common cases + -- of misspelling of predefined unit names without needing + -- a full list of them. + + -- Before actually issinying the message, we will check that the + -- unit name is indeed a plausible misspelling of the one we got. + + if Is_Bad_Spelling_Of + (Found => Get_Name_String (Expect_Name), + Expect => Get_Name_String (Actual_Name)) + then + Error_Msg_Name_1 := Actual_Name; + Error_Msg ("possible misspelling of %!", Loc); + end if; + end; - -- Non-predefined file name case + -- Non-predefined file name case. In this case we generate a message + -- and then we quit, because we are in big trouble, and if we try + -- to continue compilation, we get into some nasty situations + -- (for example in some subunit cases). else Error_Msg ("file { does not contain expected unit!", Loc); @@ -217,7 +238,10 @@ begin Error_Msg ("found unit $!", Loc); end if; - raise Unrecoverable_Error; + -- In both cases, remove the unit if it is the last unit (which it + -- normally (always?) will be) so that it is out of the way later. + + Remove_Unit (Cur_Unum); end if; -- If current unit is a body, load its corresponding spec |