arch/x86/include/asm/current.h:49:9: error: call to undeclared function '__typeof_unqual__'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

From: Naresh Kamboju
Date: Wed Dec 18 2024 - 11:08:45 EST


The Rust gcc builds failed due to following build warnings / errors on the
x86_64 and arm64 architectures with selftests/rust/config on the Linux
next-20241216...next-20241218.

First seen on the next-20241216 tag.
Good: next-20241213
Bad: next-20241216

Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>

Anders bisected this regressions and found,
# first bad commit:
[20b3c3eccd9361c9976af640be280526bef72248]
percpu: use TYPEOF_UNQUAL() in variable declarations

Build log:
-------
arch/x86/include/asm/current.h:49:9: error: call to undeclared
function '__typeof_unqual__'; ISO C99 and later do not support
implicit function declarations [-Wimplicit-function-declaration]
arch/x86/include/asm/current.h:49:9: error: expected ';' after expression
arch/x86/include/asm/current.h:49:9: error: use of undeclared
identifier 'pscr_ret__'

Links:
-------
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20241218/testrun/26395023/suite/build/test/rustgcc-lkftconfig-kselftest/log
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20241218/testrun/26395032/suite/build/test/rustgcc-lkftconfig-kselftest/log
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20241217/testrun/26355712/suite/build/test/rustgcc-lkftconfig-kselftest/history/

metadata:
----
git describe: next-20241216..next-20241218
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
kernel config:
https://storage.tuxsuite.com/public/linaro/lkft/builds/2qNMCRNosQCRWxj5dIUE87pDXos/config
build url: https://storage.tuxsuite.com/public/linaro/lkft/builds/2qNMCRNosQCRWxj5dIUE87pDXos/
toolchain: 'gcc', 'version': '14'
arch: arm64, x86
build name: rustgcc-lkftconfig-kselftest

--
Linaro LKFT
https://lkft.linaro.org