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?