[cfe-commits] [PATCH] Force C89 for c-index-test.c

Dmitri Gribenko gribozavr at gmail.com
Wed Nov 7 15:53:50 PST 2012


On Sun, Sep 30, 2012 at 9:32 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
> On Sep 22, 2012, at 11:49 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>
>> Hello,
>>
>> MSVC supports only C89, so it is important to keep c-index-test.c
>> buildable with C89.  However, Clang defaults to C99, so while building
>> Clang with Clang one can introduce C99 constructs into c-index-test.c
>> without noticing.
>>
>> The attached patch forces C89 for c-index-test.c in CMake.
>> Unfortunately, my knowledge of Makefile-based build system is not
>> sufficient to make an equivalent modification.
>
> LGTM.

Thank you for the review!  Committed r167561.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list