diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-08 21:37:50 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-08 21:37:50 +0000 |
commit | cbe25b896149e9237a51231e79caf172519e97b6 (patch) | |
tree | b3756628f1bc15d5812ce3794fe368ffa9ee1f0b /gcc/gcc.c | |
parent | e5fbea4091e302e6d696c978eea3abc231b17adf (diff) | |
download | gcc-cbe25b896149e9237a51231e79caf172519e97b6.tar.gz |
2012-02-08 Magnus Granberg <zorry@gentoo.org>
PR driver/48524
* gcc.c (switch_matches) Support switches with separated form, -D
and -U.
testsuite:
* gcc.dg/pr48524.c: New test.
* gcc.dg/pr48524.spec: New spec file for test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184022 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index 315aab321ab..6f98fc9b9d6 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -5455,6 +5455,21 @@ switch_matches (const char *atom, const char *end_atom, int starred) && check_live_switch (i, plen)) return true; + /* Check if a switch with separated form matching the atom. + We check -D and -U switches. */ + else if (switches[i].args != 0) + { + if ((*switches[i].part1 == 'D' || *switches[i].part1 == 'U') + && *switches[i].part1 == atom[0]) + { + if (!strncmp (switches[i].args[0], &atom[1], len - 1) + && (starred || (switches[i].part1[1] == '\0' + && switches[i].args[0][len - 1] == '\0')) + && check_live_switch (i, (starred ? 1 : -1))) + return true; + } + } + return false; } |