[llvm-bugs] [Bug 45552] New: nobuiltin attribute ignored for sema diagnostics

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 15 06:29:34 PDT 2020


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

            Bug ID: 45552
           Summary: nobuiltin attribute ignored for sema diagnostics
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: clement.courbet at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

#include <cstring>

static void overflow(void) __attribute__((no_builtin))
{
        char buf[8];
        /* Intentionally overwrite the stack. */
        memset(buf, 0x47, sizeof(buf)+24);
}

Compiled with `-Wfortify-source` emits a warning
(https://godbolt.org/z/nej7MN), while it does not when `-Wfortify-source
-fnobuiltin` is specified.

-- 
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/20200415/ef56c824/attachment.html>


More information about the llvm-bugs mailing list