aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2013-10-14 13:01:34 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2013-10-14 15:01:34 +0200
commitd48cd424bba331e0d119aa11bb1fed2b276212ee (patch)
tree40a2c2e242f4ba31fa9e53f35977d39c7e1919d5 /gcc/ada
parente4691ba99bff054f10be59543a6571fdbabbb427 (diff)
downloadgcc-d48cd424bba331e0d119aa11bb1fed2b276212ee.zip
gcc-d48cd424bba331e0d119aa11bb1fed2b276212ee.tar.gz
gcc-d48cd424bba331e0d119aa11bb1fed2b276212ee.tar.bz2
gnat_ugn.texi: Document -gnateu switch.
2013-10-14 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Document -gnateu switch. * opt.ads (Ignore_Unrecognized_VWY_Switches): New switch. * stylesw.adb: Ignore unrecognized switch if Ignore_Unrecognized_VWY_Switches set. * switch-c.adb: Implement -gnateu (sets Ignore_Unrecognized_VWY_Switches). * validsw.adb: Ignore unrecognized switch if Ignore_Unrecognized_VWY_Switches set. * warnsw.adb: Ignore unrecognized switch if Ignore_Unrecognized_VWY_Switches set. From-SVN: r203536
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog13
-rw-r--r--gcc/ada/gnat_ugn.texi8
-rw-r--r--gcc/ada/opt.ads6
-rw-r--r--gcc/ada/stylesw.adb21
-rw-r--r--gcc/ada/switch-c.adb6
-rw-r--r--gcc/ada/validsw.adb16
-rw-r--r--gcc/ada/warnsw.adb12
7 files changed, 70 insertions, 12 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index ab038b7..16fe13c6 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,18 @@
2013-10-14 Robert Dewar <dewar@adacore.com>
+ * gnat_ugn.texi: Document -gnateu switch.
+ * opt.ads (Ignore_Unrecognized_VWY_Switches): New switch.
+ * stylesw.adb: Ignore unrecognized switch if
+ Ignore_Unrecognized_VWY_Switches set.
+ * switch-c.adb: Implement -gnateu (sets
+ Ignore_Unrecognized_VWY_Switches).
+ * validsw.adb: Ignore unrecognized switch if
+ Ignore_Unrecognized_VWY_Switches set.
+ * warnsw.adb: Ignore unrecognized switch if
+ Ignore_Unrecognized_VWY_Switches set.
+
+2013-10-14 Robert Dewar <dewar@adacore.com>
+
* exp_prag.adb, sem_prag.adb, a-exexda.adb, s-vmexta.ads: Minor
reformatting.
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 7374f04..4078002 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -3829,6 +3829,14 @@ Synonym of @option{-fdump-scos}, kept for backards compatibility.
@cindex @option{-gnatet} (@command{gcc})
Generate target dependent information.
+@item -gnateu
+@cindex @option{-gnateu} (@command{gcc})
+Ignore unrecognized validity, warning, and style switches that
+apppear after this switch is given. This may be useful when
+compiling sources developed on a later version of the compiler
+with an earlier version. Of course the earlier version must
+support this switch.
+
@item ^-gnateV^/PARAMETER_VALIDITY_CHECK^
@cindex @option{-gnateV} (@command{gcc})
Check validity of subprogram parameters.
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
index 42b1369..492d5bc 100644
--- a/gcc/ada/opt.ads
+++ b/gcc/ada/opt.ads
@@ -719,6 +719,12 @@ package Opt is
-- Set True to ignore all Style_Checks pragmas. Can be set True by use
-- of -gnateY.
+ Ignore_Unrecognized_VWY_Switches : Boolean := False;
+ -- GNAT
+ -- Set True to ignore unrecognized y, V, w switches. Can be set True
+ -- by use of -gnateu, causing subsequent unrecognized switches to result
+ -- in a warning rather than an error.
+
Implementation_Unit_Warnings : Boolean := True;
-- GNAT
-- Set True to active warnings for use of implementation internal units.
diff --git a/gcc/ada/stylesw.adb b/gcc/ada/stylesw.adb
index 7b78a16..a708da9 100644
--- a/gcc/ada/stylesw.adb
+++ b/gcc/ada/stylesw.adb
@@ -25,6 +25,7 @@
with Hostparm; use Hostparm;
with Opt; use Opt;
+with Output; use Output;
package body Stylesw is
@@ -466,9 +467,13 @@ package body Stylesw is
null;
when others =>
- Err_Col := Err_Col - 1;
- Bad_Style_Switch ("invalid style switch: " & C);
- return;
+ if Ignore_Unrecognized_VWY_Switches then
+ Write_Line ("unrecognized switch -gnaty" & C & " ignored");
+ else
+ Err_Col := Err_Col - 1;
+ Bad_Style_Switch ("invalid style switch: " & C);
+ return;
+ end if;
end case;
-- Turning switches off
@@ -571,9 +576,13 @@ package body Stylesw is
null;
when others =>
- Err_Col := Err_Col - 1;
- Bad_Style_Switch ("invalid style switch: " & C);
- return;
+ if Ignore_Unrecognized_VWY_Switches then
+ Write_Line ("unrecognized switch -gnaty-" & C & " ignored");
+ else
+ Err_Col := Err_Col - 1;
+ Bad_Style_Switch ("invalid style switch: " & C);
+ return;
+ end if;
end case;
end if;
end loop;
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb
index 197be06..0d80f44 100644
--- a/gcc/ada/switch-c.adb
+++ b/gcc/ada/switch-c.adb
@@ -717,6 +717,12 @@ package body Switch.C is
return;
+ -- -gnateu (unrecognized y,V,w switches)
+
+ when 'u' =>
+ Ptr := Ptr + 1;
+ Ignore_Unrecognized_VWY_Switches := True;
+
-- -gnateV (validity checks on parameters)
when 'V' =>
diff --git a/gcc/ada/validsw.adb b/gcc/ada/validsw.adb
index b37825e..517180a 100644
--- a/gcc/ada/validsw.adb
+++ b/gcc/ada/validsw.adb
@@ -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- --
@@ -23,7 +23,8 @@
-- --
------------------------------------------------------------------------------
-with Opt; use Opt;
+with Opt; use Opt;
+with Output; use Output;
package body Validsw is
@@ -229,9 +230,14 @@ package body Validsw is
null;
when others =>
- OK := False;
- Err_Col := J - 1;
- return;
+ if Ignore_Unrecognized_VWY_Switches then
+ Write_Line ("unrecognized switch -gnatV" & C & " ignored");
+ else
+ OK := False;
+ Err_Col := J - 1;
+ return;
+ end if;
+
end case;
end loop;
diff --git a/gcc/ada/warnsw.adb b/gcc/ada/warnsw.adb
index 36360f9..a957138 100644
--- a/gcc/ada/warnsw.adb
+++ b/gcc/ada/warnsw.adb
@@ -25,6 +25,7 @@
with Err_Vars; use Err_Vars;
with Opt; use Opt;
+with Output; use Output;
package body Warnsw is
@@ -386,7 +387,11 @@ package body Warnsw is
No_Warn_On_Non_Local_Exception := True;
when others =>
- return False;
+ if Ignore_Unrecognized_VWY_Switches then
+ Write_Line ("unrecognized switch -gnatw." & C & " ignored");
+ else
+ return False;
+ end if;
end case;
return True;
@@ -672,6 +677,11 @@ package body Warnsw is
Warn_On_Unchecked_Conversion := False;
when others =>
+ if Ignore_Unrecognized_VWY_Switches then
+ Write_Line ("unrecognized switch -gnatw" & C & " ignored");
+ else
+ return False;
+ end if;
return False;
end case;