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: unassignedclangb...@nondot.org
          Reporter: raf...@espindo.la
                CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to