aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-03-18 16:23:48 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-03-18 16:23:48 -0400
commit49a000c39629e84c69696bfc78fb9e3f5c3dd594 (patch)
tree5c6c05809bee5c54caa7df52715890b900cb717c
parent01956319b6863b0fc507039f50bbb2c5fd2234be (diff)
downloadgcc-49a000c39629e84c69696bfc78fb9e3f5c3dd594.zip
gcc-49a000c39629e84c69696bfc78fb9e3f5c3dd594.tar.gz
gcc-49a000c39629e84c69696bfc78fb9e3f5c3dd594.tar.bz2
c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
* 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
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-common.c5
-rw-r--r--gcc/c-family/c-common.h4
-rw-r--r--gcc/c-family/c-opts.c4
-rw-r--r--gcc/c-family/c.opt4
5 files changed, 7 insertions, 15 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index ca3db25..a97a04e 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -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++.
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 799f815..f8d0c7e 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -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;
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index b6fcee9..6046d3e 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -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
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 8d2a08b..8d6e6e7 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -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;
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index f791190..0061ec5 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -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)