c.opt (-ftemplate-depth=): New.

2010-02-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* 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
parent 0e7750a0
2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
* 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 <jason@redhat.com> 2010-02-24 Jason Merrill <jason@redhat.com>
* doc/invoke.texi: Improve -Wabi and -fabi-version docs. * doc/invoke.texi: Improve -Wabi and -fabi-version docs.
......
...@@ -801,6 +801,8 @@ c_common_handle_option (size_t scode, const char *arg, int value) ...@@ -801,6 +801,8 @@ c_common_handle_option (size_t scode, const char *arg, int value)
break; break;
case OPT_ftemplate_depth_: case OPT_ftemplate_depth_:
/* Kept for backwards compatibility. */
case OPT_ftemplate_depth_eq:
max_tinst_depth = value; max_tinst_depth = value;
break; break;
......
...@@ -791,8 +791,11 @@ C ObjC C++ ObjC++ Joined RejectNegative UInteger ...@@ -791,8 +791,11 @@ C ObjC C++ ObjC++ Joined RejectNegative UInteger
-ftabstop=<number> Distance between tab stops for column reporting -ftabstop=<number> Distance between tab stops for column reporting
ftemplate-depth- ftemplate-depth-
C++ ObjC++ Joined RejectNegative UInteger Undocumented
ftemplate-depth=
C++ ObjC++ Joined RejectNegative UInteger C++ ObjC++ Joined RejectNegative UInteger
-ftemplate-depth-<number> Specify maximum template instantiation depth -ftemplate-depth=<number> Specify maximum template instantiation depth
fthis-is-variable fthis-is-variable
C++ ObjC++ C++ ObjC++
......
2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
* pt.c (push_tinst_level): Replace -ftemplate-depth- with
-ftemplate-depth=.
2010-02-24 Jason Merrill <jason@redhat.com> 2010-02-24 Jason Merrill <jason@redhat.com>
PR c++/12909 PR c++/12909
......
...@@ -7026,7 +7026,7 @@ push_tinst_level (tree d) ...@@ -7026,7 +7026,7 @@ push_tinst_level (tree d)
last_template_error_tick = tinst_level_tick; last_template_error_tick = tinst_level_tick;
error ("template instantiation depth exceeds maximum of %d (use " 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); max_tinst_depth, d);
print_instantiation_context (); print_instantiation_context ();
...@@ -16860,7 +16860,7 @@ instantiate_pending_templates (int retries) ...@@ -16860,7 +16860,7 @@ instantiate_pending_templates (int retries)
error ("template instantiation depth exceeds maximum of %d" error ("template instantiation depth exceeds maximum of %d"
" instantiating %q+D, possibly from virtual table generation" " 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); max_tinst_depth, decl);
if (TREE_CODE (decl) == FUNCTION_DECL) if (TREE_CODE (decl) == FUNCTION_DECL)
/* Pretend that we defined it. */ /* Pretend that we defined it. */
......
...@@ -190,7 +190,7 @@ in the following sections. ...@@ -190,7 +190,7 @@ in the following sections.
-fno-nonansi-builtins -fno-operator-names @gol -fno-nonansi-builtins -fno-operator-names @gol
-fno-optional-diags -fpermissive @gol -fno-optional-diags -fpermissive @gol
-fno-pretty-templates @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-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol
-fno-default-inline -fvisibility-inlines-hidden @gol -fno-default-inline -fvisibility-inlines-hidden @gol
-fvisibility-ms-compat @gol -fvisibility-ms-compat @gol
...@@ -1972,7 +1972,7 @@ unambiguous base classes. ...@@ -1972,7 +1972,7 @@ unambiguous base classes.
Emit statistics about front-end processing at the end of the compilation. Emit statistics about front-end processing at the end of the compilation.
This information is generally only useful to the G++ development team. This information is generally only useful to the G++ development team.
@item -ftemplate-depth-@var{n} @item -ftemplate-depth=@var{n}
@opindex ftemplate-depth @opindex ftemplate-depth
Set the maximum instantiation depth for template classes to @var{n}. Set the maximum instantiation depth for template classes to @var{n}.
A limit on the template instantiation depth is needed to detect A limit on the template instantiation depth is needed to detect
......
...@@ -170,7 +170,8 @@ for (i = 0; i < n_opts; i++) { ...@@ -170,7 +170,8 @@ for (i = 0; i < n_opts; i++) {
len = length (opts[i]); len = length (opts[i]);
enum = "OPT_" 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" enum = enum "eq"
gsub ("[^A-Za-z0-9]", "_", enum) gsub ("[^A-Za-z0-9]", "_", enum)
......
...@@ -331,7 +331,8 @@ for (i = 0; i < n_opts; i++) { ...@@ -331,7 +331,8 @@ for (i = 0; i < n_opts; i++) {
len = length (opts[i]); len = length (opts[i]);
enum = "OPT_" 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" enum = enum "eq"
if (opts[i] == "gdwarf+") if (opts[i] == "gdwarf+")
enum = "OPT_gdwarfplus" enum = "OPT_gdwarfplus"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment