From 124e0d274a830ab0c13e80cde1716abd23bd20b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Wed, 24 Feb 2010 20:41:01 +0000 Subject: [PATCH] c.opt (-ftemplate-depth=): New. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2010-02-24 Manuel López-Ibáñez * c.opt (-ftemplate-depth=): New. (-ftemplate-depth-): Deprecate. * optc-gen.awk: Handle -ftemplate-depth=. * opth-gen.awk: Likewise. * c-opts.c (c_common_handle_option): Likewise. * doc/invoke.texi (-ftemplate-depth-): Replace with -ftemplate-depth=. cp/ * pt.c (push_tinst_level): Replace -ftemplate-depth- with -ftemplate-depth=. From-SVN: r157054 --- gcc/ChangeLog | 10 ++++++++++ gcc/c-opts.c | 2 ++ gcc/c.opt | 5 ++++- gcc/cp/ChangeLog | 5 +++++ gcc/cp/pt.c | 4 ++-- gcc/doc/invoke.texi | 4 ++-- gcc/optc-gen.awk | 3 ++- gcc/opth-gen.awk | 3 ++- 8 files changed, 29 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6eb392c6b4e..ac0b3a131bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2010-02-24 Manuel López-Ibáñez + + * c.opt (-ftemplate-depth=): New. + (-ftemplate-depth-): Deprecate. + * optc-gen.awk: Handle -ftemplate-depth=. + * opth-gen.awk: Likewise. + * c-opts.c (c_common_handle_option): Likewise. + * doc/invoke.texi (-ftemplate-depth-): Replace with + -ftemplate-depth=. + 2010-02-24 Jason Merrill * doc/invoke.texi: Improve -Wabi and -fabi-version docs. diff --git a/gcc/c-opts.c b/gcc/c-opts.c index cf1e3723da1..7dfc1fb1486 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -801,6 +801,8 @@ c_common_handle_option (size_t scode, const char *arg, int value) break; case OPT_ftemplate_depth_: + /* Kept for backwards compatibility. */ + case OPT_ftemplate_depth_eq: max_tinst_depth = value; break; diff --git a/gcc/c.opt b/gcc/c.opt index 82dee8d4f79..1168c655519 100644 --- a/gcc/c.opt +++ b/gcc/c.opt @@ -791,8 +791,11 @@ C ObjC C++ ObjC++ Joined RejectNegative UInteger -ftabstop= Distance between tab stops for column reporting ftemplate-depth- +C++ ObjC++ Joined RejectNegative UInteger Undocumented + +ftemplate-depth= C++ ObjC++ Joined RejectNegative UInteger --ftemplate-depth- Specify maximum template instantiation depth +-ftemplate-depth= Specify maximum template instantiation depth fthis-is-variable C++ ObjC++ diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a3b7e52253c..f1fb47e6d06 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2010-02-24 Manuel López-Ibáñez + + * pt.c (push_tinst_level): Replace -ftemplate-depth- with + -ftemplate-depth=. + 2010-02-24 Jason Merrill PR c++/12909 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 8b19e2c4cbf..04cc159fa47 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -7026,7 +7026,7 @@ push_tinst_level (tree d) last_template_error_tick = tinst_level_tick; error ("template instantiation depth exceeds maximum of %d (use " - "-ftemplate-depth-NN to increase the maximum) instantiating %qD", + "-ftemplate-depth= to increase the maximum) instantiating %qD", max_tinst_depth, d); print_instantiation_context (); @@ -16860,7 +16860,7 @@ instantiate_pending_templates (int retries) error ("template instantiation depth exceeds maximum of %d" " instantiating %q+D, possibly from virtual table generation" - " (use -ftemplate-depth-NN to increase the maximum)", + " (use -ftemplate-depth= to increase the maximum)", max_tinst_depth, decl); if (TREE_CODE (decl) == FUNCTION_DECL) /* Pretend that we defined it. */ diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 36b3568dc2a..1f7077e7ab3 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -190,7 +190,7 @@ in the following sections. -fno-nonansi-builtins -fno-operator-names @gol -fno-optional-diags -fpermissive @gol -fno-pretty-templates @gol --frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol +-frepo -fno-rtti -fstats -ftemplate-depth=@var{n} @gol -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol -fno-default-inline -fvisibility-inlines-hidden @gol -fvisibility-ms-compat @gol @@ -1972,7 +1972,7 @@ unambiguous base classes. Emit statistics about front-end processing at the end of the compilation. This information is generally only useful to the G++ development team. -@item -ftemplate-depth-@var{n} +@item -ftemplate-depth=@var{n} @opindex ftemplate-depth Set the maximum instantiation depth for template classes to @var{n}. A limit on the template instantiation depth is needed to detect diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index 992e4d316ac..e44b78cd46a 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -170,7 +170,8 @@ for (i = 0; i < n_opts; i++) { len = length (opts[i]); enum = "OPT_" opts[i] - if (opts[i] == "finline-limit=" || opts[i] == "Wlarger-than=") + if (opts[i] == "finline-limit=" || opts[i] == "Wlarger-than=" \ + || opts[i] == "ftemplate-depth=") enum = enum "eq" gsub ("[^A-Za-z0-9]", "_", enum) diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk index fb262bd93b7..e081952e7ed 100644 --- a/gcc/opth-gen.awk +++ b/gcc/opth-gen.awk @@ -331,7 +331,8 @@ for (i = 0; i < n_opts; i++) { len = length (opts[i]); enum = "OPT_" opts[i] - if (opts[i] == "finline-limit=" || opts[i] == "Wlarger-than=") + if (opts[i] == "finline-limit=" || opts[i] == "Wlarger-than=" \ + || opts[i] == "ftemplate-depth=") enum = enum "eq" if (opts[i] == "gdwarf+") enum = "OPT_gdwarfplus" -- 2.30.2