[llvm-bugs] [Bug 48105] New: Clang does not reject .ctor and .init_array in the same TU
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Nov 6 18:42:42 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48105
Bug ID: 48105
Summary: Clang does not reject .ctor and .init_array in the
same TU
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: dlj at google.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
GCC disallows placing function pointers in the .ctors (or .ctors.*) sections in
C++ mode, but Clang does not.
Example:
https://compiler-explorer.com/z/P6fxoP
However, in C, this is fine for both GCC and Clang:
https://compiler-explorer.com/z/9xTh1e
--
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/20201107/970bb299/attachment.html>
More information about the llvm-bugs
mailing list