<div class="gmail_quote">2012/7/30 Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Mon, Jul 30, 2012 at 12:00 PM, Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>> wrote:<br>
><br>
> On Jul 28, 2012, at 5:51 AM, Ruben Van Boxem <<a href="mailto:vanboxem.ruben@gmail.com">vanboxem.ruben@gmail.com</a>> wrote:<br>
><br>
>>> I apologize for the delay. I think that it should be fairly trivial to detect which headers come from the SDK by looking in the registry for the path to the SDK. Maybe clang already supports this somewhere? I'm not very Windows savvy myself but I'm willing to take a crack at this if nobody else steps forward with more specific information.<br>

>>><br>
>><br>
>> This is unacceptable for MinGW, which uses no registry, but the same header names (but obviously different implementation). The MinGW(-w64) headers are all lower-case, some of the Windows SDK headers are capitalized. There is no way to detect the difference, and there is no "right" capitalization for these.<br>

>><br>
>> This feature also has an effect on cross-compilation, where a Linux to Windows cross-compile will work case sensitive, a native Windows compile will not.<br>
>><br>
>> Ruben<br>
><br>
> It /is/ a warning, not an error. Maybe it can be off by default on Windows and on case-sensitive filesystems?<br>
<br>
</div></div>I think it's important for it to be on by default on Windows as that's<br>
where I see a lot of people running into the initial problem.  They<br>
write their code on Windows without paying attention to capitalization<br>
and it works.  Then they move the code base over to the Mac or Linux<br>
and it stops compiling.  Having the warning early on (when they first<br>
write the include) would help reinforce the notion that case matters.<br></blockquote><div><br>OK. Then what capitalization is "correct"? MSVS2003, MSVS2005, MSVS2008, MSVS2010, MSVS2012 (I'm not saying all these are different, I'm saying it really doesn't matter one bit that they use different capitalization), or an old MinGW that maybe has some capitals as well (I don't know this for sure), or modern MinGW-w64, where as far as I can tell, everything is lowercase? That's the problem: there is no one right thing. The only decent way to solve this is to keep a list of *all* headers, or exclude system headers. This last thing would be kind of easy, because system headers are usually included by `-i system` or similar. Otherwise, I see no one right way to do this. perhaps all the language Standard headers can be forced lowercase as well, but that would special case those. The Win32 API headers differ between MSVS and MinGW, so those cannot possibly be included in this warning whatsoever.<br>
<br>To conclude: if this is only for user headers, I'm fine with it, as those should be consistent. Platform headers are unfortunately not consistent across implementations.<br><br>Ruben<br><br></div></div>