2003-08-19 Geoffrey Keating <geoffk@apple.com>
* cpppch.c (cpp_valid_state): Re-add warning about PCH not used
because some macro is defined.
Index: testsuite/ChangeLog
2003-08-19 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/pch/warn-1.c: New.
* gcc.dg/pch/warn-1.hs: New.
* lib/dg-pch.exp (dg-pch): Use 'return' not 'continue' to skip
not-tested file.
From-SVN: r70592
2003-08-19 Geoffrey Keating <geoffk@apple.com>
+ * cpppch.c (cpp_valid_state): Re-add warning about PCH not used
+ because some macro is defined.
+
* config/darwin.h (LINK_COMMAND_SPEC): Add -arch and -arch_only
options.
* config/i386/darwin.h (ASM_SPEC): New.
else if (cmp > 0)
++i;
else
- goto fail;
+ {
+ if (CPP_OPTION (r, warn_invalid_pch))
+ cpp_error (r, DL_WARNING_SYSHDR,
+ "%s: not used because `%s' is defined",
+ name, first);
+ goto fail;
+ }
}
free(nl.defs);
+2003-08-19 Geoffrey Keating <geoffk@apple.com>
+
+ * gcc.dg/pch/warn-1.c: New.
+ * gcc.dg/pch/warn-1.hs: New.
+
+ * lib/dg-pch.exp (dg-pch): Use 'return' not 'continue' to skip
+ not-tested file.
+
2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.dg/uninit-E.c: Add forgotten dg-warning marker.
--- /dev/null
+/* { dg-options "-I. -Winvalid-pch" } */
+
+#define DEFINED_VALUE 3
+
+#include "warn-1.h"/* { dg-error "not used because `DEFINED_VALUE' is defined|No such file" } */
+
+int main(void)
+{
+ return DEFINED_VALUE;
+}
--- /dev/null
+enum {
+ DEFINED_VALUE
+};
+
+
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $test] {
- continue
+ return
}
set nshort "$subdir/[file tail $test]"
set bname "[file rootname [file tail $nshort]]"