Re: Weirdness with clang and stdatomic.h on Rawhide

2022-02-04 Thread Jonathan Wakely
On Fri, 4 Feb 2022 at 22:26, Ron Olson wrote: > > Oh, I forgot I could test for Clang too…I tried that fix and it works for me. > :) It's on GCC trunk now, at commit https://gcc.gnu.org/r12-7064 It should get into rawhide whenever the next gcc update happens. > > On 4 Feb 2022, at 13:35,

Re: Weirdness with clang and stdatomic.h on Rawhide

2022-02-04 Thread Ron Olson
Oh, I forgot I could test for Clang too…I tried that fix and it works for me. :) On 4 Feb 2022, at 13:35, Jonathan Wakely wrote: > On Thu, 3 Feb 2022 at 20:27, Ron Olson wrote: >> >> Here’s a question: what if the following was added to stdatomic.h at the end >> of the file: >> >> #else >>

Re: Weirdness with clang and stdatomic.h on Rawhide

2022-02-04 Thread Jonathan Wakely
On Thu, 3 Feb 2022 at 20:27, Ron Olson wrote: > > Here’s a question: what if the following was added to stdatomic.h at the end > of the file: > > #else > #include_next > #endif // C++23 > > Since the rest of the file is gated by C++23, this allows C++ programs that > reference this header to

Re: Weirdness with clang and stdatomic.h on Rawhide

2022-02-03 Thread Ron Olson
Here’s a question: what if the following was added to stdatomic.h at the end of the file: #else #include_next #endif // C++23 Since the rest of the file is gated by C++23, this allows C++ programs that reference this header to have a chance to pick up the Clang one, if it exists. If Clang

Re: Weirdness with clang and stdatomic.h on Rawhide

2022-02-03 Thread Ron Olson
Hi Jonathan- The issue isn’t the variable, really, it’s the functions that are used in the macros. I ran a scratch build on koji so you can see the errors in question: https://koji.fedoraproject.org/koji/taskinfo?taskID=82338440 The build log shows the issue when trying to build block.cpp

Re: Weirdness with clang and stdatomic.h on Rawhide

2022-02-01 Thread Jonathan Wakely
On Tue, 1 Feb 2022 at 15:00, Ron Olson wrote: > > Well, yes and no. The code I linked to in the pastebin is what demonstrates > the issue. The code in question is Apple’s libdispatch which I package > separately as well as part of Swift. In that situation they’re using a C++ > file that uses

Re: Weirdness with clang and stdatomic.h on Rawhide

2022-02-01 Thread Ron Olson
Well, yes and no. The code I linked to in the pastebin is what demonstrates the issue. The code in question is Apple’s libdispatch which I package separately as well as part of Swift. In that situation they’re using a C++ file that uses the underlying primitives in stdatomic in macros for their

Re: Weirdness with clang and stdatomic.h on Rawhide

2022-02-01 Thread Jonathan Wakely
On Tue, 1 Feb 2022 at 09:15, Jonathan Wakely wrote: > > On Mon, 31 Jan 2022 at 22:45, Ron Olson wrote: > > > > Hey all, > > > > I’m troubleshooting an issue and came up with this sample program: > > https://pastebin.com/g9S8Z64q to demonstrate the problem. Basically, clang > > 13, on Rawhide,

Re: Weirdness with clang and stdatomic.h on Rawhide

2022-02-01 Thread Jonathan Wakely
On Tue, 1 Feb 2022 at 09:15, Jonathan Wakely wrote: > > On Mon, 31 Jan 2022 at 22:45, Ron Olson wrote: > > > > Hey all, > > > > I’m troubleshooting an issue and came up with this sample program: > > https://pastebin.com/g9S8Z64q to demonstrate the problem. That's not a valid C++ program, even

Re: Weirdness with clang and stdatomic.h on Rawhide

2022-02-01 Thread Jonathan Wakely
On Mon, 31 Jan 2022 at 22:45, Ron Olson wrote: > > Hey all, > > I’m troubleshooting an issue and came up with this sample program: > https://pastebin.com/g9S8Z64q to demonstrate the problem. Basically, clang > 13, on Rawhide, won’t compile that program, while on Fedora 35 it does. > > The