summaryrefslogtreecommitdiff
path: root/gcc/ada/gnatcmd.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-01 08:14:49 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-01 08:14:49 +0000
commit9e58d7edd282d81a3a18fa6e7a26b3cdddff0ca2 (patch)
tree6f0271e566e17f424763b6a9433eabc8f59c42de /gcc/ada/gnatcmd.adb
parent2f50572a69287b72b263b25e43cbc9bcb9264013 (diff)
downloadgcc-9e58d7edd282d81a3a18fa6e7a26b3cdddff0ca2.tar.gz
2012-10-01 Thomas Quinot <quinot@adacore.com>
* gnatcmd.adb, make.adb (Scan_Make_Arg, Inspect_Switches): Recognize and reject an invalid parameter passed to -vP. 2012-10-01 Yannick Moy <moy@adacore.com> * sem_warn.adb (Check_Infinite_Loop_Warning/Test_Ref): Improve the detection of modifications to the loop variable by noting that, if the type of variable is elementary and the condition does not contain a function call, then the condition cannot be modified by side-effects from a procedure call. 2012-10-01 Robert Dewar <dewar@adacore.com> * checks.adb: Add comments. 2012-10-01 Javier Miranda <miranda@adacore.com> * exp_ch3.adb (Expand_N_Object_Declaration): Improve condition catching never-ending recursion. The previous condition erroneously disabled silently the expansion of the class-wide interface object initialization in cases not involving the recursion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191892 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatcmd.adb')
-rw-r--r--gcc/ada/gnatcmd.adb34
1 files changed, 21 insertions, 13 deletions
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index 82e3f4593b4..ef93f2fab1c 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -1769,19 +1769,27 @@ begin
-- -vPx Specify verbosity while parsing project files
- elsif Argv'Length = 4
- and then Argv (Argv'First + 1 .. Argv'First + 2) = "vP"
- then
- case Argv (Argv'Last) is
- when '0' =>
- Current_Verbosity := Prj.Default;
- when '1' =>
- Current_Verbosity := Prj.Medium;
- when '2' =>
- Current_Verbosity := Prj.High;
- when others =>
- Fail ("Invalid switch: " & Argv.all);
- end case;
+ elsif Argv (Argv'First + 1 .. Argv'First + 2) = "vP" then
+ if Argv'Length = 4
+ and then Argv (Argv'Last) in '0' .. '2'
+ then
+ case Argv (Argv'Last) is
+ when '0' =>
+ Current_Verbosity := Prj.Default;
+ when '1' =>
+ Current_Verbosity := Prj.Medium;
+ when '2' =>
+ Current_Verbosity := Prj.High;
+ when others =>
+
+ -- Cannot happen
+
+ raise Program_Error;
+ end case;
+ else
+ Fail ("invalid verbosity level: "
+ & Argv (Argv'First + 3 .. Argv'Last));
+ end if;
Remove_Switch (Arg_Num);