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]

Re: C++0x PATCH to add -fconstexpr-depth


On Tue, 15 Mar 2011, Jason Merrill wrote:

> +/* Likewise, for constexpr function call evaluations.  N3225 specifies a
> +   minimum of 512.  */
>  
> +int max_constexpr_depth = 512;

Since all you're doing in the option handler is setting a global variable, 
it's better to declare the option in the .opt file with 
Var(max_constexpr_depth) Init(512).  Then you don't need to define the 
variable manually in c-common.c or declare it in c-common.h or have any 
handler code for it in c-opts.c.

> +fconstexpr-depth=
> +C++ ObjC++ Joined RejectNegative UInteger
> +-constexpr-depth=<number>	Specify maximum constexpr recursion depth

Typo in the help text: it's -fconstexpr-depth not -constexpr-depth.

-- 
Joseph S. Myers
joseph@codesourcery.com


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