[Bug c/113050] -Wincompatible-pointer-types emitted as a warning, not an error, for __atomic_load

2023-12-17 Thread fw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113050 --- Comment #3 from Florian Weimer --- (In reply to Florian Weimer from comment #1) > The warning should be -Wdiscared-qualifiers, which is not an error for C. > > What confused me is that the volatile qualifier is already accepted for the >

[Bug c/113050] -Wincompatible-pointer-types emitted as a warning, not an error, for __atomic_load

2023-12-17 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113050 --- Comment #2 from Sam James --- Yeah, for every attempt I had to reconstruct it manually, I just got the expected -Wdiscarded-qualifiers, and then realised it was atomic-specific.

[Bug c/113050] -Wincompatible-pointer-types emitted as a warning, not an error, for __atomic_load

2023-12-17 Thread fw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113050 --- Comment #1 from Florian Weimer --- The warning should be -Wdiscared-qualifiers, which is not an error for C. What confused me is that the volatile qualifier is already accepted for the first argument. I believe it's valid for the second