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

List:       llvm-testresults
Subject:    Re: [llvm-testresults] [cfe-dev]  Red bots at night,
From:       John McCall <rjmccall () apple ! com>
Date:       2010-11-22 10:16:07
Message-ID: 75EB4451-69CC-42F5-B621-BDD756DD3959 () apple ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Nov 21, 2010, at 11:56 PM, Chandler Carruth wrote:

> 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 not disagreeing with your ultimate decision here, but for the record, these *are* \
system headers; they're permitted to make assumptions about other system headers, \
it's just a porting burden to actually do so.

John.


[Attachment #5 (unknown)]

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space; "><br><div><div>On Nov 21, 2010, at 11:56 PM, \
Chandler Carruth wrote:</div><br class="Apple-interchange-newline"><blockquote \
type="cite"><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're hacking around this header file bug in the compiler, don'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'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.</div></div></blockquote><div><br></div></div><div>I'm not disagreeing with \
your ultimate decision here, but for the record, these *are* system \
headers;&nbsp;they're permitted to make assumptions about other system headers, it's \
just a porting burden to actually do \
so.</div><div><br></div><div>John.</div></body></html>



_______________________________________________
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