You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While GCC 4.8 improved global collisions, -Wshadow is still currently unusable:
./arch/x86/include/asm/bitops.h:283:28: warning: declaration of 'ffs' shadows a built-in function [-
Wshadow]
283 | static __always_inline int ffs(int x)
| ^~~
But instead, -Wshadow=local handles the cases that are the most interesting.
This would protect the kernel from silent corruptions in overlapping macro variables, for example:
https://godbolt.org/z/P1ox1xWPo
While GCC 4.8 improved global collisions,
-Wshadow
is still currently unusable:But instead,
-Wshadow=local
handles the cases that are the most interesting.This is wider coverage than what might accidentally get caught by
-Wunused-but-set-variable
, which also has a lot of false positives:https://lore.kernel.org/r/[email protected]/
https://lore.kernel.org/r/[email protected]/
The text was updated successfully, but these errors were encountered: