http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53829
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-07-02 10:15:35 UTC --- I guess we'd need to do some discovery of potential constexpr functions (that aren't marked that way though), use some bit other than DECL_DECLARED_CONSTEXPR_P for those, pass some flag from maybe_constant_value down to potential_constant_expression and cxx_eval_outermost_constant_expr (in addition to allow_non_constant or perhaps as enum instead of bool of allow_non_constant) and with optimize treat also !DECL_DECLARED_CONSTEXPR_P && DECL_CONSTEXPR_LIKE_P calls. Or is maybe_constant_value ever used to decide if a C++ program is valid or not?