[cfe-dev] make test fails: Sema/static-init.c

Nuno Lopes nunoplopes at sapo.pt
Mon Sep 1 15:14:16 PDT 2008


Hi Ted,

I knew that that test was failing. I wanted to ask here first if the test 
was really valid, but you were faster than me.
Anyway I think I'll just revert all my crap, per Eli's comments.

Sorry for the mess,
Nuno


----- Original Message ----- 
From: "Ted Kremenek" <kremenek at apple.com>
To: "Nuno Lopes" <nunoplopes at sapo.pt>
Cc: "cfe-dev Developers" <cfe-dev at cs.uiuc.edu>
Sent: Monday, September 01, 2008 9:06 PM
Subject: make test fails: Sema/static-init.c


> Hi Nuno,
>
> I think your recent patch may have broken the clang test suite:
>
> 
> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080901/007344.html
>
> Please always run "make test" before committing.
>
> Here is what I am seeing:
>
>  $ ./TestRunner.sh Sema/static-init.c
>  ******************** TEST 'static-init.c' FAILED! ********************
>  Command:
>   clang -fsyntax-only -verify static-init.c
>  Incorrect Output:
>  Errors expected but not seen:
>    Line 5: initializer element is not a compile-time constant
>
> Here is the culprit line:
>
>   float r  = (float) &r; // expected-error {{initializer element is  not a 
> compile-time constant}}
>
> Here is the output of clang:
>
>   $ clang -fsyntax-only static-init.c
>  static-init.c:3:16: error: initializer element is not a compile-time 
> constant
>  static int b = f; // expected-error {{initializer element is not a 
> compile-time constant}}
>                 ^
>  1 diagnostic generated.
>
> It appears that we are no longer flagging an error for this line.
>
> Ted 




More information about the cfe-dev mailing list