[Bug c/66963] __builtin_constant_p and __builtin_choose_expr do not agree on what is a constexpr with -O2

2015-07-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66963 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug c/66963] __builtin_constant_p and __builtin_choose_expr do not agree on what is a constexpr with -O2

2015-07-29 Thread nicstange at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66963 --- Comment #6 from Nicolai Stange nicstange at gmail dot com --- Thank you for your clarifications, Andrew and Joseph. As far as I am concerned, this bug can be marked as resolved/rejected/whatever you like.

[Bug c/66963] __builtin_constant_p and __builtin_choose_expr do not agree on what is a constexpr with -O2

2015-07-28 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66963 --- Comment #5 from joseph at codesourcery dot com joseph at codesourcery dot com --- This is by design. __builtin_choose_expr requires an integer constant expression which must be evaluated before the type of the result can be known;

[Bug c/66963] __builtin_constant_p and __builtin_choose_expr do not agree on what is a constexpr with -O2

2015-07-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66963 --- Comment #1 from Andrew Pinski pinskia at gcc dot gnu.org --- I thought this is documented somewhere but __builtin_choose_expr only really accept constant literals and not constexprs.

[Bug c/66963] __builtin_constant_p and __builtin_choose_expr do not agree on what is a constexpr with -O2

2015-07-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66963 --- Comment #2 from Andrew Pinski pinskia at gcc dot gnu.org --- (In reply to Andrew Pinski from comment #1) I thought this is documented somewhere but __builtin_choose_expr only really accept constant literals and not constexprs. And the main

[Bug c/66963] __builtin_constant_p and __builtin_choose_expr do not agree on what is a constexpr with -O2

2015-07-21 Thread nicstange at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66963 --- Comment #3 from Nicolai Stange nicstange at gmail dot com --- (In reply to Andrew Pinski from comment #1) I thought this is documented somewhere but __builtin_choose_expr only really accept constant literals and not constexprs.

[Bug c/66963] __builtin_constant_p and __builtin_choose_expr do not agree on what is a constexpr with -O2

2015-07-21 Thread nicstange at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66963 --- Comment #4 from Nicolai Stange nicstange at gmail dot com --- Sorry, misunderstanding at my side. You probably did not mean constexprs in the sense of C99, 6.6, but constexprs in the sense of constant folded expressions.