Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/gnu/dist/gcc Pull up revisions 1.7-1.9 (requested by is):



details:   https://anonhg.NetBSD.org/src/rev/7f2037ebfa0c
branches:  netbsd-1-4
changeset: 471048:7f2037ebfa0c
user:      he <he%NetBSD.org@localhost>
date:      Thu Oct 19 15:58:39 2000 +0000

description:
Pull up revisions 1.7-1.9 (requested by is):
  Implement enhanced format string checking.  New options:
  -Wnetbsd-format-audit and -Wno-format-extra-args.

diffstat:

 gnu/dist/gcc/c-decl.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r 7d2526e63c13 -r 7f2037ebfa0c gnu/dist/gcc/c-decl.c
--- a/gnu/dist/gcc/c-decl.c     Thu Oct 19 15:58:34 2000 +0000
+++ b/gnu/dist/gcc/c-decl.c     Thu Oct 19 15:58:39 2000 +0000
@@ -552,6 +552,7 @@
 
 int warn_format;
 int warn_format_y2k;
+int warn_format_extra_args;
 
 /* Warn about a subscript that has type char.  */
 
@@ -753,10 +754,17 @@
     warn_traditional = 1;
   else if (!strcmp (p, "-Wno-traditional"))
     warn_traditional = 0;
+  else if (!strcmp (p, "-Wnetbsd-format-audit"))
+    warn_format = MAX(warn_format, 2);
   else if (!strcmp (p, "-Wformat"))
-    warn_format = warn_format_y2k = 1;
+    {
+      warn_format_y2k = warn_format_extra_args = 1;
+      warn_format = MAX(warn_format, 1);
+    }
   else if (!strcmp (p, "-Wno-format"))
     warn_format = warn_format_y2k = 0;
+  else if (!strcmp (p, "-Wno-format-extra-args"))
+    warn_format_extra_args = 0;
   else if (!strcmp (p, "-Wno-format-y2k"))
     warn_format_y2k = 0;
   else if (!strcmp (p, "-Wchar-subscripts"))
@@ -832,7 +840,8 @@
       warn_return_type = 1;
       warn_unused = 1;
       warn_switch = 1;
-      warn_format = warn_format_y2k = 1;
+      warn_format_y2k = 1;
+      warn_format = MAX(warn_format, 1);
       warn_char_subscripts = 1;
       warn_parentheses = 1;
       warn_missing_braces = 1;



Home | Main Index | Thread Index | Old Index