------- Additional Comments From jsm at polyomino dot org dot uk 2004-10-20 23:03 ------- Subject: Re: C integer promotion semantics / front end problems.
I presume you sent your message directly to me by mistake, so am sending the reply back to the bug database so it can benefit more than one person. Technical messages about public GCC versions should, absent any more specific support arrangements in a particular case, go to the mailing lists, not individuals; questions are answered in public GCC development for the benefit of the public. On Wed, 20 Oct 2004, Paul Schlie wrote: > Sorry to do this to you again, but where do you see in the standard the > requirement to promote, or license to needlessly promote all operands > to int? C99 subclause 6.3.1.1 paragraph 2. signed char has rank less than that of int, so it *must* be promoted to int. What happens afterwards is nothing to do with the front end. The front end does *too many* optimisations; it should purely generate GIMPLE representing the standard meaning of the code and leave it to the later stages to tell that such conversions - or indeed conversions between int and long where they are the same size - can be optimised away in some cases. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18065