cpplib: Suppress warnings in system headers

Neil Booth NeilB@earthling.net
Mon Aug 21 11:22:00 GMT 2000


This patch suppresses all warnings and pedantic warnings in system
headers.  They can be turned on (off) by the new option -Win-sys
(-Wno-in-sys).

This is achieved by moving the checks to the diagnostic routines
themselves.  The warning routines, e.g. cpp_warning, now return a
boolean to indicate whether the warning was in fact emitted or not.
This is useful for code that wants to emit warnings only once, and
needs to know if they were actually emitted at all.

Since warnings are now off in system headers by default, I left the
multiline string in directive as a cpp_warning (I couldn't see that
the justification of a DEPRECATED category remained in this light).

Bootstrapping i386 Linux.

Neil.

	* cpperror.c (cpp_begin_message): Only emit warnings when
	outside system headers, unless they have been forced.
	(cpp_warning, cpp_warning_with_line, cpp_pedwarn,
	cpp_pedwarn_with_line, cpp_pedwarn_with_file_and_line):
	Return a nonzero int if warning actually omitted.

	* cppexp.c (parse_escape, integer_overflow, _cpp_parse_expr):
	Update to new diagnostic regime.
	* cpplex.c (skip_whitespace, parse_name, parse_string, lex_line,
	parse_args): Similarly.
	* cpplib.c (_cpp_check_directive, _cpp_check_linemarker,
	do_import, do_line, do_pragma_once, validate_else): Similarly.
	* cppmacro.c (is__va_args__, count_params): Similarly.

	* cppinit.c (cpp_handle_option): Handle -Win-sys and -Wno-in-sys.
	(print_help): Update.
	* cpphash.h (CPP_PEDANTIC): Remove.
	(CPP_WTRADITIONAL): Update.
	* cpplib.h (struct cpp_reader): New member warn_in_sys.	Update
	diagnostic function prototypes.
	* cpp.texi: Update.

Index: cpperror.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpperror.c,v
retrieving revision 1.36
diff -u -p -r1.36 cpperror.c
--- cpperror.c	2000/08/09 19:41:12	1.36
+++ cpperror.c	2000/08/21 18:07:04
@@ -121,38 +121,31 @@ _cpp_begin_message (pfile, code, file, l
 
   switch (code)
     {
+    case PEDWARN:
     case WARNING:
-      if (! CPP_OPTION (pfile, warnings_are_errors))
-	{
-	  if (CPP_OPTION (pfile, inhibit_warnings))
-	    return 0;
-	  is_warning = 1;
-	}
-      else
+
+      /* Omit warning diagnostics in system headers, unless explicitly
+         requested.  */
+      if (!CPP_OPTION (pfile, warn_in_sys) && CPP_IN_SYSTEM_HEADER (pfile))
+	return 0;
+
+      if (code == PEDWARN)
 	{
-	  if (CPP_OPTION (pfile, inhibit_errors))
+	  if (! CPP_OPTION (pfile, pedantic))
 	    return 0;
-	  if (pfile->errors < CPP_FATAL_LIMIT)
-	    pfile->errors++;
+	  is_warning = ! CPP_OPTION (pfile, pedantic_errors);
 	}
-      break;
+      else			/* WARNING.  */
+	is_warning = ! CPP_OPTION (pfile, warnings_are_errors);
 
-    case PEDWARN:
-      if (! CPP_OPTION (pfile, pedantic_errors))
+      if (is_warning)
 	{
 	  if (CPP_OPTION (pfile, inhibit_warnings))
-	    return 0;
-	  is_warning = 1;
-	}
-      else
-	{
-	  if (CPP_OPTION (pfile, inhibit_errors))
 	    return 0;
-	  if (pfile->errors < CPP_FATAL_LIMIT)
-	    pfile->errors++;
+	  break;
 	}
-      break;
-	
+      /* Fall through.  */
+
     case ERROR:
       if (CPP_OPTION (pfile, inhibit_errors))
 	return 0;
@@ -297,13 +290,14 @@ cpp_error_from_errno (pfile, name)
   cpp_error (pfile, "%s: %s", name, xstrerror (errno));
 }
 
-void
+int
 cpp_warning VPARAMS ((cpp_reader * pfile, const char *msgid, ...))
 {
 #ifndef ANSI_PROTOTYPES
   cpp_reader *pfile;
   const char *msgid;
 #endif
+  int emitted;
   va_list ap;
   
   VA_START (ap, msgid);
@@ -313,12 +307,15 @@ cpp_warning VPARAMS ((cpp_reader * pfile
   msgid = va_arg (ap, const char *);
 #endif
 
-  if (_cpp_begin_message (pfile, WARNING, NULL, 0, 0))
+  emitted = _cpp_begin_message (pfile, WARNING, NULL, 0, 0);
+  if (emitted)
     v_message (msgid, ap);
   va_end(ap);
+
+  return emitted;
 }
 
-void
+int
 cpp_warning_with_line VPARAMS ((cpp_reader * pfile, int line, int column,
 			       const char *msgid, ...))
 {
@@ -328,6 +325,7 @@ cpp_warning_with_line VPARAMS ((cpp_read
   int column;
   const char *msgid;
 #endif
+  int emitted;
   va_list ap;
   
   VA_START (ap, msgid);
@@ -339,12 +337,15 @@ cpp_warning_with_line VPARAMS ((cpp_read
   msgid = va_arg (ap, const char *);
 #endif
 
-  if (_cpp_begin_message (pfile, WARNING, NULL, line, column))
+  emitted = _cpp_begin_message (pfile, WARNING, NULL, line, column);
+  if (emitted)
     v_message (msgid, ap);
   va_end(ap);
+
+  return emitted;
 }
 
-void
+int
 cpp_pedwarn VPARAMS ((cpp_reader * pfile, const char *msgid, ...))
 {
 #ifndef ANSI_PROTOTYPES
@@ -352,6 +353,7 @@ cpp_pedwarn VPARAMS ((cpp_reader * pfile
   const char *msgid;
 #endif
   va_list ap;
+  int emitted;
   
   VA_START (ap, msgid);
   
@@ -360,12 +362,15 @@ cpp_pedwarn VPARAMS ((cpp_reader * pfile
   msgid = va_arg (ap, const char *);
 #endif
 
-  if (_cpp_begin_message (pfile, PEDWARN, NULL, 0, 0))
+  emitted = _cpp_begin_message (pfile, PEDWARN, NULL, 0, 0);
+  if (emitted)
     v_message (msgid, ap);
   va_end(ap);
+
+  return emitted;
 }
 
-void
+int
 cpp_pedwarn_with_line VPARAMS ((cpp_reader * pfile, int line, int column,
 			       const char *msgid, ...))
 {
@@ -375,6 +380,7 @@ cpp_pedwarn_with_line VPARAMS ((cpp_read
   int column;
   const char *msgid;
 #endif
+  int emitted;
   va_list ap;
   
   VA_START (ap, msgid);
@@ -386,15 +392,18 @@ cpp_pedwarn_with_line VPARAMS ((cpp_read
   msgid = va_arg (ap, const char *);
 #endif
 
-  if (_cpp_begin_message (pfile, PEDWARN, NULL, line, column))
+  emitted = _cpp_begin_message (pfile, PEDWARN, NULL, line, column);
+  if (emitted)
     v_message (msgid, ap);
   va_end(ap);
+
+  return emitted;
 }
 
 /* Report a warning (or an error if pedantic_errors)
    giving specified file name and line number, not current.  */
 
-void
+int
 cpp_pedwarn_with_file_and_line VPARAMS ((cpp_reader *pfile,
 					 const char *file, int line, int col,
 					 const char *msgid, ...))
@@ -407,6 +416,7 @@ cpp_pedwarn_with_file_and_line VPARAMS (
   const char *msgid;
 #endif
   va_list ap;
+  int emitted;
   
   VA_START (ap, msgid);
 
@@ -418,9 +428,12 @@ cpp_pedwarn_with_file_and_line VPARAMS (
   msgid = va_arg (ap, const char *);
 #endif
 
-  if (_cpp_begin_message (pfile, PEDWARN, file, line, col))
+  emitted = _cpp_begin_message (pfile, PEDWARN, file, line, col);
+  if (emitted)
     v_message (msgid, ap);
   va_end(ap);
+
+  return emitted;
 }
 
 /* Print an error message not associated with a file.  */
Index: cppexp.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cppexp.c,v
retrieving revision 1.73
diff -u -p -r1.73 cppexp.c
--- cppexp.c	2000/08/10 15:21:18	1.73
+++ cppexp.c	2000/08/21 18:07:07
@@ -481,8 +481,7 @@ parse_escape (pfile, string_ptr, limit, 
     case 'v': c = TARGET_VT;	  break;
 
     case 'e': case 'E':
-      if (CPP_PEDANTIC (pfile))
-	cpp_pedwarn (pfile, "non-ISO-standard escape sequence, '\\%c'", c);
+      cpp_pedwarn (pfile, "non-ISO-standard escape sequence, '\\%c'", c);
       c = TARGET_ESC;
       break;
       
@@ -552,8 +551,7 @@ static void
 integer_overflow (pfile)
      cpp_reader *pfile;
 {
-  if (CPP_PEDANTIC (pfile))
-    cpp_pedwarn (pfile, "integer overflow in preprocessor expression");
+  cpp_pedwarn (pfile, "integer overflow in preprocessor expression");
 }
 
 static HOST_WIDEST_INT
@@ -931,8 +929,7 @@ _cpp_parse_expr (pfile)
 	      if (!v1) skip_evaluation--;
 	      break;
 	    case CPP_COMMA:
-	      if (CPP_PEDANTIC (pfile))
-		cpp_pedwarn (pfile, "comma operator in operand of #if");
+	      cpp_pedwarn (pfile, "comma operator in operand of #if");
 	      top->value = v2;
 	      top->unsignedp = unsigned2;
 	      break;
Index: cpphash.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpphash.h,v
retrieving revision 1.69
diff -u -p -r1.69 cpphash.h
--- cpphash.h	2000/08/18 17:35:57	1.69
+++ cpphash.h	2000/08/21 18:07:13
@@ -199,10 +199,7 @@ extern unsigned char _cpp_trigraph_map[U
 #define CPP_IN_SYSTEM_HEADER(PFILE) \
   (CPP_BUFFER (PFILE) && CPP_BUFFER (PFILE)->inc \
    && CPP_BUFFER (PFILE)->inc->sysp)
-#define CPP_PEDANTIC(PF) \
-  (CPP_OPTION (PF, pedantic) && !CPP_IN_SYSTEM_HEADER (PF))
-#define CPP_WTRADITIONAL(PF) \
-  (CPP_OPTION (PF, warn_traditional) && !CPP_IN_SYSTEM_HEADER (PF))
+#define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, warn_traditional)
 
 /* Hash step.  The hash calculation is duplicated in cpp_lookup and
    parse_name.  */
Index: cppinit.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cppinit.c,v
retrieving revision 1.106
diff -u -p -r1.106 cppinit.c
--- cppinit.c	2000/08/20 21:36:17	1.106
+++ cppinit.c	2000/08/21 18:07:23
@@ -830,9 +830,7 @@ cpp_start_read (pfile, print, fname)
     user_label_prefix = USER_LABEL_PREFIX;
 
   /* Figure out if we need to save function macro parameter spellings.
-     We don't use CPP_PEDANTIC() here because that depends on whether
-     or not the current file is a system header, and there is no
-     current file yet.  */
+     Note there is no current file yet.  */
   pfile->save_parameter_spellings =
     CPP_OPTION (pfile, pedantic)
     || CPP_OPTION (pfile, debug_output)
@@ -1623,6 +1621,8 @@ cpp_handle_option (pfile, argc, argv)
 	    CPP_OPTION (pfile, warn_paste) = 1;
 	  else if (!strcmp (argv[i], "-Werror"))
 	    CPP_OPTION (pfile, warnings_are_errors) = 1;
+	  else if (!strcmp (argv[i], "-Win-sys"))
+	    CPP_OPTION (pfile, warn_in_sys) = 1;
 	  else if (!strcmp (argv[i], "-Wno-traditional"))
 	    CPP_OPTION (pfile, warn_traditional) = 0;
 	  else if (!strcmp (argv[i], "-Wno-trigraphs"))
@@ -1639,6 +1639,8 @@ cpp_handle_option (pfile, argc, argv)
 	    CPP_OPTION (pfile, warn_paste) = 0;
 	  else if (!strcmp (argv[i], "-Wno-error"))
 	    CPP_OPTION (pfile, warnings_are_errors) = 0;
+	  else if (!strcmp (argv[i], "-Wno-in-sys"))
+	    CPP_OPTION (pfile, warn_in_sys) = 0;
 	  break;
  	}
     }
@@ -1727,6 +1729,8 @@ Switches:\n\
   -Wno-comment{s}           Do not warn about comments\n\
   -Wtraditional             Warn about features not present in traditional C\n\
   -Wno-traditional          Do not warn about traditional C\n\
+  -Win-sys                  Warn even when in system headers\n\
+  -Wno-in-sys               Do not warn when in system headers\n\
   -Wundef                   Warn if an undefined macro is used by #if\n\
   -Wno-undef                Do not warn about testing undefined macros\n\
   -Wimport                  Warn about the use of the #import directive\n\
Index: cpplex.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpplex.c,v
retrieving revision 1.89
diff -u -p -r1.89 cpplex.c
--- cpplex.c	2000/08/20 21:36:17	1.89
+++ cpplex.c	2000/08/21 18:07:31
@@ -941,7 +941,7 @@ skip_whitespace (pfile, in_directive)
 				   "embedded null character ignored");
 	  warned = 1;
 	}
-      else if (in_directive && CPP_PEDANTIC (pfile))
+      else if (in_directive)
 	cpp_pedwarn_with_line (pfile, CPP_BUF_LINE (buffer),
 			       CPP_BUF_COL (buffer),
 			       "%s in preprocessing directive",
@@ -971,7 +971,7 @@ parse_name (pfile, tok, cur, rlimit)
       /* $ is not a identifier character in the standard, but is
 	 commonly accepted as an extension.  Don't warn about it in
 	 skipped conditional blocks. */
-      if (*cur == '$' && CPP_PEDANTIC (pfile) && ! pfile->skipping)
+      if (*cur == '$' && ! pfile->skipping)
 	{
 	  CPP_BUFFER (pfile)->cur = cur;
 	  cpp_pedwarn (pfile, "'$' character in identifier");
@@ -1128,14 +1128,17 @@ parse_string (pfile, list, token, termin
 		 longlong.h breaks.)  */
 	      if (terminator != '"')
 		goto unterminated;
-		
+
 	      cur++;  /* Move forwards again.  */
 
 	      if (pfile->multiline_string_line == 0)
 		{
 		  pfile->multiline_string_line = token->line;
 		  pfile->multiline_string_column = token->col;
-		  if (CPP_PEDANTIC (pfile))
+		  if (pfile->token_list.directive)
+		    cpp_warning (pfile,
+		 "deprecated use of multi-line string literal in directive");
+		  else
 		    cpp_pedwarn (pfile, "multi-line string constant");
 		}
 
@@ -1428,15 +1431,17 @@ lex_line (pfile, list)
 		    goto do_line_comment;
 		  else if (CPP_OPTION (pfile, cplusplus_comments))
 		    {
-		      if (CPP_OPTION (pfile, c89) && CPP_PEDANTIC (pfile)
+		      if (CPP_OPTION (pfile, c89)
 			  && ! buffer->warned_cplusplus_comments)
 			{
 			  buffer->cur = cur;
-			  cpp_pedwarn (pfile,
-			     "C++ style comments are not allowed in ISO C89");
-			  cpp_pedwarn (pfile,
-			  "(this will be reported only once per input file)");
-			  buffer->warned_cplusplus_comments = 1;
+			  if (cpp_pedwarn (pfile,
+			   "C++ style comments are not allowed in ISO C89"))
+			    {
+			      cpp_pedwarn (pfile,
+			   "(this will be reported only once per input file)");
+			      buffer->warned_cplusplus_comments = 1;
+			    }
 			}
 		    do_line_comment:
 		      buffer->cur = cur;
@@ -2439,7 +2444,7 @@ parse_args (pfile, hp, args)
 	  save_token (args, pm);
 	  args->ends[argc] = total + 1;
 
-	  if (CPP_OPTION (pfile, c99) && CPP_PEDANTIC (pfile))
+	  if (CPP_OPTION (pfile, c99))
 	    cpp_pedwarn (pfile, "ISO C99 requires rest arguments to be used");
 
 	  return 0;
Index: cpplib.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpplib.c,v
retrieving revision 1.200
diff -u -p -r1.200 cpplib.c
--- cpplib.c	2000/08/18 22:42:14	1.200
+++ cpplib.c	2000/08/21 18:07:38
@@ -172,7 +172,7 @@ _cpp_check_directive (pfile, token, bol)
 	  return 0;
 
 	/* Issue -pedantic warnings for extended directives.   */
-	if (CPP_PEDANTIC (pfile) && dtable[i].origin == EXTENSION)
+	if (dtable[i].origin == EXTENSION)
 	  cpp_pedwarn (pfile, "ISO C does not allow #%s", dtable[i].name);
 
 	return &dtable[i];
@@ -195,8 +195,7 @@ _cpp_check_linemarker (pfile, token, bol
   if (pfile->skipping || CPP_OPTION (pfile, lang_asm))
     return 0;
 
-  if (CPP_PEDANTIC (pfile) && CPP_BUFFER (pfile)->inc
-      && ! CPP_OPTION (pfile, preprocessed))
+  if (CPP_BUFFER (pfile)->inc && ! CPP_OPTION (pfile, preprocessed))
     cpp_pedwarn (pfile, "# followed by integer");
 
   /* In -traditional mode, a directive is ignored unless its #
@@ -361,13 +360,9 @@ do_import (pfile)
   const U_CHAR *str;
   int ab;
 
-  if (CPP_OPTION (pfile, warn_import)
-      && !CPP_IN_SYSTEM_HEADER (pfile) && !pfile->import_warning)
-    {
-      pfile->import_warning = 1;
-      cpp_warning (pfile,
+  if (CPP_OPTION (pfile, warn_import) && !pfile->import_warning)
+    pfile->import_warning = cpp_warning (pfile,
 	   "#import is obsolete, use an #ifndef wrapper in the header file");
-    }
 
   if (parse_include (pfile, dtable[T_IMPORT].name, 0, &str, &len, &ab))
     return;
@@ -490,7 +485,7 @@ do_line (pfile)
       return;
     }      
 
-  if (CPP_PEDANTIC (pfile) && (new_lineno == 0 || new_lineno > cap))
+  if (new_lineno == 0 || new_lineno > cap)
     cpp_pedwarn (pfile, "line number out of range");
 
   old_lineno = ip->lineno;
@@ -525,8 +520,7 @@ do_line (pfile)
   if (read_line_number (pfile, &action_number) == 0)
     goto done;
 
-  if (CPP_PEDANTIC (pfile))
-    cpp_pedwarn (pfile, "garbage at end of #line");
+  cpp_pedwarn (pfile, "garbage at end of #line");
 
   if (action_number == 1)
     {
@@ -780,10 +774,7 @@ do_pragma_once (pfile)
 {
   cpp_buffer *ip = CPP_BUFFER (pfile);
 
-  /* Allow #pragma once in system headers, since that's not the user's
-     fault.  */
-  if (!CPP_IN_SYSTEM_HEADER (pfile))
-    cpp_warning (pfile, "#pragma once is obsolete");
+  cpp_warning (pfile, "#pragma once is obsolete");
       
   if (CPP_PREV_BUFFER (ip) == NULL)
     cpp_warning (pfile, "#pragma once outside include file");
@@ -1150,7 +1141,7 @@ validate_else (pfile, directive)
      cpp_reader *pfile;
      const U_CHAR *directive;
 {
-  if (CPP_PEDANTIC (pfile) && _cpp_get_token (pfile)->type != CPP_EOF)
+  if (_cpp_get_token (pfile)->type != CPP_EOF)
     cpp_pedwarn (pfile, "ISO C forbids text after #%s", directive);
 }
 
Index: cpplib.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpplib.h,v
retrieving revision 1.118
diff -u -p -r1.118 cpplib.h
--- cpplib.h	2000/08/17 17:52:48	1.118
+++ cpplib.h	2000/08/21 18:07:40
@@ -359,6 +359,9 @@ struct cpp_options
   /* Nonzero means warn if #import is used.  */
   unsigned char warn_import;
 
+  /* Nonzero means warn when in system headers.  */
+  unsigned int warn_in_sys;
+
   /* Nonzero means warn about various incompatibilities with
      traditional C.  */
   unsigned char warn_traditional;
@@ -679,19 +682,19 @@ extern void cpp_fatal PARAMS ((cpp_reade
   ATTRIBUTE_PRINTF_2;
 extern void cpp_error PARAMS ((cpp_reader *, const char *msgid, ...))
   ATTRIBUTE_PRINTF_2;
-extern void cpp_warning PARAMS ((cpp_reader *, const char *msgid, ...))
+extern int cpp_warning PARAMS ((cpp_reader *, const char *msgid, ...))
   ATTRIBUTE_PRINTF_2;
-extern void cpp_pedwarn PARAMS ((cpp_reader *, const char *msgid, ...))
+extern int cpp_pedwarn PARAMS ((cpp_reader *, const char *msgid, ...))
   ATTRIBUTE_PRINTF_2;
 extern void cpp_notice PARAMS ((cpp_reader *, const char *msgid, ...))
   ATTRIBUTE_PRINTF_2;
 extern void cpp_error_with_line PARAMS ((cpp_reader *, int, int, const char *msgid, ...))
   ATTRIBUTE_PRINTF_4;
-extern void cpp_warning_with_line PARAMS ((cpp_reader *, int, int, const char *msgid, ...))
+extern int cpp_warning_with_line PARAMS ((cpp_reader *, int, int, const char *msgid, ...))
   ATTRIBUTE_PRINTF_4;
-extern void cpp_pedwarn_with_line PARAMS ((cpp_reader *, int, int, const char *msgid, ...))
+extern int cpp_pedwarn_with_line PARAMS ((cpp_reader *, int, int, const char *msgid, ...))
   ATTRIBUTE_PRINTF_4;
-extern void cpp_pedwarn_with_file_and_line PARAMS ((cpp_reader *, const char *, int, int, const char *msgid, ...))
+extern int cpp_pedwarn_with_file_and_line PARAMS ((cpp_reader *, const char *, int, int, const char *msgid, ...))
   ATTRIBUTE_PRINTF_5;
 extern void cpp_error_from_errno PARAMS ((cpp_reader *, const char *));
 extern void cpp_notice_from_errno PARAMS ((cpp_reader *, const char *));
Index: cppmacro.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cppmacro.c,v
retrieving revision 1.9
diff -u -p -r1.9 cppmacro.c
--- cppmacro.c	2000/08/17 18:01:42	1.9
+++ cppmacro.c	2000/08/21 18:07:41
@@ -92,8 +92,7 @@ is__va_args__ (pfile, token)
      cpp_reader *pfile;
      const cpp_token *token;
 {
-  if (!CPP_PEDANTIC (pfile)
-      || token->val.node != pfile->spec_nodes->n__VA_ARGS__)
+  if (token->val.node != pfile->spec_nodes->n__VA_ARGS__)
     return 0;
 
   cpp_pedwarn_with_line (pfile, token->line, token->col,
@@ -198,16 +197,13 @@ count_params (pfile, info)
 	      info->paramc++;
 	      info->paramlen += tok->val.node->length + 1;
 
-	      if (CPP_PEDANTIC (pfile) && ! CPP_OPTION (pfile, c99))
+	      if (! CPP_OPTION (pfile, c99))
 		cpp_pedwarn (pfile,
 			     "C89 does not permit anon varargs macros");
 	    }
 	  else
-	    {
-	      if (CPP_PEDANTIC (pfile))
-		cpp_pedwarn (pfile,
-			     "ISO C does not permit named varargs parameters");
-	    }
+	    cpp_pedwarn (pfile,
+			 "ISO C does not permit named varargs parameters");
 
 	  info->flags |= VAR_ARGS;
 	  token++;
Index: cpp.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpp.texi,v
retrieving revision 1.31
diff -u -p -r1.31 cpp.texi
--- cpp.texi	2000/08/19 20:13:06	1.31
+++ cpp.texi	2000/08/21 18:07:55
@@ -3137,6 +3137,12 @@ comment, or whenever a backslash-newline
 Warn if any trigraphs are encountered.  This option used to take effect
 only if @samp{-trigraphs} was also specified, but now works independently.
 
+@item -Win-sys
+@findex -Win-sys
+Emit warnings even when in system headers.  By default, warnings are
+suppressed in system headers, on the assumption that the user cannot
+change them.
+
 @item -Wwhite-space
 @findex -Wwhite-space
 Warn about possible white space confusion, e.g. white space between a


More information about the Gcc-patches mailing list