[all-commits] [llvm/llvm-project] 4b3acf: [C] Add -Wduplicate-decl-specifier to -Wc++-compat...
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Thu May 1 03:52:46 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4b3acfb10a6b6388b95682c471bdbf42982be030
https://github.com/llvm/llvm-project/commit/4b3acfb10a6b6388b95682c471bdbf42982be030
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2025-05-01 (Thu, 01 May 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/DiagnosticGroups.td
A clang/test/Sema/warn-duplicate-decl-specifier.c
Log Message:
-----------
[C] Add -Wduplicate-decl-specifier to -Wc++-compat (#138012)
The existing diagnostic, already enabled by default in C, will diagnose
use of duplicate declaration specifiers (e.g., `const const`). However,
the C++ standard claims that is ill-formed, so the diagnostic is now
also controlled via -Wc++-compat.
Note: Clang treats this as a warning in C++ rather than an error, but
GCC does treat this as an error in C++, so the compatibility concerns
are minor but do exist.
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