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 07:09:58 +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
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-07-02
CC| |jakub at gcc dot gnu.org,
| |jason at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-07-02 07:09:58 UTC ---
With -std=c++11 and constexpr on the static inline it is already compiled into
the expected form. For -O0 it shouldn't be optimized into that without
constexpr, but as an optimization it would be nice if non-constexpr marked
trivial functions could be as an optimization handled like constexpr ones in
some cases (in particular when deciding if an initializer can be output as
simple constant). Jason?