Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.6: build fails with gcc 12.0.0 #110

Closed
kloczek opened this issue Jan 28, 2022 · 1 comment
Closed

3.6: build fails with gcc 12.0.0 #110

kloczek opened this issue Jan 28, 2022 · 1 comment

Comments

@kloczek
Copy link

kloczek commented Jan 28, 2022

gcc 12.0.0 frpom fedora rawhide.

[tkloczko@ss-desktop safeclib-3.6]$ make
make  all-recursive
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/safeclib-3.6'
Making all in src
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/safeclib-3.6/src'
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc -DHAVE_CONFIG_H -I. -I..  -I../include  -I../include -I. -pedantic -fno-strict-aliasing -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wcast-align -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Wpacked -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wswitch-enum -Wswitch-default -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wdouble-promotion -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init -Werror -Wno-suggest-attribute=format -Wno-error=unused-parameter -Wno-error=missing-field-initializers -fstack-protector-strong -fstack-clash-protection -fcf-protection  -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -c -o misc/qsort_s.lo misc/qsort_s.c
libtool: compile:  /usr/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I. -pedantic -fno-strict-aliasing -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wcast-align -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Wpacked -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wswitch-enum -Wswitch-default -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wdouble-promotion -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init -Werror -Wno-suggest-attribute=format -Wno-error=unused-parameter -Wno-error=missing-field-initializers -fstack-protector-strong -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -c misc/qsort_s.c  -fPIC -DPIC -o misc/.libs/qsort_s.o
misc/qsort_s.c: In function ‘cycle’:
misc/qsort_s.c:177:11: error: storing the address of local variable ‘tmp’ in ‘*_3’ [-Werror=dangling-pointer=]
  177 |     ar[n] = tmp;
      |     ~~~~~~^~~~~
misc/qsort_s.c:169:19: note: ‘tmp’ declared here
  169 |     unsigned char tmp[256];
      |                   ^~~
misc/qsort_s.c:169:19: note: ‘ar_32(D)’ declared here
cc1: all warnings being treated as errors
@rurban
Copy link
Owner

rurban commented Jan 28, 2022

Hmm, timely catch. I was just preparing the 3.7 release...

rurban added a commit that referenced this issue Jan 28, 2022
@rurban rurban closed this as completed Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants