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
[Sema] Do not emit -Wmissing-variable-declarations for register variables
When building the Linux kernel with -Wmissing-variable-declarations,
there are several instances of warnings around variables declared with
register storage:
arch/x86/include/asm/asm.h:208:24: warning: no previous extern declaration for non-static variable 'current_stack_pointer' [-Wmissing-variable-declarations]
register unsigned long current_stack_pointer asm(_ASM_SP);
^
arch/x86/include/asm/asm.h:208:10: note: declare 'static' if the variable is not intended to be used outside of this translation unit
register unsigned long current_stack_pointer asm(_ASM_SP);
^
1 warning generated.
The suggestion is invalid, as the variable cannot have both static and
register storage. Do not emit -Wmissing-variable-declarations for
register variables.
Closes: #64509
Link: https://lore.kernel.org/[email protected]/
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110947
Reviewed By: aaron.ballman, nickdesaulniers
Differential Revision: https://reviews.llvm.org/D157435
0 commit comments