https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114571
--- Comment #3 from Pierre Ossman ---
And another odd case; gcc 5 complains about this:
> const char *a;
> a = NULL;
but not:
> const char *a = NULL;
gcc 13 complains about neither, and clang about both.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114573
--- Comment #2 from Pierre Ossman ---
Indeed. It is part of an effort to have a more modern C++ style in TigerVNC.
One item was preferring nullptr over NULL, and this issue became an obstacle
there.
Right now, we did a #pragma, but if there is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114571
--- Comment #2 from Pierre Ossman ---
Found another case that neither gcc 5, gcc 13, nor clang complain about for
some odd reason:
> assert(thing == NULL);
All three complain about:
> assert(thing == 0);
Not sure what's going on here.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114573
Bug ID: 114573
Summary: -Wzero-as-null-pointer-constant complains on enum with
explicit cast
Product: gcc
Version: 13.2.1
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114571
--- Comment #1 from Pierre Ossman ---
Hmm.. I found bug 77513, and r9-873. So I guess this is intentional?
This makes the warning somewhat pointless. We want to make sure developers
standardise on nullptr, both for style and since the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114571
Bug ID: 114571
Summary: -Wzero-as-null-pointer-constant does not complain
about NULL
Product: gcc
Version: 13.2.1
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108743
--- Comment #5 from Pierre Ossman ---
Could you consider adding -fconstant-cfstrings as an alias? It would make life
easier for making build systems compiler agnostic.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108743
--- Comment #4 from Pierre Ossman ---
I am indeed trying to compile for macOS. Specifically Qt5, which is designed
with just Xcode in mind.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108743
--- Comment #2 from Pierre Ossman ---
Great news. And that is the same thing as clang's -fconstant-cfstrings?
Unfortunately, I couldn't see -mconstant-cfstrings in gcc's documentation, but
I may be looking in the wrong place.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108743
Bug ID: 108743
Summary: -fconstant-cfstrings not supported
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: objc
10 matches
Mail list logo