[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-testresults
Subject:    Re: [llvm-testresults] Red bots at night, buildczar's delight?
From:       Chandler Carruth <chandlerc () google ! com>
Date:       2010-11-22 7:56:23
Message-ID: AANLkTi=iFuMxa9UHyX60Dxv+q2ha+QfjFcv373WTkJOf () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Nov 18, 2010 at 4:00 PM, Chandler Carruth <chandlerc@google.com>wrote:

> On Thu, Nov 18, 2010 at 3:23 PM, dalej <dalej@apple.com> wrote:
>
>> Given that we're hacking around this header file bug in the compiler,
>> don't we have to allow the reverse ordering anyway?
>> #include <stddef.h>
>> extern void* malloc(size_t);
>> #include <stdlib.h>
>>
>
> I think so, but I worry about further hacks. =[ Seems likely we have no
> choice.
>

For reference, I'm now convinced this isn't a good idea. GCC actually
rejects the construct you propose, and POSIX is pretty clear that this type
of redeclaring isn't allowed: 'malloc' is in its reserved set of identifiers
that can be implemented via function-like macros. Clang shouldn't get *more*
lax than GCC here, and we don't want to start forward declaring these
functions.

I'm going to revert my change to mm_malloc.h, and use __STDC_HOSTED__ to
guard our only inclusion of it. I'm also going to temporarily remove it from
the regression test suite while I discuss w/ Clang devs in general whether
the un-hosted requirement for the test suite is going to remain feasible.
Sorry again for the noise here. =[

[Attachment #5 (text/html)]

<div class="gmail_quote">On Thu, Nov 18, 2010 at 4:00 PM, Chandler Carruth <span \
dir="ltr">&lt;<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"> <div class="gmail_quote"><div class="im">On Thu, Nov \
18, 2010 at 3:23 PM, dalej <span dir="ltr">&lt;<a href="mailto:dalej@apple.com" \
target="_blank">dalej@apple.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">

<div>Given that we&#39;re hacking around this header file bug in the compiler, \
don&#39;t we have to allow the reverse ordering anyway?</div><div>#include \
&lt;stddef.h&gt;</div><div>extern void* malloc(size_t);</div><div> #include \
&lt;stdlib.h&gt;</div> </blockquote><div><br></div></div><div>I think so, but I worry \
about further hacks. =[ Seems likely we have no \
choice.</div></div></blockquote><div><br></div><div>For reference, I&#39;m now \
convinced this isn&#39;t a good idea. GCC actually rejects the construct you propose, \
and POSIX is pretty clear that this type of redeclaring isn&#39;t allowed: \
&#39;malloc&#39; is in its reserved set of identifiers that can be implemented via \
function-like macros. Clang shouldn&#39;t get *more* lax than GCC here, and we \
don&#39;t want to start forward declaring these functions.</div> \
<div><br></div><div>I&#39;m going to revert my change to mm_malloc.h, and use \
__STDC_HOSTED__ to guard our only inclusion of it. I&#39;m also going to temporarily \
remove it from the regression test suite while I discuss w/ Clang devs in general \
whether the un-hosted requirement for the test suite is going to remain feasible. \
Sorry again for the noise here. =[</div> </div>



_______________________________________________
llvm-testresults mailing list
llvm-testresults@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-testresults


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic