aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpppch.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2003-08-20 04:04:47 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2003-08-20 04:04:47 +0000
commitccc014442a6731846c6e852a8ebbdc889d5c113b (patch)
tree425049d868b986693043ccff94f8c96bf12c8778 /gcc/cpppch.c
parenta6f3e2539ea54d97d7459af06de55b6e467a9e2c (diff)
downloadgcc-ccc014442a6731846c6e852a8ebbdc889d5c113b.zip
gcc-ccc014442a6731846c6e852a8ebbdc889d5c113b.tar.gz
gcc-ccc014442a6731846c6e852a8ebbdc889d5c113b.tar.bz2
cpppch.c (cpp_valid_state): Re-add warning about PCH not used because some macro is defined.
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
Diffstat (limited to 'gcc/cpppch.c')
-rw-r--r--gcc/cpppch.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cpppch.c b/gcc/cpppch.c
index bdb7d16..e1dc1d7 100644
--- a/gcc/cpppch.c
+++ b/gcc/cpppch.c
@@ -509,7 +509,13 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd)
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);