* 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
+2003-01-28 Jason Merrill <jason@redhat.com>
+
+ * 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.
+
2003-01-28 Dale Johannesen <dalej@apple.com>
+
* emit-rtl.c (const_double_htab_hash): Use mode in the hash.
* loop.c (scan_loop): Move movables on -Os rich-register targets.
* config/rs6000/rs6000.md (sibcall*): Use match_operand for LR.
case OPT_Wdeprecated:
warn_deprecated = on;
+ cpp_opts->warn_deprecated = on;
break;
case OPT_Wdiv_by_zero:
CPP_OPTION (pfile, tabstop) = 8;
CPP_OPTION (pfile, operator_names) = 1;
CPP_OPTION (pfile, warn_endif_labels) = 1;
+ CPP_OPTION (pfile, warn_deprecated) = 1;
CPP_OPTION (pfile, warn_long_long) = !CPP_OPTION (pfile, c99);
CPP_OPTION (pfile, pending) =
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");
/* Nonzero means don't print warning messages. */
unsigned char inhibit_warnings;
+ /* Nonzero means complain about deprecated features. */
+ unsigned char warn_deprecated;
+
/* Nonzero means don't suppress warnings from system headers. */
unsigned char warn_system_headers;