From: Stan Cox Date: Fri, 27 Sep 1996 16:54:10 +0000 (+0000) Subject: (do_spec_1): Allow -A in %[Spec]. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51c0d897d410385c872e663f3047fb69c8b171a3;p=gcc.git (do_spec_1): Allow -A in %[Spec]. From-SVN: r12852 --- diff --git a/gcc/gcc.c b/gcc/gcc.c index 081596f721c..0b84a83d50c 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3585,6 +3585,8 @@ do_spec_1 (spec, inswitch, soft_matched_part) every -D and at the end of each arg, */ while (1) { + int flag; + if (! strncmp (y, "-D", 2)) { *x++ = '-'; @@ -3592,16 +3594,18 @@ do_spec_1 (spec, inswitch, soft_matched_part) *x++ = '_'; *x++ = '_'; y += 2; + flag = 1; + continue; } - else if (*y == ' ' || *y == 0) + else if (flag && (*y == ' ' || *y == '\t' || *y == '=' + || *y == '}' || *y == 0)) { *x++ = '_'; *x++ = '_'; - if (*y == 0) - break; - else - *x++ = *y++; + flag = 0; } + if (*y == 0) + break; else *x++ = *y++; }