[cfe-commits] P4R: Truncate CodeGEn initializer for arrays that are shorter than the initializer

Christopher Lamb christopher.lamb at gmail.com
Thu Nov 29 11:04:52 PST 2007


GCC compiles it, with warnings of course.

--
Christopher Lamb


On Nov 29, 2007, at 7:03 AM, Neil Booth wrote:

> Christopher Lamb wrote:-
>
>> This allows the following to CodeGen, with warnings:
>>
>> int ary[2] = {1, 2, 3, 4};
>
> Why not just reject outright?  This is clear junk that is better
> flagged to the user as uncompilable than being lost in a sea of
> compiler warning noise.
>
> Neil.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20071129/557bc775/attachment.html>


More information about the cfe-commits mailing list