https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497
Tom Honermann changed:
What|Removed |Added
CC||tom at honermann dot net
--- Comment #1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497
--- Comment #9 from Jonathan Wakely ---
There's no reason to have any special case for scenario 1. It should give the
same diagnostic as any other invalid use of a non-constant in constexpr
contexts.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497
Thomas P. K. Healy changed:
What|Removed |Added
CC||thomaspkhealy at yahoo dot com
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497
--- Comment #7 from Arthur O'Dwyer ---
> @jwakely is correct that on OSX/Darwin the macro is named `__assert_rtn`.
...er, sorry, the *non-constexpr function called by the `assert` macro* is
named `__assert_rtn`.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497
Arthur O'Dwyer changed:
What|Removed |Added
CC||arthur.j.odwyer at gmail dot
com
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497
Thiago Macieira changed:
What|Removed |Added
CC||thiago at kde dot org
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497
--- Comment #5 from Jonathan Wakely ---
I guess calling any noreturn function inside the expansion of a macro called
'assert' is probably a good enough heuristic.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497
--- Comment #1 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #0)
> Another way to word it could be:
>
> note: failed assertion is not a constant expression: '...'
Actually maybe not this, because it might lead people to th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497
--- Comment #3 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #2)
> And suppress any mention of __assert_fail, __assert_rtn etc. which are not
s/which are not/which are/
> meant to be implementation details of assert.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497
--- Comment #2 from Jonathan Wakely ---
Testcase:
#include
constexpr int foo(int i)
{
assert(i != 0);
return 1;
}
constexpr int i = foo(0);
We do already show the assert(...) macro in the caret diagnostic, so maybe this
would be clear:
10 matches
Mail list logo