Skip to content

Build error with gcc 14 #156

@rafael2k

Description

@rafael2k

When trying to build TLVC by running "build.sh", I get:

gcc -DHAVE_CONFIG_H -I. -I../../binutils-src/gas  -I. -I../../binutils-src/gas -I../bfd -I../../binutils-src/gas/config -I../../binutils-src/gas/../include -I../../binutils-src/gas/.. -I../../binutils-src/gas/../bfd -DLOCALEDIR="\"/home/rafael2k/programs/devel/TLVC/cross/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -Wwrite-strings -I../../binutils-src/gas/../zlib -g -O2 -MT write.o -MD -MP -MF $depbase.Tpo -c -o write.o ../../binutils-src/gas/write.c &&\
mv -f $depbase.Tpo $depbase.Po
../../binutils-src/gas/write.c: In function ‘chain_frchains_together’:
../../binutils-src/gas/write.c:426:7: error: dangling pointer ‘prev_frag’ to ‘dummy’ may be used [-Werror=dangling-pointer=]
  425 |     info->frchainP->frch_last
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~
  426 |       = chain_frchains_together_1 (section, info->frchainP);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../binutils-src/gas/write.c:391:9: note: ‘dummy’ declared here
  391 |   fragS dummy, *prev_frag = &dummy;
      |         ^~~~~
cc1: all warnings being treated as errors
make[5]: *** [Makefile:1224: write.o] Error 1
make[5]: Leaving directory '/home/rafael2k/programs/devel/TLVC/cross/build/binutils-build/gas'
make[4]: *** [Makefile:1269: all-recursive] Error 1
make[4]: Leaving directory '/home/rafael2k/programs/devel/TLVC/cross/build/binutils-build/gas'
make[3]: *** [Makefile:814: all] Error 2
make[3]: Leaving directory '/home/rafael2k/programs/devel/TLVC/cross/build/binutils-build/gas'
make[2]: *** [Makefile:4864: all-gas] Error 2
make[2]: Leaving directory '/home/rafael2k/programs/devel/TLVC/cross/build/binutils-build'
make[1]: *** [Makefile:849: all] Error 2
make[1]: Leaving directory '/home/rafael2k/programs/devel/TLVC/cross/build/binutils-build'
make: *** [Makefile:54: /home/rafael2k/programs/devel/TLVC/cross/build/.binutils.build] Error 2
make: Leaving directory '/home/rafael2k/programs/devel/TLVC/tools'
Build script has terminated with error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions