PATCH: [PR preprocessor/16950] [3.5 regression] -Wno-deprecated doesn't work
H. J. Lu
Tue Aug 10 05:30:00 GMT 2004
On Tue, Aug 10, 2004 at 01:05:41AM -0000, kcook at gcc dot gnu dot org wrote:
> ------- Additional Comments From kcook at gcc dot gnu dot org 2004-08-10 01:05 -------
> Yes this was caused by my patch.
> Actually his entire patch was included in a yet to submitted followup patch
> though I clearly didn't realize that I had caused a regression after I split out
> just the lang.opt part. As there weren't any new java errors, it never occurred
> to me that the C++ regressions were mine.
> I would recommend that H.J's patch be applied; a case could be easily made that
> this falls under the obviously correct rule.
Here is the complete patch.
-------------- next part --------------
2004-08-09 H.J. Lu <email@example.com>
* java-tree.h (flag_deprecated): Removed.
* lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
* parse.y (check_deprecation): Check warn_deprecated instead of
--- gcc/java/java-tree.h.depre 2004-08-02 08:23:11.000000000 -0700
+++ gcc/java/java-tree.h 2004-08-09 15:05:20.524087846 -0700
@@ -180,9 +180,6 @@ extern int flag_jni;
extern int flag_extraneous_semicolon;
-/* When nonzero, report use of deprecated classes, methods, or fields. */
-extern int flag_deprecated;
/* When nonzero, always check for a non gcj generated classes archive. */
extern int flag_force_classes_archive_check;
--- gcc/java/lang.opt.depre 2004-08-06 11:07:21.000000000 -0700
+++ gcc/java/lang.opt 2004-08-09 15:09:15.498749481 -0700
@@ -62,8 +62,8 @@ Java
; Documented for C
-Java Var(flag_deprecated) Init(1)
-Warn if deprecated class, method, or field is used
+Java Var(warn_deprecated) VarExists
+Warn if deprecated compiler feature, class, method, or field is used
--- gcc/java/parse.y.depre 2004-08-02 16:25:19.000000000 -0700
+++ gcc/java/parse.y 2004-08-09 15:05:37.170938516 -0700
@@ -10095,7 +10095,7 @@ check_deprecation (tree wfl, tree decl)
const char *file;
- if (! flag_deprecated)
+ if (! warn_deprecated)
/* We want to look at the element type of arrays here, so we strip
More information about the Gcc-patches