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]

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


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 provided both the pedwarn and then an hard error)
3- In C++14 mode we rejected local variables in constructors.

The patch itself uses quite straightforward strategies: check_constexpr_ctor_body is extended via the new check_constexpr_ctor_body_1; recursion on BIND_EXPRs takes care of compound-statements; the parser is tweaked to suppress the "compound-statement in constexpr function" pedwarn in C++14 mode.

Tested x86_64-linux.

Thanks,
Paolo.

//////////////////////

Attachment: CL_constexpr
Description: Text document

Attachment: patch_constexpr
Description: Text document


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