Bug ID | 1196279 |
---|---|
Summary | gcc12 doesn't like kernel's fortify-string.h |
Classification | openSUSE |
Product | openSUSE Tumbleweed |
Version | Current |
Hardware | Other |
OS | Other |
Status | NEW |
Severity | Normal |
Priority | P5 - None |
Component | Development |
Assignee | rguenther@suse.com |
Reporter | jslaby@suse.com |
QA Contact | qa-bugs@suse.de |
Found By | --- |
Blocker | --- |
Created attachment 856404 [details] one preprocessed example When building a kernel using gcc 12, I see a lot of: > In file included from /home/latest/linux/include/linux/string.h:253, > from /home/latest/linux/include/linux/bitmap.h:11, > from /home/latest/linux/include/linux/cpumask.h:12, > from /home/latest/linux/arch/x86/include/asm/cpumask.h:5, > from /home/latest/linux/arch/x86/include/asm/msr.h:11, > from /home/latest/linux/arch/x86/include/asm/processor.h:22, > from /home/latest/linux/arch/x86/include/asm/cpufeature.h:5, > from /home/latest/linux/arch/x86/include/asm/thread_info.h:53, > from /home/latest/linux/include/linux/thread_info.h:60, > from /home/latest/linux/arch/x86/include/asm/preempt.h:7, > from /home/latest/linux/include/linux/preempt.h:78, > from /home/latest/linux/include/linux/spinlock.h:55, > from /home/latest/linux/include/linux/mmzone.h:8, > from /home/latest/linux/include/linux/gfp.h:6, > from /home/latest/linux/include/linux/mm.h:7, > from /home/latest/linux/mm/swapfile.c:9: > /home/latest/linux/include/linux/fortify-string.h: In function ���������memcmp���������: > /home/latest/linux/include/linux/fortify-string.h:391:5: warning: infinite recursion detected [-Winfinite-recursion] > 391 | int memcmp(const void * const POS0 p, const void * const POS0 q, __kernel_size_t size) > | ^~~~~~ > /home/latest/linux/include/linux/fortify-string.h:44:33: note: recursive call > 44 | #define __underlying_memcmp __builtin_memcmp > | ^ > /home/latest/linux/include/linux/fortify-string.h:404:16: note: in expansion of macro ���������__underlying_memcmp��������� > 404 | return __underlying_memcmp(p, q, size); > | ^~~~~~~~~~~~~~~~~~~ It's like this: #define __underlying_memcmp __builtin_memcmp __FORTIFY_INLINE __diagnose_as(__builtin_memcmp, 1, 2, 3) int memcmp(const void * const POS0 p, const void * const POS0 q, __kernel_size_t size) { ... return __underlying_memcmp(p, q, size); } I suppose it's a gcc bug...