Re: Function signatures in extern "C".

2020-09-10 Thread Florian Weimer via Gcc
* Jakub Jelinek via Gcc: > On Mon, Sep 07, 2020 at 10:27:13AM +0100, Jonathan Wakely via Gcc wrote: >> On Mon, 7 Sep 2020 at 09:18, Iain Sandoe wrote: >> > >> > Perhaps the PR should be reopened with “accepts invalid”? >> >> My impression from the PR is that the reporter was using a different >>

Re: Function signatures in extern "C".

2020-09-07 Thread Jonathan Wakely via Gcc
On Mon, 7 Sep 2020, 10:34 Jakub Jelinek, wrote: > On Mon, Sep 07, 2020 at 10:27:13AM +0100, Jonathan Wakely via Gcc wrote: > > On Mon, 7 Sep 2020 at 09:18, Iain Sandoe wrote: > > > > > > Perhaps the PR should be reopened with “accepts invalid”? > > > > My impression from the PR is that the report

Re: Function signatures in extern "C".

2020-09-07 Thread Iain Sandoe
Jonathan Wakely via Gcc wrote: On Mon, 7 Sep 2020 at 09:18, Iain Sandoe wrote: Perhaps the PR should be reopened with “accepts invalid”? My impression from the PR is that the reporter was using a different ABI, where the name isn't reserved. Maybe the testcase should only be accepted with -f

Re: Function signatures in extern "C".

2020-09-07 Thread Jakub Jelinek via Gcc
On Mon, Sep 07, 2020 at 10:27:13AM +0100, Jonathan Wakely via Gcc wrote: > On Mon, 7 Sep 2020 at 09:18, Iain Sandoe wrote: > > > > Perhaps the PR should be reopened with “accepts invalid”? > > My impression from the PR is that the reporter was using a different > ABI, where the name isn't reserved

Re: Function signatures in extern "C".

2020-09-07 Thread Jonathan Wakely via Gcc
On Mon, 7 Sep 2020 at 09:18, Iain Sandoe wrote: > > Perhaps the PR should be reopened with “accepts invalid”? My impression from the PR is that the reporter was using a different ABI, where the name isn't reserved. Maybe the testcase should only be accepted with -fno-threadsafe-statics or -ffreest

Re: Function signatures in extern "C".

2020-09-07 Thread Iain Sandoe
Nathan Sidwell wrote: GCC has an extension on machaines with cxx_implicit_extern_c (what used to be !NO_IMPLICIT_EXTERN_C). On such targets we'll treat 'extern "C" void Foo ()' as-if the argument list is variadic. (or something approximating that) perhaps that is confusing things? may

Re: Function signatures in extern "C".

2020-09-06 Thread Nathan Sidwell
GCC has an extension on machaines with cxx_implicit_extern_c (what used to be !NO_IMPLICIT_EXTERN_C). On such targets we'll treat 'extern "C" void Foo ()' as-if the argument list is variadic. (or something approximating that) perhaps that is confusing things? nathan On 9/6/20 4:43 PM, Iain

Re: Function signatures in extern "C".

2020-09-06 Thread Iain Sandoe
Jonathan Wakely via Gcc wrote: On Sun, 6 Sep 2020 at 16:23, Iain Sandoe wrote: g++.dg/abi/guard3.C has: extern "C" int __cxa_guard_acquire(); Which might not be a suitable declaration, depending on how the ‘extern “C”’ is supposed to affect the function signature generated. IF, the exte

Re: Function signatures in extern "C".

2020-09-06 Thread Jonathan Wakely via Gcc
On Sun, 6 Sep 2020 at 16:23, Iain Sandoe wrote: > > Hi > > g++.dg/abi/guard3.C > > has: > > extern "C" int __cxa_guard_acquire(); > > Which might not be a suitable declaration, depending on how the ‘extern > “C”’ is supposed to affect the function signature generated. > > IF, the extern C should m