[llvm-bugs] [Bug 38569] New: dont emit -Wreturn-stack-address in single case
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Aug 14 16:13:09 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38569
Bug ID: 38569
Summary: dont emit -Wreturn-stack-address in single case
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: ndesaulniers at google.com
CC: llozano at chromium.org, llvm-bugs at lists.llvm.org,
srhines at google.com
>From https://github.com/ClangBuiltLinux/linux/issues/24:
The Linux kernel uses the following construct often:
#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
This produces -Wreturn-stack-address (in Clang 7+) for the label, but generates
the expected code.
I think we can detect returning the address of a label in a GNU-C-extension
statement expression, that has nothing between the label and the final
statement, and not emit the warning?
--
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/20180814/34bce723/attachment.html>
More information about the llvm-bugs
mailing list