[Bug c/106571] Implement -Wsection diag

2022-08-10 Thread bp at alien8 dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106571 --- Comment #5 from Boris --- (In reply to Michael Matz from comment #4) > Boris: what does DECLARE_PER_CPU() expand into? Are there other attributes > that could be usefully checked for mismatch between decl and def? Unfortunately, DECLARE_P

[Bug c/106571] Implement -Wsection diag

2022-08-10 Thread matz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106571 Michael Matz changed: What|Removed |Added CC||matz at gcc dot gnu.org --- Comment #4 f

[Bug c/106571] Implement -Wsection diag

2022-08-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106571 --- Comment #3 from Andrew Pinski --- (In reply to Boris from comment #2) > How can you check a mismatch if only the definition has the section > attribute? You don't need to. > > Here's the kernel commit which fixes this for clang: > > http

[Bug c/106571] Implement -Wsection diag

2022-08-09 Thread bp at alien8 dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106571 --- Comment #2 from Boris --- How can you check a mismatch if only the definition has the section attribute? Here's the kernel commit which fixes this for clang: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=db8

[Bug c/106571] Implement -Wsection diag

2022-08-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106571 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2022-08-09 Ever confirmed|0