Treat _Atomic pointers as pointer types (check value type of AtomicType) in case of handling the "restrict" qualifier. Accept such code (so does GCC):
int * restrict _Atomic p;
Differential D18698
[C11] PR24451: Allow restrict _Atomic pointers • d.zobnin.bugzilla on Apr 1 2016, 9:40 AM. Authored by
Details
Treat _Atomic pointers as pointer types (check value type of AtomicType) in case of handling the "restrict" qualifier. Accept such code (so does GCC): int * restrict _Atomic p;
Diff Detail Event TimelineComment Actions I'm not convinced this change is correct. There are two possibilities for what int *_Atomic restrict could mean:
If you're trying to simulate a GCC extension, this should at least have a corresponding ExtWarn, but you'll also need to make the case that the extension is useful. Comment Actions Richard, thank you for the review and explanation! Thank you, Comment Actions Richard, please let me know what in your opinion we should do with this revision. Thank you, Comment Actions I mailed WG14 asking for clarification on how these rules are supposed to work (10 days ago) and am yet to hear anything in response. Is this apparent GCC extension/bug seeing much use in the wild? If not, I think our path forward is to file this as a bug against GCC and see if they want to fix it or accept it as an extension. |