diff options
author | Jeff Law <law@gcc.gnu.org> | 1998-05-05 17:18:02 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-05-05 17:18:02 -0600 |
commit | f5963e617044e79f7658c82ebc9acdccdc56d57b (patch) | |
tree | 017db6c8be411c52ab98093e94dcce3c7ca3f029 /gcc/cpplib.c | |
parent | 9d1bcb4667cf94ae02b3b3015694a55175be9c9f (diff) | |
download | gcc-f5963e617044e79f7658c82ebc9acdccdc56d57b.zip gcc-f5963e617044e79f7658c82ebc9acdccdc56d57b.tar.gz gcc-f5963e617044e79f7658c82ebc9acdccdc56d57b.tar.bz2 |
* Check in merge from gcc2. See ChangeLog.12 for details.
From-SVN: r19553
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r-- | gcc/cpplib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c index bd68911..3d1fd92 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -3880,6 +3880,10 @@ do_warning (pfile, keyword, buf, limit) bcopy (buf, copy, length); copy[length] = 0; SKIP_WHITE_SPACE (copy); + + if (CPP_PEDANTIC (pfile) && !CPP_BUFFER (pfile)->system_header_p) + cpp_pedwarn ("ANSI C does not allow `#warning'"); + /* Use `pedwarn' not `warning', because #warning isn't in the C Standard; if -pedantic-errors is given, #warning should cause an error. */ cpp_pedwarn (pfile, "#warning %s", copy); |