[coreboot] [Patch] remove some warnings
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Thu Mar 18 15:47:07 CET 2010
On 18.03.2010 15:05, Stefan Reinauer wrote:
> On 3/18/10 11:35 AM, Mark Marshall wrote:
>
>> This will mean that you've got wrong debug info, of course, but it is
>> what you seem to want. The first file defines a symbol, and the second
>> files says that a symbol is defined somewhere else. The types don't
>> match, but the C compiler doesn't know / care about that.
>>
> Since the type punning issue is about wrong alignment, I think the C
> compiler does not do the right thing in that case, we just trick it
> around the warning.
>
AFAIK (and I could be wrong) type punning is not only about alignment,
but the C compiler is free to optimize the generated code in a way that
may break your expectations if you're violating strict aliasing rules.
Regards,
Carl-Daniel
--
"I do consider assignment statements and pointer variables to be among
computer science's most valuable treasures."
-- Donald E. Knuth
More information about the coreboot
mailing list