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++/54021] [c++0x] __builtin_constant_p should be constexpr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54021

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-07-19 06:53:11 UTC ---
This is rejected only at -O0 and quite matches how __builtin_constant_p
normally behaves at -O0 - you really need a constant right in the
__builtin_constant_p argument, everything else results in 0.  With -O1 and
above you get BUILTIN_CONSTANT_P not folded right away to 0 if not constant and
whether it in the end folds to 0 or 1 depends on optimization, whether a
constant is propagated to it or not.


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