[cfe-dev] Integer promotions in C-style cast expressions?

Eli Friedman eli.friedman at gmail.com
Thu Aug 13 01:14:26 PDT 2009


On Wed, Aug 12, 2009 at 11:38 PM, Enea Zaffanella<zaffanella at cs.unipr.it> wrote:
> However, according to our understanding of the C99 standard, the
> operator of a C-style cast expression is not subject to promotions.

Mmm... probably just that whoever wrote the code didn't consider the
difference between DefaultFunctionArrayConversion and
UsualUnaryConversions in this context, since it's not particularly
important in terms of generating the correct code.

> Function UsualUnaryConversions mixes array/function decays and integral
> promotions. In our opinion, operands of explicit casts should be subject
> to type decay, but not to promotions.

That sounds fine; could you send a patch to cfe-commits?

-Eli



More information about the cfe-dev mailing list