[cfe-commits] r76670 - in /cfe/trunk/test/PCH: ext_vector.c functions.c method_pool.h

Chris Lattner clattner at apple.com
Tue Jul 21 16:19:41 PDT 2009


On Jul 21, 2009, at 4:17 PM, Mike Stump wrote:

> On Jul 21, 2009, at 3:59 PM, Eli Friedman wrote:
>> On Tue, Jul 21, 2009 at 3:54 PM, Mike Stump<mrs at apple.com> wrote:
>>> --- cfe/trunk/test/PCH/ext_vector.c (original)
>>> +++ cfe/trunk/test/PCH/ext_vector.c Tue Jul 21 17:54:02 2009
>>> @@ -7,4 +7,5 @@
>>>
>>> int test(float4 f4) {
>>>  return f4.xy; // expected-error{{float2}}
>>> +  return 1;
>>> }
>>
>> If this change is necessary to avoid a warning, I would consider it a
>> bug in the warning code...
>
> I agree.  The problem is that the parser creates an AST that differs
> from what the user wrote, for the AST is creates, the warning is
> valid.  I talked with Doug, and he thinks we should mark the function
> decl as invalid.  I tried my hand at that, but I was left with a ton
> of failures in the test suite.  :-(

I'd just turn the unreachable code checker completely off after an  
error is produced. (not a warning mapped to error)

-Chris




More information about the cfe-commits mailing list