r190979 - Avoid including <stdlib.h> in the intrin.h test

Reid Kleckner rnk at google.com
Wed Sep 18 18:58:30 PDT 2013


Should be fixed with r190985.


On Wed, Sep 18, 2013 at 6:34 PM, Richard Smith <richard at metafoo.co.uk>wrote:

>
> On 18 Sep 2013 18:18, "Chandler Carruth" <chandlerc at google.com> wrote:
> >
> > On Wed, Sep 18, 2013 at 6:12 PM, Reid Kleckner <rnk at google.com> wrote:
> >>
> >> On Wed, Sep 18, 2013 at 6:05 PM, Eli Friedman <eli.friedman at gmail.com>
> wrote:
> >>>
> >>> On Wed, Sep 18, 2013 at 5:32 PM, Reid Kleckner <reid at kleckner.net>
> wrote:
> >>>>
> >>>> Author: rnk
> >>>> Date: Wed Sep 18 19:32:11 2013
> >>>> New Revision: 190979
> >>>>
> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=190979&view=rev
> >>>> Log:
> >>>> Avoid including <stdlib.h> in the intrin.h test
> >>>>
> >>>> Modified:
> >>>>     cfe/trunk/test/Headers/ms-intrin.cpp
> >>>>
> >>>> Modified: cfe/trunk/test/Headers/ms-intrin.cpp
> >>>> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/ms-intrin.cpp?rev=190979&r1=190978&r2=190979&view=diff
> >>>>
> ==============================================================================
> >>>> --- cfe/trunk/test/Headers/ms-intrin.cpp (original)
> >>>> +++ cfe/trunk/test/Headers/ms-intrin.cpp Wed Sep 18 19:32:11 2013
> >>>> @@ -1,5 +1,10 @@
> >>>>  // RUN: %clang -target i386-pc-win32 -fms-extensions -fsyntax-only %s
> >>>>
> >>>> +// Get size_t, but avoid including mm_malloc.h which includes
> stdlib.h which may
> >>>> +// not exist.
> >>>> +#include <stdint.h>
> >>>> +#undef __STDC_HOSTED__
> >>>> +
> >>>>  #include <Intrin.h>
> >>>>
> >>>
> >>> It's more conventional to use -ffreestanding rather than write "#undef
> __STDC_HOSTED__"...
> >>
> >>
> >> That doesn't work because we need size_t from stdint.h.  ;_;  I recall
> this is why Eric gave up testing it in the first place.
> >
> >
> > Just define size_t yourself using decltype.
>
> Or __SIZE_TYPE__
>
> >>
> >>
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130918/0beff1dc/attachment.html>


More information about the cfe-commits mailing list