misc.c (gnat_init_options): Do not concatenate -I and its argument, except for the special -I- switch.

* gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
	its argument, except for the special -I- switch.

From-SVN: r170150
This commit is contained in:
Eric Botcazou 2011-02-14 19:16:34 +00:00 committed by Eric Botcazou
parent 12967872c5
commit 400a2d2437
4 changed files with 19 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
its argument, except for the special -I- switch.
2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
* gnat_ugn.texi (Compiling Different Versions of Ada): Update

View File

@ -195,13 +195,12 @@ gnat_init_options (unsigned int decoded_options_count,
|| num_elements == 0)
continue;
if (decoded_options[i].opt_index == OPT_I)
{
gcc_assert (num_elements == 2);
save_argv[save_argc++]
= concat (decoded_options[i].canonical_option[0],
decoded_options[i].canonical_option[1], NULL);
}
/* Deal with -I- specially since it must be a single switch. */
if (decoded_options[i].opt_index == OPT_I
&& num_elements == 2
&& decoded_options[i].canonical_option[1][0] == '-'
&& decoded_options[i].canonical_option[1][1] == '\0')
save_argv[save_argc++] = "-I-";
else
{
gcc_assert (num_elements >= 1 && num_elements <= 2);

View File

@ -1,3 +1,7 @@
2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/include.adb: New test.
2011-02-14 Janus Weil <janus@gcc.gnu.org>
PR fortran/47728

View File

@ -0,0 +1,4 @@
-- { dg-do compile } */
-- { dg-options "-cargs -I -gnatws" }
-- { dg-error "search directory missing" "" { target *-*-* } 0 }