[cfe-dev] [llvm-testresults] Red bots at night, buildczar's delight?
John McCall
rjmccall at apple.com
Mon Nov 22 02:16:07 PST 2010
On Nov 21, 2010, at 11:56 PM, Chandler Carruth wrote:
> On Thu, Nov 18, 2010 at 4:00 PM, Chandler Carruth <chandlerc at google.com> wrote:
> On Thu, Nov 18, 2010 at 3:23 PM, dalej <dalej at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101122/7321da29/attachment.html>
More information about the cfe-dev
mailing list