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

gcc-plugins: Reorganize gimple includes for GCC 13

The gimple-iterator.h header must be included before gimple-fold.h
starting with GCC 13. Reorganize gimple headers to work for all GCC
versions.

Reported-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/all/20230113173033.4380-1-palmer@rivosinc.com/
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>

+2 -2
+2 -2
scripts/gcc-plugins/gcc-common.h
··· 71 71 #include "varasm.h" 72 72 #include "stor-layout.h" 73 73 #include "internal-fn.h" 74 + #include "gimple.h" 74 75 #include "gimple-expr.h" 76 + #include "gimple-iterator.h" 75 77 #include "gimple-fold.h" 76 78 #include "context.h" 77 79 #include "tree-ssa-alias.h" ··· 87 85 #include "tree-eh.h" 88 86 #include "stmt.h" 89 87 #include "gimplify.h" 90 - #include "gimple.h" 91 88 #include "tree-phinodes.h" 92 89 #include "tree-cfg.h" 93 - #include "gimple-iterator.h" 94 90 #include "gimple-ssa.h" 95 91 #include "ssa-iterators.h" 96 92