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

Ted Kremenek kremenek at apple.com
Mon Sep 1 13:06:34 PDT 2008


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