Commit 9f5b865a by Vincent Celier Committed by Arnaud Charlet

switch-c.adb: Document internal switches.

2013-04-11  Vincent Celier  <celier@adacore.com>

	* switch-c.adb: Document internal switches.
	* usage.adb: Remove lines for internal switches: -gnatea, -gnateO,
	-gnatez and -gnateO.

From-SVN: r197782
parent afb4a8cd
2013-04-11 Vincent Celier <celier@adacore.com>
* switch-c.adb: Document internal switches.
* usage.adb: Remove lines for internal switches: -gnatea, -gnateO,
-gnatez and -gnateO.
2013-04-11 Ed Schonberg <schonberg@adacore.com>
* par-ch6.adb (P_Subprogram): Attach aspects to subprogram stub.
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-2012, Free Software Foundation, Inc. --
-- Copyright (C) 2001-2013, 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- --
......@@ -274,30 +274,32 @@ package body Switch.C is
case C is
-- -gnata (assertions enabled)
when 'a' =>
Ptr := Ptr + 1;
Assertions_Enabled := True;
Debug_Pragmas_Enabled := True;
-- Processing for A switch
-- -gnatA (disregard gnat.adc)
when 'A' =>
Ptr := Ptr + 1;
Config_File := False;
-- Processing for b switch
-- -gnatb (brief messages to stderr)
when 'b' =>
Ptr := Ptr + 1;
Brief_Output := True;
-- Processing for B switch
-- -gnatB (assume no invalid values)
when 'B' =>
Ptr := Ptr + 1;
Assume_No_Invalid_Values := True;
-- Processing for c switch
-- -gnatc (check syntax and semantics only)
when 'c' =>
if not First_Switch then
......@@ -308,7 +310,7 @@ package body Switch.C is
Ptr := Ptr + 1;
Operating_Mode := Check_Semantics;
-- Processing for C switch
-- -gnatC (Generate CodePeer information)
when 'C' =>
Ptr := Ptr + 1;
......@@ -326,7 +328,7 @@ package body Switch.C is
Warning_Mode := Suppress;
end if;
-- Processing for d switch
-- -gnatd (compiler debug options)
when 'd' =>
Store_Switch := False;
......@@ -367,7 +369,7 @@ package body Switch.C is
return;
-- Processing for D switch
-- -gnatD (debug expanded code)
when 'D' =>
Ptr := Ptr + 1;
......@@ -403,6 +405,8 @@ package body Switch.C is
-- -gnatea (initial delimiter of explicit switches)
-- This is an internal switch
-- All switches that come before -gnatea have been added by
-- the GCC driver and are not stored in the ALI file.
-- See also -gnatez below.
......@@ -562,6 +566,8 @@ package body Switch.C is
-- -gnateO= (object path file)
-- This is an internal switch
when 'O' =>
Store_Switch := False;
Ptr := Ptr + 1;
......@@ -641,6 +647,8 @@ package body Switch.C is
-- -gnatez (final delimiter of explicit switches)
-- This is an internal switch
-- All switches that come after -gnatez have been added by
-- the GCC driver and are not stored in the ALI file. See
-- also -gnatea above.
......@@ -668,14 +676,14 @@ package body Switch.C is
Ptr := Ptr + 1;
All_Errors_Mode := True;
-- Processing for F switch
-- -gnatF (overflow of predefined float types)
when 'F' =>
Ptr := Ptr + 1;
External_Name_Exp_Casing := Uppercase;
External_Name_Imp_Casing := Uppercase;
-- Processing for g switch
-- -gnatg (GNAT implementation mode)
when 'g' =>
Ptr := Ptr + 1;
......@@ -696,7 +704,7 @@ package body Switch.C is
Set_GNAT_Mode_Warnings;
Set_GNAT_Style_Check_Options;
-- Processing for G switch
-- -gnatG (output generated code)
when 'G' =>
Ptr := Ptr + 1;
......@@ -709,13 +717,13 @@ package body Switch.C is
Sprint_Line_Limit := Nat'Max (Sprint_Line_Limit, 40);
end if;
-- Processing for h switch
-- -gnath (help information)
when 'h' =>
Ptr := Ptr + 1;
Usage_Requested := True;
-- Processing for i switch
-- -gnati (character set)
when 'i' =>
if Ptr = Max then
......@@ -740,26 +748,26 @@ package body Switch.C is
Bad_Switch ("-gnati" & Switch_Chars (Ptr .. Max));
end if;
-- Processing for I switch
-- -gnatI (ignore representation clauses)
when 'I' =>
Ptr := Ptr + 1;
Ignore_Rep_Clauses := True;
-- Processing for j switch
-- -gnatj (messages in limited length lines)
when 'j' =>
Ptr := Ptr + 1;
Scan_Nat (Switch_Chars, Max, Ptr, Error_Msg_Line_Length, C);
-- Processing for k switch
-- -gnatk (limit file name length)
when 'k' =>
Ptr := Ptr + 1;
Scan_Pos
(Switch_Chars, Max, Ptr, Maximum_File_Name_Length, C);
-- Processing for l switch
-- -gnatl (output full source)
when 'l' =>
Ptr := Ptr + 1;
......@@ -777,19 +785,19 @@ package body Switch.C is
end if;
end if;
-- Processing for L switch
-- -gnatL (corresponding source text)
when 'L' =>
Ptr := Ptr + 1;
Dump_Source_Text := True;
-- Processing for m switch
-- -gnatm (max number or errors/warnings)
when 'm' =>
Ptr := Ptr + 1;
Scan_Nat (Switch_Chars, Max, Ptr, Maximum_Messages, C);
-- Processing for n switch
-- -gnatn (enable pragma Inline)
when 'n' =>
Ptr := Ptr + 1;
......@@ -806,14 +814,14 @@ package body Switch.C is
end if;
end if;
-- Processing for N switch
-- -gnatN (obsolescent)
when 'N' =>
Ptr := Ptr + 1;
Inline_Active := True;
Front_End_Inlining := True;
-- Processing for o switch
-- -gnato (overflow checks)
when 'o' =>
Ptr := Ptr + 1;
......@@ -852,14 +860,16 @@ package body Switch.C is
end if;
end if;
-- Processing for O switch
-- -gnatO (specify name of the object file)
-- This is an internal switch
when 'O' =>
Store_Switch := False;
Ptr := Ptr + 1;
Output_File_Name_Present := True;
-- Processing for p switch
-- -gnatp (suppress all checks)
when 'p' =>
Ptr := Ptr + 1;
......@@ -890,32 +900,32 @@ package body Switch.C is
Opt.Suppress_Checks := True;
end if;
-- Processing for P switch
-- -gnatP (periodic poll)
when 'P' =>
Ptr := Ptr + 1;
Polling_Required := True;
-- Processing for q switch
-- -gnatq (don't quit)
when 'q' =>
Ptr := Ptr + 1;
Try_Semantics := True;
-- Processing for Q switch
-- -gnatQ (always write ALI file)
when 'Q' =>
Ptr := Ptr + 1;
Force_ALI_Tree_File := True;
Try_Semantics := True;
-- Processing for r switch
-- -gnatr (restrictions as warnings)
when 'r' =>
Ptr := Ptr + 1;
Treat_Restrictions_As_Warnings := True;
-- Processing for R switch
-- -gnatR (list rep. info)
when 'R' =>
Back_Annotate_Rep_Info := True;
......@@ -942,7 +952,7 @@ package body Switch.C is
Ptr := Ptr + 1;
end loop;
-- Processing for s switch
-- -gnats (syntax check only)
when 's' =>
if not First_Switch then
......@@ -953,44 +963,44 @@ package body Switch.C is
Ptr := Ptr + 1;
Operating_Mode := Check_Syntax;
-- Processing for S switch
-- -gnatS (print package Standard)
when 'S' =>
Print_Standard := True;
Ptr := Ptr + 1;
-- Processing for t switch
-- -gnatt (output tree)
when 't' =>
Ptr := Ptr + 1;
Tree_Output := True;
Back_Annotate_Rep_Info := True;
-- Processing for T switch
-- -gnatT (change start of internal table sizes)
when 'T' =>
Ptr := Ptr + 1;
Scan_Pos (Switch_Chars, Max, Ptr, Table_Factor, C);
-- Processing for u switch
-- -gnatu (list units for compilation)
when 'u' =>
Ptr := Ptr + 1;
List_Units := True;
-- Processing for U switch
-- -gnatU (unique tags)
when 'U' =>
Ptr := Ptr + 1;
Unique_Error_Tag := True;
-- Processing for v switch
-- -gnatv (verbose mode)
when 'v' =>
Ptr := Ptr + 1;
Verbose_Mode := True;
-- Processing for V switch
-- -gnatV (validity checks)
when 'V' =>
Store_Switch := False;
......@@ -1020,7 +1030,7 @@ package body Switch.C is
Ptr := Max + 1;
-- Processing for w switch
-- -gnatw (warning modes)
when 'w' =>
Store_Switch := False;
......@@ -1060,7 +1070,7 @@ package body Switch.C is
return;
-- Processing for W switch
-- -gnatW (wide character encoding method)
when 'W' =>
Ptr := Ptr + 1;
......@@ -1085,13 +1095,13 @@ package body Switch.C is
Ptr := Ptr + 1;
-- Processing for x switch
-- -gnatx (suppress cross-ref information)
when 'x' =>
Ptr := Ptr + 1;
Xref_Active := False;
-- Processing for X switch
-- -gnatX (language extensions)
when 'X' =>
Ptr := Ptr + 1;
......@@ -1099,7 +1109,7 @@ package body Switch.C is
Ada_Version := Ada_Version_Type'Last;
Ada_Version_Explicit := Ada_Version_Type'Last;
-- Processing for y switch
-- -gnaty (style checks)
when 'y' =>
Ptr := Ptr + 1;
......@@ -1145,7 +1155,7 @@ package body Switch.C is
end;
end if;
-- Processing for z switch
-- -gnatz (stub generation)
when 'z' =>
......@@ -1185,7 +1195,7 @@ package body Switch.C is
Osint.Fail ("only one -gnatz* switch allowed");
end if;
-- Processing for Z switch
-- -gnatZ (obsolescent)
when 'Z' =>
Ptr := Ptr + 1;
......@@ -1196,7 +1206,7 @@ package body Switch.C is
-- version switch is added, Switch.M.Normalize_Compiler_Switches
-- must be updated.
-- Processing for 83 switch
-- -gnat83
when '8' =>
if Ptr = Max then
......@@ -1213,7 +1223,7 @@ package body Switch.C is
Ada_Version_Explicit := Ada_Version;
end if;
-- Processing for 95 switch
-- -gnat95
when '9' =>
if Ptr = Max then
......@@ -1230,7 +1240,7 @@ package body Switch.C is
Ada_Version_Explicit := Ada_Version;
end if;
-- Processing for 05 switch
-- -gnat05
when '0' =>
if Ptr = Max then
......@@ -1247,7 +1257,7 @@ package body Switch.C is
Ada_Version_Explicit := Ada_Version;
end if;
-- Processing for 12 switch
-- -gnat12
when '1' =>
if Ptr = Max then
......@@ -1264,7 +1274,7 @@ package body Switch.C is
Ada_Version_Explicit := Ada_Version;
end if;
-- Processing for 2005 and 2012 switches
-- -gnat2005 and -gnat2012
when '2' =>
if Ptr > Max - 3 then
......
......@@ -167,10 +167,7 @@ begin
Write_Switch_Char ("Dnn");
Write_Line ("Debug expanded generated code (max line length = nn)");
-- Line for -gnatea switch
Write_Switch_Char ("ea");
Write_Line ("Delimiter for automatically added switches (internal switch)");
-- No line for -gnatea : internal switch
-- Line for -gnateA switch
......@@ -227,10 +224,7 @@ begin
Write_Switch_Char ("em=?");
Write_Line ("Specify mapping file, e.g. -gnatem=mapping");
-- Line for -gnateO=?
Write_Switch_Char ("eO=?");
Write_Line ("Specify an object path file (internal switch)");
-- No line for -gnateO=? : internal switch
-- Line for -gnatep switch
......@@ -262,10 +256,7 @@ begin
Write_Switch_Char ("eY");
Write_Line ("Ignore all Style_Checks pragmas in source");
-- Line for -gnatez switch
Write_Switch_Char ("ez");
Write_Line ("Delimiter for automatically added switches (internal switch)");
-- No line for -gnatez : internal switch
-- Line for -gnatE switch
......@@ -355,10 +346,7 @@ begin
Write_Line
("Set mode for general/assertion expressions separately");
-- Line for -gnatO switch
Write_Switch_Char ("O nm ");
Write_Line ("Set name of output ali file (internal switch)");
-- No line for -gnatO : internal switch
-- Line for -gnatp switch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment