[Bug c/28901] -Wunused-variable ignores unused const initialised variables

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Mar 13 08:43:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901

--- Comment #37 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note this change also introduces some warnings when compiling the arm64 kernel:

In file included from arch/arm64/crypto/aes-glue.c:17:0:
include/linux/cpufeature.h:48:33: warning: ‘cpu_feature_match_AES’ defined but
not used [-Wunused-const-variable=]
 static struct cpu_feature const cpu_feature_match_ ## x[] = \
                                 ^
arch/arm64/crypto/aes-glue.c:452:1: note: in expansion of macro
‘module_cpu_feature_match’
 module_cpu_feature_match(AES, aes_init);
 ^~~~~~~~~~~~~~~~~~~~~~~~


 MODULE_DEVICE_TABLE(cpu, cpu_feature_match_ ## x);              \


This happens when the aes crypto code is compiled in rather than a module.


More information about the Gcc-bugs mailing list