From: Bernhard Reutner-Fischer <al...@gcc.gnu.org> Dear maintainers
I propose the following mechanical change to use the defines in tree.h. (Common convention is to use the defines as per tree.h, which is what we keep telling people.) Exceptions applied to the generator here: NULL_TREE # we want to retain "NULL" CAN_HAVE_RANGE_P # keep CAN_HAVE_LOCATION_P; Looks confused otherwise. No fallback declarations considered. I.e. picks TREE_CODE_CLASS true branch (to pick the checking variants of tree access) and skips the whole true arm when seeing an extension (like DECL_RTL_KNOWN_SET). Case enumerations ignored (CASE_FLT_FN CASE_FLT_FN_FLOATN_NX CASE_BUILT_IN_TM_STORE). Only _P() named macros without loops are considered for starters. Bootstrapped on x86_64-unknown-linux with --enable-languages=c,fortran,c++,ada,d,go,lto,jit,objc,obj-c++,rust (hence not m2) --enable-checking=yes --enable-multilib --disable-libstdcxx-pch and regtested without regressions against r14-619-g2499540e9abb55 on --target_board=unix'{-m32,-m64}' Ok for trunk? PS: I refrain from Ccing about all frontend maintainers in the hopes to apply this squashed. Bernhard Reutner-Fischer (14): ada: use _P() defines from tree.h analyzer: use _P() defines from tree.h gcc/config/*: use _P() defines from tree.h c++: use _P() defines from tree.h m2: use _P() defines from tree.h lto: use _P() defines from tree.h d: use _P() defines from tree.h fortran: use _P() defines from tree.h rust: use _P() defines from tree.h c: use _P() defines from tree.h objc: use _P() defines from tree.h go: use _P() defines from tree.h omp: use _P() defines from tree.h gcc: use _P() defines from tree.h gcc/ada/gcc-interface/decl.cc | 17 +++--- gcc/ada/gcc-interface/trans.cc | 20 +++---- gcc/ada/gcc-interface/utils.cc | 10 ++-- gcc/ada/gcc-interface/utils2.cc | 16 +++--- gcc/alias.cc | 2 +- gcc/analyzer/region-model-manager.cc | 8 +-- gcc/analyzer/region-model.cc | 2 +- gcc/analyzer/region.cc | 2 +- gcc/attribs.cc | 11 ++-- gcc/builtins.cc | 8 +-- gcc/c-family/c-ada-spec.cc | 6 +-- gcc/c-family/c-common.cc | 32 ++++++------ gcc/c-family/c-common.h | 2 +- gcc/c-family/c-omp.cc | 5 +- gcc/c-family/c-ubsan.cc | 2 +- gcc/c-family/c-warn.cc | 6 +-- gcc/c/c-convert.cc | 4 +- gcc/c/c-decl.cc | 6 +-- gcc/c/c-parser.cc | 4 +- gcc/c/c-typeck.cc | 52 +++++++++---------- gcc/c/gimple-parser.cc | 2 +- gcc/cfgexpand.cc | 2 +- gcc/cgraph.h | 4 +- gcc/config/aarch64/aarch64.cc | 4 +- gcc/config/alpha/alpha.cc | 6 +-- gcc/config/arc/arc.cc | 8 +-- gcc/config/arm/arm.cc | 16 +++--- gcc/config/arm/unknown-elf.h | 2 +- gcc/config/avr/avr.cc | 11 ++-- gcc/config/bfin/bfin.cc | 2 +- gcc/config/bpf/bpf.cc | 2 +- gcc/config/c6x/c6x.cc | 4 +- gcc/config/csky/csky.cc | 8 ++- gcc/config/darwin-c.cc | 2 +- gcc/config/darwin.cc | 2 +- gcc/config/epiphany/epiphany.cc | 3 +- gcc/config/epiphany/epiphany.h | 6 +-- gcc/config/frv/frv.cc | 4 +- gcc/config/gcn/gcn-tree.cc | 2 +- gcc/config/gcn/gcn.cc | 4 +- gcc/config/h8300/h8300.cc | 2 +- gcc/config/i386/i386-expand.cc | 2 +- gcc/config/i386/i386.cc | 20 +++---- gcc/config/i386/winnt-cxx.cc | 12 ++--- gcc/config/i386/winnt.cc | 6 +-- gcc/config/ia64/ia64.cc | 6 +-- gcc/config/iq2000/iq2000.cc | 8 ++- gcc/config/lm32/lm32.cc | 2 +- gcc/config/loongarch/loongarch.cc | 2 +- gcc/config/m32c/m32c.cc | 2 +- gcc/config/mcore/mcore.cc | 6 +-- gcc/config/microblaze/microblaze.cc | 2 +- gcc/config/mips/mips.cc | 2 +- gcc/config/mmix/mmix.cc | 4 +- gcc/config/nvptx/nvptx.cc | 8 +-- gcc/config/pa/pa.cc | 10 ++-- gcc/config/pa/pa.h | 4 +- gcc/config/pa/som.h | 2 +- gcc/config/pdp11/pdp11.cc | 2 +- gcc/config/riscv/riscv.cc | 4 +- gcc/config/rl78/rl78.cc | 4 +- gcc/config/rs6000/aix.h | 4 +- gcc/config/rs6000/darwin.h | 6 +-- gcc/config/rs6000/freebsd64.h | 4 +- gcc/config/rs6000/linux64.h | 4 +- gcc/config/rs6000/rs6000-call.cc | 10 ++-- gcc/config/rs6000/rs6000-logue.cc | 4 +- gcc/config/rs6000/rs6000.cc | 15 +++--- gcc/config/s390/s390-c.cc | 4 +- gcc/config/s390/s390.cc | 8 +-- gcc/config/sh/sh.cc | 12 ++--- gcc/config/sol2.cc | 2 +- gcc/config/sparc/sparc.cc | 2 +- gcc/config/sparc/sparc.h | 4 +- gcc/config/stormy16/stormy16.cc | 4 +- gcc/config/v850/v850.cc | 6 +-- gcc/config/visium/visium.cc | 4 +- gcc/config/xtensa/xtensa.cc | 2 +- gcc/cp/call.cc | 42 +++++++-------- gcc/cp/class.cc | 2 +- gcc/cp/coroutines.cc | 2 +- gcc/cp/cp-tree.h | 4 +- gcc/cp/cvt.cc | 2 +- gcc/cp/cxx-pretty-print.cc | 2 +- gcc/cp/decl.cc | 4 +- gcc/cp/error.cc | 2 +- gcc/cp/lambda.cc | 2 +- gcc/cp/mangle.cc | 2 +- gcc/cp/method.cc | 2 +- gcc/cp/module.cc | 12 ++--- gcc/cp/name-lookup.cc | 6 +-- gcc/cp/pt.cc | 2 +- gcc/cp/semantics.cc | 24 ++++----- gcc/cp/tree.cc | 4 +- gcc/cp/typeck.cc | 4 +- gcc/cp/typeck2.cc | 10 ++-- gcc/d/d-codegen.cc | 2 +- gcc/d/d-convert.cc | 9 ++-- gcc/dwarf2out.cc | 15 +++--- gcc/expr.cc | 2 +- gcc/fold-const.cc | 46 ++++++++-------- gcc/fortran/trans-array.cc | 10 ++-- gcc/fortran/trans-decl.cc | 4 +- gcc/fortran/trans-expr.cc | 6 +-- gcc/fortran/trans-intrinsic.cc | 4 +- gcc/fortran/trans-io.cc | 2 +- gcc/fortran/trans-openmp.cc | 7 ++- gcc/fortran/trans-stmt.cc | 2 +- gcc/fortran/trans.cc | 4 +- gcc/gcc-rich-location.cc | 2 +- gcc/gimple-expr.cc | 19 +++---- gcc/gimple-expr.h | 4 +- gcc/gimple-ssa-warn-access.cc | 2 +- gcc/gimplify.cc | 48 ++++++++--------- gcc/go/go-gcc.cc | 10 ++-- gcc/godump.cc | 4 +- gcc/graphite-scop-detection.cc | 4 +- gcc/ipa-devirt.cc | 4 +- gcc/ipa-prop.cc | 7 ++- gcc/ipa-sra.cc | 8 +-- gcc/lto-streamer-in.cc | 4 +- gcc/lto-streamer-out.cc | 11 ++-- gcc/lto/lto-common.cc | 2 +- gcc/lto/lto-symtab.cc | 8 +-- gcc/lto/lto-symtab.h | 2 +- gcc/m2/gm2-gcc/m2builtins.cc | 14 ++--- gcc/m2/gm2-gcc/m2convert.cc | 8 +-- gcc/m2/gm2-gcc/m2expr.cc | 4 +- gcc/m2/gm2-gcc/m2tree.cc | 2 +- gcc/m2/gm2-gcc/m2treelib.cc | 2 +- gcc/m2/gm2-gcc/m2type.cc | 4 +- gcc/m2/m2pp.cc | 4 +- gcc/objc/objc-act.cc | 10 ++-- gcc/objc/objc-next-runtime-abi-01.cc | 2 +- gcc/objc/objc-next-runtime-abi-02.cc | 4 +- gcc/omp-low.cc | 36 ++++++------- gcc/omp-oacc-neuter-broadcast.cc | 10 ++-- gcc/omp-offload.cc | 2 +- gcc/omp-simd-clone.cc | 2 +- gcc/optabs-tree.cc | 12 ++--- gcc/rust/backend/rust-compile-expr.cc | 2 +- gcc/rust/backend/rust-tree.cc | 2 +- gcc/rust/backend/rust-tree.h | 4 +- gcc/rust/checks/lints/rust-lint-unused-var.cc | 2 +- gcc/rust/rust-gcc.cc | 8 +-- gcc/toplev.cc | 2 +- gcc/trans-mem.cc | 2 +- gcc/tree-cfg.cc | 22 ++++---- gcc/tree-complex.cc | 2 +- gcc/tree-emutls.cc | 2 +- gcc/tree-inline.cc | 8 +-- gcc/tree-nested.cc | 16 +++--- gcc/tree-parloops.cc | 2 +- gcc/tree-pretty-print.cc | 4 +- gcc/tree-sra.cc | 4 +- gcc/tree-ssa-alias.cc | 4 +- gcc/tree-ssa-ccp.cc | 2 +- gcc/tree-ssa-coalesce.cc | 2 +- gcc/tree-ssa-dom.cc | 4 +- gcc/tree-ssa-forwprop.cc | 3 +- gcc/tree-ssa-propagate.cc | 2 +- gcc/tree-ssa-sccvn.cc | 2 +- gcc/tree-ssa-sink.cc | 2 +- gcc/tree-ssa-structalias.cc | 3 +- gcc/tree-ssa-ter.cc | 2 +- gcc/tree-ssa-uninit.cc | 2 +- gcc/tree-ssa.cc | 4 +- gcc/tree-streamer-in.cc | 3 +- gcc/tree-streamer-out.cc | 3 +- gcc/tree-vect-generic.cc | 8 +-- gcc/tree-vect-stmts.cc | 2 +- gcc/tree-vector-builder.h | 2 +- gcc/tree.cc | 28 +++++----- gcc/ubsan.cc | 2 +- gcc/var-tracking.cc | 4 +- gcc/varasm.cc | 2 +- libcc1/libcc1plugin.cc | 2 +- libcc1/libcp1plugin.cc | 4 +- 178 files changed, 569 insertions(+), 615 deletions(-) -- 2.30.2