Re: [C++ PAtch] More C++11 and C++14 constexpr work

2014-10-09 Thread Jason Merrill
On 10/09/2014 11:15 AM, Paolo Carlini wrote: 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

Re: [C++ PAtch] More C++11 and C++14 constexpr work

2014-10-09 Thread Paolo Carlini
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 o

Re: [C++ PAtch] More C++11 and C++14 constexpr work

2014-10-09 Thread Jason Merrill
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 re

Re: [C++ PAtch] More C++11 and C++14 constexpr work

2014-10-09 Thread Paolo Carlini
.. a simple example in C++11 would be: struct S { constexpr S() { { struct T { }; } } }; Paolo.

Re: [C++ PAtch] More C++11 and C++14 constexpr work

2014-10-09 Thread Paolo Carlini
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 wi

Re: [C++ PAtch] More C++11 and C++14 constexpr work

2014-10-09 Thread Jason Merrill
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? Jason

[C++ PAtch] More C++11 and C++14 constexpr work

2014-10-08 Thread Paolo Carlini
Hi, the below tries to make progress on some relatively easy issues I noticed while working on c++/55250. At least: 1- We rejected using declarations and using directives in constructors. 2- In C++14 mode we rejected compound-statements both in constructors and elsewhere (and in C++11 we provi