aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/g++spec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/g++spec.c')
-rw-r--r--gcc/cp/g++spec.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
index 7e10bc9996f..b58fdcd7fed 100644
--- a/gcc/cp/g++spec.c
+++ b/gcc/cp/g++spec.c
@@ -149,19 +149,19 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
saw_verbose_flag = 1;
else if (strncmp (argv[i], "-x", 2) == 0)
{
- if (library == 0)
- {
- const char * arg;
- if (argv[i][2] != '\0')
- arg = argv[i]+2;
- else if (argv[i+1] != NULL)
- arg = argv[i+1];
- else /* Error condition, message will be printed later. */
- arg = "";
- if (strcmp (arg, "c++") == 0
- || strcmp (arg, "c++-cpp-output") == 0)
- library = 1;
- }
+ const char * arg;
+ if (argv[i][2] != '\0')
+ arg = argv[i]+2;
+ else if ((argv[i+1]) != NULL)
+ /* We need to swallow arg on next loop. */
+ quote = arg = argv[i+1];
+ else /* Error condition, message will be printed later. */
+ arg = "";
+ if (library == 0
+ && (strcmp (arg, "c++") == 0
+ || strcmp (arg, "c++-cpp-output") == 0))
+ library = 1;
+
saw_speclang = 1;
}
/* Arguments that go directly to the linker might be .o files,