[Bug c++/114571] -Wzero-as-null-pointer-constant does not complain about NULL

2024-04-03 Thread ossman at cendio dot se via Gcc-bugs
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.

[Bug c++/114573] -Wzero-as-null-pointer-constant complains on enum with explicit cast

2024-04-03 Thread ossman at cendio dot se via Gcc-bugs
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

[Bug c++/114571] -Wzero-as-null-pointer-constant does not complain about NULL

2024-04-03 Thread ossman at cendio dot se via Gcc-bugs
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.

[Bug c++/114573] New: -Wzero-as-null-pointer-constant complains on enum with explicit cast

2024-04-03 Thread ossman at cendio dot se via Gcc-bugs
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

[Bug c++/114571] -Wzero-as-null-pointer-constant does not complain about NULL

2024-04-03 Thread ossman at cendio dot se via Gcc-bugs
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

[Bug c++/114571] New: -Wzero-as-null-pointer-constant does not complain about NULL

2024-04-03 Thread ossman at cendio dot se via Gcc-bugs
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

[Bug objc/108743] -fconstant-cfstrings not supported

2023-02-10 Thread ossman at cendio dot se via Gcc-bugs
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.

[Bug objc/108743] -fconstant-cfstrings not supported

2023-02-10 Thread ossman at cendio dot se via Gcc-bugs
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.

[Bug objc/108743] -fconstant-cfstrings not supported

2023-02-09 Thread ossman at cendio dot se via Gcc-bugs
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.

[Bug objc/108743] New: -fconstant-cfstrings not supported

2023-02-09 Thread ossman at cendio dot se via Gcc-bugs
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