This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70552] __builtin_constant_p fails to reflect the constness of constexpr calls
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 05 Apr 2016 19:22:59 +0000
- Subject: [Bug c++/70552] __builtin_constant_p fails to reflect the constness of constexpr calls
- Auto-submitted: auto-generated
- References: <bug-70552-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70552
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Yes, thanks for pointing that out. I think the change is r233671. I certainly
agree that it's useful to be able to step through constexpr functions in
non-constexpr contexts. In the test case below, however, the definition of
foo() isn't emitted into the object file so it cannot be stepped into. The
builtin simply returns the wrong result. I hope we can make it so that it
returns the useful result I described in comment #0 while still maintaining the
useful debuggability outside of constexpr contexts.