-- --
-- 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- --
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
Ptr := Ptr + 1;
Operating_Mode := Check_Semantics;
- -- Processing for C switch
+ -- -gnatC (Generate CodePeer information)
when 'C' =>
Ptr := Ptr + 1;
Warning_Mode := Suppress;
end if;
- -- Processing for d switch
+ -- -gnatd (compiler debug options)
when 'd' =>
Store_Switch := False;
return;
- -- Processing for D switch
+ -- -gnatD (debug expanded code)
when 'D' =>
Ptr := Ptr + 1;
-- -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.
-- -gnateO= (object path file)
+ -- This is an internal switch
+
when 'O' =>
Store_Switch := False;
Ptr := Ptr + 1;
-- -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.
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;
Set_GNAT_Mode_Warnings;
Set_GNAT_Style_Check_Options;
- -- Processing for G switch
+ -- -gnatG (output generated code)
when 'G' =>
Ptr := Ptr + 1;
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
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;
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;
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;
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;
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;
Ptr := Ptr + 1;
end loop;
- -- Processing for s switch
+ -- -gnats (syntax check only)
when 's' =>
if not First_Switch then
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;
Ptr := Max + 1;
- -- Processing for w switch
+ -- -gnatw (warning modes)
when 'w' =>
Store_Switch := False;
return;
- -- Processing for W switch
+ -- -gnatW (wide character encoding method)
when 'W' =>
Ptr := Ptr + 1;
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;
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;
end;
end if;
- -- Processing for z switch
+ -- -gnatz (stub generation)
when 'z' =>
Osint.Fail ("only one -gnatz* switch allowed");
end if;
- -- Processing for Z switch
+ -- -gnatZ (obsolescent)
when 'Z' =>
Ptr := Ptr + 1;
-- version switch is added, Switch.M.Normalize_Compiler_Switches
-- must be updated.
- -- Processing for 83 switch
+ -- -gnat83
when '8' =>
if Ptr = Max then
Ada_Version_Explicit := Ada_Version;
end if;
- -- Processing for 95 switch
+ -- -gnat95
when '9' =>
if Ptr = Max then
Ada_Version_Explicit := Ada_Version;
end if;
- -- Processing for 05 switch
+ -- -gnat05
when '0' =>
if Ptr = Max then
Ada_Version_Explicit := Ada_Version;
end if;
- -- Processing for 12 switch
+ -- -gnat12
when '1' =>
if Ptr = Max then
Ada_Version_Explicit := Ada_Version;
end if;
- -- Processing for 2005 and 2012 switches
+ -- -gnat2005 and -gnat2012
when '2' =>
if Ptr > Max - 3 then