[all-commits] [llvm/llvm-project] 0eb4bd: [C] Silence unreachable -Watomic-access diagnostic...
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Thu May 15 09:24:36 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0eb4bd27d1ab15ea6b078ac386be01ae13d261a9
https://github.com/llvm/llvm-project/commit/0eb4bd27d1ab15ea6b078ac386be01ae13d261a9
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2025-05-15 (Thu, 15 May 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaExprMember.cpp
M clang/test/Sema/atomic-expr.c
Log Message:
-----------
[C] Silence unreachable -Watomic-access diagnostics (#140064)
Accessing the member of a structure or union which is _Atomic-qualified
is undefined behavior in C. We currently diagnose that with a warning
that defaults to an error. In turn, this means we reject a valid program
if the access it not reachable because of the error. e.g.,
if (0)
SomeAtomicStruct.Member = 12; // Was diagnosed
This silences the diagnostic if the member access is not reachable.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list