https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96182
--- Comment #2 from Haoxin Tu <haoxintu at gmail dot com> --- (In reply to Jakub Jelinek from comment #1) > The difference is that in C++11 the standard requires that the body of a > constexpr function is return expression, that is not the case of C++14 > anymore. > And, you'd get an error if you tried constexpr int a = foo (); i.e. when it > is evaluated in constant expression, but when it is only evaluated e.g. in > int b = foo (); it is a problem only at runtime. Thank you, Jakub. At runtime this must be a error. But I guess should it be rejected at compile time? Maybe reject this in compile time will help users to fix this issue early, like other mainstream compilers do. Just for a suggestion, please understand if anything I stated is unsuitable. Thanks.