[cfe-dev] Reinstating stdint.h in test/CodeGen/const-init.c

John Thompson john.thompson.jtsoftware at gmail.com
Thu Nov 19 11:46:09 PST 2009


It works on Windows.

On Thu, Nov 19, 2009 at 11:26 AM, Ken Dyck <Ken.Dyck at onsemi.com> wrote:

> In October (in r84160) the #include<stdint.h> in
> test/CodeGen/const-init.c was replaced with an explicit definition of
> intptr_t. From what I gather, this was done to get the test to succeed
> on Windows, where a host stdint.h is not implemented and clang, in
> hosted mode, blindly attempts to include one anyways.
>
> Explicitly defining intptr_t in the file has the problem of relying on
> the built-in macro, __INTPTR_TYPE__, which I would consider an
> implementation detail of stdint.h, one that I'd like to remove (but I'll
> save that discussion for another thread).
>
> I'd like to propose an alternate fix. See the attached patch. It runs
> the test in freestanding mode, forcing the inclusion of clang's stdint.h
> instead looking for a hosted one. And, more importantly, it doesn't rely
> on any built-in macros.
>
> Thoughts?
>
> -Ken
>
> _____________________________
> Ken Dyck
> Senior Member of Technical Staff
> Software Tools Development
> Medical Division
> ON Semiconductor
> ken.dyck at onsemi.com
> +1 519 884 9696 ext 2277 | office
> +1 519 884 0228 | fax
> http://onsemi.com
> _____________________________
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>


-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091119/4979fcad/attachment.html>


More information about the cfe-dev mailing list