Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 884771 - app-cdr/cdrtools-3.02_alpha09-r4 fails to compile (lto) setfp.c:47:10: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
Summary: app-cdr/cdrtools-3.02_alpha09-r4 fails to compile (lto) setfp.c:47:10: error:...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2022-12-07 20:29 UTC by Kostadin
Modified: 2022-12-07 20:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info and buildlog (build.log,196.50 KB, text/x-log)
2022-12-07 20:29 UTC, Kostadin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kostadin 2022-12-07 20:29:26 UTC
Created attachment 840849 [details]
emerge --info and buildlog

app-cdr/cdrtools-3.02_alpha09-r4 fails to compile with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing


setfp.c: In function 'setfp':
setfp.c:47:10: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
   47 |         *(long ***)(&((struct frame *)___fpoff((char *)&dummy[0]))->fr_savfp) =
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [../RULES/r-gmake.obj:51: OBJ/amd64-linux-cc/pic/setfp.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r4/work/cdrtools-3.02/libschily'
make[1]: *** [../RULES/rules.mks:23: all] Error 2
make[1]: Leaving directory '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r4/work/cdrtools-3.02/libschily'
make: *** [RULES/rules1.dir:25: all] Error 2
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-07 20:39:05 UTC
Given this codebase is so old and upstream are gone, this is probably an append-flags -fno-strict-aliasing situation.