[cfe-dev] Proposed change to __builtin_overload
Chris Lattner
clattner at apple.com
Tue Feb 10 13:44:48 PST 2009
On Feb 9, 2009, at 8:33 AM, Douglas Gregor wrote:
>>
>
> It would take a bit of work to support such a pragma in Clang,
> because we currently have quite a few places where we make a lot of
> assumptions about language-specific data structures based on the
> current language we're parsing (e.g., we assume that all class types
> are handled by CXXRecordDecl in C++ mode). However, it seems
> reasonable that we would work toward making Clang #pragma c++'able.
>
> In the shorter term, I think some kind of __overload__ attribute
> would be relatively easy to implement. Most of the pain would be in
> making sure that the C++ implicit-conversion rules handle all of the
> funky C99 types :)
I spoke with Doug more about this offline, and I agree. We should add
an __attribute__((overloadable)) or something like that. Doug
volunteered to tackle this when he gets to a good intermediate point
on his template work. I filed PR 3542 to track this.
Thanks Doug! When this is done, I'll do the horrible header hacking
stuff to hook it up for tgmath.h to use.
-Chris
More information about the cfe-dev
mailing list