[cfe-dev] New warning for mismatched include case

Ruben Van Boxem vanboxem.ruben at gmail.com
Sat Jul 28 05:51:31 PDT 2012


>
> 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.

Ruben

>
> Jason
>
>
> On Jul 19, 2012, at 5:14 AM, Sebastian Redl wrote:
>
> >* On 19.07.2012 00:09, Jason Haslam wrote:*>>* The attached (incomplete proof-of-concept) patch provides a new warning that fires on case-insensitive file systems when the case of the file name in the #include directive doesn't match the case of the file name on disk. The idea is to avoid broken commits that fail to build on case-sensitive file systems. For example:*>>* *>>* What do you think? Is this desirable? Does the direction look right?*>>* *>* There would need to be a whitelist mechanism for some headers, I think. *>* I'm pretty sure the WinSDK headers have changed casing over time, so I *>* would want to suppress this warning for windows.h. I would not want to *>* have to change code just because I installed a new SDK.*>* *>* Sebastian*>* _______________________________________________*>* cfe-dev mailing list*>* cfe-dev at cs.uiuc.edu <http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev>*>* http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev*
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120728/18f23c9d/attachment.html>


More information about the cfe-dev mailing list