[cfe-dev] User manual, and GCC functions not implemented

Jeffrey Walton noloader at gmail.com
Fri Jul 25 10:09:28 PDT 2014


On Fri, Jul 25, 2014 at 12:51 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> ----- Original Message -----
>> From: "Jeffrey Walton" <noloader at gmail.com>
>> To: cfe-dev at cs.uiuc.edu
>> Sent: Friday, July 25, 2014 11:43:05 AM
>> Subject: [cfe-dev] User manual, and GCC functions not implemented
>>
>> http://clang.llvm.org/docs/UsersManual.html#gcc-extensions-not-implemented-yet
>>
>> "clang does not support nested functions; this is a complex
>> feature..."
>>
>> That is bitter sweet. I need it because a library I'm building uses
>> them (but I'd prefer the library not use them).
>>
>> The devs might consider adding text to the statements: in addition to
>> being complex, it also breaks No-Exec Stacks because a trampoline is
>> placed on the stack (assuming Clang would have a similar
>> implementation to GCC). I think the security posture is more
>> important
>> than feature complexity ;)
>>
>> And the devs might consider adding this text to the statements: Clang
>> has no plans to implement the feature. See Bug 6378,
>> http://www.llvm.org/bugs/show_bug.cgi?id=6378.
>
> Not that I'm advocating implementing it, but I wonder if now that we have support for many similar constructs (C++ lambdas, OpenMP outlining, etc.) it would not be as complex as it once was.
>
I *think* there may be a work around for me using Objective C style
blocks in C mode. A fellow on Stack Overflow suggested it at
http://stackoverflow.com/questions/24959440/rewrite-gcc-cleanup-macro-with-nested-function-for-clang.

Perhaps the manual could be updated to also include text about using
Objective C style blocks, too.



More information about the cfe-dev mailing list