This is the mail archive of the gcc-patches@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: [PATCH]: Don't apply default conversions to C switch expressions



> Use the standard, not the Rationale.  6.8.4.2#5 clearly states that
> "The integer promotions are performed on the controlling expression.".

My apologies.  I formally withdraw the proposed patch.  It appears that
the freely available documentation doesn't accurately reflect the final
ratified standards in this respect.  I also agree with Joseph that he
resubmit/apply his patch to avoid calling get_unwidened. Perhaps together
with my switch-2.c testcase, replacing dg-warning with dg-bogus to
ensure that the promoted and not the truncated values are used when
testing for duplicate cases.

Roger
--


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