Accepting request 711229 from home:tomdevries:branches:devel:gcc-2

- Remove -Wno-implicit-fallthrough, -Wno-error=cast-function-type
  and -Wno-error=stringop-truncation

OBS-URL: https://build.opensuse.org/request/show/711229
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=211
This commit is contained in:
Richard Biener 2019-06-21 11:06:01 +00:00 committed by Git OBS Bridge
parent 1d1ac43d41
commit 7978b0d71a
2 changed files with 12 additions and 14 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jun 20 15:19:35 UTC 2019 - Tom de Vries <tdevries@suse.de>
- Remove -Wno-implicit-fallthrough, -Wno-error=cast-function-type
and -Wno-error=stringop-truncation
-------------------------------------------------------------------
Wed Jun 19 06:54:23 UTC 2019 - Tom de Vries <tdevries@suse.de>

View File

@ -586,20 +586,12 @@ export CC
export CXX
export CFLAGS="$RPM_OPT_FLAGS"
# FIXME: gcc-7 compatibility.
# checking for acceptance of -Wno-foo is a bit wieldy: GCC doesn't
# warn about unknown -Wno- flags, _except_ if there are other
# diagnostics as well, so let's force an uninitialized use warning
# and grep for the diagnostic about the -Wno flag:
# -Wno-error=cast-function-type:
# FIXME: gcc-8.0:
# ./elf32-target.h:215:4: error: cast between incompatible function types from 'void * (*)(bfd *)' {aka 'void * (*)(struct bfd *)'} to 'asymbol * (*)(bfd *, void *, long unsigned int)' {aka 'struct bfd_symbol * (*)(struc t bfd *, void *, long unsigned int)'} [-Werror=cast-function-type]
# ((asymbol * (*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
# -Wno-error=stringop-truncation:
# FIXME: gcc-8.0:
# linux-tdep.c:1767:11: error: char* strncpy(char*, const char*, size_t) specified bound 17 equals destination size [-Werror=stringop-truncation]
# strncpy (p->pr_fname, basename, sizeof (p->pr_fname));
for opt in -Wno-implicit-fallthrough -Wno-error=cast-function-type -Wno-error=stringop-truncation; do
# Add your -Wno-x/-Wno-error=y options here:
for opt in ; do
# checking for acceptance of -Wno-foo is a bit wieldy: GCC doesn't
# warn about unknown -Wno- flags, _except_ if there are other
# diagnostics as well, so let's force an uninitialized use warning
# and grep for the diagnostic about the -Wno flag:
if ! echo "int foo(void) { int a; return a;} " | \
$CC -x c -c - -o /dev/null -W ${opt} 2>&1 | \
grep -E "Wno|no option" >/dev/null; then