ldlang won't compile with latest gcc

Ross Ridge rridge@csclub.uwaterloo.ca
Thu Jul 28 18:22:00 GMT 2005


>../../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  //	  



More information about the Binutils mailing list