[cfe-commits] r60331 - /cfe/trunk/test/Sema/i-c-e3.c

Eli Friedman eli.friedman at gmail.com
Mon Dec 1 09:25:27 PST 2008


On Mon, Dec 1, 2008 at 7:59 AM, Anders Carlsson <andersca at mac.com> wrote:
>
> 1 dec 2008 kl. 04.33 skrev Eli Friedman:
>
>> On Sun, Nov 30, 2008 at 10:27 PM, Anders Carlsson <andersca at mac.com>
>> wrote:
>>>
>>> Author: andersca
>>> Date: Mon Dec  1 00:27:38 2008
>>> New Revision: 60331
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=60331&view=rev
>>> Log:
>>> Fix test. (0 && (a(),1)) is a valid I-C-E according to C99.
>>
>> No, it isn't.  Note the requirement about operands; "a" is a global,
>> which isn't allowed.
>>
>
> Ah, I see - I got ICEs and regular constant expressions mixed up. Maybe the
> test should fail when in strict C (not gnu) mode?

We've had this discussion before... my instinct is that we don't want
to do this.  gcc is planning on fixing their ICEs correctly for 4.5
(http://gcc.gnu.org/ml/gcc-patches/2008-10/msg01061.html), and glibc
will have a fixed tgmath.h in the next release
(http://sourceware.org/ml/glibc-cvs/2008-q4/msg00091.html).
Therefore, I think we want to just make this an error unconditionally.

-Eli



More information about the cfe-commits mailing list