[llvm-bugs] [Bug 47399] New: GCC warns about a reserved destructor priority on llvm_writeout_and_clear
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 2 10:42:19 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47399
Bug ID: 47399
Summary: GCC warns about a reserved destructor priority on
llvm_writeout_and_clear
Product: compiler-rt
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: compiler-rt
Assignee: unassignedbugs at nondot.org
Reporter: jistone at redhat.com
CC: llvm-bugs at lists.llvm.org, maskray at google.com
>From Rust: https://github.com/rust-lang/rust/pull/76224#issuecomment-685880913
Since: https://reviews.llvm.org/D82253
../lib/profile/GCDAProfiling.c:637:1: warning: destructor priorities from 0 to
100 are reserved for the implementation [-Wprio-ctor-dtor]
637 | static void llvm_writeout_and_clear(void) {
| ^~~~~~
That function in full:
#ifndef _WIN32
// __attribute__((destructor)) and destructors whose priorities are greater
than
// 100 run before this function and can thus be tracked. The priority is
// compatible with GCC 7 onwards.
__attribute__((destructor(100)))
#endif
static void llvm_writeout_and_clear(void) {
llvm_writeout_files();
fn_list_remove(&writeout_fn_list);
}
GCC has MAX_RESERVED_INIT_PRIORITY 100, and warns for anything <= MAX. Perhaps
this should use 101?
--
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/20200902/3568819b/attachment.html>
More information about the llvm-bugs
mailing list