[cfe-dev] A patch for integer promotions.
Enea Zaffanella
zaffanella at cs.unipr.it
Mon Aug 17 23:32:13 PDT 2009
Enea Zaffanella wrote:
> Enea Zaffanella wrote:
>> Hello.
>>
>> The attached program promotion_bug.c shows a bug in the current code
>> generating integer promotions: independently from the sizes of integer
>> types, all small integers are promoted to type `int'.
>
> While at it, I would also like to ask for the reason(s) why a method such as
>
> QualType Sema::UsualArithmeticConversionsType(QualType, QualType);
>
> belongs to Sema, whereas methods such as
>
> QualType ASTContext::mergeTypes(QualType, QualType);
> QualType ASTContext::mergeFunctionTypes(QualType, QualType);
>
> belong to ASTContext.
>
> As far as I can see, the former method looks very similar to the other
> two: it requires access to mostly the same info from the context and it
> does not need to directly access/change nodes in the AST or issue
> diagnostics.
>
> If there are no objections, I would like to move the former method into
> ASTContext. This change, besides making things more consistent, would
> make the method easily accessible to clients (that was indeed the
> original motivation for my investigation).
>
> If you agree, I can merge this with the patch previously sent.
Here is attached the cumulative patch.
Is it possible they get applied before code is frozen?
Cheers,
Enea Zaffanella
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: IntegerPromotions_and_ASTContext.patch
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090818/2837c3a9/attachment.ksh>
More information about the cfe-dev
mailing list