aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-12-07 18:29:21 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1996-12-07 18:29:21 -0500
commit9f3c45fd6284d60ad31ffa61495005f5302e822c (patch)
treef6eed56d7dbf64b003da78856f478f3125d29f5d /gcc
parent00523ef24d46ca62f57821d8b5ff15e1abe57b2e (diff)
downloadgcc-9f3c45fd6284d60ad31ffa61495005f5302e822c.zip
gcc-9f3c45fd6284d60ad31ffa61495005f5302e822c.tar.gz
gcc-9f3c45fd6284d60ad31ffa61495005f5302e822c.tar.bz2
(handle_braces): Rework last change.
From-SVN: r13241
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gcc.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 3bea4ee..488a291 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -362,7 +362,7 @@ or with constant text in a single argument.
arguments. CC considers `-o foo' as being one switch whose
name starts with `o'. %{o*} would substitute this text,
including the space; thus, two arguments would be generated.
- %{S*^} likewise, but don't put a blank between a switch and any args.
+ %{^S*} likewise, but don't put a blank between a switch and any args.
%{S*:X} substitutes X if one or more switches whose names start with -S are
specified to CC. Note that the tail part of the -S option
(i.e. the part matched by the `*') will be substituted for each
@@ -3749,6 +3749,11 @@ handle_braces (p)
int pipe_p = 0;
int negate = 0;
int suffix = 0;
+ int include_blanks = 1;
+
+ if (*p == '^')
+ /* A '^' after the open-brace means to not give blanks before args. */
+ include_blanks = 0, ++p;
if (*p == '|')
/* A `|' after the open-brace means,
@@ -3814,19 +3819,7 @@ handle_braces (p)
for (i = 0; i < n_switches; i++)
if (!strncmp (switches[i].part1, filter, p - filter)
&& check_live_switch (i, p - filter))
- give_switch (i, 0, 1);
- }
- else if (p[-1] == '*' && p[0] == '^' && p[1] == '}')
- {
- /* Substitute all matching switches as separate args, but don't
- write a blank between the first part and any args, even if they
- were present. */
- register int i;
- --p;
- for (i = 0; i < n_switches; i++)
- if (!strncmp (switches[i].part1, filter, p - filter)
- && check_live_switch (i, p - filter))
- give_switch (i, 0, 0);
+ give_switch (i, 0, include_blanks);
}
else
{
@@ -3909,7 +3902,7 @@ handle_braces (p)
{
if (*p == '}')
{
- give_switch (i, 0, 1);
+ give_switch (i, 0, include_blanks);
}
else
{