This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[4.4] [C++] separate pedwarns and permissive errors.


An updated version of the patch posted (and discussed) here:
http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00583.html

Bootstrapped and tested on x86_64-unknown-linux-gnu.

2008-01-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>

  PR 24924
 * c-common.c (flag_permissive): Delete.
   (constant_expression_warnings): Check flags first.
   (constant_expression_error): New.
 * c-common.h (flag_permissive): Delete.
   (constant_expression_error): Declare.
 * flags.h (flag_permissive): Declare. Update description.
 * diagnostic.c (pedwarn): Update.
   (permerror): New.
 * diagnostic.h: (pedantic_error_kind): Rename as pedantic_warning_kind.
  (permissive_error_kind): New.
 * toplev.c (flag_permissive): Define. Update description.
 * toplev.h (permissive_error_kind): Declare.
 * c-errors.c (pedwarn_c99): Use pedantic_warning_kind.
   (pedwarn_c90): Use pedantic_warning_kind.
  * c-opts.c (c_common_post_options): flag_permissive does not affect
flag_pedantic_errors.

cp/
  PR 24924
 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
   (check_field_decls): Likewise.
   (note_name_declared_in_class): Likewise.
 * call.c (build_new_op): Likewise.
   (convert_like_real): Likewise.
   (build_over_call): Likewise.
 * lex.c (unqualified_fn_lookup_error): Likewise.
 * parser.c (cp_parser_template_id): Likewise.
 * cvt.c (warn_ref_binding): Likewise.
   (convert_to_reference): Likewise.
   (ocp_convert): Likewise.
   (convert_to_void): Use error instead of pedwarn.
 * error.c (cp_cpp_error): Use pedantic_warning_kind.
 * decl.c (compute_array_index_type): Use constant_expression_error.

testsuite/
  PR 24924
 * g++.dg/cpp/string-2.C: This is a warning now.
 * g++.dg/cpp/pedantic-errors.C: -pedantic-errors is not enabled by
default, so add it.

OK to commit to trunk?

Cheers,

Manuel.
Index: gcc/flags.h
===================================================================
--- gcc/flags.h	(revision 132503)
+++ gcc/flags.h	(working copy)
@@ -195,10 +195,14 @@ extern int flag_dump_unnumbered;
 /* Nonzero means change certain warnings into errors.
    Usually these are warnings about failure to conform to some standard.  */
 
 extern int flag_pedantic_errors;
 
+/* Nonzero means make permerror produce warnings instead of errors.  */
+
+extern int flag_permissive;
+
 /* Nonzero if we are compiling code for a shared library, zero for
    executable.  */
 
 extern int flag_shlib;
 
Index: gcc/diagnostic.c
===================================================================
--- gcc/diagnostic.c	(revision 132503)
+++ gcc/diagnostic.c	(working copy)
@@ -538,15 +538,35 @@ pedwarn (const char *gmsgid, ...)
   diagnostic_info diagnostic;
   va_list ap;
 
   va_start (ap, gmsgid);
   diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location,
-		       pedantic_error_kind ());
+		       pedantic_warning_kind ());
   report_diagnostic (&diagnostic);
   va_end (ap);
 }
 
+/* A "permissive" error: issues an error unless -fpermissive was given
+   on the command line, in which case it issues a warning.  Use this
+   for things that really should be errors but we want to support
+   legacy code.  */
+
+void
+permerror (const char *gmsgid, ...)
+{
+  diagnostic_info diagnostic;
+  va_list ap;
+
+  va_start (ap, gmsgid);
+  diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location,
+		       permissive_error_kind ());
+  diagnostic.option_index = OPT_fpermissive;
+  report_diagnostic (&diagnostic);
+  va_end (ap);
+}
+
+
 /* A hard error: the code is definitely ill-formed, and an object file
    will not be produced.  */
 void
 error (const char *gmsgid, ...)
 {
Index: gcc/diagnostic.h
===================================================================
--- gcc/diagnostic.h	(revision 132503)
+++ gcc/diagnostic.h	(working copy)
@@ -48,11 +48,12 @@ typedef struct diagnostic_info
   diagnostic_t kind;
   /* Which OPT_* directly controls this diagnostic.  */
   int option_index;
 } diagnostic_info;
 
-#define pedantic_error_kind() (flag_pedantic_errors ? DK_ERROR : DK_WARNING)
+#define pedantic_warning_kind() (flag_pedantic_errors ? DK_ERROR : DK_WARNING)
+#define permissive_error_kind() (flag_permissive ? DK_WARNING : DK_ERROR)
 
 
 /*  Forward declarations.  */
 typedef struct diagnostic_context diagnostic_context;
 typedef void (*diagnostic_starter_fn) (diagnostic_context *,
Index: gcc/toplev.c
===================================================================
--- gcc/toplev.c	(revision 132503)
+++ gcc/toplev.c	(working copy)
@@ -300,10 +300,14 @@ enum tls_model flag_tls_default = TLS_MO
 /* Nonzero means change certain warnings into errors.
    Usually these are warnings about failure to conform to some standard.  */
 
 int flag_pedantic_errors = 0;
 
+/* Nonzero means make permerror produce warnings instead of errors.  */
+
+int flag_permissive = 0;
+
 /* -dA causes debug commentary information to be produced in
    the generated assembly code (to make it more readable).  This option
    is generally only of use to those who actually need to read the
    generated assembly code (perhaps while debugging the compiler itself).
    Currently, this switch is only used by dwarfout.c; however, it is intended
Index: gcc/toplev.h
===================================================================
--- gcc/toplev.h	(revision 132503)
+++ gcc/toplev.h	(working copy)
@@ -60,10 +60,11 @@ extern void warning0 (const char *, ...)
 extern void warning (int, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
 extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
 extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
      ATTRIBUTE_NORETURN;
 extern void pedwarn (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
+extern void permerror (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
 extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
 extern void inform (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
 extern void verbatim (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
 
 extern void rest_of_decl_compilation (tree, int, int);
Index: gcc/testsuite/g++.dg/cpp/pedantic-errors.C
===================================================================
--- gcc/testsuite/g++.dg/cpp/pedantic-errors.C	(revision 0)
+++ gcc/testsuite/g++.dg/cpp/pedantic-errors.C	(revision 0)
@@ -0,0 +1,5 @@
+/* { dg-do preprocess } */
+/* { dg-options "-std=c++98 -pedantic-errors" } */
+
+#if 1   
+#endif 1 /* { dg-error "error: extra tokens at end of #endif directive" } */
Index: gcc/testsuite/g++.dg/cpp/string-2.C
===================================================================
--- gcc/testsuite/g++.dg/cpp/string-2.C	(revision 132503)
+++ gcc/testsuite/g++.dg/cpp/string-2.C	(working copy)
@@ -1,7 +1,6 @@
-// Test diagnostics for interpreting strings: should be an error by
-// default.
+// Test diagnostics for interpreting strings: This is a pedwarn.
 // Origin: Joseph Myers <joseph@codesourcery.com>
 // { dg-do compile }
 // { dg-options "" }
 
-const char *s = "\q"; // { dg-error "error: unknown escape sequence" }
+const char *s = "\q"; // { dg-warning "warning: unknown escape sequence" }
Index: gcc/cp/class.c
===================================================================
--- gcc/cp/class.c	(revision 132503)
+++ gcc/cp/class.c	(working copy)
@@ -2491,31 +2491,31 @@ finish_struct_anon (tree t)
 		continue;
 
 	      if (TREE_CODE (elt) != FIELD_DECL)
 		{
 		  if (is_union)
-		    pedwarn ("%q+#D invalid; an anonymous union can "
-			     "only have non-static data members", elt);
+		    permerror ("%q+#D invalid; an anonymous union can "
+			       "only have non-static data members", elt);
 		  else
-		    pedwarn ("%q+#D invalid; an anonymous struct can "
-			     "only have non-static data members", elt);
+		    permerror ("%q+#D invalid; an anonymous struct can "
+			       "only have non-static data members", elt);
 		  continue;
 		}
 
 	      if (TREE_PRIVATE (elt))
 		{
 		  if (is_union)
-		    pedwarn ("private member %q+#D in anonymous union", elt);
+		    permerror ("private member %q+#D in anonymous union", elt);
 		  else
-		    pedwarn ("private member %q+#D in anonymous struct", elt);
+		    permerror ("private member %q+#D in anonymous struct", elt);
 		}
 	      else if (TREE_PROTECTED (elt))
 		{
 		  if (is_union)
-		    pedwarn ("protected member %q+#D in anonymous union", elt);
+		    permerror ("protected member %q+#D in anonymous union", elt);
 		  else
-		    pedwarn ("protected member %q+#D in anonymous struct", elt);
+		    permerror ("protected member %q+#D in anonymous struct", elt);
 		}
 
 	      TREE_PRIVATE (elt) = TREE_PRIVATE (field);
 	      TREE_PROTECTED (elt) = TREE_PROTECTED (field);
 	    }
@@ -3042,11 +3042,11 @@ check_field_decls (tree t, tree *access_
       /* Core issue 80: A nonstatic data member is required to have a
 	 different name from the class iff the class has a
 	 user-defined constructor.  */
       if (constructor_name_p (DECL_NAME (x), t)
 	  && TYPE_HAS_USER_CONSTRUCTOR (t))
-	pedwarn ("field %q+#D with same name as class", x);
+	permerror ("field %q+#D with same name as class", x);
 
       /* We set DECL_C_BIT_FIELD in grokbitfield.
 	 If the type and width are valid, we'll also set DECL_BIT_FIELD.  */
       if (! DECL_C_BIT_FIELD (x) || ! check_bitfield_decl (x))
 	check_field_decl (x, t,
@@ -6070,14 +6070,14 @@ resolve_address_of_overloaded_function (
       static int explained;
 
       if (!(flags & tf_error))
 	return error_mark_node;
 
-      pedwarn ("assuming pointer to member %qD", fn);
+      permerror ("assuming pointer to member %qD", fn);
       if (!explained)
 	{
-	  pedwarn ("(a pointer to member can only be formed with %<&%E%>)", fn);
+	  inform ("(a pointer to member can only be formed with %<&%E%>)", fn);
 	  explained = 1;
 	}
     }
 
   /* If we're doing overload resolution purely for the purpose of
@@ -6433,12 +6433,12 @@ note_name_declared_in_class (tree name, 
       /* [basic.scope.class]
 
 	 A name N used in a class S shall refer to the same declaration
 	 in its context and when re-evaluated in the completed scope of
 	 S.  */
-      pedwarn ("declaration of %q#D", decl);
-      pedwarn ("changes meaning of %qD from %q+#D",
+      permerror ("declaration of %q#D", decl);
+      permerror ("changes meaning of %qD from %q+#D",
 	       DECL_NAME (OVL_CURRENT (decl)), (tree) n->value);
     }
 }
 
 /* Returns the VAR_DECL for the complete vtable associated with BINFO.
Index: gcc/cp/decl.c
===================================================================
--- gcc/cp/decl.c	(revision 132503)
+++ gcc/cp/decl.c	(working copy)
@@ -7016,16 +7016,11 @@ compute_array_index_type (tree name, tre
   /* Normally, the array-bound will be a constant.  */
   if (TREE_CODE (size) == INTEGER_CST)
     {
       /* Check to see if the array bound overflowed.  Make that an
 	 error, no matter how generous we're being.  */
-      int old_flag_pedantic_errors = flag_pedantic_errors;
-      int old_pedantic = pedantic;
-      pedantic = flag_pedantic_errors = 1;
-      constant_expression_warning (size);
-      pedantic = old_pedantic;
-      flag_pedantic_errors = old_flag_pedantic_errors;
+      constant_expression_error (size);
 
       /* An array must have a positive number of elements.  */
       if (INT_CST_LT (size, integer_zero_node))
 	{
 	  if (name)
Index: gcc/cp/call.c
===================================================================
--- gcc/cp/call.c	(revision 132503)
+++ gcc/cp/call.c	(working copy)
@@ -3855,14 +3855,14 @@ build_new_op (enum tree_code code, int f
 	case POSTINCREMENT_EXPR:
 	case POSTDECREMENT_EXPR:
 	  /* Look for an `operator++ (int)'.  If they didn't have
 	     one, then we fall back to the old way of doing things.  */
 	  if (flags & LOOKUP_COMPLAIN)
-	    pedwarn ("no %<%D(int)%> declared for postfix %qs, "
-		     "trying prefix operator instead",
-		     fnname,
-		     operator_name_info[code].name);
+	    permerror ("no %<%D(int)%> declared for postfix %qs, "
+		       "trying prefix operator instead",
+		       fnname,
+		       operator_name_info[code].name);
 	  if (code == POSTINCREMENT_EXPR)
 	    code = PREINCREMENT_EXPR;
 	  else
 	    code = PREDECREMENT_EXPR;
 	  result = build_new_op (code, flags, arg1, NULL_TREE, NULL_TREE,
@@ -4341,13 +4341,13 @@ convert_like_real (conversion *convs, tr
 				      /*issue_conversion_warnings=*/false,
 				      /*c_cast_p=*/false);
 	  else if (t->kind == ck_identity)
 	    break;
 	}
-      pedwarn ("invalid conversion from %qT to %qT", TREE_TYPE (expr), totype);
+      permerror ("invalid conversion from %qT to %qT", TREE_TYPE (expr), totype);
       if (fn)
-	pedwarn ("  initializing argument %P of %qD", argnum, fn);
+	permerror ("  initializing argument %P of %qD", argnum, fn);
       return cp_convert (totype, expr);
     }
 
   if (issue_conversion_warnings)
     conversion_null_warnings (totype, expr, fn, argnum);
@@ -4954,11 +4954,11 @@ build_over_call (struct z_candidate *can
       tree argtype = TREE_TYPE (TREE_VALUE (arg));
       tree converted_arg;
       tree base_binfo;
 
       if (convs[i]->bad_p)
-	pedwarn ("passing %qT as %<this%> argument of %q#D discards qualifiers",
+	permerror ("passing %qT as %<this%> argument of %q#D discards qualifiers",
 		 TREE_TYPE (argtype), fn);
 
       /* [class.mfct.nonstatic]: If a nonstatic member function of a class
 	 X is called for an object that is not of type X, or of a type
 	 derived from X, the behavior is undefined.
Index: gcc/cp/error.c
===================================================================
--- gcc/cp/error.c	(revision 132503)
+++ gcc/cp/error.c	(working copy)
@@ -2683,11 +2683,11 @@ cp_cpp_error (cpp_reader *pfile ATTRIBUT
     case CPP_DL_WARNING:
     case CPP_DL_WARNING_SYSHDR:
       dlevel = DK_WARNING;
       break;
     case CPP_DL_PEDWARN:
-      dlevel = pedantic_error_kind ();
+      dlevel = pedantic_warning_kind ();
       break;
     case CPP_DL_ERROR:
       dlevel = DK_ERROR;
       break;
     case CPP_DL_ICE:
Index: gcc/cp/cvt.c
===================================================================
--- gcc/cp/cvt.c	(revision 132503)
+++ gcc/cp/cvt.c	(working copy)
@@ -377,11 +377,11 @@ warn_ref_binding (tree reftype, tree int
 	    " rvalue of type %qT";
       else
 	  msg = "conversion to non-const reference type %q#T from"
 	    " rvalue of type %qT";
 
-      pedwarn (msg, reftype, intype);
+      permerror (msg, reftype, intype);
     }
 }
 
 /* For C++: Only need to do one-level references, but cannot
    get tripped up on signed/unsigned differences.
@@ -447,12 +447,12 @@ convert_to_reference (tree reftype, tree
 	  if (! real_lvalue_p (expr))
 	    warn_ref_binding (reftype, intype, decl);
 
 	  if (! (convtype & CONV_CONST)
 		   && !at_least_as_qualified_p (ttl, ttr))
-	    pedwarn ("conversion from %qT to %qT discards qualifiers",
-		     ttr, reftype);
+	    permerror ("conversion from %qT to %qT discards qualifiers",
+		       ttr, reftype);
 	}
 
       return build_up_reference (reftype, expr, flags, decl);
     }
   else if ((convtype & CONV_REINTERPRET) && lvalue_p (expr))
@@ -644,13 +644,13 @@ ocp_convert (tree type, tree expr, int c
 		|| TREE_CODE (intype) == REAL_TYPE)
 	       && ! (convtype & CONV_STATIC))
 	      || TREE_CODE (intype) == POINTER_TYPE))
 	{
 	  if (flags & LOOKUP_COMPLAIN)
-	    pedwarn ("conversion from %q#T to %q#T", intype, type);
+	    permerror ("conversion from %q#T to %q#T", intype, type);
 
-	  if (flag_pedantic_errors)
+	  if (!flag_permissive)
 	    return error_mark_node;
 	}
       if (IS_AGGR_TYPE (intype))
 	{
 	  tree rval;
@@ -890,12 +890,12 @@ convert_to_void (tree expr, const char *
       probe = TREE_OPERAND (expr, 0);
     if (type_unknown_p (probe))
       {
 	/* [over.over] enumerates the places where we can take the address
 	   of an overloaded function, and this is not one of them.  */
-	pedwarn ("%s cannot resolve address of overloaded function",
-		    implicit ? implicit : "void cast");
+	error ("%s cannot resolve address of overloaded function",
+	       implicit ? implicit : "void cast");
 	expr = void_zero_node;
       }
     else if (implicit && probe == expr && is_overloaded_fn (probe))
       {
 	/* Only warn when there is no &.  */
Index: gcc/cp/lex.c
===================================================================
--- gcc/cp/lex.c	(revision 132503)
+++ gcc/cp/lex.c	(working copy)
@@ -658,20 +658,20 @@ unqualified_fn_lookup_error (tree name)
 	 is going wrong.
 
 	 Note that we have the exact wording of the following message in
 	 the manual (trouble.texi, node "Name lookup"), so they need to
 	 be kept in synch.  */
-      pedwarn ("there are no arguments to %qD that depend on a template "
-	       "parameter, so a declaration of %qD must be available",
-	       name, name);
+      permerror ("there are no arguments to %qD that depend on a template "
+		 "parameter, so a declaration of %qD must be available",
+		 name, name);
 
       if (!flag_permissive)
 	{
 	  static bool hint;
 	  if (!hint)
 	    {
-	      error ("(if you use %<-fpermissive%>, G++ will accept your "
+	      inform ("(if you use %<-fpermissive%>, G++ will accept your "
 		     "code, but allowing the use of an undeclared name is "
 		     "deprecated)");
 	      hint = true;
 	    }
 	}
Index: gcc/cp/parser.c
===================================================================
--- gcc/cp/parser.c	(revision 132503)
+++ gcc/cp/parser.c	(working copy)
@@ -9753,11 +9753,11 @@ cp_parser_template_id (cp_parser *parser
 	  pop_deferring_access_checks ();
 	  return error_mark_node;
 	}
       /* Otherwise, emit an error about the invalid digraph, but continue
 	 parsing because we got our argument list.  */
-      pedwarn ("%<<::%> cannot begin a template-argument list");
+      permerror ("%<<::%> cannot begin a template-argument list");
       inform ("%<<:%> is an alternate spelling for %<[%>. Insert whitespace "
 	      "between %<<%> and %<::%>");
       if (!flag_permissive)
 	{
 	  static bool hint;
Index: gcc/c-errors.c
===================================================================
--- gcc/c-errors.c	(revision 132503)
+++ gcc/c-errors.c	(working copy)
@@ -36,11 +36,11 @@ pedwarn_c99 (const char *gmsgid, ...)
   diagnostic_info diagnostic;
   va_list ap;
 
   va_start (ap, gmsgid);
   diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location,
-		       flag_isoc99 ? pedantic_error_kind () : DK_WARNING);
+		       flag_isoc99 ? pedantic_warning_kind () : DK_WARNING);
   report_diagnostic (&diagnostic);
   va_end (ap);
 }
 
 /* Issue an ISO C90 pedantic warning MSGID.  This function is supposed to
@@ -54,9 +54,9 @@ pedwarn_c90 (const char *gmsgid, ...)
   diagnostic_info diagnostic;
   va_list ap;
 
   va_start (ap, gmsgid);
   diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location,
-		       flag_isoc99 ? DK_WARNING : pedantic_error_kind ());
+		       flag_isoc99 ? DK_WARNING : pedantic_warning_kind ());
   report_diagnostic (&diagnostic);
   va_end (ap);
 }
Index: gcc/c-opts.c
===================================================================
--- gcc/c-opts.c	(revision 132503)
+++ gcc/c-opts.c	(working copy)
@@ -1104,22 +1104,10 @@ c_common_post_options (const char **pfil
     warn_overlength_strings = 0;
 
   /* Adjust various flags for C++ based on command-line settings.  */
   if (c_dialect_cxx ())
     {
-      if (!flag_permissive)
-	{
-	  flag_pedantic_errors = 1;
-	  /* FIXME: For consistency pedantic_errors should have the
-	     same value in the front-end and in CPP. However, this
-	     will break existing applications. The right fix is
-	     disentagle flag_permissive from flag_pedantic_errors,
-	     create a new diagnostic function permerror that is
-	     controlled by flag_permissive and convert most C++
-	     pedwarns to this new function.
-	  cpp_opts->pedantic_errors = 1;  */
-	}
       if (!flag_no_inline)
 	{
 	  flag_inline_trees = 1;
 	  flag_no_inline = 1;
 	}
Index: gcc/c-common.c
===================================================================
--- gcc/c-common.c	(revision 132503)
+++ gcc/c-common.c	(working copy)
@@ -441,15 +441,10 @@ int flag_use_cxa_atexit = DEFAULT_USE_CX
 /* Nonzero to use __cxa_get_exception_ptr in C++ exception-handling
    code.  '2' means it has not been set explicitly on the command line.  */
 
 int flag_use_cxa_get_exception_ptr = 2;
 
-/* Nonzero means make the default pedwarns warnings instead of errors.
-   The value of this flag is ignored if -pedantic is specified.  */
-
-int flag_permissive;
-
 /* Nonzero means to implement standard semantics for exception
    specifications, calling unexpected if an exception is thrown that
    doesn't match the specification.  Zero means to treat them as
    assertions and optimize accordingly, but not check them.  */
 
@@ -929,18 +924,29 @@ fix_string_type (tree value)
    constant expression to overflow.  */
 
 void
 constant_expression_warning (tree value)
 {
+  if (warn_overflow && pedantic 
+      && (TREE_CODE (value) == INTEGER_CST || TREE_CODE (value) == REAL_CST
+	  || TREE_CODE (value) == FIXED_CST
+	  || TREE_CODE (value) == VECTOR_CST
+	  || TREE_CODE (value) == COMPLEX_CST)
+      && TREE_OVERFLOW (value))
+    pedwarn ("overflow in constant expression");
+}
+
+/* The same as above but print an unconditional error.  */
+void
+constant_expression_error (tree value)
+{
   if ((TREE_CODE (value) == INTEGER_CST || TREE_CODE (value) == REAL_CST
        || TREE_CODE (value) == FIXED_CST
        || TREE_CODE (value) == VECTOR_CST
        || TREE_CODE (value) == COMPLEX_CST)
-      && TREE_OVERFLOW (value)
-      && warn_overflow
-      && pedantic)
-    pedwarn ("overflow in constant expression");
+      && TREE_OVERFLOW (value))
+    error ("overflow in constant expression");
 }
 
 /* Print a warning if an expression had overflow in folding and its
    operands hadn't.
 
Index: gcc/c-common.h
===================================================================
--- gcc/c-common.h	(revision 132503)
+++ gcc/c-common.h	(working copy)
@@ -582,15 +582,10 @@ extern int flag_use_cxa_atexit;
 /* Nonzero to use __cxa_get_exception_ptr in the C++ exception-handling
    logic.  */
 
 extern int flag_use_cxa_get_exception_ptr;
 
-/* Nonzero means make the default pedwarns warnings instead of errors.
-   The value of this flag is ignored if -pedantic is specified.  */
-
-extern int flag_permissive;
-
 /* Nonzero means to implement standard semantics for exception
    specifications, calling unexpected if an exception is thrown that
    doesn't match the specification.  Zero means to treat them as
    assertions and optimize accordingly, but not check them.  */
 
@@ -686,10 +681,11 @@ extern tree c_alignof_expr (tree);
    NOP_EXPR is used as a special case (see truthvalue_conversion).  */
 extern void binary_op_error (enum tree_code, tree, tree);
 extern tree fix_string_type (tree);
 struct varray_head_tag;
 extern void constant_expression_warning (tree);
+extern void constant_expression_error (tree);
 extern bool strict_aliasing_warning (tree, tree, tree);
 extern void empty_if_body_warning (tree, tree);
 extern void warnings_for_convert_and_check (tree, tree, tree);
 extern tree convert_and_check (tree, tree);
 extern void overflow_warning (tree);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]