c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
authorJason Merrill <jason@redhat.com>
Fri, 18 Mar 2011 20:23:48 +0000 (16:23 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 18 Mar 2011 20:23:48 +0000 (16:23 -0400)
* c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
* c-common.h: Don't declare it here.
* c-common.c: Or define it here.
* c-opts.c (c_common_handle_option): Or set it here.

From-SVN: r171166

gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/c-family/c-opts.c
gcc/c-family/c.opt

index ca3db25..a97a04e 100644 (file)
@@ -1,5 +1,10 @@
 2011-03-18  Jason Merrill  <jason@redhat.com>
 
+       * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
+       * c-common.h: Don't declare it here.
+       * c-common.c: Or define it here.
+       * c-opts.c (c_common_handle_option): Or set it here.
+
        PR c++/35315
        * c-common.c (handle_transparent_union_attribute): Don't
        make a duplicate type in C++.
index 799f815..f8d0c7e 100644 (file)
@@ -260,11 +260,6 @@ enum cxx_dialect cxx_dialect = cxx98;
 
 int max_tinst_depth = 1024;
 
-/* Likewise, for constexpr function call evaluations.  N3225 specifies a
-   minimum of 512.  */
-
-int max_constexpr_depth = 512;
-
 /* The elements of `ridpointers' are identifier nodes for the reserved
    type names and storage classes.  It is indexed by a RID_... value.  */
 tree *ridpointers;
index b6fcee9..6046d3e 100644 (file)
@@ -623,10 +623,6 @@ extern enum cxx_dialect cxx_dialect;
 
 extern int max_tinst_depth;
 
-/* Likewise, for constexpr function call evaluations.  */
-
-extern int max_constexpr_depth;
-
 /* Nonzero means that we should not issue warnings about problems that
    occur when the code is executed, because the code being processed
    is not expected to be executed.  This is set during parsing.  This
index 8d2a08b..8d6e6e7 100644 (file)
@@ -568,10 +568,6 @@ c_common_handle_option (size_t scode, const char *arg, int value,
        disable_builtin_function (arg);
       break;
 
-    case OPT_fconstexpr_depth_:
-      max_constexpr_depth = value;
-      break;
-
     case OPT_fdirectives_only:
       cpp_opts->directives_only = value;
       break;
index f791190..0061ec5 100644 (file)
@@ -720,8 +720,8 @@ ObjC ObjC++ Joined MissingArgError(no class name specified with %qs)
 -fconst-string-class=<name>    Use class <name> for constant strings
 
 fconstexpr-depth=
-C++ ObjC++ Joined RejectNegative UInteger
--constexpr-depth=<number>      Specify maximum constexpr recursion depth
+C++ ObjC++ Joined RejectNegative UInteger Var(max_constexpr_depth) Init(512)
+-fconstexpr-depth=<number>     Specify maximum constexpr recursion depth
 
 fdeduce-init-list
 C++ ObjC++ Var(flag_deduce_init_list) Init(1)