diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-28 19:30:00 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-28 19:30:00 +0000 |
commit | 922df7274cc783f696481502ae49f7d44a671400 (patch) | |
tree | e935857a003fa751109e2bb1c411f1ff70dd7772 /gcc/cpplib.c | |
parent | a576091379944a53645cd7d227d784dce94ba8d0 (diff) | |
download | ppe42-gcc-922df7274cc783f696481502ae49f7d44a671400.tar.gz ppe42-gcc-922df7274cc783f696481502ae49f7d44a671400.zip |
* cpplib.h (struct cpp_options): Add warn_deprecated field.
* cppinit.c (cpp_create_reader): Turn it on by default.
* c-opts.c (c_common_decode_option): Set it.
* cpplib.c (do_pragma_once): Only complain about #pragma once
if warn_deprecated is set.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62005 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r-- | gcc/cpplib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c index 1019a2a9713..a40fe1229ff 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -1223,7 +1223,8 @@ static void do_pragma_once (pfile) cpp_reader *pfile; { - cpp_error (pfile, DL_WARNING, "#pragma once is obsolete"); + if (CPP_OPTION (pfile, warn_deprecated)) + cpp_error (pfile, DL_WARNING, "#pragma once is obsolete"); if (pfile->buffer->prev == NULL) cpp_error (pfile, DL_WARNING, "#pragma once in main file"); |