diff options
author | Robert Dewar <dewar@adacore.com> | 2006-10-31 18:52:20 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2006-10-31 18:52:20 +0100 |
commit | 4ecc031cdb794be4acb8a2824350d1c6c36c9566 (patch) | |
tree | 586f0245e6ae4921b36d6b6710dad5c2709422d7 /gcc/ada/switch-c.adb | |
parent | 6e443c90131e82b5140c8e3c565fbf9e1da77110 (diff) | |
download | gcc-4ecc031cdb794be4acb8a2824350d1c6c36c9566.zip gcc-4ecc031cdb794be4acb8a2824350d1c6c36c9566.tar.gz gcc-4ecc031cdb794be4acb8a2824350d1c6c36c9566.tar.bz2 |
errout.ads, errout.adb (Finalize): Implement switch -gnatd.m Avoid abbreviation Creat
2006-10-31 Robert Dewar <dewar@adacore.com>
* errout.ads, errout.adb (Finalize): Implement switch -gnatd.m
Avoid abbreviation Creat
(Finalize): List all sources in extended mail source if -gnatl
switch is active.
Suppress copyright notice to file in -gnatl=f mode if -gnatd7 set
(Finalize): Implement new -gnatl=xxx switch to output listing to file
(Set_Specific_Warning_On): New procedure
(Set_Specific_Warning_Off): New procedure
Add implementation of new insertion \\
(Error_Msg_Internal): Add handling for Error_Msg_Line_Length
(Unwind_Internal_Type): Improve report on anonymous access_to_subprogram
types.
(Error_Msg_Internal): Make sure that we set Last_Killed to
True when a message from another package is suppressed.
Implement insertion character ~ (insert string)
(First_Node): Minor adjustments to get better placement.
* frontend.adb:
Implement new -gnatl=xxx switch to output listing to file
* gnat1drv.adb:
Implement new -gnatl=xxx switch to output listing to file
* opt.ads: (Warn_On_Questionable_Missing_Paren): New switch
(Commands_To_Stdout): New flag
Implement new -gnatl=xxx switch to output listing to file
New switch Dump_Source_Text
(Warn_On_Deleted_Code): New warning flag for -gnatwt
Define Error_Msg_Line_Length
(Warn_On_Assumed_Low_Bound): New switch
* osint.ads, osint.adb
(Normalize_Directory_Name): Fix bug.
Implement new -gnatl=xxx switch to output listing to file
(Concat): Removed, replaced by real concatenation
Make use of concatenation now allowed in compiler
(Executable_Prefix.Get_Install_Dir): First get the full path, so that
we find the 'lib' or 'bin' directory even when the tool has been
invoked with a relative path.
(Executable_Name): New function taking string parameters.
* osint-c.ads, osint-c.adb:
Implement new -gnatl=xxx switch to output listing to file
* sinput-d.adb: Change name Creat_Debug_File to Create_Debug_File
* switch-c.adb:
Implement new -gnatl=xxx switch to output listing to file
Recognize new -gnatL switch
(no longer keep in old warning about old style usage)
Use concatenation to simplify code
Recognize -gnatjnn switch
(Scan_Front_End_Switches): Clean up handling of -gnatW
(Scan_Front_End_Switches): Include Warn_On_Assumed_Low_Bound for -gnatg
From-SVN: r118251
Diffstat (limited to 'gcc/ada/switch-c.adb')
-rw-r--r-- | gcc/ada/switch-c.adb | 57 |
1 files changed, 37 insertions, 20 deletions
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index 1428aa7..bd30fb9 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -498,6 +498,7 @@ package body Switch.C is Constant_Condition_Warnings := True; Implementation_Unit_Warnings := True; Ineffective_Inline_Warnings := True; + Warn_On_Assumed_Low_Bound := True; Warn_On_Bad_Fixed_Value := True; Warn_On_Constant := True; Warn_On_Export_Import := True; @@ -553,6 +554,19 @@ package body Switch.C is Bad_Switch (C); end if; + -- Processing for j switch + + when 'j' => + Ptr := Ptr + 1; + + -- There may be an equal sign between -gnatj and the value + + if Ptr <= Max and then Switch_Chars (Ptr) = '=' then + Ptr := Ptr + 1; + end if; + + Scan_Nat (Switch_Chars, Max, Ptr, Error_Msg_Line_Length, C); + -- Processing for k switch when 'k' => @@ -566,12 +580,23 @@ package body Switch.C is Ptr := Ptr + 1; Full_List := True; + -- There may be an equal sign between -gnatl and a file name + + if Ptr <= Max and then Switch_Chars (Ptr) = '=' then + if Ptr = Max then + Osint.Fail ("file name for -gnatl= is null"); + else + Opt.Full_List_File_Name := + new String'(Switch_Chars (Ptr + 1 .. Max)); + Ptr := Max + 1; + end if; + end if; + -- Processing for L switch when 'L' => Ptr := Ptr + 1; - Osint.Fail - ("-gnatL is no longer supported: consider using --RTS=sjlj"); + Dump_Source_Text := True; -- Processing for m switch @@ -584,7 +609,7 @@ package body Switch.C is Ptr := Ptr + 1; end if; - Scan_Pos (Switch_Chars, Max, Ptr, Maximum_Errors, C); + Scan_Nat (Switch_Chars, Max, Ptr, Maximum_Errors, C); -- Processing for n switch @@ -805,15 +830,13 @@ package body Switch.C is Bad_Switch (C); end if; - for J in WC_Encoding_Method loop - if Switch_Chars (Ptr) = WC_Encoding_Letters (J) then - Wide_Character_Encoding_Method := J; - exit; - - elsif J = WC_Encoding_Method'Last then + begin + Wide_Character_Encoding_Method := + Get_WC_Encoding_Method (Switch_Chars (Ptr)); + exception + when Constraint_Error => Bad_Switch (C); - end if; - end loop; + end; Upper_Half_Encoding := Wide_Character_Encoding_Method in @@ -856,15 +879,9 @@ package body Switch.C is (Switch_Chars (Ptr .. Max), OK, Ptr); if not OK then - declare - R : String (1 .. Style_Msg_Len + 20); - begin - R (1 .. 19) := "bad -gnaty switch ("; - R (20 .. R'Last - 1) := - Style_Msg_Buf (1 .. Style_Msg_Len); - R (R'Last) := ')'; - Osint.Fail (R); - end; + Osint.Fail + ("bad -gnaty switch (" & + Style_Msg_Buf (1 .. Style_Msg_Len) & ')'); end if; Ptr := First_Char + 1; |