Skip to contentSkip to conversation

warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules

U-Boot Timur Tabi 2 participants 4 messages Aug 31, 2010 – Sep 2, 2010

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

I ran Software Update on my Fedora 13 system, and now whenever I build U-Boot, I get a bunch of warnings like this:

dlmalloc.c: In function 'malloc':
dlmalloc.c:2252: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2252: note: initialized from here
dlmalloc.c:2261: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2261: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2261: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2261: note: initialized from here
dlmalloc.c:2268: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2268: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2268: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2268: note: initialized from here
dlmalloc.c:2325: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2325: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2325: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2325: note: initialized from here

Can anyone explain why this is happening? I don't understand how a Fedora update would change anything, since my cross-compile toolchain is not distributed with Fedora, so it shouldn't have changed.

#1 lore raw
Quoted 2 lines · On Tuesday, August 31, 2010 18:30:39 Timur Tabi wrote:

I ran Software Update on my Fedora 13 system, and now whenever I build U-Boot, I get a bunch of warnings like this:

what version of u-boot exactly ? for what board/architecture ? what is your host gcc version and your target gcc version ? what is the exact compile line that causes this warning to be displayed ? this is a pretty information-less bug report ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100901/869f3309/attachment.pgp

author
#2 lore raw
Quoted 5 lines · Mike Frysinger
Quoted 2 lines · On Tuesday, August 31, 2010 18:30:39 Timur Tabi wrote:

I ran Software Update on my Fedora 13 system, and now whenever I build U-Boot, I get a bunch of warnings like this:

what version of u-boot exactly ?

Any recent version. Every version I've tried has this problem.

Quoted 1 line

?for what board/architecture ?

It appears to be any PowerPC board.

Quoted 2 lines

what is your
host gcc version and your target gcc version ?

$ gcc --version
gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10)
$ powerpc-linux-gnu-gcc --version
powerpc-linux-gnu-gcc (Sourcery G++ Lite 4.4-194) 4.4.1
Quoted 2 lines

what is the exact compile line
that causes this warning to be displayed ?

powerpc-linux-gnu-gcc -g -Os -mrelocatable -fPIC -meabi
-D__KERNEL__ -DTEXT_BASE=0xeff80000 -DRESET_VECTOR_ADDRESS=0xeffffffc -I/home/b04825/git/u-boot.diu/include -fno-builtin -ffreestanding
-nostdinc -isystem /opt/freescale/usr/local/gcc-4.4.194-eglibc-2.11.194/powerpc-linux-gnu/lib/gcc/powerpc-linux-gnu/4.4.1/include -pipe -DCONFIG_PPC -D__powerpc__ -ffixed-r2 -Wa,-me500 -msoft-float
-mno-string -mspe=yes -mno-spe -Wall -Wstrict-prototypes
-fno-stack-protector \
-o dlmalloc.o dlmalloc.c -c

Quoted 2 lines

this is a pretty information-less
bug report ...

It's not a bug report. I was hoping that other people had already seen this, since I'm not doing anything special.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
#3 lore raw
Quoted 2 lines · On Wednesday, September 01, 2010 21:27:24 Timur Tabi wrote:
$ powerpc-linux-gnu-gcc --version
powerpc-linux-gnu-gcc (Sourcery G++ Lite 4.4-194) 4.4.1

all gcc-4.4+ compilers should show similar output. your host should have nothing to do with it.

searching the archives shows people working on it, but no satisfactory solution. feel free to get it working.

the standard Blackfin release is currently based on 4.3.5 which is why i'm not seeing it and i'm not worrying about it ;).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100902/dc3ac33a/attachment.pgp