[llvm-bugs] [Bug 45588] New: calling noreturn functions generates definitions of functions with static linkage

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Apr 17 12:45:00 PDT 2020


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

            Bug ID: 45588
           Summary: calling noreturn functions generates definitions of
                    functions with static linkage
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: ndesaulniers at google.com
                CC: llvm-bugs at lists.llvm.org, srhines at google.com

__attribute__((noreturn))
void foo (void);

static
void bar (void) {
    return foo();
}
void baz (void) {
    return bar();
}

clang -O2 will emit a definition for bar, gcc will not.

-- 
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/20200417/cd03d136/attachment.html>


More information about the llvm-bugs mailing list