Hi,
On 10/09/2014 04:18 PM, Jason Merrill wrote:
On 10/09/2014 09:49 AM, Paolo Carlini wrote:
Hi,
On 10/09/2014 03:31 PM, Jason Merrill wrote:
On 10/08/2014 03:47 PM, Paolo Carlini wrote:
(check_constexpr_ctor_body): Use it; add bool parameter.
This function seems to only be called in one place; why add the
parameter?
Is also called recursively by check_constexpr_ctor_body_1 and without
the complain boolean we end up printing the error message twice.
Ah, guess I overlooked that. OK.
Thanks, I'm going to commit the patch.
I noticed today that given the actual C++11 the error messages we provide:
"constexpr constructor does not have empty body"
and:
"body of constexpr function ‘XXX’ not a return-statement"
are rather outdated and misleading. In principle we should probably also
provide more fine grained error messages, but if you have suggestions
for less misleading catch all, I volunteer to do the change and adjust
the testcases...
Also, I have been thinking that it would probably make sense to move
constexpr-related code to a separate cp/constexpr.c: what do you think?
Functions with *constexpr* in the name, the various cxx_eval_* and the
various potential_constant_* would qualify, I think.
Paolo.