Created attachment 1433041 [details]
Description of problem:
gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20)
gcc -O3 -g -ggdb -Wstrict-overflow -Wall -Wcomment -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -fstrict-aliasing -DDEVELOPER -DDEBUG_PASSWORD -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -fstack-protector -Wshadow -Wcast-qual -fno-common -Werror=address -Werror=strict-prototypes -Werror=write-strings -Werror-implicit-function-declaration -Werror=pointer-arith -Werror=declaration-after-statement -Werror=return-type -Wreturn-type -Werror=uninitialized -Wuninitialized -Wimplicit-fallthrough -Werror=strict-overflow -Wstrict-overflow=2 -Wformat=2 -Wno-format-y2k -Wno-format-zero-length -Werror=format-security -Wformat-security -Werror=format -Werror -Wno-error=deprecated-declarations -Wno-error=tautological-compare -DSTATIC_samba_debug_MODULES=NULL -DSTATIC_samba_debug_MODULES_PROTO='extern void __samba_debug_dummy_module_proto(void)' -MD -Idefault/include/public -I../include/public -Idefault/source4 -I../source4 -Idefault/lib -I../lib -Idefault/source4/lib -I../source4/lib -Idefault/source4/include -I../source4/include -Idefault/include -I../include -Idefault/lib/replace -I../lib/replace -Idefault -I.. -I/usr/local/include -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H=1 -D_GNU_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 ../lib/util/debug.c -c -o default/lib/util/debug_11.o
../lib/util/debug.c: In function ‘debug_parse_levels’:
../lib/util/debug.c:788:5: error: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Werror=strict-overflow]
bool debug_parse_levels(const char *params_str)
cc1: all warnings being treated as errors
Attached is the pre-processed C file (debug.i)
Seems to have changed in r250619 so before that the warning would appear with -ftree-vectorize. Not sure what there is to change...
Using -Werror with -Wstrict-overflow? Why would one do that? It doesn't make much sense.
The -Wstrict-overflow warning informs the user about cases where the compiler optimizes something and assumes no UB happens. There is usually nothing wrong with the code and there is nothing wrong with what the compiler does (except when you rely on the UB in the code).
Well, the warning doesn't make sense at all. It points to the function declaration! I don't see any pointer arithmetic involved here.
Still happens with GCC 8.1.1
The error points to the function declaration!
Fixed, upstream. Please add the patch to Fedora!
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 28 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.