summaryrefslogtreecommitdiff
path: root/gcc/cp/g++spec.c
diff options
context:
space:
mode:
authordannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-25 00:24:10 +0000
committerdannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-25 00:24:10 +0000
commiteee88414a523c581519229185a7b2b4ecc4d221a (patch)
treeb944faa7ffa62104907fd4354141ca7f2270088c /gcc/cp/g++spec.c
parentb1615938631f2ff76d3e37af9f83e95b57a0e865 (diff)
downloadgcc-eee88414a523c581519229185a7b2b4ecc4d221a.tar.gz
PR driver/28528
* g++spec.c (lang_specific_driver): Always check if we need to swallow a space-separated arg to '-x'. * lang-specs.h: Don't create ouput files for '-xc++-header' if -fsyntax-only. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116392 138bc75d-0d04-0410-961f-82ee72b054a4
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,