Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gcc-plugins: Remove duplicate included header file stringpool.h

The header file stringpool.h is included for GCC version >= 8 and then
again for all versions.

Since the header file stringpool.h was added in GCC 4.9 and the kernel
currently requires GCC 5.1 as a minimum, remove the conditional include.

Including the header file only once removes the following warning
reported by make includecheck:

stringpool.h is included more than once

However, it's important to include stringpool.h before attribs.h
because attribs.h uses some of its functions.

Compile-tested with GCC 14.

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Link: https://lore.kernel.org/r/20240629233608.278028-2-thorsten.blum@toblux.com
Signed-off-by: Kees Cook <kees@kernel.org>

authored by

Thorsten Blum and committed by
Kees Cook
18c18b1f ef40d28f

-5
-5
scripts/gcc-plugins/gcc-common.h
··· 62 62 #include "pass_manager.h" 63 63 #include "predict.h" 64 64 #include "ipa-utils.h" 65 - 66 - #if BUILDING_GCC_VERSION >= 8000 67 65 #include "stringpool.h" 68 - #endif 69 - 70 66 #include "attribs.h" 71 67 #include "varasm.h" 72 68 #include "stor-layout.h" ··· 74 78 #include "context.h" 75 79 #include "tree-ssa-alias.h" 76 80 #include "tree-ssa.h" 77 - #include "stringpool.h" 78 81 #if BUILDING_GCC_VERSION >= 7000 79 82 #include "tree-vrp.h" 80 83 #endif