diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-12 12:37:50 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-12 12:37:50 +0000 |
commit | 55f3494f6f78f7c03e73e16ac135ab85d47d865a (patch) | |
tree | 527a9ec026717a6c42fcbc9fe50eab2285462cfd /gcc/ada/g-comlin.adb | |
parent | 916c9a35b739ed3af227768b8674d64b638f2940 (diff) | |
download | gcc-55f3494f6f78f7c03e73e16ac135ab85d47d865a.tar.gz |
2010-10-12 Javier Miranda <miranda@adacore.com>
* sem_ch6.adb (New_Overloaded_Entity): Add missing decoration of
attribute Overridden_Operation in predefined dispatching primitives.
2010-10-12 Emmanuel Briot <briot@adacore.com>
* g-comlin.adb, g-comlin.ads (Add_Switch): Raise an exception when a
command line configuration exists and we specify an invalid section.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165368 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-comlin.adb')
-rw-r--r-- | gcc/ada/g-comlin.adb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb index eb982543b38..1de44178ada 100644 --- a/gcc/ada/g-comlin.adb +++ b/gcc/ada/g-comlin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2010, 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- -- @@ -1755,7 +1755,21 @@ package body GNAT.Command_Line is -- Start of processing for Add_Switch + Section_Valid : Boolean := False; begin + if Section /= "" and then Cmd.Config /= null then + for S in Cmd.Config.Sections'Range loop + if Section = Cmd.Config.Sections (S).all then + Section_Valid := True; + exit; + end if; + end loop; + + if not Section_Valid then + raise Invalid_Section; + end if; + end if; + Success := False; Add_Simple_Switches (Cmd, Switch, Parameter); Free (Cmd.Coalesce); @@ -2252,7 +2266,7 @@ package body GNAT.Command_Line is procedure Start (Cmd : in out Command_Line; Iter : in out Command_Line_Iterator; - Expanded : Boolean) + Expanded : Boolean := False) is begin if Cmd.Expanded = null then |