diff options
author | Magnus Granberg <zorry@gentoo.org> | 2012-02-08 21:37:50 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2012-02-08 21:37:50 +0000 |
commit | 5371f7195e823bd69cf7e00444248ff44ce0a3d1 (patch) | |
tree | b3756628f1bc15d5812ce3794fe368ffa9ee1f0b /gcc/gcc.c | |
parent | 893f430128424f440c6be9bcfd31a1b763307304 (diff) | |
download | gcc-5371f7195e823bd69cf7e00444248ff44ce0a3d1.zip gcc-5371f7195e823bd69cf7e00444248ff44ce0a3d1.tar.gz gcc-5371f7195e823bd69cf7e00444248ff44ce0a3d1.tar.bz2 |
re PR driver/48524 (spec language does not cover switches with separated form)
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.
From-SVN: r184022
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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; } |