Re: arm gcc 4.1.3 -O2 dead code removal breaks configure test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 30, 2011 at 00:01 UTC, Andrew W. Nosenko wrote:
> IMHO, better would to be just disable a compiler to do optimization
> dances around 'in6' variable (i.e. mark 'in6' as 'volatile'):
>
> ÂÂ Â Â Â Â Â Â volatile struct in6_addr in6;
> ÂÂ Â Â Â Â Â Â in6 = in6addr_any;

Thanks, Andrew, for helping out.

While I expect your suggestion would work, I am uncomfortable relying
on it.  I don't know of a freely-available, reliable ANSI C/ISO C
reference to check exactly what the standard says about optimizing
away volatile stack variables assignments, I decided it was safer to
assume the compiler wouldn't optimize away a printf parameter.

Take care,
Dave Hart

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux