diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-05 12:18:09 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-05 12:18:09 +0200 |
commit | f2282a5810af33a473724e8e450033b6019b6778 (patch) | |
tree | 2a79d939d6a795ff0e4dd40004a784eab26657eb /gcc/ada/gnatbind.adb | |
parent | 3ce5ca7546a3772a770a7456d9575b3d10c0380e (diff) | |
download | gcc-f2282a5810af33a473724e8e450033b6019b6778.zip gcc-f2282a5810af33a473724e8e450033b6019b6778.tar.gz gcc-f2282a5810af33a473724e8e450033b6019b6778.tar.bz2 |
[multiple changes]
2010-10-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Analyze_Task_Body_Stub): Diagnose duplicate stub for
task.
2010-10-05 Vincent Celier <celier@adacore.com>
* gnatbind.adb: If the main library file is not for a suitable main
program, change the error message.
2010-10-05 Vincent Celier <celier@adacore.com>
* a-direct.ads: Minor spelling error fixes in comments.
* gnat_rm.texi: Add three entries in "Implementation Defined
Characteristics" for the interpretations of the Form parameters in
Ada.Directories.
From-SVN: r164980
Diffstat (limited to 'gcc/ada/gnatbind.adb')
-rw-r--r-- | gcc/ada/gnatbind.adb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ada/gnatbind.adb b/gcc/ada/gnatbind.adb index d388258..9285aa9 100644 --- a/gcc/ada/gnatbind.adb +++ b/gcc/ada/gnatbind.adb @@ -789,8 +789,20 @@ begin and then ALIs.Table (ALIs.First).Main_Program = None and then not No_Main_Subprogram then - Error_Msg_File_1 := Main_Lib_File; - Error_Msg ("{ does not contain a unit that can be a main program"); + Get_Name_String + (Units.Table (ALIs.Table (ALIs.First).First_Unit).Uname); + + declare + Unit_Name : String := Name_Buffer (1 .. Name_Len - 2); + begin + To_Mixed (Unit_Name); + Get_Name_String (ALIs.Table (ALIs.First).Sfile); + Add_Str_To_Name_Buffer (":1: "); + Add_Str_To_Name_Buffer (Unit_Name); + Add_Str_To_Name_Buffer (" cannot be used as a main program"); + Write_Line (Name_Buffer (1 .. Name_Len)); + Errors_Detected := Errors_Detected + 1; + end; end if; -- Perform consistency and correctness checks |