D3f0 / D3f0/coreemu

gcc 4.7 strict aliasing build error

Open
#237 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
Tcl
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
Under Fedora 19+, openSUSE 12.x+ having gcc 4.7.x there is a build error:

The fix: this can be fixed by setting the following CFLAGS at configure time:

CFLAGS="-fno-strict-aliasing $CFLAGS" ./configure
make -j4

- - - - - - - - -

The error output is:

gcc -Wall -fno-strict-aliasing -O3 -g -I/usr/include/libev -O3 -Werror -Wall -
D_GNU_SOURCE -o netns netns_main.o netns.o
vcmdmodule.c: In function ‘init_evloop’:
vcmdmodule.c:168:3: error: dereferencing type-punned pointer will break strict-a
liasing rules [-Werror=strict-aliasing]
vcmdmodule.c:168:3: error: dereferencing type-punned pointer will break strict-a
liasing rules [-Werror=strict-aliasing]
vcmdmodule.c: In function ‘VCmdWait_complete’:
vcmdmodule.c:264:5: error: dereferencing type-punned pointer will break
strict-aliasing rules [-Werror=strict-aliasing]
vcmdmodule.c:266:5: error: dereferencing type-punned pointer will break
strict-aliasing rules [-Werror=strict-aliasing]
vcmdmodule.c: In function ‘VCmd_connected’:
vcmdmodule.c:439:5: error: dereferencing type-punned pointer will break
strict-aliasing rules [-Werror=strict-aliasing]
vcmdmodule.c:441:5: error: dereferencing type-punned pointer will break
strict-aliasing rules [-Werror=strict-aliasing]
vcmdmodule.c: In function ‘initvcmd’:
vcmdmodule.c:868:3: error: dereferencing type-punned pointer will break
strict-aliasing rules [-Werror=strict-aliasing]
vcmdmodule.c:871:3: error: dereferencing type-punned pointer will break
strict-aliasing rules [-Werror=strict-aliasing]
cc1: all warnings being treated as errors
error: command 'gcc' failed with exit status 1
make[3]: *** [libnetns.a] Error 1

```

Original issue reported on code.google.com by `ahrenh...@gmail.com` on 8 Jan 2014 at 4:17

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.