aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-01-28 14:30:00 -0500
committerJason Merrill <jason@gcc.gnu.org>2003-01-28 14:30:00 -0500
commit9fbd3e416654b42041026f9d51d1115a42dd5d34 (patch)
treee935857a003fa751109e2bb1c411f1ff70dd7772 /gcc/cpplib.c
parentfe352c2900b2bfc9af52a1f761063a6bb974acdb (diff)
downloadgcc-9fbd3e416654b42041026f9d51d1115a42dd5d34.zip
gcc-9fbd3e416654b42041026f9d51d1115a42dd5d34.tar.gz
gcc-9fbd3e416654b42041026f9d51d1115a42dd5d34.tar.bz2
cpplib.h (struct cpp_options): Add warn_deprecated field.
* 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. From-SVN: r62005
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 1019a2a..a40fe122 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");