Open igor35hh opened 11 months ago
This is probably my fault, since I introduced the PR that disabled this warning.
It might be something that can be fixed by upgrading gcc
. I'm using this version here:
$ gcc --version
gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you're not using gcc
then I guess it is because clang
does not (yet?) support this warning.
It may also be that the M1 CPU does not have support for this warning.
Ideally this could be fixed just by updating the compiler, but if not then we'll either need to back out the change (which is bad because that introduces warnings to other systems) or figure out how to add the -Wno-stringop-overflow
option conditionally.
So... maybe you can see what gcc
version you're using?
This is probably my fault, since I introduced the PR that disabled this warning.
It might be something that can be fixed by upgrading
gcc
. I'm using this version here:$ gcc --version gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4) Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you're not using
gcc
then I guess it is becauseclang
does not (yet?) support this warning.It may also be that the M1 CPU does not have support for this warning.
Ideally this could be fixed just by updating the compiler, but if not then we'll either need to back out the change (which is bad because that introduces warnings to other systems) or figure out how to add the
-Wno-stringop-overflow
option conditionally.So... maybe you can see what
gcc
version you're using?
sure gcc --version Apple clang version 15.0.0 (clang-1500.0.40.1) Target: arm64-apple-darwin23.1.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
chip: Apple M1 Pro
I can confirm that I see the same warnings. Same clang version, on macOS Ventura.
I guess the options are:
-Wno-stringop-overflow
.-Wno-stringop-overflow
by something supported by both gcc and clang, if such an option exists.-Wno-unknown-warning-option
to hide warnings about unknown warning options.@shane-ns1 What do you think?
If clang
supports the -Wno-unknown-warning-option
then that is probably the best approach, right? That seems to be exactly what it is designed for:
When an unrecognized warning option is requested (e.g., -Wunknown-warning), GCC emits a diagnostic stating that the option is not recognized. However, if the -Wno- form is used, the behavior is slightly different: no diagnostic is produced for -Wno-unknown-warning unless other diagnostics are being produced. This allows the use of new -Wno- options with old compilers, but if something goes wrong, the compiler warns that an unrecognized option is present.
Hi guys, want to replace bmatsuo/lmdb-go on yours that is more fresh, but have many warnings on start or build an application.
go version go1.21.5 darwin/arm64
go get github.com/PowerDNS/lmdb-go/lmdb go: downloading github.com/PowerDNS/lmdb-go v1.9.2 go: added github.com/PowerDNS/lmdb-go v1.9.2