[llvm-bugs] [Bug 41710] New: Please support the [[gnu::leaf]] attribute

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 2 07:39:05 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41710

            Bug ID: 41710
           Summary: Please support the [[gnu::leaf]] attribute
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rafael at espindo.la
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

gcc 9 warn if an alias "specifies less restrictive attribute than its target".
This means that a declaration of an alias to malloc has to look like

extern "C"
[[gnu::alias("malloc")]]
[[gnu::malloc]]
[[gnu::alloc_size(1)]]
[[gnu::leaf]]
void* __libc_malloc(size_t n) throw ();

or gcc will warn.

Of the above attributes, only gnu::leaf is missing from clang.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190502/72498e82/attachment.html>


More information about the llvm-bugs mailing list