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

Tobias Grosser tobias at grosser.es
Mon Nov 19 10:05:04 PST 2012


On 11/19/2012 06:56 PM, Sebastian Pop wrote:
> Tobias Grosser wrote:
>> 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?
>>
>
> No reason.  I just happened to have a script that was setting it and that
> crashed my runs of TSVC.
>
>> 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.
>
> I see that if I do not explicitly set the CFLAGS, TSVC is automatically using
> -std=gnu99.

I would say, setting -std flags explicitly for the test suite is 
probably a misuse. Different programs in the test suite may use 
different standards.

However, the test suite should work with both gcc (defaults to gnu89) 
and clang (default to gnu99). If this does not work, we should probably 
supply the flags with the test cases.

Tobi




More information about the llvm-commits mailing list