diff options
author | Arnaud Charlet <charlet@adacore.com> | 2015-11-12 12:00:56 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-11-12 13:00:56 +0100 |
commit | 95bcd2a700d3284d3606ddedf18eec22243c1239 (patch) | |
tree | df81795285fd0f55eadd887033fef7be91a57474 /gcc/ada | |
parent | d1915cb82c1319af3267e9617fd81ecbeef01a2c (diff) | |
download | gcc-95bcd2a700d3284d3606ddedf18eec22243c1239.zip gcc-95bcd2a700d3284d3606ddedf18eec22243c1239.tar.gz gcc-95bcd2a700d3284d3606ddedf18eec22243c1239.tar.bz2 |
switch-c.adb, [...]: Reserve -gnateg for generation of C headers.
2015-11-12 Arnaud Charlet <charlet@adacore.com>
* switch-c.adb, gnat1drv.adb, opt.ads: Reserve -gnateg for generation
of C headers.
From-SVN: r230248
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gnat1drv.adb | 7 | ||||
-rw-r--r-- | gcc/ada/opt.ads | 2 | ||||
-rw-r--r-- | gcc/ada/switch-c.adb | 6 |
4 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 582a646..51448ed 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2015-11-12 Arnaud Charlet <charlet@adacore.com> + * switch-c.adb, gnat1drv.adb, opt.ads: Reserve -gnateg for generation + of C headers. + +2015-11-12 Arnaud Charlet <charlet@adacore.com> + * back_end.adb, opt.ads (Debugger_Level): Update comment. (Scan_Back_End_Switches): Set Debugger_Level. diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index e36533a..7e5b067 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -142,10 +142,15 @@ procedure Gnat1drv is Modify_Tree_For_C := True; end if; - -- Set all flags required when generating C code (-gnatd.V) + -- -gnatd.V enables C generation if Debug_Flag_Dot_VV then Generate_C_Code := True; + end if; + + -- Set all flags required when generating C code + + if Generate_C_Code then Modify_Tree_For_C := True; Unnest_Subprogram_Mode := True; diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index cacc6a0..9e0acdc 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -704,7 +704,7 @@ package Opt is Generate_C_Code : Boolean := False; -- GNAT -- If True, the Cprint circuitry to generate C code output is activated. - -- Set True by use of -gnatd.V. + -- Set True by use of -gnateg or -gnatd.V. Generate_CodePeer_Messages : Boolean := False; -- GNAT diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index c3ebbaa..4f565ce 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -585,6 +585,12 @@ package body Switch.C is Ptr := Ptr + 1; Check_Float_Overflow := not Machine_Overflows_On_Target; + -- -gnateg (generate C code) + + when 'g' => + Generate_C_Code := True; + Ptr := Ptr + 1; + -- -gnateG (save preprocessor output) when 'G' => |