From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BDD2B3891C07; Wed, 8 May 2024 07:37:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BDD2B3891C07 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715153853; bh=wszTTXOQZUtnbNcQ4oA4cFOqo9rAaX1FEsX4GWWJFSE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EORGb6J/3PlCZhlacCnnMYCi9iQRul7fS2lZpIH7Z3tN+P/iWFfWY304VvUFoVlp4 ulxmqO6lhB6h0j+TeQ0AQOeLIQva6k43Y53cUip5K7eAx+FABVqxuiGjTiCqULqgvk KFydJ378QbSXza9PH+BXQ6/kjjDqmARjzU/vDKYY= From: "lh_mouse at 126 dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114968] [14/15 Regression] missing `__thiscall` attribute on builtin declaration of `__cxa_thread_atexit()` Date: Wed, 08 May 2024 07:37:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.1.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: lh_mouse at 126 dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114968 --- Comment #12 from LIU Hao --- testcase: ``` namespace __cxxabiv1 { extern "C" int __cxa_thread_atexit(void (__thiscall* dtor)(void*), void* ob= j, void* dso) noexcept; } struct nontrivial { nontrivial(); ~nontrivial(); }; void* get_data() { thread_local nontrivial nt; return &nt; } ``` ``` E:\lh_mouse\Desktop>g++ test.cc : error: conflicting declaration of C function 'int __cxxabiv1::__cxa_thread_atexit(void (*)(), void*, void*)' test.cc:3:18: note: previous declaration 'int __cxxabiv1::__cxa_thread_atexit(void (__attribute__((thiscall)) *)(void*), void*, void*)' 3 | extern "C" int __cxa_thread_atexit(void (__thiscall* dtor)(void*), void* obj, void* dso) noexcept; | ^~~~~~~~~~~~~~~~~~~ ```=