[llvm-commits] test-suite: declare i only once in TSVC

Tobias Grosser tobias at grosser.es
Mon Nov 19 09:42:32 PST 2012


On 11/19/2012 06:21 PM, Sebastian Pop wrote:
> Hi,
>
> the attached patch fixes the compile errors when compiling TSVC with -std=gnu89:

Is there a specific reason why you are running TSVC with --std=gnu89?

Would it not make more sense to ensure that the CFLAGS of all test 
programs set the C/C++ mode according to the C/C++ version that is used 
in the test case, rather than working on making all programs work with 
all compilers.

What would you do in case of variable sized length arrays or even C++11 
features?

> .../MultiSource/Benchmarks/TSVC/Equivalencing-dbl/../tsc.inc:181:11: error: redefinition of 'i'
>          for (int i = 0; i < LEN2; i++){
>                   ^
> .../MultiSource/Benchmarks/TSVC/Equivalencing-dbl/../tsc.inc:171:11: note: previous definition is here
>          for (int i = 0; i < LEN; i++){

The error message sounds incorrect. 'i' is not redefined. Would you mind 
submitting a clang bug report?

Tobi



More information about the llvm-commits mailing list