This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Abusive (?) promotions to int


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]