Skip to content

Failure to build with GCC 11 #78

@thesamesam

Description

@thesamesam
gcc -O2 -g3 -pipe -fPIE -fstack-protector-all -fstack-clash-protection -fcf-protection=full  -Wall -Wextra -Wsign-compare -Wno-unused-result -Wno-unused-function -Wno-missing-field-initializers -Wno-analyzer-malloc-leak -Werror -Wno-error=cpp -Wno-free-nonheap-object -std=gnu11 -fshort-wchar -fPIC -fno-strict-aliasing -D_GNU_SOURCE -DCONFIG_x86_64 -I/home/sam/git/pesign/include '-DRUNDIR="/run/"'   -Wmaybe-uninitialized -grecord-gcc-switches  -fmessage-length=0 -fdiagnostics-color=always -fdiagnostics-format=text -fdiagnostics-show-cwe -fanalyzer  -I/usr/include/efivar -I/usr/include/nss -I/usr/include/nspr  -D_FORTIFY_SOURCE=2 -c -o pesign.o pesign.c
gcc -O2 -g3 -pipe -fPIE -fstack-protector-all -fstack-clash-protection -fcf-protection=full  -Wall -Wextra -Wsign-compare -Wno-unused-result -Wno-unused-function -Wno-missing-field-initializers -Wno-analyzer-malloc-leak -Werror -Wno-error=cpp -Wno-free-nonheap-object -std=gnu11 -fshort-wchar -fPIC -fno-strict-aliasing -D_GNU_SOURCE -DCONFIG_x86_64 -I/home/sam/git/pesign/include '-DRUNDIR="/run/"'   -Wmaybe-uninitialized -grecord-gcc-switches  -fmessage-length=0 -fdiagnostics-color=always -fdiagnostics-format=text -fdiagnostics-show-cwe -fanalyzer  -I/usr/include/efivar -I/usr/include/nss -I/usr/include/nspr  -D_FORTIFY_SOURCE=2 -c -o daemon.o daemon.c
daemon.c:922:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
  922 | #pragma GCC diagnostic ignored "-Wanalyzer-use-of-uninitialized-value"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [/home/sam/git/pesign/Make.rules:34: daemon.o] Error 1
make[1]: Leaving directory '/home/sam/git/pesign/src'
make: *** [Makefile:29: all] Error 2

Noticed when building on Gentoo Linux with gcc (Gentoo Hardened 11.2.1_p20220115 p4) 11.2.1 20220115. I'm guessing that maybe GCC 12 allows this but GCC 11 doesn't.

Full log: build.log

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions