diff options
author | Robert Dewar <dewar@adacore.com> | 2009-04-07 14:52:29 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-07 16:52:29 +0200 |
commit | dcd8728b8e5ad2b9920f184e028850553b243ba4 (patch) | |
tree | 9f06a3c5b8275f9577f39b3bdb7771fd3f574e8f /gcc/ada | |
parent | 0609b35537e3c1c5677632064635e24bc257ee25 (diff) | |
download | gcc-dcd8728b8e5ad2b9920f184e028850553b243ba4.zip gcc-dcd8728b8e5ad2b9920f184e028850553b243ba4.tar.gz gcc-dcd8728b8e5ad2b9920f184e028850553b243ba4.tar.bz2 |
gnat_ugn.texi: Document -gnatDnn/-gnatGnn
2009-04-07 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Document -gnatDnn/-gnatGnn
* opt.ads (Sprint_Line_Limit): New parameter
* sprint.adb: Usa Sprint_Line_Limit instead of Line_Limit throughout
* switch-c.adb: Recognize -gnatDnnn and -gnatGnnn switches
* usage.adb: Output information for -gnatGnn -gnatDnn
* make.adb: Minor reformatting
* mlib-tgt-specific-vms-alpha.adb: Minor reformatting
* mlib-tgt-specific-vms-ia64.adb: Minor reformatting
From-SVN: r145677
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 24 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 20 | ||||
-rw-r--r-- | gcc/ada/make.adb | 2 | ||||
-rw-r--r-- | gcc/ada/mlib-tgt-specific-vms-alpha.adb | 2 | ||||
-rw-r--r-- | gcc/ada/mlib-tgt-specific-vms-ia64.adb | 2 | ||||
-rw-r--r-- | gcc/ada/opt.ads | 4 | ||||
-rw-r--r-- | gcc/ada/sprint.adb | 13 | ||||
-rw-r--r-- | gcc/ada/switch-c.adb | 14 | ||||
-rw-r--r-- | gcc/ada/usage.adb | 10 |
9 files changed, 72 insertions, 19 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0bf73e7..ea28b0e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,29 @@ 2009-04-07 Robert Dewar <dewar@adacore.com> + * gnat_ugn.texi: Document -gnatDnn/-gnatGnn + + * opt.ads (Sprint_Line_Limit): New parameter + + * sprint.adb: Usa Sprint_Line_Limit instead of Line_Limit throughout + + * switch-c.adb: Recognize -gnatDnnn and -gnatGnnn switches + + * usage.adb: Output information for -gnatGnn -gnatDnn + +2009-04-07 Robert Dewar <dewar@adacore.com> + + * make.adb: Minor reformatting + +2009-04-07 Robert Dewar <dewar@adacore.com> + + * mlib-tgt-specific-vms-alpha.adb: Minor reformatting + +2009-04-07 Robert Dewar <dewar@adacore.com> + + * mlib-tgt-specific-vms-ia64.adb: Minor reformatting + +2009-04-07 Robert Dewar <dewar@adacore.com> + * checks.adb: Remove Assume_Valid parameter from In_Subrange_Of calls diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 78cca28..50ccad4 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -3886,7 +3886,7 @@ programmers, and these are documented at appropriate points in this users guide. @item -gnatD -@cindex @option{-gnatD} (@command{gcc}) +@cindex @option{-gnatD[nn]} (@command{gcc}) Create expanded source files for source level debugging. This switch also suppress generation of cross-reference information (see @option{-gnatx}). @@ -3952,8 +3952,8 @@ Note that @option{^-gnatg^/GNAT_INTERNAL^} implies so that all standard warnings and all standard style options are turned on. All warnings and style error messages are treated as errors. -@item -gnatG -@cindex @option{-gnatG} (@command{gcc}) +@item -gnatGnn +@cindex @option{-gnatG[nn]} (@command{gcc}) List generated expanded code in source form. @item ^-gnath^/HELP^ @@ -6781,7 +6781,7 @@ switches in the body of the @code{Debug} unit in the compiler source file @file{debug.adb}. @end ifclear -@item -gnatG +@item -gnatG[nn] @cindex @option{-gnatG} (@command{gcc}) This switch causes the compiler to generate auxiliary output containing a pseudo-source listing of the generated expanded code. Like most Ada @@ -6796,6 +6796,11 @@ generate a lot of run-time code. By using @option{-gnatG} you can identify these cases, and consider whether it may be desirable to modify the coding approach to improve efficiency. +The optional parameter @code{nn} if present after -gnatG specifies an +alternative maximum line length that overrides the normal default of 72. +This value is in the range 40-999999, values less than 40 being silently +reset to 40. + The format of the output is very similar to standard Ada source, and is easily understood by an Ada programmer. The following special syntactic additions correspond to low level features used in the generated code that @@ -6879,7 +6884,7 @@ representation in base 2-16 (for example, the result of compile time evaluation of the expression 1.0/27.0). @end table -@item -gnatD +@item -gnatD[nn] @cindex @option{-gnatD} (@command{gcc}) When used in conjunction with @option{-gnatG}, this switch causes the expanded source, as described above for @@ -6907,6 +6912,11 @@ If the switch @option{-gnatL} is used in conjunction with @option{-gnatDG}, then the original source lines are interspersed in the expanded source (as comment lines with the original line number). +The optional parameter @code{nn} if present after -gnatD specifies an +alternative maximum line length that overrides the normal default of 72. +This value is in the range 40-999999, values less than 40 being silently +reset to 40. + @item -gnatr @cindex @option{-gnatr} (@command{gcc}) @cindex pragma Restrictions diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index f79cbe5..3df5482 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -1888,7 +1888,7 @@ package body Make is return; end if; - -- Do the same check for each of the withed units. + -- Do the same check for each of the withed units W_Check : for W in Units.Table (U).First_With diff --git a/gcc/ada/mlib-tgt-specific-vms-alpha.adb b/gcc/ada/mlib-tgt-specific-vms-alpha.adb index f272307..0c4ab95 100644 --- a/gcc/ada/mlib-tgt-specific-vms-alpha.adb +++ b/gcc/ada/mlib-tgt-specific-vms-alpha.adb @@ -46,7 +46,7 @@ with System.CRTL; use System.CRTL; package body MLib.Tgt.Specific is - -- Non default subprogram. See comment in mlib-tgt.ads. + -- Non default subprogram. See comment in mlib-tgt.ads procedure Build_Dynamic_Library (Ofiles : Argument_List; diff --git a/gcc/ada/mlib-tgt-specific-vms-ia64.adb b/gcc/ada/mlib-tgt-specific-vms-ia64.adb index ed48387..c133ef0 100644 --- a/gcc/ada/mlib-tgt-specific-vms-ia64.adb +++ b/gcc/ada/mlib-tgt-specific-vms-ia64.adb @@ -46,7 +46,7 @@ with System.CRTL; use System.CRTL; package body MLib.Tgt.Specific is - -- Non default subprogram. See comment in mlib-tgt.ads. + -- Non default subprogram, see comment in mlib-tgt.ads procedure Build_Dynamic_Library (Ofiles : Argument_List; diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index 810f4d5..1aba6eb 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -1024,6 +1024,10 @@ package Opt is -- option for GNATBIND and to False when using the -static option. The -- value of this flag is set by Gnatbind.Scan_Bind_Arg. + Sprint_Line_Limit : Nat := 72; + -- Limit values for chopping long lines in Sprint output, can be reset + -- by use of NNN parameter with -gnatG or -gnatD switches. + Stack_Checking_Enabled : Boolean; -- GNAT -- Set to indicate if -fstack-check switch is set for the compilation. True diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index ad20565..1ea8bac 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -87,9 +87,6 @@ package body Sprint is -- This keeps track of the physical line number of the last source line -- that has been output. The value is only valid in Dump_Source_Text mode. - Line_Limit : constant := 72; - -- Limit value for chopping long lines - ------------------------------- -- Operator Precedence Table -- ------------------------------- @@ -355,7 +352,7 @@ package body Sprint is procedure Col_Check (N : Nat) is begin - if N + Column > Line_Limit then + if N + Column > Sprint_Line_Limit then Write_Indent_Str (" "); end if; end Col_Check; @@ -1119,7 +1116,7 @@ package body Sprint is Sprint_Indented_List (Statements (Node)); when N_Character_Literal => - if Column > 70 then + if Column > Sprint_Line_Limit - 2 then Write_Indent_Str (" "); end if; @@ -2723,7 +2720,7 @@ package body Sprint is Write_Char (')'); when N_String_Literal => - if String_Length (Strval (Node)) + Column > 75 then + if String_Length (Strval (Node)) + Column > Sprint_Line_Limit then Write_Indent_Str (" "); end if; @@ -4216,7 +4213,7 @@ package body Sprint is procedure Write_Str_With_Col_Check (S : String) is begin - if Int (S'Last) + Column > Line_Limit then + if Int (S'Last) + Column > Sprint_Line_Limit then Write_Indent_Str (" "); if S (S'First) = ' ' then @@ -4236,7 +4233,7 @@ package body Sprint is procedure Write_Str_With_Col_Check_Sloc (S : String) is begin - if Int (S'Last) + Column > Line_Limit then + if Int (S'Last) + Column > Sprint_Line_Limit then Write_Indent_Str (" "); if S (S'First) = ' ' then diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index 0da8f66..a7299ab 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -279,6 +279,13 @@ package body Switch.C is when 'D' => Ptr := Ptr + 1; + -- Scan option integer line limit value + + if Ptr <= Max and then Switch_Chars (Ptr) in '0' .. '9' then + Scan_Nat (Switch_Chars, Max, Ptr, Sprint_Line_Limit, 'D'); + Sprint_Line_Limit := Nat'Max (Sprint_Line_Limit, 40); + end if; + -- Note: -gnatD also sets -gnatx (to turn off cross-reference -- generation in the ali file) since otherwise this generation -- gets confused by the "wrong" Sloc values put in the tree. @@ -522,6 +529,13 @@ package body Switch.C is Ptr := Ptr + 1; Print_Generated_Code := True; + -- Scan option integer line limit value + + if Ptr <= Max and then Switch_Chars (Ptr) in '0' .. '9' then + Scan_Nat (Switch_Chars, Max, Ptr, Sprint_Line_Limit, 'G'); + Sprint_Line_Limit := Nat'Max (Sprint_Line_Limit, 40); + end if; + -- Processing for h switch when 'h' => diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb index b2fe13a..de3d579 100644 --- a/gcc/ada/usage.adb +++ b/gcc/ada/usage.adb @@ -155,7 +155,9 @@ begin -- Line for -gnatD switch Write_Switch_Char ("D"); - Write_Line ("Debug expanded generated code rather than source code"); + Write_Line ("Debug expanded generated code (max line length = 72)"); + Write_Switch_Char ("Dnn"); + Write_Line ("Debug expanded generated code (max line length = nnn)"); -- Line for -gnatec switch @@ -212,10 +214,12 @@ begin Write_Switch_Char ("g"); Write_Line ("GNAT implementation mode (used for compiling GNAT units)"); - -- Line for -gnatG switch + -- Lines for -gnatG switch Write_Switch_Char ("G"); - Write_Line ("Output generated expanded code in source form"); + Write_Line ("Output generated expanded code (max line length = 72)"); + Write_Switch_Char ("Gnn"); + Write_Line ("Output generated expanded code (max line length = nn)"); -- Line for -gnath switch |