This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53829] Trivial static initializers are created for initialization with result of trivial static inline functions
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 02 Jul 2012 10:15:35 +0000
- Subject: [Bug c++/53829] Trivial static initializers are created for initialization with result of trivial static inline functions
- Auto-submitted: auto-generated
- References: <bug-53829-4@http.gcc.gnu.org/bugzilla/>
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?