https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113200
Jiang An <de34 at live dot cn> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |de34 at live dot cn
--- Comment #9 from Jiang An <de34 at live dot cn> ---
(In reply to Peter Dimov from comment #3)
> I think that the compiler is correct; string literal address comparisons
> aren't constant expressions. Clang gives the same error:
> https://godbolt.org/z/xPWEf4z63.
This looks weird... It seems that `+"abc" == +"def"` is never unspecified (must
be false, but Clang rejects it in constant evaluation), while `"abcd" + 1 ==
+"bcd"` is unspecified.
It's unclear to me whether we can practically detect all kinds of
unspecifiedness in pointer comparision involving string literals.