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
+2012-02-08 Magnus Granberg <zorry@gentoo.org>
+
+ PR driver/48524
+ * gcc.c (switch_matches) Support switches with separated form, -D
+ and -U.
+
2012-02-08 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr.md (SREG_ADDR): Remove constant definition.
&& 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;
}
+2012-02-08 Magnus Granberg <zorry@gentoo.org>
+
+ PR driver/48524
+ * gcc.dg/pr48524.c: New test.
+ * gcc.dg/pr48524.spec: New spec file for test.
+
2012-02-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/32380
--- /dev/null
+/* { dg-do preprocess } */
+/* { dg-options "-specs=${srcdir}/gcc.dg/pr48524.spec -D_TEST_D" } */
+# ifdef _FOO
+# error works /* { dg-error "works" } */
+# endif
+
--- /dev/null
+*cpp_options:
+%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
+ %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\
+ %{undef} %{save-temps*:-fpch-preprocess} %{D_TEST_D:-D_FOO}
+