OK, so is initial patch a good one? ;-)

Andrey


On Wed, Feb 17, 2016 at 8:06 PM, David Majnemer
<david.majne...@gmail.com> wrote:
> majnemer added a comment.
>
> In http://reviews.llvm.org/D17330#354755, @andreybokhanko wrote:
>
>> In http://reviews.llvm.org/D17330#354730, @majnemer wrote:
>>
>> > Why not just stick clang in C90 mode when targeting C if the 
>> > -fms-compatibility-version is 18?
>> >
>> > We have similar code for the C++ mode in 
>> > https://github.com/llvm-mirror/clang/blob/master/lib/Driver/Tools.cpp#l5069
>>
>>
>> David, thanks for looking into this!
>>
>> MSVC18 doesn't support a set C standard; it adds some things from C99 as 
>> well. For example, it supports _Bool. So, I tried not to throw away baby 
>> along with bathwater and cause too much disruption.
>>
>> OK -- will implement a driver fix that sets C90 for MSVC18 tomorrow and will 
>> update the patch.
>>
>> Andrey
>
>
> _Bool is fine, our C90 support is a superset of C90: it includes things which 
> a conforming implementation is permitted to provide.
>
> However, the following test case is problematic:
>
>   void f() {
>     for (int x = 0; x < 10; ++x) {}
>     for (int x = 0; x < 10; ++x) {}
>   }
>
> This is supported by MSVC 2013 but would be (correctly) rejected by a 
> compiler in C90 mode...
> I have a feeling that sticking us in C90 mode would break code...
>
>
> http://reviews.llvm.org/D17330
>
>
>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to