This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ldlang won't compile with latest gcc
- From: rridge at csclub dot uwaterloo dot ca (Ross Ridge)
- To: binutils at sources dot redhat dot com
- Date: Thu, 28 Jul 2005 14:22:19 -0400 (EDT)
- Subject: Re: ldlang won't compile with latest gcc
>../../src/ld/ldlang.c:1043: warning: dereferencing type-punned pointer
>will break strict-aliasing rules
Your patch only gets rid of this warning, it doesn't actually stop the
type-punned pointer from being derefenced. You need to do something
like to avoid the type-punning:
lang_statement_union_type *temp;
lang_statement_append (..., &temp);
lookup->next = (lang_output_section_statement_type *) temp;
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rridge@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/u/rridge/
db //