This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53829] Trivial static initializers are created for initialization with result of trivial static inline functions


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]