New warning for mismatched include case

Hi Sebastian,

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.

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.

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.


It /is/ a warning, not an error. Maybe it can be off by default on Windows and on case-sensitive filesystems?

I think it's important for it to be on by default on Windows as that's
where I see a lot of people running into the initial problem. They
write their code on Windows without paying attention to capitalization
and it works. Then they move the code base over to the Mac or Linux
and it stops compiling. Having the warning early on (when they first
write the include) would help reinforce the notion that case matters.


2012/7/30 Aaron Ballman <>

I'm fine with that. We can always relax the rules in the future as
other ideas for how to handle it (if any) come up.