Abusive (?) promotions to int

Jim Wilson wilson@specifixinc.com
Thu Sep 25 06:38:00 GMT 2003


Ian Lance Taylor wrote:
> True, but compilers are also permitted to follow the as-if rule: if
> you can't detect a difference, then there is no difference.

There is code in the C front end to perform this optimization.  Search 
for "shorten", "short_compare", and "short_shift" in 
build_binary_operation in c-typeck.c.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list