aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Dalecki <martin@dalecki.de>2006-10-23 14:20:56 +0000
committerMarcin Dalecki <martin@dalecki.de>2006-10-23 14:20:56 +0000
commit46e02f6dd14ae7279e94be50f8f5473abcac97af (patch)
tree9ab887994c957be985a0a73b8b26801920bd6637
parent6194350ff9feab15c279e8dcde95aefbd71a74b5 (diff)
Added the first working version of the C++ compatibility port. Everything with the notable exception of ADA just works now.c++-compat-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/c++-compat-branch@117976 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/Makefile.in28
-rw-r--r--gcc/alias.c10
-rw-r--r--gcc/alloc-pool.c2
-rw-r--r--gcc/basic-block.h12
-rw-r--r--gcc/bb-reorder.c20
-rw-r--r--gcc/bitmap.c6
-rw-r--r--gcc/bt-load.c78
-rw-r--r--gcc/builtins.c66
-rw-r--r--gcc/c-common.c9
-rw-r--r--gcc/c-common.h10
-rw-r--r--gcc/c-decl.c47
-rw-r--r--gcc/c-format.c76
-rw-r--r--gcc/c-format.h2
-rw-r--r--gcc/c-gimplify.c1
-rw-r--r--gcc/c-lex.c12
-rw-r--r--gcc/c-objc-common.c1
-rw-r--r--gcc/c-parser.c33
-rw-r--r--gcc/c-pch.c6
-rw-r--r--gcc/c-pretty-print.c2
-rw-r--r--gcc/c-pretty-print.h1
-rw-r--r--gcc/c-tree-code.h37
-rw-r--r--gcc/c-tree.h26
-rw-r--r--gcc/c-typeck.c9
-rw-r--r--gcc/caller-save.c76
-rw-r--r--gcc/calls.c32
-rw-r--r--gcc/cfg.c38
-rw-r--r--gcc/cfgexpand.c4
-rw-r--r--gcc/cfghooks.c10
-rw-r--r--gcc/cfglayout.c12
-rw-r--r--gcc/cfgloopanal.c24
-rw-r--r--gcc/cfgloopmanip.c4
-rw-r--r--gcc/cfgrtl.c10
-rw-r--r--gcc/cgraph.c52
-rw-r--r--gcc/cgraphunit.c8
-rw-r--r--gcc/collect2.c13
-rw-r--r--gcc/combine.c220
-rw-r--r--gcc/config/alpha/alpha.c2
-rw-r--r--gcc/config/alpha/vms.h3
-rw-r--r--gcc/config/arm/arm-protos.h2
-rw-r--r--gcc/config/arm/arm.c350
-rw-r--r--gcc/config/arm/arm.h2
-rw-r--r--gcc/config/arm/arm.md8
-rw-r--r--gcc/config/arm/uclinux-elf.h4
-rw-r--r--gcc/config/c4x/c4x.c14
-rw-r--r--gcc/config/chorus.h3
-rw-r--r--gcc/config/cris/cris.c8
-rw-r--r--gcc/config/darwin-c.c4
-rw-r--r--gcc/config/darwin.c8
-rw-r--r--gcc/config/frv/frv.c2
-rw-r--r--gcc/config/i386/djgpp.h8
-rw-r--r--gcc/config/i386/i386.c1196
-rw-r--r--gcc/config/i386/netware.h1
-rw-r--r--gcc/config/i386/nto.h3
-rw-r--r--gcc/config/i386/sco5.h10
-rw-r--r--gcc/config/i386/uwin.h2
-rw-r--r--gcc/config/ia64/ia64.c16
-rw-r--r--gcc/config/iq2000/iq2000.c2
-rw-r--r--gcc/config/linux.h7
-rw-r--r--gcc/config/m68hc11/m68hc11.c6
-rw-r--r--gcc/config/mips/linux.h3
-rw-r--r--gcc/config/mips/mips.c114
-rw-r--r--gcc/config/mips/mips.h3
-rw-r--r--gcc/config/mips/mips.md6
-rw-r--r--gcc/config/mips/netbsd.h4
-rw-r--r--gcc/config/pa/pa-hpux10.h21
-rw-r--r--gcc/config/pa/pa-hpux11.h18
-rw-r--r--gcc/config/pa/pa.h9
-rw-r--r--gcc/config/pa/pa64-hpux.h14
-rw-r--r--gcc/config/rs6000/beos.h3
-rw-r--r--gcc/config/rs6000/linux.h9
-rw-r--r--gcc/config/rs6000/linux64.h10
-rw-r--r--gcc/config/rs6000/rs6000-c.c2
-rw-r--r--gcc/config/rs6000/rs6000.c154
-rw-r--r--gcc/config/rs6000/rs6000.h1
-rw-r--r--gcc/config/rs6000/rs6000.opt3
-rw-r--r--gcc/config/s390/s390.c2
-rw-r--r--gcc/config/s390/tpf.h4
-rw-r--r--gcc/config/sh/predicates.md12
-rw-r--r--gcc/config/sh/sh.c291
-rw-r--r--gcc/config/sh/sh.h26
-rw-r--r--gcc/config/sparc/linux.h7
-rw-r--r--gcc/config/sparc/linux64.h7
-rw-r--r--gcc/config/sparc/netbsd-elf.h4
-rw-r--r--gcc/config/sparc/openbsd64.h3
-rw-r--r--gcc/config/sparc/sp64-elf.h3
-rw-r--r--gcc/config/sparc/sparc.c100
-rw-r--r--gcc/config/sparc/sparc.h1
-rw-r--r--gcc/config/sparc/sparc.md18
-rw-r--r--gcc/config/stormy16/stormy16.c2
-rw-r--r--gcc/config/stormy16/stormy16.h6
-rw-r--r--gcc/config/svr4.h16
-rw-r--r--gcc/config/xtensa/elf.h3
-rw-r--r--gcc/configure.ac5
-rw-r--r--gcc/conflict.c2
-rw-r--r--gcc/coverage.c10
-rw-r--r--gcc/cp/call.c5
-rw-r--r--gcc/cp/class.c13
-rw-r--r--gcc/cp/cp-gimplify.c3
-rw-r--r--gcc/cp/cp-lang.c1
-rw-r--r--gcc/cp/cp-objcp-common.c1
-rw-r--r--gcc/cp/cp-tree-code.h40
-rw-r--r--gcc/cp/cp-tree.h15
-rw-r--r--gcc/cp/cvt.c11
-rw-r--r--gcc/cp/cxx-pretty-print.c2
-rw-r--r--gcc/cp/decl.c23
-rw-r--r--gcc/cp/decl2.c3
-rw-r--r--gcc/cp/dump.c1
-rw-r--r--gcc/cp/error.c1
-rw-r--r--gcc/cp/except.c1
-rw-r--r--gcc/cp/expr.c5
-rw-r--r--gcc/cp/friend.c9
-rw-r--r--gcc/cp/init.c11
-rw-r--r--gcc/cp/lex.c1
-rw-r--r--gcc/cp/mangle.c27
-rw-r--r--gcc/cp/method.c1
-rw-r--r--gcc/cp/name-lookup.c59
-rw-r--r--gcc/cp/optimize.c1
-rw-r--r--gcc/cp/parser.c73
-rw-r--r--gcc/cp/pt.c193
-rw-r--r--gcc/cp/ptree.c1
-rw-r--r--gcc/cp/repo.c1
-rw-r--r--gcc/cp/rtti.c1
-rw-r--r--gcc/cp/search.c7
-rw-r--r--gcc/cp/semantics.c5
-rw-r--r--gcc/cp/tree.c23
-rw-r--r--gcc/cp/typeck.c7
-rw-r--r--gcc/cp/typeck2.c1
-rw-r--r--gcc/cppspec.c3
-rw-r--r--gcc/cse.c231
-rw-r--r--gcc/cselib.c8
-rw-r--r--gcc/dbxout.c14
-rw-r--r--gcc/debug.h2
-rw-r--r--gcc/df-core.c2
-rw-r--r--gcc/df-problems.c44
-rw-r--r--gcc/df-scan.c48
-rw-r--r--gcc/df.h1
-rw-r--r--gcc/diagnostic.h2
-rw-r--r--gcc/doc/tm.texi65
-rw-r--r--gcc/dominance.c14
-rw-r--r--gcc/double-int.c2
-rw-r--r--gcc/dummy-checksum.c1
-rw-r--r--gcc/dwarf2asm.c10
-rw-r--r--gcc/dwarf2out.c116
-rw-r--r--gcc/emit-rtl.c171
-rw-r--r--gcc/et-forest.c4
-rw-r--r--gcc/except.c306
-rw-r--r--gcc/explow.c14
-rw-r--r--gcc/expmed.c22
-rw-r--r--gcc/expr.c83
-rw-r--r--gcc/final.c52
-rw-r--r--gcc/fix-header.c2
-rw-r--r--gcc/flags.h8
-rw-r--r--gcc/flow.c74
-rw-r--r--gcc/fold-const.c42
-rw-r--r--gcc/fortran/Make-lang.in2
-rw-r--r--gcc/fortran/arith.c44
-rw-r--r--gcc/fortran/array.c108
-rw-r--r--gcc/fortran/bbt.c14
-rw-r--r--gcc/fortran/check.c322
-rw-r--r--gcc/fortran/data.c4
-rw-r--r--gcc/fortran/decl.c94
-rw-r--r--gcc/fortran/dump-parse-tree.c8
-rw-r--r--gcc/fortran/error.c6
-rw-r--r--gcc/fortran/expr.c94
-rw-r--r--gcc/fortran/f95-lang.c8
-rw-r--r--gcc/fortran/gfortran.h278
-rw-r--r--gcc/fortran/interface.c126
-rw-r--r--gcc/fortran/intrinsic.c74
-rw-r--r--gcc/fortran/intrinsic.h294
-rw-r--r--gcc/fortran/io.c56
-rw-r--r--gcc/fortran/iresolve.c4
-rw-r--r--gcc/fortran/match.c16
-rw-r--r--gcc/fortran/matchexp.c18
-rw-r--r--gcc/fortran/module.c104
-rw-r--r--gcc/fortran/openmp.c12
-rw-r--r--gcc/fortran/options.c2
-rw-r--r--gcc/fortran/parse.c17
-rw-r--r--gcc/fortran/parse.h2
-rw-r--r--gcc/fortran/primary.c10
-rw-r--r--gcc/fortran/resolve.c130
-rw-r--r--gcc/fortran/scanner.c32
-rw-r--r--gcc/fortran/simplify.c22
-rw-r--r--gcc/fortran/st.c12
-rw-r--r--gcc/fortran/symbol.c122
-rw-r--r--gcc/fortran/trans-const.c2
-rw-r--r--gcc/fortran/trans-expr.c34
-rw-r--r--gcc/fortran/trans-intrinsic.c20
-rw-r--r--gcc/fortran/trans-io.c13
-rw-r--r--gcc/fortran/trans-openmp.c4
-rw-r--r--gcc/fortran/trans-stmt.c2
-rw-r--r--gcc/fortran/trans-types.c14
-rw-r--r--gcc/fortran/trans.c2
-rw-r--r--gcc/fortran/trans.h8
-rw-r--r--gcc/function.c137
-rw-r--r--gcc/gcc.c435
-rw-r--r--gcc/gcc.h3
-rw-r--r--gcc/gcov-io.c2
-rw-r--r--gcc/gcse.c163
-rw-r--r--gcc/genattrtab.c41
-rw-r--r--gcc/genautomata.c137
-rw-r--r--gcc/genchecksum.c1
-rw-r--r--gcc/genemit.c10
-rw-r--r--gcc/genextract.c2
-rw-r--r--gcc/gengenrtl.c4
-rw-r--r--gcc/gengtype.c22
-rw-r--r--gcc/genmodes.c10
-rw-r--r--gcc/genoutput.c40
-rw-r--r--gcc/genpreds.c4
-rw-r--r--gcc/genrecog.c84
-rw-r--r--gcc/gensupport.c12
-rw-r--r--gcc/ggc-common.c12
-rw-r--r--gcc/ggc-page.c32
-rw-r--r--gcc/gimplify.c56
-rw-r--r--gcc/global.c32
-rw-r--r--gcc/graph.c16
-rw-r--r--gcc/haifa-sched.c24
-rw-r--r--gcc/ifcvt.c4
-rw-r--r--gcc/integrate.c6
-rw-r--r--gcc/intl.c2
-rw-r--r--gcc/ipa-cp.c2
-rw-r--r--gcc/ipa-inline.c14
-rw-r--r--gcc/ipa-pure-const.c14
-rw-r--r--gcc/ipa-reference.c30
-rw-r--r--gcc/ipa-type-escape.c2
-rw-r--r--gcc/ipa-utils.c16
-rw-r--r--gcc/ipa-utils.h2
-rw-r--r--gcc/ipa.c6
-rw-r--r--gcc/java/Make-lang.in2
-rw-r--r--gcc/java/buffer.c2
-rw-r--r--gcc/java/builtins.c14
-rw-r--r--gcc/java/check-init.c5
-rw-r--r--gcc/java/class.c76
-rw-r--r--gcc/java/constants.c20
-rw-r--r--gcc/java/decl.c69
-rw-r--r--gcc/java/except.c4
-rw-r--r--gcc/java/expr.c23
-rw-r--r--gcc/java/java-gimplify.c11
-rw-r--r--gcc/java/java-tree.h17
-rw-r--r--gcc/java/jcf-io.c28
-rw-r--r--gcc/java/jcf-parse.c60
-rw-r--r--gcc/java/jcf-path.c80
-rw-r--r--gcc/java/jcf-reader.c4
-rw-r--r--gcc/java/jcf-write.c75
-rw-r--r--gcc/java/jcf.h6
-rw-r--r--gcc/java/jvgenmain.c2
-rw-r--r--gcc/java/lang.c3
-rw-r--r--gcc/java/lex.c14
-rw-r--r--gcc/java/lex.h8
-rw-r--r--gcc/java/mangle.c6
-rw-r--r--gcc/java/parse-scan.y2
-rw-r--r--gcc/java/parse.h8
-rw-r--r--gcc/java/parse.y347
-rw-r--r--gcc/java/typeck.c4
-rw-r--r--gcc/java/verify-impl.c14
-rw-r--r--gcc/java/verify.h9
-rw-r--r--gcc/lambda-code.c10
-rw-r--r--gcc/lambda-mat.c2
-rw-r--r--gcc/lambda-trans.c2
-rw-r--r--gcc/lambda.h6
-rw-r--r--gcc/langhooks.h3
-rw-r--r--gcc/lcm.c24
-rw-r--r--gcc/lists.c4
-rw-r--r--gcc/local-alloc.c26
-rw-r--r--gcc/loop-invariant.c14
-rw-r--r--gcc/loop-iv.c42
-rw-r--r--gcc/loop-unroll.c22
-rw-r--r--gcc/loop-unswitch.c4
-rw-r--r--gcc/machmode.h10
-rw-r--r--gcc/mode-switching.c18
-rw-r--r--gcc/modulo-sched.c10
-rw-r--r--gcc/objc/objc-act.c248
-rw-r--r--gcc/objc/objc-act.h23
-rw-r--r--gcc/objc/objc-lang.c1
-rw-r--r--gcc/objc/objc-tree-code.h54
-rw-r--r--gcc/objcp/objcp-decl.c1
-rw-r--r--gcc/objcp/objcp-lang.c1
-rw-r--r--gcc/omp-low.c20
-rw-r--r--gcc/optabs.c120
-rw-r--r--gcc/optabs.h8
-rw-r--r--gcc/opts-common.c4
-rw-r--r--gcc/opts.c17
-rw-r--r--gcc/params.c2
-rw-r--r--gcc/passes.c40
-rw-r--r--gcc/postreload.c20
-rw-r--r--gcc/predict.c14
-rw-r--r--gcc/predict.h3
-rw-r--r--gcc/print-tree.c18
-rw-r--r--gcc/profile.c6
-rw-r--r--gcc/real.c12
-rw-r--r--gcc/recog.c84
-rw-r--r--gcc/recog.h4
-rw-r--r--gcc/reg-stack.c86
-rw-r--r--gcc/regclass.c164
-rw-r--r--gcc/regmove.c29
-rw-r--r--gcc/regrename.c151
-rw-r--r--gcc/reload.c254
-rw-r--r--gcc/reload.h2
-rw-r--r--gcc/reload1.c158
-rw-r--r--gcc/reorg.c94
-rw-r--r--gcc/rtl-factoring.c6
-rw-r--r--gcc/rtl.h24
-rw-r--r--gcc/rtlanal.c30
-rw-r--r--gcc/rtlhooks.c8
-rw-r--r--gcc/sbitmap.c6
-rw-r--r--gcc/scan.c2
-rw-r--r--gcc/sched-deps.c10
-rw-r--r--gcc/sched-ebb.c11
-rw-r--r--gcc/sched-int.h23
-rw-r--r--gcc/sched-rgn.c22
-rw-r--r--gcc/sdbout.c2
-rw-r--r--gcc/see.c87
-rw-r--r--gcc/simplify-rtx.c4
-rw-r--r--gcc/stmt.c36
-rw-r--r--gcc/stor-layout.c14
-rw-r--r--gcc/stringpool.c4
-rw-r--r--gcc/stub-objc.c2
-rw-r--r--gcc/system.h8
-rw-r--r--gcc/target.h15
-rw-r--r--gcc/targhooks.c18
-rw-r--r--gcc/tlink.c12
-rw-r--r--gcc/toplev.c16
-rw-r--r--gcc/tracer.c4
-rw-r--r--gcc/tree-cfg.c8
-rw-r--r--gcc/tree-complex.c16
-rw-r--r--gcc/tree-data-ref.c2
-rw-r--r--gcc/tree-dfa.c2
-rw-r--r--gcc/tree-dump.c22
-rw-r--r--gcc/tree-eh.c54
-rw-r--r--gcc/tree-if-conv.c12
-rw-r--r--gcc/tree-inline.c142
-rw-r--r--gcc/tree-inline.h11
-rw-r--r--gcc/tree-into-ssa.c64
-rw-r--r--gcc/tree-iterator.c4
-rw-r--r--gcc/tree-nested.c52
-rw-r--r--gcc/tree-phinodes.c2
-rw-r--r--gcc/tree-pretty-print.c8
-rw-r--r--gcc/tree-sra.c8
-rw-r--r--gcc/tree-ssa-ccp.c10
-rw-r--r--gcc/tree-ssa-copy.c12
-rw-r--r--gcc/tree-ssa-dom.c26
-rw-r--r--gcc/tree-ssa-dse.c16
-rw-r--r--gcc/tree-ssa-forwprop.c10
-rw-r--r--gcc/tree-ssa-loop-im.c30
-rw-r--r--gcc/tree-ssa-loop-ivopts.c32
-rw-r--r--gcc/tree-ssa-loop-niter.c15
-rw-r--r--gcc/tree-ssa-loop-prefetch.c6
-rw-r--r--gcc/tree-ssa-math-opts.c3
-rw-r--r--gcc/tree-ssa-operands.c62
-rw-r--r--gcc/tree-ssa-phiopt.c42
-rw-r--r--gcc/tree-ssa-pre.c26
-rw-r--r--gcc/tree-ssa-reassoc.c4
-rw-r--r--gcc/tree-ssa-sink.c2
-rw-r--r--gcc/tree-ssa-structalias.c14
-rw-r--r--gcc/tree-ssa-threadupdate.c10
-rw-r--r--gcc/tree-ssanames.c2
-rw-r--r--gcc/tree-vect-patterns.c2
-rw-r--r--gcc/tree-vect-transform.c8
-rw-r--r--gcc/tree-vectorizer.c8
-rw-r--r--gcc/tree-vrp.c12
-rw-r--r--gcc/tree.c133
-rw-r--r--gcc/tree.h4
-rw-r--r--gcc/treelang/Make-lang.in1
-rw-r--r--gcc/treelang/lex.l2
-rw-r--r--gcc/treelang/parse.y108
-rw-r--r--gcc/treelang/tree1.c14
-rw-r--r--gcc/treelang/treetree.c25
-rw-r--r--gcc/value-prof.c14
-rw-r--r--gcc/var-tracking.c38
-rw-r--r--gcc/varasm.c66
-rw-r--r--gcc/varray.c8
-rw-r--r--gcc/vec.c6
-rw-r--r--gcc/vec.h4
-rw-r--r--include/libiberty.h7
-rw-r--r--intl/bindtextdom.c18
-rw-r--r--intl/dcgettext.c5
-rw-r--r--intl/dcigettext.c45
-rw-r--r--intl/dcngettext.c8
-rw-r--r--intl/dgettext.c4
-rw-r--r--intl/dngettext.c8
-rw-r--r--intl/eval-plural.h4
-rw-r--r--intl/explodename.c18
-rw-r--r--intl/finddomain.c7
-rw-r--r--intl/gettext.c3
-rw-r--r--intl/gettextP.h4
-rw-r--r--intl/gmo.h18
-rw-r--r--intl/hash-string.h3
-rw-r--r--intl/intl-compat.c44
-rw-r--r--intl/l10nflist.c44
-rw-r--r--intl/loadmsgcat.c32
-rw-r--r--intl/localcharset.c150
-rw-r--r--intl/localealias.c15
-rw-r--r--intl/localename.c4
-rw-r--r--intl/log.c13
-rw-r--r--intl/ngettext.c6
-rw-r--r--intl/plural-exp.c6
-rw-r--r--intl/plural-exp.h49
-rw-r--r--intl/plural.y46
-rw-r--r--intl/textdomain.c3
-rw-r--r--libiberty/argv.c4
-rw-r--r--libiberty/floatformat.c5
-rw-r--r--libiberty/strncmp.c2
-rw-r--r--libiberty/strverscmp.c7
-rw-r--r--zlib/adler32.c10
-rw-r--r--zlib/compress.c18
-rw-r--r--zlib/crc32.c31
-rw-r--r--zlib/deflate.c104
-rw-r--r--zlib/gzio.c99
-rw-r--r--zlib/infback.c100
-rw-r--r--zlib/inffast.c32
-rw-r--r--zlib/inflate.c138
-rw-r--r--zlib/inftrees.c47
-rw-r--r--zlib/trees.c109
-rw-r--r--zlib/uncompr.c7
-rw-r--r--zlib/zutil.c12
414 files changed, 7045 insertions, 7490 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 4b7100913af..2cce99656fc 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1573,10 +1573,10 @@ s-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
c-errors.o: c-errors.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(C_TREE_H) $(FLAGS_H) $(DIAGNOSTIC_H) $(TM_P_H)
-c-parser.o : c-parser.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
- $(GGC_H) $(TIMEVAR_H) $(C_TREE_H) input.h $(FLAGS_H) toplev.h output.h \
- $(CPPLIB_H) gt-c-parser.h langhooks.h $(C_COMMON_H) $(C_PRAGMA_H) \
- vec.h $(TARGET_H)
+c-parser.o : c-parser.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ c-tree-code.h $(TREE_H) $(GGC_H) $(TIMEVAR_H) $(C_TREE_H) input.h \
+ $(FLAGS_H) toplev.h output.h $(CPPLIB_H) gt-c-parser.h langhooks.h \
+ $(C_COMMON_H) $(C_PRAGMA_H) vec.h $(TARGET_H)
srcextra: gcc.srcextra lang.srcextra
@@ -1587,15 +1587,15 @@ c-incpath.o: c-incpath.c c-incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \
intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \
$(MACHMODE_H)
-c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
- $(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) output.h \
- $(EXPR_H) debug.h toplev.h intl.h $(TM_P_H) $(TREE_INLINE_H) $(TIMEVAR_H) \
- opts.h $(C_PRAGMA_H) gt-c-decl.h $(CGRAPH_H) $(HASHTAB_H) libfuncs.h \
- except.h $(LANGHOOKS_DEF_H) $(TREE_DUMP_H) $(C_COMMON_H) $(CPPLIB_H) \
- $(DIAGNOSTIC_H) input.h langhooks.h $(TREE_GIMPLE_H) tree-mudflap.h \
- pointer-set.h
+c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h \
+ c-tree-code.h $(TREE_H) $(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) \
+ $(FLAGS_H) $(FUNCTION_H) output.h $(EXPR_H) debug.h toplev.h $(TM_P_H) \
+ $(TREE_INLINE_H) $(TIMEVAR_H) opts.h $(C_PRAGMA_H) gt-c-decl.h \
+ $(CGRAPH_H) $(HASHTAB_H) libfuncs.h except.h $(LANGHOOKS_DEF_H) \
+ $(TREE_DUMP_H) $(C_COMMON_H) $(CPPLIB_H) $(DIAGNOSTIC_H) input.h \
+ langhooks.h $(TREE_GIMPLE_H) tree-mudflap.h pointer-set.h
c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h output.h $(EXPR_H) \
+ c-tree-code.h $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h output.h $(EXPR_H) \
$(RTL_H) toplev.h $(TM_P_H) langhooks.h $(GGC_H) $(TREE_FLOW_H) \
$(TREE_GIMPLE_H) tree-iterator.h
c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
@@ -1656,7 +1656,7 @@ c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
intl.h opts.h $(REAL_H) $(CPPLIB_H) $(TREE_INLINE_H) $(HASHTAB_H) \
$(BUILTINS_DEF)
-c-pretty-print.o : c-pretty-print.c $(C_PRETTY_PRINT_H) \
+c-pretty-print.o : c-pretty-print.c c-tree-code.h $(C_PRETTY_PRINT_H) \
$(C_TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(REAL_H) \
$(DIAGNOSTIC_H) tree-iterator.h
@@ -2047,7 +2047,7 @@ tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(FUNCTION_H) langhooks.h $(FLAGS_H) $(CGRAPH_H) $(TREE_INLINE_H) \
tree-mudflap.h $(GGC_H) $(CGRAPH_H) tree-pass.h $(CFGLOOP_H) \
$(BASIC_BLOCK_H) graph.h hard-reg-set.h
-c-gimplify.o : c-gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
+c-gimplify.o : c-gimplify.c $(CONFIG_H) $(SYSTEM_H) c-tree-code.h $(TREE_H) \
$(C_TREE_H) $(C_COMMON_H) $(DIAGNOSTIC_H) $(TREE_GIMPLE_H) $(VARRAY_H) \
$(FLAGS_H) langhooks.h toplev.h $(RTL_H) $(TREE_FLOW_H) $(LANGHOOKS_DEF_H) \
$(TM_H) coretypes.h $(C_PRETTY_PRINT_H) $(CGRAPH_H) $(BASIC_BLOCK_H) \
diff --git a/gcc/alias.c b/gcc/alias.c
index 7c51ad79dd6..a6cc14ed67c 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -128,7 +128,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
However, this is no actual entry for alias set zero. It is an
error to attempt to explicitly construct a subset of zero. */
-struct alias_set_entry GTY(())
+struct alias_set_entry_s GTY(())
{
/* The alias set number, as stored in MEM_ALIAS_SET. */
HOST_WIDE_INT alias_set;
@@ -146,7 +146,7 @@ struct alias_set_entry GTY(())
alias set the same as alias set zero. */
int has_zero_child;
};
-typedef struct alias_set_entry *alias_set_entry;
+typedef struct alias_set_entry_s *alias_set_entry;
static int rtx_equal_for_memref_p (rtx, rtx);
static rtx find_symbolic_term (rtx);
@@ -670,7 +670,7 @@ record_alias_subset (HOST_WIDE_INT superset, HOST_WIDE_INT subset)
{
/* Create an entry for the SUPERSET, so that we have a place to
attach the SUBSET. */
- superset_entry = ggc_alloc (sizeof (struct alias_set_entry));
+ superset_entry = (alias_set_entry) ggc_alloc (sizeof (struct alias_set_entry_s));
superset_entry->alias_set = superset;
superset_entry->children
= splay_tree_new_ggc (splay_tree_compare_ints);
@@ -2421,8 +2421,8 @@ init_alias_analysis (void)
timevar_push (TV_ALIAS_ANALYSIS);
reg_known_value_size = maxreg - FIRST_PSEUDO_REGISTER;
- reg_known_value = ggc_calloc (reg_known_value_size, sizeof (rtx));
- reg_known_equiv_p = xcalloc (reg_known_value_size, sizeof (bool));
+ reg_known_value = (rtx *) ggc_calloc (reg_known_value_size, sizeof (rtx));
+ reg_known_equiv_p = XCNEWVEC (bool, reg_known_value_size);
/* If we have memory allocated from the previous run, use it. */
if (old_reg_base_value)
diff --git a/gcc/alloc-pool.c b/gcc/alloc-pool.c
index fb40577953b..b91829d7f8f 100644
--- a/gcc/alloc-pool.c
+++ b/gcc/alloc-pool.c
@@ -146,7 +146,7 @@ create_alloc_pool (const char *name, size_t size, size_t num)
pool_size = sizeof (struct alloc_pool_def);
/* and allocate that much memory. */
- pool = xmalloc (pool_size);
+ pool = (alloc_pool) xmalloc (pool_size);
/* Now init the various pieces of our pool structure. */
pool->name = /*xstrdup (name)*/name;
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 67c09226ad1..ccc35350b72 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -355,6 +355,12 @@ enum bb_flags
#define BB_COPY_PARTITION(dstbb, srcbb) \
BB_SET_PARTITION (dstbb, BB_PARTITION (srcbb))
+enum profile_status {
+ PROFILE_ABSENT,
+ PROFILE_GUESSED,
+ PROFILE_READ
+};
+
/* A structure to group all the per-function control flow graph data.
The x_* prefixing is necessary because otherwise references to the
fields of this struct are interpreted as the defines for backward
@@ -382,11 +388,7 @@ struct control_flow_graph GTY(())
only used for the tree CFG. */
VEC(basic_block,gc) *x_label_to_block_map;
- enum profile_status {
- PROFILE_ABSENT,
- PROFILE_GUESSED,
- PROFILE_READ
- } x_profile_status;
+ enum profile_status x_profile_status;
};
/* Defines for accessing the fields of the CFG structure for function FN. */
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index bf8c6afe05f..66b7eafbac4 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -277,7 +277,7 @@ find_traces (int *n_traces, struct trace *traces)
basic_block bb;
fprintf (dump_file, "Trace %d (round %d): ", i + 1,
traces[i].round + 1);
- for (bb = traces[i].first; bb != traces[i].last; bb = bb->aux)
+ for (bb = traces[i].first; bb != traces[i].last; bb = (basic_block) bb->aux)
fprintf (dump_file, "%d [%d] ", bb->index, bb->frequency);
fprintf (dump_file, "%d [%d]\n", bb->index, bb->frequency);
}
@@ -357,7 +357,7 @@ rotate_loop (edge back_edge, struct trace *trace, int trace_n)
}
}
}
- bb = bb->aux;
+ bb = (basic_block) bb->aux;
}
while (bb != back_edge->dest);
@@ -367,7 +367,7 @@ rotate_loop (edge back_edge, struct trace *trace, int trace_n)
the trace. */
if (back_edge->dest == trace->first)
{
- trace->first = best_bb->aux;
+ trace->first = (basic_block) best_bb->aux;
}
else
{
@@ -375,7 +375,7 @@ rotate_loop (edge back_edge, struct trace *trace, int trace_n)
for (prev_bb = trace->first;
prev_bb->aux != back_edge->dest;
- prev_bb = prev_bb->aux)
+ prev_bb = (basic_block) prev_bb->aux)
;
prev_bb->aux = best_bb->aux;
@@ -441,7 +441,7 @@ find_traces_1_round (int branch_th, int exec_th, gcov_type count_th,
fibheapkey_t key;
edge_iterator ei;
- bb = fibheap_extract_min (*heap);
+ bb = (basic_block) fibheap_extract_min (*heap);
bbd[bb->index].heap = NULL;
bbd[bb->index].node = NULL;
@@ -779,7 +779,7 @@ copy_bb (basic_block old_bb, edge e, basic_block bb, int trace)
new_size = MAX (last_basic_block, new_bb->index + 1);
new_size = GET_ARRAY_SIZE (new_size);
- bbd = xrealloc (bbd, new_size * sizeof (bbro_basic_block_data));
+ bbd = (bbro_basic_block_data *) xrealloc (bbd, new_size * sizeof (bbro_basic_block_data));
for (i = array_size; i < new_size; i++)
{
bbd[i].start_of_trace = -1;
@@ -1142,7 +1142,7 @@ connect_traces (int n_traces, struct trace *traces)
basic_block bb;
fprintf (dump_file, "Final order:\n");
- for (bb = traces[0].first; bb; bb = bb->aux)
+ for (bb = traces[0].first; bb; bb = (basic_block) bb->aux)
fprintf (dump_file, "%d ", bb->index);
fprintf (dump_file, "\n");
fflush (dump_file);
@@ -1254,7 +1254,7 @@ find_rarely_executed_basic_blocks_and_crossing_edges (edge *crossing_edges,
if (i == *max_idx)
{
*max_idx *= 2;
- crossing_edges = xrealloc (crossing_edges,
+ crossing_edges = (edge *) xrealloc (crossing_edges,
(*max_idx) * sizeof (edge));
}
crossing_edges[i++] = e;
@@ -2272,12 +2272,12 @@ gate_handle_partition_blocks (void)
static unsigned int
rest_of_handle_partition_blocks (void)
{
- no_new_pseudos = 0;
+ no_new_pseudos = false;
partition_hot_cold_basic_blocks ();
allocate_reg_life_data ();
update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
PROP_LOG_LINKS | PROP_REG_INFO | PROP_DEATH_NOTES);
- no_new_pseudos = 1;
+ no_new_pseudos = true;
return 0;
}
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index 4ac38b04c2b..d42b12b3a51 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -186,7 +186,7 @@ bitmap_elt_clear_from (bitmap head, bitmap_element *elt)
/* Clear a bitmap by freeing the linked list. */
-inline void
+void
bitmap_clear (bitmap head)
{
if (head->first)
@@ -240,7 +240,7 @@ bitmap_obstack_alloc (bitmap_obstack *bit_obstack)
bit_obstack = &bitmap_default_obstack;
map = bit_obstack->heads;
if (map)
- bit_obstack->heads = (void *)map->first;
+ bit_obstack->heads = (bitmap) map->first;
else
map = XOBNEW (&bit_obstack->obstack, bitmap_head);
bitmap_initialize (map, bit_obstack);
@@ -269,7 +269,7 @@ bitmap_obstack_free (bitmap map)
if (map)
{
bitmap_clear (map);
- map->first = (void *)map->obstack->heads;
+ map->first = (bitmap_element *)map->obstack->heads;
map->obstack->heads = map;
}
}
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index bd1761616c9..1d792ab3b65 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -281,7 +281,7 @@ find_btr_def_group (btr_def_group *all_btr_def_groups, btr_def def)
if (!this_group)
{
- this_group = obstack_alloc (&migrate_btrl_obstack,
+ this_group = (btr_def_group) obstack_alloc (&migrate_btrl_obstack,
sizeof (struct btr_def_group_s));
this_group->src = def_src;
this_group->members = NULL;
@@ -304,31 +304,31 @@ add_btr_def (fibheap_t all_btr_defs, basic_block bb, int insn_luid, rtx insn,
unsigned int dest_reg, int other_btr_uses_before_def,
btr_def_group *all_btr_def_groups)
{
- btr_def this
- = obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_def_s));
- this->bb = bb;
- this->luid = insn_luid;
- this->insn = insn;
- this->btr = dest_reg;
- this->cost = basic_block_freq (bb);
- this->has_ambiguous_use = 0;
- this->other_btr_uses_before_def = other_btr_uses_before_def;
- this->other_btr_uses_after_use = 0;
- this->next_this_bb = NULL;
- this->next_this_group = NULL;
- this->uses = NULL;
- this->live_range = NULL;
- find_btr_def_group (all_btr_def_groups, this);
-
- fibheap_insert (all_btr_defs, -this->cost, this);
+ btr_def it
+ = (btr_def) obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_def_s));
+ it->bb = bb;
+ it->luid = insn_luid;
+ it->insn = insn;
+ it->btr = dest_reg;
+ it->cost = basic_block_freq (bb);
+ it->has_ambiguous_use = 0;
+ it->other_btr_uses_before_def = other_btr_uses_before_def;
+ it->other_btr_uses_after_use = 0;
+ it->next_this_bb = NULL;
+ it->next_this_group = NULL;
+ it->uses = NULL;
+ it->live_range = NULL;
+ find_btr_def_group (all_btr_def_groups, it);
+
+ fibheap_insert (all_btr_defs, -it->cost, it);
if (dump_file)
fprintf (dump_file,
"Found target reg definition: sets %u { bb %d, insn %d }%s priority %d\n",
- dest_reg, bb->index, INSN_UID (insn), (this->group ? "" : ":not const"),
- this->cost);
+ dest_reg, bb->index, INSN_UID (insn), (it->group ? "" : ":not const"),
+ it->cost);
- return this;
+ return it;
}
/* Create a new target register user structure, for a use in block BB,
@@ -356,7 +356,7 @@ new_btr_user (basic_block bb, int insn_luid, rtx insn)
usep = NULL;
}
use = usep ? *usep : NULL_RTX;
- user = obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_user_s));
+ user = (struct btr_user_s *) obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_user_s));
user->bb = bb;
user->luid = insn_luid;
user->insn = insn;
@@ -427,7 +427,7 @@ typedef struct {
static void
note_btr_set (rtx dest, rtx set ATTRIBUTE_UNUSED, void *data)
{
- defs_uses_info *info = data;
+ defs_uses_info *info = (defs_uses_info *) data;
int regno, end_regno;
if (!REG_P (dest))
@@ -1278,7 +1278,7 @@ migrate_btr_def (btr_def def, int min_cost)
HARD_REG_SET btrs_live_in_range;
int btr_used_near_def = 0;
int def_basic_block_freq;
- basic_block try;
+ basic_block check;
int give_up = 0;
int def_moved = 0;
btr_user user;
@@ -1332,31 +1332,31 @@ migrate_btr_def (btr_def def, int min_cost)
def_basic_block_freq = basic_block_freq (def->bb);
- for (try = get_immediate_dominator (CDI_DOMINATORS, def->bb);
- !give_up && try && try != ENTRY_BLOCK_PTR && def->cost >= min_cost;
- try = get_immediate_dominator (CDI_DOMINATORS, try))
+ for (check = get_immediate_dominator (CDI_DOMINATORS, def->bb);
+ !give_up && check && check != ENTRY_BLOCK_PTR && def->cost >= min_cost;
+ check = get_immediate_dominator (CDI_DOMINATORS, check))
{
/* Try to move the instruction that sets the target register into
basic block TRY. */
- int try_freq = basic_block_freq (try);
+ int try_freq = basic_block_freq (check);
edge_iterator ei;
edge e;
/* If TRY has abnormal edges, skip it. */
- FOR_EACH_EDGE (e, ei, try->succs)
+ FOR_EACH_EDGE (e, ei, check->succs)
if (e->flags & EDGE_COMPLEX)
break;
if (e)
continue;
if (dump_file)
- fprintf (dump_file, "trying block %d ...", try->index);
+ fprintf (dump_file, "trying block %d ...", check->index);
if (try_freq < def_basic_block_freq
|| (try_freq == def_basic_block_freq && btr_used_near_def))
{
int btr;
- augment_live_range (live_range, &btrs_live_in_range, def->bb, try,
+ augment_live_range (live_range, &btrs_live_in_range, def->bb, check,
flag_btr_bb_exclusive);
if (dump_file)
{
@@ -1367,7 +1367,7 @@ migrate_btr_def (btr_def def, int min_cost)
btr = choose_btr (btrs_live_in_range);
if (btr != -1)
{
- move_btr_def (try, btr, def, live_range, &btrs_live_in_range);
+ move_btr_def (check, btr, def, live_range, &btrs_live_in_range);
bitmap_copy(live_range, def->live_range);
btr_used_near_def = 0;
def_moved = 1;
@@ -1421,7 +1421,7 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
CLEAR_HARD_REG_SET (all_btrs);
for (first_btr = -1, reg = 0; reg < FIRST_PSEUDO_REGISTER; reg++)
- if (TEST_HARD_REG_BIT (reg_class_contents[(int) btr_class], reg)
+ if (TEST_HARD_REG_BIT (reg_class_contents[btr_class], reg)
&& (allow_callee_save || call_used_regs[reg] || regs_ever_live[reg]))
{
SET_HARD_REG_BIT (all_btrs, reg);
@@ -1430,14 +1430,14 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
first_btr = reg;
}
- btrs_live = xcalloc (n_basic_blocks, sizeof (HARD_REG_SET));
- btrs_live_at_end = xcalloc (n_basic_blocks, sizeof (HARD_REG_SET));
+ btrs_live = XCNEWVEC (HARD_REG_SET, n_basic_blocks);
+ btrs_live_at_end = XCNEWVEC (HARD_REG_SET, n_basic_blocks);
build_btr_def_use_webs (all_btr_defs);
while (!fibheap_empty (all_btr_defs))
{
- btr_def def = fibheap_extract_min (all_btr_defs);
+ btr_def def = (btr_def) fibheap_extract_min (all_btr_defs);
int min_cost = -fibheap_min_key (all_btr_defs);
if (migrate_btr_def (def, min_cost))
{
@@ -1462,8 +1462,8 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
void
branch_target_load_optimize (bool after_prologue_epilogue_gen)
{
- enum reg_class class = targetm.branch_target_register_class ();
- if (class != NO_REGS)
+ enum reg_class btr_class = (enum reg_class) targetm.branch_target_register_class ();
+ if (btr_class != NO_REGS)
{
/* Initialize issue_rate. */
if (targetm.sched.issue_rate)
@@ -1482,7 +1482,7 @@ branch_target_load_optimize (bool after_prologue_epilogue_gen)
/* Dominator info is also needed for migrate_btr_def. */
calculate_dominance_info (CDI_DOMINATORS);
- migrate_btr_defs (class,
+ migrate_btr_defs (btr_class,
(targetm.branch_target_register_callee_saved
(after_prologue_epilogue_gen)));
diff --git a/gcc/builtins.c b/gcc/builtins.c
index ecee42b69be..16de7658e6f 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -1252,7 +1252,7 @@ result_vector (int savep, rtx result)
int regno, size, align, nelts;
enum machine_mode mode;
rtx reg, mem;
- rtx *savevec = alloca (FIRST_PSEUDO_REGISTER * sizeof (rtx));
+ rtx *savevec = (rtx *) alloca (FIRST_PSEUDO_REGISTER * sizeof (rtx));
size = nelts = 0;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
@@ -1862,7 +1862,7 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget)
exp = build_function_call_expr (fndecl, arglist);
}
- op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+ op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
start_sequence ();
@@ -2111,7 +2111,7 @@ expand_builtin_mathfn_3 (tree exp, rtx target, rtx subtarget)
exp = build_function_call_expr (fndecl, arglist);
}
- op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+ op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
start_sequence ();
@@ -2270,7 +2270,7 @@ expand_builtin_int_roundingfn (tree exp, rtx target, rtx subtarget)
exp = build_function_call_expr (fndecl, arglist);
}
- op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+ op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
start_sequence ();
@@ -2363,7 +2363,7 @@ expand_builtin_int_roundingfn_2 (tree exp, rtx target, rtx subtarget)
exp = build_function_call_expr (fndecl, arglist);
}
- op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+ op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
start_sequence ();
@@ -2634,7 +2634,7 @@ expand_builtin_pow (tree exp, rtx target, rtx subtarget)
&& powi_cost (n) <= POWI_MAX_MULTS))
{
enum machine_mode mode = TYPE_MODE (TREE_TYPE (exp));
- rtx op = expand_expr (arg0, subtarget, VOIDmode, 0);
+ rtx op = expand_expr (arg0, subtarget, VOIDmode, EXPAND_NORMAL);
op = force_reg (mode, op);
return expand_powi (op, mode, n);
}
@@ -2682,7 +2682,7 @@ expand_builtin_powi (tree exp, rtx target, rtx subtarget)
|| (! optimize_size
&& powi_cost (n) <= POWI_MAX_MULTS)))
{
- op0 = expand_expr (arg0, subtarget, VOIDmode, 0);
+ op0 = expand_expr (arg0, subtarget, VOIDmode, EXPAND_NORMAL);
op0 = force_reg (mode, op0);
return expand_powi (op0, mode, n);
}
@@ -2696,10 +2696,10 @@ expand_builtin_powi (tree exp, rtx target, rtx subtarget)
if (target == NULL_RTX)
target = gen_reg_rtx (mode);
- op0 = expand_expr (arg0, subtarget, mode, 0);
+ op0 = expand_expr (arg0, subtarget, mode, EXPAND_NORMAL);
if (GET_MODE (op0) != mode)
op0 = convert_to_mode (mode, op0, 0);
- op1 = expand_expr (arg1, 0, mode2, 0);
+ op1 = expand_expr (arg1, 0, mode2, EXPAND_NORMAL);
if (GET_MODE (op1) != mode2)
op1 = convert_to_mode (mode2, op1, 0);
@@ -3450,7 +3450,7 @@ builtin_memset_read_str (void *data, HOST_WIDE_INT offset ATTRIBUTE_UNUSED,
enum machine_mode mode)
{
const char *c = (const char *) data;
- char *p = alloca (GET_MODE_SIZE (mode));
+ char *p = (char *) alloca (GET_MODE_SIZE (mode));
memset (p, *c, GET_MODE_SIZE (mode));
@@ -3474,7 +3474,7 @@ builtin_memset_gen_str (void *data, HOST_WIDE_INT offset ATTRIBUTE_UNUSED,
if (size == 1)
return (rtx) data;
- p = alloca (size);
+ p = (char *) alloca (size);
memset (p, 1, size);
coeff = c_readstr (p, mode);
@@ -4685,7 +4685,7 @@ expand_builtin_unop (enum machine_mode target_mode, tree arglist, rtx target,
return 0;
/* Compute the argument. */
- op0 = expand_expr (TREE_VALUE (arglist), subtarget, VOIDmode, 0);
+ op0 = expand_expr (TREE_VALUE (arglist), subtarget, VOIDmode, EXPAND_NORMAL);
/* Compute op, into TARGET if possible.
Set TARGET to wherever the result comes back. */
target = expand_unop (TYPE_MODE (TREE_TYPE (TREE_VALUE (arglist))),
@@ -4803,21 +4803,21 @@ expand_builtin_expect_jump (tree exp, rtx if_false_label, rtx if_true_label)
rtx ifelse = SET_SRC (pc_set (insn));
rtx then_dest = XEXP (ifelse, 1);
rtx else_dest = XEXP (ifelse, 2);
- int taken = -1;
+ enum prediction taken = NO_PREDICTION;
/* First check if we recognize any of the labels. */
if (GET_CODE (then_dest) == LABEL_REF
&& XEXP (then_dest, 0) == if_true_label)
- taken = 1;
+ taken = TAKEN;
else if (GET_CODE (then_dest) == LABEL_REF
&& XEXP (then_dest, 0) == if_false_label)
- taken = 0;
+ taken = NOT_TAKEN;
else if (GET_CODE (else_dest) == LABEL_REF
&& XEXP (else_dest, 0) == if_false_label)
- taken = 1;
+ taken = TAKEN;
else if (GET_CODE (else_dest) == LABEL_REF
&& XEXP (else_dest, 0) == if_true_label)
- taken = 0;
+ taken = NOT_TAKEN;
/* Otherwise check where we drop through. */
else if (else_dest == pc_rtx)
{
@@ -4833,9 +4833,9 @@ expand_builtin_expect_jump (tree exp, rtx if_false_label, rtx if_true_label)
/* TEMP is either a CODE_LABEL, NULL_RTX or something
else that can't possibly match either target label. */
if (temp == if_false_label)
- taken = 1;
+ taken = TAKEN;
else if (temp == if_true_label)
- taken = 0;
+ taken = NOT_TAKEN;
}
else if (then_dest == pc_rtx)
{
@@ -4849,17 +4849,17 @@ expand_builtin_expect_jump (tree exp, rtx if_false_label, rtx if_true_label)
temp = next;
if (temp == if_false_label)
- taken = 0;
+ taken = NOT_TAKEN;
else if (temp == if_true_label)
- taken = 1;
+ taken = TAKEN;
}
- if (taken != -1)
+ if (taken != NO_PREDICTION)
{
/* If the test is expected to fail, reverse the
probabilities. */
if (integer_zerop (arg1))
- taken = 1 - taken;
+ taken = (taken == TAKEN ? NOT_TAKEN : TAKEN);
predict_insn_def (insn, PRED_BUILTIN_EXPECT, taken);
}
}
@@ -4901,7 +4901,7 @@ expand_builtin_fabs (tree arglist, rtx target, rtx subtarget)
arg = TREE_VALUE (arglist);
mode = TYPE_MODE (TREE_TYPE (arg));
- op0 = expand_expr (arg, subtarget, VOIDmode, 0);
+ op0 = expand_expr (arg, subtarget, VOIDmode, EXPAND_NORMAL);
return expand_abs (mode, op0, target, 0, safe_from_p (target, arg, 1));
}
@@ -5040,7 +5040,7 @@ expand_builtin_printf (tree exp, rtx target, enum machine_mode mode,
{
/* Create a NUL-terminated string that's one char shorter
than the original, stripping off the trailing '\n'. */
- char *newstr = alloca (len);
+ char *newstr = (char *) alloca (len);
memcpy (newstr, fmt_str, len - 1);
newstr[len - 1] = 0;
@@ -5257,18 +5257,18 @@ expand_builtin_sprintf (tree arglist, rtx target, enum machine_mode mode)
static rtx
expand_builtin_profile_func (bool exitp)
{
- rtx this, which;
+ rtx it, which;
- this = DECL_RTL (current_function_decl);
- gcc_assert (MEM_P (this));
- this = XEXP (this, 0);
+ it = DECL_RTL (current_function_decl);
+ gcc_assert (MEM_P (it));
+ it = XEXP (it, 0);
if (exitp)
which = profile_function_exit_libfunc;
else
which = profile_function_entry_libfunc;
- emit_library_call (which, LCT_NORMAL, VOIDmode, 2, this, Pmode,
+ emit_library_call (which, LCT_NORMAL, VOIDmode, 2, it, Pmode,
expand_builtin_return_addr (BUILT_IN_RETURN_ADDRESS,
0),
Pmode);
@@ -6132,7 +6132,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
/* This is copied from the handling of non-local gotos. */
expand_builtin_setjmp_setup (buf_addr, label_r);
nonlocal_goto_handler_labels
- = gen_rtx_EXPR_LIST (VOIDmode, label_r,
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, label_r,
nonlocal_goto_handler_labels);
/* ??? Do not let expand_label treat us as such since we would
not want to be both on the list of non-local labels and on
@@ -9308,7 +9308,7 @@ validate_arglist (tree arglist, ...)
do
{
- code = va_arg (ap, enum tree_code);
+ code = (enum tree_code) va_arg (ap, int);
switch (code)
{
case 0:
@@ -11066,7 +11066,7 @@ fold_builtin_printf (tree fndecl, tree arglist, bool ignore,
{
/* Create a NUL-terminated string that's one char shorter
than the original, stripping off the trailing '\n'. */
- char *newstr = alloca (len);
+ char *newstr = (char *) alloca (len);
memcpy (newstr, str, len - 1);
newstr[len - 1] = 0;
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 62d5261e5f7..dfe14784ea3 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -24,6 +24,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "coretypes.h"
#include "tm.h"
#include "intl.h"
+#include "c-tree-code.h"
#include "tree.h"
#include "flags.h"
#include "output.h"
@@ -3043,8 +3044,6 @@ enum c_builtin_type
BT_LAST
};
-typedef enum c_builtin_type builtin_type;
-
/* A temporary array for c_common_nodes_and_builtins. Used in
communication with def_fn_type. */
static tree builtin_types[(int) BT_LAST + 1];
@@ -3059,7 +3058,7 @@ static tree builtin_types[(int) BT_LAST + 1];
should be error_mark_node. */
static void
-def_fn_type (builtin_type def, builtin_type ret, bool var, int n, ...)
+def_fn_type (enum c_builtin_type def, enum c_builtin_type ret, bool var, int n, ...)
{
tree args = NULL, t;
va_list list;
@@ -3068,7 +3067,7 @@ def_fn_type (builtin_type def, builtin_type ret, bool var, int n, ...)
va_start (list, n);
for (i = 0; i < n; ++i)
{
- builtin_type a = va_arg (list, builtin_type);
+ enum c_builtin_type a = (enum c_builtin_type) va_arg (list, int);
t = builtin_types[a];
if (t == error_mark_node)
goto egress;
@@ -3976,7 +3975,7 @@ c_expand_expr (tree exp, rtx target, enum machine_mode tmode,
literal, then return the variable. */
tree decl = COMPOUND_LITERAL_EXPR_DECL (exp);
emit_local_var (decl);
- return expand_expr_real (decl, target, tmode, modifier, alt_rtl);
+ return expand_expr_real (decl, target, tmode, (enum expand_modifier) modifier, alt_rtl);
}
default:
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 633990a3a35..9225570eb6f 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -723,16 +723,6 @@ extern void finish_file (void);
#define COMPOUND_LITERAL_EXPR_DECL(NODE) \
DECL_EXPR_DECL (COMPOUND_LITERAL_EXPR_DECL_STMT (NODE))
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
-
-enum c_tree_code {
- C_DUMMY_TREE_CODE = LAST_AND_UNUSED_TREE_CODE,
-#include "c-common.def"
- LAST_C_TREE_CODE
-};
-
-#undef DEFTREECODE
-
extern int anon_aggr_type_p (tree);
/* For a VAR_DECL that is an anonymous union, these are the various
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 4b3ee627cec..37d4ff84536 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -32,6 +32,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "input.h"
#include "tm.h"
#include "intl.h"
+#include "c-tree-code.h"
#include "tree.h"
#include "tree-inline.h"
#include "rtl.h"
@@ -73,10 +74,10 @@ enum decl_context
/* Nonzero if we have seen an invalid cross reference
to a struct, union, or enum, but not yet printed the message. */
-tree pending_invalid_xref;
+static tree pending_invalid_xref;
/* File and line to appear in the eventual error message. */
-location_t pending_invalid_xref_location;
+static location_t pending_invalid_xref_location;
/* True means we've initialized exception handling. */
bool c_eh_initialized_p;
@@ -134,29 +135,29 @@ static GTY(()) tree all_translation_units;
/* A list of decls to be made automatically visible in each file scope. */
static GTY(()) tree visible_builtins;
-/* Set to 0 at beginning of a function definition, set to 1 if
+/* Set to false at beginning of a function definition, set to true if
a return statement that specifies a return value is seen. */
-int current_function_returns_value;
+bool current_function_returns_value;
-/* Set to 0 at beginning of a function definition, set to 1 if
+/* Set to false at beginning of a function definition, set to true if
a return statement with no argument is seen. */
-int current_function_returns_null;
+bool current_function_returns_null;
-/* Set to 0 at beginning of a function definition, set to 1 if
+/* Set to false at beginning of a function definition, set to true if
a call to a noreturn function is seen. */
-int current_function_returns_abnormally;
+bool current_function_returns_abnormally;
-/* Set to nonzero by `grokdeclarator' for a function
+/* Set to true by `grokdeclarator' for a function
whose return type is defaulted, if warnings for this are desired. */
-static int warn_about_return_type;
+static bool warn_about_return_type;
-/* Nonzero when starting a function declared `extern inline'. */
+/* True when starting a function declared `extern inline'. */
-static int current_extern_inline;
+static bool current_extern_inline;
/* Nonzero when the current toplevel function contains a declaration
of a nested function which is never defined. */
@@ -2822,7 +2823,7 @@ c_make_fname_decl (tree id, int type_dep)
ATTRS is nonzero, use that for the function's attribute list. */
tree
-builtin_function (const char *name, tree type, int function_code,
+builtin_function (const char *name, tree type, enum built_in_function function_code,
enum built_in_class cl, const char *library_name,
tree attrs)
{
@@ -3969,7 +3970,7 @@ grokdeclarator (const struct c_declarator *declarator,
prefer the former warning since it is more explicit. */
if ((warn_implicit_int || warn_return_type || flag_isoc99)
&& funcdef_flag)
- warn_about_return_type = 1;
+ warn_about_return_type = true;
else if (warn_implicit_int || flag_isoc99)
pedwarn_c99 ("type defaults to %<int%> in declaration of %qs", name);
}
@@ -4781,7 +4782,7 @@ grokdeclarator (const struct c_declarator *declarator,
{
DECL_INLINE (decl) = 1;
if (storage_class == csc_extern)
- current_extern_inline = 1;
+ current_extern_inline = true;
}
}
/* If -finline-functions, assume it can be inlined. This does
@@ -5973,11 +5974,11 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
struct c_label_context_se *nstack_se;
struct c_label_context_vm *nstack_vm;
- current_function_returns_value = 0; /* Assume, until we see it does. */
- current_function_returns_null = 0;
- current_function_returns_abnormally = 0;
- warn_about_return_type = 0;
- current_extern_inline = 0;
+ current_function_returns_value = false; /* Assume, until we see it does. */
+ current_function_returns_null = false;
+ current_function_returns_abnormally = false;
+ warn_about_return_type = false;
+ current_extern_inline = false;
c_switch_stack = NULL;
nstack_se = XOBNEW (&parser_obstack, struct c_label_context_se);
@@ -7150,7 +7151,7 @@ declspecs_add_qual (struct c_declspecs *specs, tree qual)
specs->declspecs_seen_p = true;
gcc_assert (TREE_CODE (qual) == IDENTIFIER_NODE
&& C_IS_RESERVED_WORD (qual));
- i = C_RID_CODE (qual);
+ i = (enum rid) C_RID_CODE (qual);
switch (i)
{
case RID_CONST:
@@ -7189,7 +7190,7 @@ declspecs_add_type (struct c_declspecs *specs, struct c_typespec spec)
/* Handle type specifier keywords. */
if (TREE_CODE (type) == IDENTIFIER_NODE && C_IS_RESERVED_WORD (type))
{
- enum rid i = C_RID_CODE (type);
+ enum rid i = (enum rid) C_RID_CODE (type);
if (specs->type)
{
error ("two or more data types in declaration specifiers");
@@ -7565,7 +7566,7 @@ declspecs_add_scspec (struct c_declspecs *specs, tree scspec)
specs->declspecs_seen_p = true;
gcc_assert (TREE_CODE (scspec) == IDENTIFIER_NODE
&& C_IS_RESERVED_WORD (scspec));
- i = C_RID_CODE (scspec);
+ i = (enum rid) C_RID_CODE (scspec);
if (extra_warnings && specs->non_sc_seen_p)
warning (OPT_Wextra, "%qE is not at beginning of declaration", scspec);
switch (i)
diff --git a/gcc/c-format.c b/gcc/c-format.c
index 403724e5e11..efe0c273a45 100644
--- a/gcc/c-format.c
+++ b/gcc/c-format.c
@@ -285,31 +285,31 @@ static const format_length_info printf_length_specs[] =
{
{ "h", FMT_LEN_h, STD_C89, "hh", FMT_LEN_hh, STD_C99 },
{ "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L },
- { "q", FMT_LEN_ll, STD_EXT, NULL, 0, 0 },
- { "L", FMT_LEN_L, STD_C89, NULL, 0, 0 },
- { "z", FMT_LEN_z, STD_C99, NULL, 0, 0 },
- { "Z", FMT_LEN_z, STD_EXT, NULL, 0, 0 },
- { "t", FMT_LEN_t, STD_C99, NULL, 0, 0 },
- { "j", FMT_LEN_j, STD_C99, NULL, 0, 0 },
- { "H", FMT_LEN_H, STD_EXT, NULL, 0, 0 },
+ { "q", FMT_LEN_ll, STD_EXT, NULL, FMT_LEN_none, STD_C89 },
+ { "L", FMT_LEN_L, STD_C89, NULL, FMT_LEN_none, STD_C89 },
+ { "z", FMT_LEN_z, STD_C99, NULL, FMT_LEN_none, STD_C89 },
+ { "Z", FMT_LEN_z, STD_EXT, NULL, FMT_LEN_none, STD_C89 },
+ { "t", FMT_LEN_t, STD_C99, NULL, FMT_LEN_none, STD_C89 },
+ { "j", FMT_LEN_j, STD_C99, NULL, FMT_LEN_none, STD_C89 },
+ { "H", FMT_LEN_H, STD_EXT, NULL, FMT_LEN_none, STD_C89 },
{ "D", FMT_LEN_D, STD_EXT, "DD", FMT_LEN_DD, STD_EXT },
- { NULL, 0, 0, NULL, 0, 0 }
+ { NULL, FMT_LEN_none, STD_C89, NULL, FMT_LEN_none, STD_C89 }
};
/* Length specifiers valid for asm_fprintf. */
static const format_length_info asm_fprintf_length_specs[] =
{
{ "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C89 },
- { "w", FMT_LEN_none, STD_C89, NULL, 0, 0 },
- { NULL, 0, 0, NULL, 0, 0 }
+ { "w", FMT_LEN_none, STD_C89, NULL, FMT_LEN_none, STD_C89 },
+ { NULL, FMT_LEN_none, STD_C89, NULL, FMT_LEN_none, STD_C89 }
};
/* Length specifiers valid for GCC diagnostics. */
static const format_length_info gcc_diag_length_specs[] =
{
{ "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C89 },
- { "w", FMT_LEN_none, STD_C89, NULL, 0, 0 },
- { NULL, 0, 0, NULL, 0, 0 }
+ { "w", FMT_LEN_none, STD_C89, NULL, FMT_LEN_none, STD_C89 },
+ { NULL, FMT_LEN_none, STD_C89, NULL, FMT_LEN_none, STD_C89 }
};
/* The custom diagnostics all accept the same length specifiers. */
@@ -322,14 +322,14 @@ static const format_length_info scanf_length_specs[] =
{
{ "h", FMT_LEN_h, STD_C89, "hh", FMT_LEN_hh, STD_C99 },
{ "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L },
- { "q", FMT_LEN_ll, STD_EXT, NULL, 0, 0 },
- { "L", FMT_LEN_L, STD_C89, NULL, 0, 0 },
- { "z", FMT_LEN_z, STD_C99, NULL, 0, 0 },
- { "t", FMT_LEN_t, STD_C99, NULL, 0, 0 },
- { "j", FMT_LEN_j, STD_C99, NULL, 0, 0 },
- { "H", FMT_LEN_H, STD_EXT, NULL, 0, 0 },
+ { "q", FMT_LEN_ll, STD_EXT, NULL, FMT_LEN_none, STD_C89 },
+ { "L", FMT_LEN_L, STD_C89, NULL, FMT_LEN_none, STD_C89 },
+ { "z", FMT_LEN_z, STD_C99, NULL, FMT_LEN_none, STD_C89 },
+ { "t", FMT_LEN_t, STD_C99, NULL, FMT_LEN_none, STD_C89 },
+ { "j", FMT_LEN_j, STD_C99, NULL, FMT_LEN_none, STD_C89 },
+ { "H", FMT_LEN_H, STD_EXT, NULL, FMT_LEN_none, STD_C89 },
{ "D", FMT_LEN_D, STD_EXT, "DD", FMT_LEN_DD, STD_EXT },
- { NULL, 0, 0, NULL, 0, 0 }
+ { NULL, FMT_LEN_none, STD_C89, NULL, FMT_LEN_none, STD_C89 }
};
@@ -338,8 +338,8 @@ static const format_length_info scanf_length_specs[] =
static const format_length_info strfmon_length_specs[] =
{
/* A GNU extension. */
- { "L", FMT_LEN_L, STD_C89, NULL, 0, 0 },
- { NULL, 0, 0, NULL, 0, 0 }
+ { "L", FMT_LEN_L, STD_C89, NULL, FMT_LEN_none, STD_C89 },
+ { NULL, FMT_LEN_none, STD_C89, NULL, FMT_LEN_none, STD_C89 }
};
static const format_flag_spec printf_flag_specs[] =
@@ -354,7 +354,7 @@ static const format_flag_spec printf_flag_specs[] =
{ 'w', 0, 0, N_("field width"), N_("field width in printf format"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
- { 0, 0, 0, NULL, NULL, 0 }
+ { 0, 0, 0, NULL, NULL, STD_C89 }
};
@@ -376,7 +376,7 @@ static const format_flag_spec asm_fprintf_flag_specs[] =
{ 'w', 0, 0, N_("field width"), N_("field width in printf format"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
- { 0, 0, 0, NULL, NULL, 0 }
+ { 0, 0, 0, NULL, NULL, STD_C89 }
};
static const format_flag_pair asm_fprintf_flag_pairs[] =
@@ -407,7 +407,7 @@ static const format_flag_spec gcc_diag_flag_specs[] =
{ 'q', 0, 0, N_("'q' flag"), N_("the 'q' diagnostic flag"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
- { 0, 0, 0, NULL, NULL, 0 }
+ { 0, 0, 0, NULL, NULL, STD_C89 }
};
#define gcc_tdiag_flag_specs gcc_diag_flag_specs
@@ -420,7 +420,7 @@ static const format_flag_spec gcc_cxxdiag_flag_specs[] =
{ 'q', 0, 0, N_("'q' flag"), N_("the 'q' diagnostic flag"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
- { 0, 0, 0, NULL, NULL, 0 }
+ { 0, 0, 0, NULL, NULL, STD_C89 }
};
static const format_flag_spec scanf_flag_specs[] =
@@ -431,7 +431,7 @@ static const format_flag_spec scanf_flag_specs[] =
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in scanf format"), STD_C89 },
{ '\'', 0, 0, N_("''' flag"), N_("the ''' scanf flag"), STD_EXT },
{ 'I', 0, 0, N_("'I' flag"), N_("the 'I' scanf flag"), STD_EXT },
- { 0, 0, 0, NULL, NULL, 0 }
+ { 0, 0, 0, NULL, NULL, STD_C89 }
};
@@ -453,7 +453,7 @@ static const format_flag_spec strftime_flag_specs[] =
{ 'E', 0, 0, N_("'E' modifier"), N_("the 'E' strftime modifier"), STD_C99 },
{ 'O', 0, 0, N_("'O' modifier"), N_("the 'O' strftime modifier"), STD_C99 },
{ 'O', 'o', 0, NULL, N_("the 'O' modifier"), STD_EXT },
- { 0, 0, 0, NULL, NULL, 0 }
+ { 0, 0, 0, NULL, NULL, STD_C89 }
};
@@ -480,7 +480,7 @@ static const format_flag_spec strfmon_flag_specs[] =
{ '#', 0, 0, N_("left precision"), N_("left precision in strfmon format"), STD_C89 },
{ 'p', 0, 0, N_("right precision"), N_("right precision in strfmon format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in strfmon format"), STD_C89 },
- { 0, 0, 0, NULL, NULL, 0 }
+ { 0, 0, 0, NULL, NULL, STD_C89 }
};
static const format_flag_pair strfmon_flag_pairs[] =
@@ -510,7 +510,7 @@ static const format_char_info print_char_table[] =
{ "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R", NULL },
/* GNU conversion specifiers. */
{ "m", 0, STD_EXT, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
static const format_char_info asm_fprintf_char_table[] =
@@ -530,7 +530,7 @@ static const format_char_info asm_fprintf_char_table[] =
{ "U", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "r", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
{ "@", 0, STD_C89, NOARGUMENTS, "", "", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
static const format_char_info gcc_diag_char_table[] =
@@ -553,7 +553,7 @@ static const format_char_info gcc_diag_char_table[] =
{ "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "m", 0, STD_C89, NOARGUMENTS, "q", "", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
static const format_char_info gcc_tdiag_char_table[] =
@@ -576,7 +576,7 @@ static const format_char_info gcc_tdiag_char_table[] =
{ "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "m", 0, STD_C89, NOARGUMENTS, "q", "", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
static const format_char_info gcc_cdiag_char_table[] =
@@ -599,7 +599,7 @@ static const format_char_info gcc_cdiag_char_table[] =
{ "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "m", 0, STD_C89, NOARGUMENTS, "q", "", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
static const format_char_info gcc_cxxdiag_char_table[] =
@@ -625,7 +625,7 @@ static const format_char_info gcc_cxxdiag_char_table[] =
{ "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "m", 0, STD_C89, NOARGUMENTS, "q", "", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
static const format_char_info gcc_gfc_char_table[] =
@@ -642,7 +642,7 @@ static const format_char_info gcc_gfc_char_table[] =
/* This will require a "locus" at runtime. */
{ "L", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "R", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
static const format_char_info scan_char_table[] =
@@ -663,7 +663,7 @@ static const format_char_info scan_char_table[] =
/* X/Open conversion specifiers. */
{ "C", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w", "W", NULL },
{ "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*aw", "W", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
static const format_char_info time_char_table[] =
@@ -690,13 +690,13 @@ static const format_char_info time_char_table[] =
/* GNU conversion specifiers. */
{ "kls", 0, STD_EXT, NOLENGTHS, "-_0Ow", "", NULL },
{ "P", 0, STD_EXT, NOLENGTHS, "", "", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
static const format_char_info monetary_char_table[] =
{
{ "in", 0, STD_C89, { T89_D, BADLEN, BADLEN, BADLEN, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "=^+(!-w#p", "", NULL },
- { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
/* This must be in the same order as enum format_type. */
diff --git a/gcc/c-format.h b/gcc/c-format.h
index 5fa544dde80..fe76b0e114f 100644
--- a/gcc/c-format.h
+++ b/gcc/c-format.h
@@ -117,7 +117,7 @@ typedef struct
/* Macros to fill out tables of these. */
#define NOARGUMENTS { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }
-#define BADLEN { 0, NULL, NULL }
+#define BADLEN { STD_C89, NULL, NULL }
#define NOLENGTHS { BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }
diff --git a/gcc/c-gimplify.c b/gcc/c-gimplify.c
index 7ddc88cf4ea..00c2541e633 100644
--- a/gcc/c-gimplify.c
+++ b/gcc/c-gimplify.c
@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "c-tree-code.h"
#include "tree.h"
#include "varray.h"
#include "c-tree.h"
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 108bc5cff17..4b88fc177b9 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -500,7 +500,7 @@ narrowest_unsigned_type (unsigned HOST_WIDE_INT low,
unsigned HOST_WIDE_INT high,
unsigned int flags)
{
- enum integer_type_kind itk;
+ int itk;
if ((flags & CPP_N_WIDTH) == CPP_N_SMALL)
itk = itk_unsigned_int;
@@ -516,10 +516,10 @@ narrowest_unsigned_type (unsigned HOST_WIDE_INT low,
if ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) > high
|| ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) == high
&& TREE_INT_CST_LOW (upper) >= low))
- return itk;
+ return (enum integer_type_kind) itk;
}
- return itk_none;
+ return (enum integer_type_kind) itk_none;
}
/* Ditto, but narrowest signed type. */
@@ -527,7 +527,7 @@ static enum integer_type_kind
narrowest_signed_type (unsigned HOST_WIDE_INT low,
unsigned HOST_WIDE_INT high, unsigned int flags)
{
- enum integer_type_kind itk;
+ int itk;
if ((flags & CPP_N_WIDTH) == CPP_N_SMALL)
itk = itk_int;
@@ -544,10 +544,10 @@ narrowest_signed_type (unsigned HOST_WIDE_INT low,
if ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) > high
|| ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (upper) == high
&& TREE_INT_CST_LOW (upper) >= low))
- return itk;
+ return (enum integer_type_kind) itk;
}
- return itk_none;
+ return (enum integer_type_kind) itk_none;
}
/* Interpret TOKEN, an integer with FLAGS as classified by cpplib. */
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c
index d4ad1f89f26..4ebf19ae2b8 100644
--- a/gcc/c-objc-common.c
+++ b/gcc/c-objc-common.c
@@ -22,6 +22,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "c-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "insn-config.h"
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 85202539283..56d905db7b6 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -41,6 +41,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "c-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "langhooks.h"
@@ -350,7 +351,7 @@ c_lex_one_token (c_token *token)
if (C_IS_RESERVED_WORD (token->value))
{
- enum rid rid_code = C_RID_CODE (token->value);
+ enum rid rid_code = (enum rid) C_RID_CODE (token->value);
if (c_dialect_objc ())
{
@@ -404,7 +405,7 @@ c_lex_one_token (c_token *token)
case CPP_AT_NAME:
/* This only happens in Objective-C; it must be a keyword. */
token->type = CPP_KEYWORD;
- token->keyword = C_RID_CODE (token->value);
+ token->keyword = (enum rid) C_RID_CODE (token->value);
break;
case CPP_COLON:
case CPP_COMMA:
@@ -416,7 +417,7 @@ c_lex_one_token (c_token *token)
break;
case CPP_PRAGMA:
/* We smuggled the cpp_token->u.pragma value in an INTEGER_CST. */
- token->pragma_kind = TREE_INT_CST_LOW (token->value);
+ token->pragma_kind = (enum pragma_kind) TREE_INT_CST_LOW (token->value);
token->value = NULL;
break;
default:
@@ -6177,7 +6178,7 @@ static tree
c_parser_objc_type_name (c_parser *parser)
{
tree quals = NULL_TREE;
- struct c_type_name *typename = NULL;
+ struct c_type_name *type_name = NULL;
tree type = NULL_TREE;
while (true)
{
@@ -6197,9 +6198,9 @@ c_parser_objc_type_name (c_parser *parser)
break;
}
if (c_parser_next_token_starts_typename (parser))
- typename = c_parser_type_name (parser);
- if (typename)
- type = groktypename (typename);
+ type_name = c_parser_type_name (parser);
+ if (type_name)
+ type = groktypename (type_name);
return build_tree_list (quals, type);
}
@@ -6761,7 +6762,7 @@ c_parser_omp_variable_list (c_parser *parser, enum omp_clause_code kind,
common case for omp clauses. */
static tree
-c_parser_omp_var_list_parens (c_parser *parser, enum tree_code kind, tree list)
+c_parser_omp_var_list_parens (c_parser *parser, enum omp_clause_code kind, tree list)
{
if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
{
@@ -6834,7 +6835,7 @@ c_parser_omp_clause_default (c_parser *parser, tree list)
if (kind == OMP_CLAUSE_DEFAULT_UNSPECIFIED)
return list;
- check_no_duplicate_clause (list, OMP_CLAUSE_DEFAULT, "default");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_DEFAULT, "default");
c = build_omp_clause (OMP_CLAUSE_DEFAULT);
OMP_CLAUSE_CHAIN (c) = list;
OMP_CLAUSE_DEFAULT_KIND (c) = kind;
@@ -6862,7 +6863,7 @@ c_parser_omp_clause_if (c_parser *parser, tree list)
tree t = c_parser_paren_condition (parser);
tree c;
- check_no_duplicate_clause (list, OMP_CLAUSE_IF, "if");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_IF, "if");
c = build_omp_clause (OMP_CLAUSE_IF);
OMP_CLAUSE_IF_EXPR (c) = t;
@@ -6892,7 +6893,7 @@ c_parser_omp_clause_nowait (c_parser *parser ATTRIBUTE_UNUSED, tree list)
{
tree c;
- check_no_duplicate_clause (list, OMP_CLAUSE_NOWAIT, "nowait");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_NOWAIT, "nowait");
c = build_omp_clause (OMP_CLAUSE_NOWAIT);
OMP_CLAUSE_CHAIN (c) = list;
@@ -6926,7 +6927,7 @@ c_parser_omp_clause_num_threads (c_parser *parser, tree list)
t = integer_one_node;
}
- check_no_duplicate_clause (list, OMP_CLAUSE_NUM_THREADS, "num_threads");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_NUM_THREADS, "num_threads");
c = build_omp_clause (OMP_CLAUSE_NUM_THREADS);
OMP_CLAUSE_NUM_THREADS_EXPR (c) = t;
@@ -6945,7 +6946,7 @@ c_parser_omp_clause_ordered (c_parser *parser ATTRIBUTE_UNUSED, tree list)
{
tree c;
- check_no_duplicate_clause (list, OMP_CLAUSE_ORDERED, "ordered");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_ORDERED, "ordered");
c = build_omp_clause (OMP_CLAUSE_ORDERED);
OMP_CLAUSE_CHAIN (c) = list;
@@ -7096,7 +7097,7 @@ c_parser_omp_clause_schedule (c_parser *parser, tree list)
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
"expected %<,%> or %<)%>");
- check_no_duplicate_clause (list, OMP_CLAUSE_SCHEDULE, "schedule");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_SCHEDULE, "schedule");
OMP_CLAUSE_CHAIN (c) = list;
return c;
@@ -7364,7 +7365,7 @@ c_parser_omp_flush (c_parser *parser)
{
c_parser_consume_pragma (parser);
if (c_parser_next_token_is (parser, CPP_OPEN_PAREN))
- c_parser_omp_var_list_parens (parser, 0, NULL);
+ c_parser_omp_var_list_parens (parser, (enum omp_clause_code) ERROR_MARK, NULL);
else if (c_parser_next_token_is_not (parser, CPP_PRAGMA_EOL))
c_parser_error (parser, "expected %<(%> or end of line");
c_parser_skip_to_pragma_eol (parser);
@@ -7799,7 +7800,7 @@ c_parser_omp_threadprivate (c_parser *parser)
tree vars, t;
c_parser_consume_pragma (parser);
- vars = c_parser_omp_var_list_parens (parser, 0, NULL);
+ vars = c_parser_omp_var_list_parens (parser, (enum omp_clause_code) ERROR_MARK, NULL);
if (!targetm.have_tls)
sorry ("threadprivate variables not supported in this target");
diff --git a/gcc/c-pch.c b/gcc/c-pch.c
index 76e40fb0a26..9b21e2e77ec 100644
--- a/gcc/c-pch.c
+++ b/gcc/c-pch.c
@@ -93,10 +93,10 @@ static const char *
get_ident (void)
{
static char result[IDENT_LENGTH];
- static const char template[IDENT_LENGTH] = "gpch.013";
+ static const char templ[IDENT_LENGTH + 1] = "gpch.013";
static const char c_language_chars[] = "Co+O";
- memcpy (result, template, IDENT_LENGTH);
+ memcpy (result, templ, IDENT_LENGTH);
result[4] = c_language_chars[c_language];
return result;
@@ -113,7 +113,7 @@ pch_init (void)
FILE *f;
struct c_pch_validity v;
void *target_validity;
- static const char partial_pch[IDENT_LENGTH] = "gpcWrite";
+ static const char partial_pch[IDENT_LENGTH + 1] = "gpcWrite";
#ifdef ASM_COMMENT_START
if (flag_verbose_asm)
diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c
index 5225ea3dd96..c92a0857a62 100644
--- a/gcc/c-pretty-print.c
+++ b/gcc/c-pretty-print.c
@@ -24,6 +24,8 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "coretypes.h"
#include "tm.h"
#include "real.h"
+#include "c-tree-code.h"
+#include "tree.h"
#include "c-pretty-print.h"
#include "c-tree.h"
#include "tree-iterator.h"
diff --git a/gcc/c-pretty-print.h b/gcc/c-pretty-print.h
index 6a4086b4fc2..a45e3f5222d 100644
--- a/gcc/c-pretty-print.h
+++ b/gcc/c-pretty-print.h
@@ -22,7 +22,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#ifndef GCC_C_PRETTY_PRINTER
#define GCC_C_PRETTY_PRINTER
-#include "tree.h"
#include "c-common.h"
#include "pretty-print.h"
diff --git a/gcc/c-tree-code.h b/gcc/c-tree-code.h
new file mode 100644
index 00000000000..22f60d79a86
--- /dev/null
+++ b/gcc/c-tree-code.h
@@ -0,0 +1,37 @@
+/* Definitions for C codes of tree nodes.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
+
+/* Codes of tree nodes */
+
+#define DEFTREECODE(SYM, STRING, TYPE, NARGS) SYM,
+
+enum tree_code {
+#include "tree.def"
+
+ LAST_AND_UNUSED_TREE_CODE, /* A convenient way to get a value for
+ NUM_TREE_CODES. */
+ C_DUMMY_TREE_CODE = LAST_AND_UNUSED_TREE_CODE,
+#include "c-common.def"
+ LAST_C_TREE_CODE
+};
+
+#undef DEFTREECODE
+
+#define TREE_CODE_DEFINED 1
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index 79579b0547a..72e5aed0b80 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -380,11 +380,11 @@ struct language_function GTY(())
tree x_cont_label;
struct c_switch * GTY((skip)) x_switch_stack;
struct c_arg_info * GTY((skip)) arg_info;
- int returns_value;
- int returns_null;
- int returns_abnormally;
- int warn_about_return_type;
- int extern_inline;
+ bool returns_value;
+ bool returns_null;
+ bool returns_abnormally;
+ bool warn_about_return_type;
+ bool extern_inline;
};
/* Save lists of labels used or defined in particular contexts.
@@ -474,7 +474,9 @@ extern void push_parm_decl (const struct c_parm *);
extern struct c_declarator *set_array_declarator_inner (struct c_declarator *,
struct c_declarator *,
bool);
-extern tree builtin_function (const char *, tree, int, enum built_in_class,
+extern tree builtin_function (const char *, tree,
+ enum built_in_function,
+ enum built_in_class,
const char *, tree);
extern void shadow_tag (const struct c_declspecs *);
extern void shadow_tag_warned (const struct c_declspecs *, int);
@@ -589,20 +591,20 @@ extern tree c_begin_omp_parallel (void);
extern tree c_finish_omp_parallel (tree, tree);
extern tree c_finish_omp_clauses (tree);
-/* Set to 0 at beginning of a function definition, set to 1 if
+/* Set to false at beginning of a function definition, set to true if
a return statement that specifies a return value is seen. */
-extern int current_function_returns_value;
+extern bool current_function_returns_value;
-/* Set to 0 at beginning of a function definition, set to 1 if
+/* Set to false at beginning of a function definition, set to true if
a return statement with no argument is seen. */
-extern int current_function_returns_null;
+extern bool current_function_returns_null;
-/* Set to 0 at beginning of a function definition, set to 1 if
+/* Set to false at beginning of a function definition, set to true if
a call to a noreturn function is seen. */
-extern int current_function_returns_abnormally;
+extern bool current_function_returns_abnormally;
/* Nonzero means we are reading code that came from a system header file. */
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 2534c25e75d..14496008704 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -31,6 +31,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
+#include "c-tree-code.h"
#include "tree.h"
#include "langhooks.h"
#include "c-tree.h"
@@ -2258,7 +2259,7 @@ build_function_call (tree function, tree params)
}
if (fundecl && TREE_THIS_VOLATILE (fundecl))
- current_function_returns_abnormally = 1;
+ current_function_returns_abnormally = true;
/* fntype now gets the type of function pointed to. */
fntype = TREE_TYPE (fntype);
@@ -6973,7 +6974,7 @@ c_finish_return (tree retval)
if (!retval)
{
- current_function_returns_null = 1;
+ current_function_returns_null = true;
if ((warn_return_type || flag_isoc99)
&& valtype != 0 && TREE_CODE (valtype) != VOID_TYPE)
{
@@ -6984,7 +6985,7 @@ c_finish_return (tree retval)
}
else if (valtype == 0 || TREE_CODE (valtype) == VOID_TYPE)
{
- current_function_returns_null = 1;
+ current_function_returns_null = true;
if (pedantic || TREE_CODE (TREE_TYPE (retval)) != VOID_TYPE)
pedwarn ("%<return%> with a value, in function returning void");
}
@@ -6995,7 +6996,7 @@ c_finish_return (tree retval)
tree res = DECL_RESULT (current_function_decl);
tree inner;
- current_function_returns_value = 1;
+ current_function_returns_value = true;
if (t == error_mark_node)
return NULL_TREE;
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index c81c72c49b6..36c5ba220e1 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -112,7 +112,7 @@ init_caller_save (void)
int offset;
rtx address;
int i, j;
- enum machine_mode mode;
+ int mode;
rtx savepat, restpat;
rtx test_reg, test_mem;
rtx saveinsn, restinsn;
@@ -194,15 +194,15 @@ init_caller_save (void)
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
for (mode = 0 ; mode < MAX_MACHINE_MODE; mode++)
- if (HARD_REGNO_MODE_OK (i, mode))
+ if (HARD_REGNO_MODE_OK (i, (enum machine_mode) mode))
{
int ok;
/* Update the register number and modes of the register
and memory operand. */
REGNO (test_reg) = i;
- PUT_MODE (test_reg, mode);
- PUT_MODE (test_mem, mode);
+ PUT_MODE (test_reg, (enum machine_mode) mode);
+ PUT_MODE (test_mem, (enum machine_mode) mode);
/* Force re-recognition of the modified insns. */
INSN_CODE (saveinsn) = -1;
@@ -500,7 +500,7 @@ mark_set_regs (rtx reg, rtx setter ATTRIBUTE_UNUSED, void *data)
{
int regno, endregno, i;
enum machine_mode mode = GET_MODE (reg);
- HARD_REG_SET *this_insn_sets = data;
+ HARD_REG_SET *this_insn_sets = (HARD_REG_SET *) data;
if (GET_CODE (reg) == SUBREG)
{
@@ -641,7 +641,7 @@ insert_restore (struct insn_chain *chain, int before_p, int regno,
rtx pat = NULL_RTX;
int code;
unsigned int numregs = 0;
- struct insn_chain *new;
+ struct insn_chain *fresh;
rtx mem;
/* A common failure mode if register status is not correct in the
@@ -689,13 +689,13 @@ insert_restore (struct insn_chain *chain, int before_p, int regno,
gen_rtx_REG (GET_MODE (mem),
regno), mem);
code = reg_restore_code[regno][GET_MODE (mem)];
- new = insert_one_insn (chain, before_p, code, pat);
+ fresh = insert_one_insn (chain, before_p, code, pat);
/* Clear status for all registers we restored. */
for (k = 0; k < i; k++)
{
CLEAR_HARD_REG_BIT (hard_regs_saved, regno + k);
- SET_REGNO_REG_SET (&new->dead_or_set, regno + k);
+ SET_REGNO_REG_SET (&fresh->dead_or_set, regno + k);
n_regs_saved--;
}
@@ -714,7 +714,7 @@ insert_save (struct insn_chain *chain, int before_p, int regno,
rtx pat = NULL_RTX;
int code;
unsigned int numregs = 0;
- struct insn_chain *new;
+ struct insn_chain *fresh;
rtx mem;
/* A common failure mode if register status is not correct in the
@@ -761,13 +761,13 @@ insert_save (struct insn_chain *chain, int before_p, int regno,
gen_rtx_REG (GET_MODE (mem),
regno));
code = reg_save_code[regno][GET_MODE (mem)];
- new = insert_one_insn (chain, before_p, code, pat);
+ fresh = insert_one_insn (chain, before_p, code, pat);
/* Set hard_regs_saved and dead_or_set for all the registers we saved. */
for (k = 0; k < numregs; k++)
{
SET_HARD_REG_BIT (hard_regs_saved, regno + k);
- SET_REGNO_REG_SET (&new->dead_or_set, regno + k);
+ SET_REGNO_REG_SET (&fresh->dead_or_set, regno + k);
n_regs_saved++;
}
@@ -780,7 +780,7 @@ static struct insn_chain *
insert_one_insn (struct insn_chain *chain, int before_p, int code, rtx pat)
{
rtx insn = chain->insn;
- struct insn_chain *new;
+ struct insn_chain *fresh;
#ifdef HAVE_cc0
/* If INSN references CC0, put our insns in front of the insn that sets
@@ -795,23 +795,23 @@ insert_one_insn (struct insn_chain *chain, int before_p, int code, rtx pat)
chain = chain->prev, insn = chain->insn;
#endif
- new = new_insn_chain ();
+ fresh = new_insn_chain ();
if (before_p)
{
rtx link;
- new->prev = chain->prev;
- if (new->prev != 0)
- new->prev->next = new;
+ fresh->prev = chain->prev;
+ if (fresh->prev != 0)
+ fresh->prev->next = fresh;
else
- reload_insn_chain = new;
+ reload_insn_chain = fresh;
- chain->prev = new;
- new->next = chain;
- new->insn = emit_insn_before (pat, insn);
+ chain->prev = fresh;
+ fresh->next = chain;
+ fresh->insn = emit_insn_before (pat, insn);
/* ??? It would be nice if we could exclude the already / still saved
registers from the live sets. */
- COPY_REG_SET (&new->live_throughout, &chain->live_throughout);
+ COPY_REG_SET (&fresh->live_throughout, &chain->live_throughout);
/* Registers that die in CHAIN->INSN still live in the new insn. */
for (link = REG_NOTES (chain->insn); link; link = XEXP (link, 1))
{
@@ -828,36 +828,36 @@ insert_one_insn (struct insn_chain *chain, int before_p, int code, rtx pat)
continue;
for (i = hard_regno_nregs[regno][GET_MODE (reg)] - 1;
i >= 0; i--)
- SET_REGNO_REG_SET (&new->live_throughout, regno + i);
+ SET_REGNO_REG_SET (&fresh->live_throughout, regno + i);
}
}
- CLEAR_REG_SET (&new->dead_or_set);
+ CLEAR_REG_SET (&fresh->dead_or_set);
if (chain->insn == BB_HEAD (BASIC_BLOCK (chain->block)))
- BB_HEAD (BASIC_BLOCK (chain->block)) = new->insn;
+ BB_HEAD (BASIC_BLOCK (chain->block)) = fresh->insn;
}
else
{
- new->next = chain->next;
- if (new->next != 0)
- new->next->prev = new;
- chain->next = new;
- new->prev = chain;
- new->insn = emit_insn_after (pat, insn);
+ fresh->next = chain->next;
+ if (fresh->next != 0)
+ fresh->next->prev = fresh;
+ chain->next = fresh;
+ fresh->prev = chain;
+ fresh->insn = emit_insn_after (pat, insn);
/* ??? It would be nice if we could exclude the already / still saved
registers from the live sets, and observe REG_UNUSED notes. */
- COPY_REG_SET (&new->live_throughout, &chain->live_throughout);
+ COPY_REG_SET (&fresh->live_throughout, &chain->live_throughout);
/* Registers that are set in CHAIN->INSN live in the new insn.
(Unless there is a REG_UNUSED note for them, but we don't
look for them here.) */
note_stores (PATTERN (chain->insn), add_stored_regs,
- &new->live_throughout);
- CLEAR_REG_SET (&new->dead_or_set);
+ &fresh->live_throughout);
+ CLEAR_REG_SET (&fresh->dead_or_set);
if (chain->insn == BB_END (BASIC_BLOCK (chain->block)))
- BB_END (BASIC_BLOCK (chain->block)) = new->insn;
+ BB_END (BASIC_BLOCK (chain->block)) = fresh->insn;
}
- new->block = chain->block;
- new->is_caller_save_insn = 1;
+ fresh->block = chain->block;
+ fresh->is_caller_save_insn = 1;
- INSN_CODE (new->insn) = code;
- return new;
+ INSN_CODE (fresh->insn) = code;
+ return fresh;
}
diff --git a/gcc/calls.c b/gcc/calls.c
index b6f57df78c1..e3c81cfa82d 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -363,7 +363,7 @@ emit_call_1 (rtx funexp, tree fntree, tree fndecl ATTRIBUTE_UNUSED,
if (ecf_flags & ECF_PURE)
call_fusage
= gen_rtx_EXPR_LIST
- (VOIDmode,
+ (REG_DEP_TRUE,
gen_rtx_USE (VOIDmode,
gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode))),
call_fusage);
@@ -413,7 +413,7 @@ emit_call_1 (rtx funexp, tree fntree, tree fndecl ATTRIBUTE_UNUSED,
{
if (!already_popped)
CALL_INSN_FUNCTION_USAGE (call_insn)
- = gen_rtx_EXPR_LIST (VOIDmode,
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_CLOBBER (VOIDmode, stack_pointer_rtx),
CALL_INSN_FUNCTION_USAGE (call_insn));
rounded_stack_size -= n_popped;
@@ -2101,7 +2101,7 @@ expand_call (tree exp, rtx target, int ignore)
n_named_args = num_actuals;
/* Make a vector to hold all the information about each arg. */
- args = alloca (num_actuals * sizeof (struct arg_data));
+ args = (struct arg_data *) alloca (num_actuals * sizeof (struct arg_data));
memset (args, 0, num_actuals * sizeof (struct arg_data));
/* Build up entries in the ARGS array, compute the size of the
@@ -2578,7 +2578,7 @@ expand_call (tree exp, rtx target, int ignore)
if (flags & ECF_CONST
&& args[i].stack
&& args[i].value == args[i].stack)
- call_fusage = gen_rtx_EXPR_LIST (VOIDmode,
+ call_fusage = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_USE (VOIDmode,
args[i].value),
call_fusage);
@@ -2735,12 +2735,12 @@ expand_call (tree exp, rtx target, int ignore)
mentions all the arguments in order as well as
the function name. */
for (i = 0; i < num_actuals; i++)
- note = gen_rtx_EXPR_LIST (VOIDmode,
+ note = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
args[i].initial_value, note);
- note = gen_rtx_EXPR_LIST (VOIDmode, funexp, note);
+ note = gen_rtx_EXPR_LIST (REG_DEP_TRUE, funexp, note);
if (flags & ECF_PURE)
- note = gen_rtx_EXPR_LIST (VOIDmode,
+ note = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_USE (VOIDmode,
gen_rtx_MEM (BLKmode,
gen_rtx_SCRATCH (VOIDmode))),
@@ -3341,7 +3341,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
of the full argument passing conventions to limit complexity here since
library functions shouldn't have many args. */
- argvec = alloca ((nargs + 1) * sizeof (struct arg));
+ argvec = (struct arg *) alloca ((nargs + 1) * sizeof (struct arg));
memset (argvec, 0, (nargs + 1) * sizeof (struct arg));
#ifdef INIT_CUMULATIVE_LIBCALL_ARGS
@@ -3403,7 +3403,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
for (; count < nargs; count++)
{
rtx val = va_arg (p, rtx);
- enum machine_mode mode = va_arg (p, enum machine_mode);
+ enum machine_mode mode = (enum machine_mode) va_arg (p, int);
/* We cannot convert the arg value to the mode the library wants here;
must do it earlier where we know the signedness of the arg. */
@@ -3448,11 +3448,11 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
emit_move_insn (slot, val);
}
- call_fusage = gen_rtx_EXPR_LIST (VOIDmode,
+ call_fusage = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_USE (VOIDmode, slot),
call_fusage);
if (must_copy)
- call_fusage = gen_rtx_EXPR_LIST (VOIDmode,
+ call_fusage = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_CLOBBER (VOIDmode,
slot),
call_fusage);
@@ -3698,7 +3698,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
gen_rtx_SCRATCH (Pmode));
use = gen_rtx_MEM (argvec[argnum].mode, use);
use = gen_rtx_USE (VOIDmode, use);
- call_fusage = gen_rtx_EXPR_LIST (VOIDmode, use, call_fusage);
+ call_fusage = gen_rtx_EXPR_LIST (REG_DEP_TRUE, use, call_fusage);
}
}
}
@@ -3843,14 +3843,14 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
/* Construct an "equal form" for the value which mentions all the
arguments in order as well as the function name. */
for (i = 0; i < nargs; i++)
- note = gen_rtx_EXPR_LIST (VOIDmode, argvec[i].value, note);
- note = gen_rtx_EXPR_LIST (VOIDmode, fun, note);
+ note = gen_rtx_EXPR_LIST (REG_DEP_TRUE, argvec[i].value, note);
+ note = gen_rtx_EXPR_LIST (REG_DEP_TRUE, fun, note);
insns = get_insns ();
end_sequence ();
if (flags & ECF_PURE)
- note = gen_rtx_EXPR_LIST (VOIDmode,
+ note = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_USE (VOIDmode,
gen_rtx_MEM (BLKmode,
gen_rtx_SCRATCH (VOIDmode))),
@@ -4216,7 +4216,7 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
- int_size_in_bytes (TREE_TYPE (pval))
+ partial);
size_rtx = expand_expr (size_in_bytes (TREE_TYPE (pval)),
- NULL_RTX, TYPE_MODE (sizetype), 0);
+ NULL_RTX, TYPE_MODE (sizetype), EXPAND_NORMAL);
}
parm_align = arg->locate.boundary;
diff --git a/gcc/cfg.c b/gcc/cfg.c
index aa8eaca9eec..a158028c55c 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -82,11 +82,11 @@ void
init_flow (void)
{
if (!cfun->cfg)
- cfun->cfg = ggc_alloc_cleared (sizeof (struct control_flow_graph));
+ cfun->cfg = (struct control_flow_graph *) ggc_alloc_cleared (sizeof (struct control_flow_graph));
n_edges = 0;
- ENTRY_BLOCK_PTR = ggc_alloc_cleared (sizeof (struct basic_block_def));
+ ENTRY_BLOCK_PTR = (struct basic_block_def *) ggc_alloc_cleared (sizeof (struct basic_block_def));
ENTRY_BLOCK_PTR->index = ENTRY_BLOCK;
- EXIT_BLOCK_PTR = ggc_alloc_cleared (sizeof (struct basic_block_def));
+ EXIT_BLOCK_PTR = (struct basic_block_def *) ggc_alloc_cleared (sizeof (struct basic_block_def));
EXIT_BLOCK_PTR->index = EXIT_BLOCK;
ENTRY_BLOCK_PTR->next_bb = EXIT_BLOCK_PTR;
EXIT_BLOCK_PTR->prev_bb = ENTRY_BLOCK_PTR;
@@ -133,7 +133,7 @@ basic_block
alloc_block (void)
{
basic_block bb;
- bb = ggc_alloc_cleared (sizeof (*bb));
+ bb = (basic_block) ggc_alloc_cleared (sizeof (*bb));
return bb;
}
@@ -263,7 +263,7 @@ edge
unchecked_make_edge (basic_block src, basic_block dst, int flags)
{
edge e;
- e = ggc_alloc_cleared (sizeof (*e));
+ e = (edge) ggc_alloc_cleared (sizeof (*e));
n_edges++;
e->src = src;
@@ -541,7 +541,7 @@ dump_flow_info (FILE *file, int flags)
for (i = FIRST_PSEUDO_REGISTER; i < max; i++)
if (REG_N_REFS (i))
{
- enum reg_class class, altclass;
+ enum reg_class cls, alt;
fprintf (file, "\nRegister %d used %d times across %d insns",
i, REG_N_REFS (i), REG_LIVE_LENGTH (i));
@@ -562,18 +562,18 @@ dump_flow_info (FILE *file, int flags)
&& PSEUDO_REGNO_BYTES (i) != UNITS_PER_WORD)
fprintf (file, "; %d bytes", PSEUDO_REGNO_BYTES (i));
- class = reg_preferred_class (i);
- altclass = reg_alternate_class (i);
- if (class != GENERAL_REGS || altclass != ALL_REGS)
+ cls = reg_preferred_class (i);
+ alt = reg_alternate_class (i);
+ if (cls != GENERAL_REGS || alt != ALL_REGS)
{
- if (altclass == ALL_REGS || class == ALL_REGS)
- fprintf (file, "; pref %s", reg_class_names[(int) class]);
- else if (altclass == NO_REGS)
- fprintf (file, "; %s or none", reg_class_names[(int) class]);
+ if (alt == ALL_REGS || cls == ALL_REGS)
+ fprintf (file, "; pref %s", reg_class_names[cls]);
+ else if (alt == NO_REGS)
+ fprintf (file, "; %s or none", reg_class_names[cls]);
else
fprintf (file, "; pref %s, else %s",
- reg_class_names[(int) class],
- reg_class_names[(int) altclass]);
+ reg_class_names[cls],
+ reg_class_names[alt]);
}
if (regno_reg_rtx[i] != NULL && REG_POINTER (regno_reg_rtx[i]))
@@ -658,7 +658,7 @@ static void *first_edge_aux_obj = 0;
/* Allocate a memory block of SIZE as BB->aux. The obstack must
be first initialized by alloc_aux_for_blocks. */
-inline void
+void
alloc_aux_for_block (basic_block bb, int size)
{
/* Verify that aux field is clear. */
@@ -721,7 +721,7 @@ free_aux_for_blocks (void)
/* Allocate a memory edge of SIZE as BB->aux. The obstack must
be first initialized by alloc_aux_for_edges. */
-inline void
+void
alloc_aux_for_edge (edge e, int size)
{
/* Verify that aux field is clear. */
@@ -1089,7 +1089,7 @@ set_bb_original (basic_block bb, basic_block original)
(*slot)->index2 = original->index;
else
{
- *slot = pool_alloc (original_copy_bb_pool);
+ *slot = (struct htab_bb_copy_original_entry *) pool_alloc (original_copy_bb_pool);
(*slot)->index1 = bb->index;
(*slot)->index2 = original->index;
}
@@ -1131,7 +1131,7 @@ set_bb_copy (basic_block bb, basic_block copy)
(*slot)->index2 = copy->index;
else
{
- *slot = pool_alloc (original_copy_bb_pool);
+ *slot = (struct htab_bb_copy_original_entry *) pool_alloc (original_copy_bb_pool);
(*slot)->index1 = bb->index;
(*slot)->index2 = copy->index;
}
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index b688917cc72..48ad9f68494 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -436,7 +436,9 @@ partition_stack_vars (void)
C code at least) to declare all variables at the top of the function,
and if we're not inlining, then all variables will be in the same scope.
Take advantage of very fast libc routines for this scan. */
+#ifndef __cplusplus
gcc_assert (sizeof(bool) == sizeof(char));
+#endif
if (memchr (stack_vars_conflict, false, stack_vars_conflict_alloc) == NULL)
return;
@@ -1152,7 +1154,7 @@ expand_gimple_cond_expr (basic_block bb, tree stmt)
jumpif (pred, label_rtx (GOTO_DESTINATION (then_exp)));
add_reg_br_prob_note (last, true_edge->probability);
last = get_last_insn ();
- expand_expr (else_exp, const0_rtx, VOIDmode, 0);
+ expand_expr (else_exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
BB_END (bb) = last;
if (BARRIER_P (BB_END (bb)))
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c
index a4cc31c8b61..6c50d02829a 100644
--- a/gcc/cfghooks.c
+++ b/gcc/cfghooks.c
@@ -239,7 +239,7 @@ dump_bb (basic_block bb, FILE *outf, int indent)
edge_iterator ei;
char *s_indent;
- s_indent = alloca ((size_t) indent + 1);
+ s_indent = (char *) alloca ((size_t) indent + 1);
memset (s_indent, ' ', (size_t) indent);
s_indent[indent] = '\0';
@@ -872,10 +872,10 @@ extract_cond_bb_edges (basic_block b, edge *e1, edge *e2)
new condition basic block that guards the versioned loop. */
void
lv_adjust_loop_header_phi (basic_block first, basic_block second,
- basic_block new, edge e)
+ basic_block bb, edge e)
{
if (cfg_hooks->lv_adjust_loop_header_phi)
- cfg_hooks->lv_adjust_loop_header_phi (first, second, new, e);
+ cfg_hooks->lv_adjust_loop_header_phi (first, second, bb, e);
}
/* Conditions in trees and RTL are different so we need
@@ -883,8 +883,8 @@ lv_adjust_loop_header_phi (basic_block first, basic_block second,
versioning code. */
void
lv_add_condition_to_bb (basic_block first, basic_block second,
- basic_block new, void *cond)
+ basic_block bb, void *cond)
{
gcc_assert (cfg_hooks->lv_add_condition_to_bb);
- cfg_hooks->lv_add_condition_to_bb (first, second, new, cond);
+ cfg_hooks->lv_add_condition_to_bb (first, second, bb, cond);
}
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index cddb0daa5ce..6230dcf4fa8 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -600,7 +600,7 @@ fixup_reorder_chain (void)
for (bb = ENTRY_BLOCK_PTR->next_bb, index = NUM_FIXED_BLOCKS;
bb != 0;
- bb = bb->aux, index++)
+ bb = (basic_block) bb->aux, index++)
{
if (bb->il.rtl->header)
{
@@ -646,7 +646,7 @@ fixup_reorder_chain (void)
/* Now add jumps and labels as needed to match the blocks new
outgoing edges. */
- for (bb = ENTRY_BLOCK_PTR->next_bb; bb ; bb = bb->aux)
+ for (bb = ENTRY_BLOCK_PTR->next_bb; bb ; bb = (basic_block) bb->aux)
{
edge e_fall, e_taken, e;
rtx bb_end_insn;
@@ -789,7 +789,7 @@ fixup_reorder_chain (void)
fprintf (dump_file, "Reordered sequence:\n");
for (bb = ENTRY_BLOCK_PTR->next_bb, index = NUM_FIXED_BLOCKS;
bb;
- bb = bb->aux, index++)
+ bb = (basic_block) bb->aux, index++)
{
fprintf (dump_file, " %i ", index);
if (get_bb_original (bb))
@@ -808,7 +808,7 @@ fixup_reorder_chain (void)
bb = ENTRY_BLOCK_PTR->next_bb;
index = NUM_FIXED_BLOCKS;
- for (; bb; prev_bb = bb, bb = bb->aux, index ++)
+ for (; bb; prev_bb = bb, bb = (basic_block) bb->aux, index ++)
{
bb->index = index;
SET_BASIC_BLOCK (index, bb);
@@ -896,11 +896,11 @@ fixup_fallthru_exit_predecessor (void)
}
while (c->aux != bb)
- c = c->aux;
+ c = (basic_block) c->aux;
c->aux = bb->aux;
while (c->aux)
- c = c->aux;
+ c = (basic_block) c->aux;
c->aux = bb;
bb->aux = NULL;
diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c
index da545838436..e960acbb034 100644
--- a/gcc/cfgloopanal.c
+++ b/gcc/cfgloopanal.c
@@ -52,10 +52,10 @@ just_once_each_iteration_p (const struct loop *loop, basic_block bb)
/* Structure representing edge of a graph. */
-struct edge
+struct edge_s
{
int src, dest; /* Source and destination. */
- struct edge *pred_next, *succ_next;
+ struct edge_s *pred_next, *succ_next;
/* Next edge in predecessor and successor lists. */
void *data; /* Data attached to the edge. */
};
@@ -64,7 +64,7 @@ struct edge
struct vertex
{
- struct edge *pred, *succ;
+ struct edge_s *pred, *succ;
/* Lists of predecessors and successors. */
int component; /* Number of dfs restarts before reaching the
vertex. */
@@ -88,7 +88,7 @@ void
dump_graph (FILE *f, struct graph *g)
{
int i;
- struct edge *e;
+ struct edge_s *e;
for (i = 0; i < g->n_vertices; i++)
{
@@ -126,7 +126,7 @@ new_graph (int n_vertices)
static void
add_edge (struct graph *g, int f, int t, void *data)
{
- struct edge *e = xmalloc (sizeof (struct edge));
+ struct edge_s *e = XNEW (struct edge_s);
e->src = f;
e->dest = t;
@@ -147,8 +147,8 @@ static void
dfs (struct graph *g, int *qs, int nq, int *qt, bool forward)
{
int i, tick = 0, v, comp = 0, top;
- struct edge *e;
- struct edge **stack = xmalloc (sizeof (struct edge *) * g->n_vertices);
+ struct edge_s *e;
+ struct edge_s **stack = XNEWVEC (struct edge_s *, g->n_vertices);
for (i = 0; i < g->n_vertices; i++)
{
@@ -205,9 +205,9 @@ dfs (struct graph *g, int *qs, int nq, int *qt, bool forward)
same scc. */
static void
-check_irred (struct graph *g, struct edge *e)
+check_irred (struct graph *g, struct edge_s *e)
{
- edge real = e->data;
+ edge real = (edge) e->data;
/* All edges should lead from a component with higher number to the
one with lower one. */
@@ -225,9 +225,9 @@ check_irred (struct graph *g, struct edge *e)
static void
for_each_edge (struct graph *g,
- void (callback) (struct graph *, struct edge *))
+ void (callback) (struct graph *, struct edge_s *))
{
- struct edge *e;
+ struct edge_s *e;
int i;
for (i = 0; i < g->n_vertices; i++)
@@ -240,7 +240,7 @@ for_each_edge (struct graph *g,
static void
free_graph (struct graph *g)
{
- struct edge *e, *n;
+ struct edge_s *e, *n;
int i;
for (i = 0; i < g->n_vertices; i++)
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index 638b2996584..b9a6c159864 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -55,7 +55,7 @@ static void unloop (struct loops *, struct loop *, bool *);
static bool
rpe_enum_p (basic_block bb, void *data)
{
- return dominated_by_p (CDI_DOMINATORS, bb, data);
+ return dominated_by_p (CDI_DOMINATORS, bb, (basic_block) data);
}
/* Remove basic blocks BBS from loop structure and dominance info,
@@ -626,7 +626,7 @@ fix_loop_placements (struct loops *loops, struct loop *loop,
static void
place_new_loop (struct loops *loops, struct loop *loop)
{
- loops->parray =
+ loops->parray = (struct loop **)
xrealloc (loops->parray, (loops->num + 1) * sizeof (struct loop *));
loops->parray[loops->num] = loop;
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index ea39f35cc20..deaa0844669 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -321,7 +321,7 @@ create_basic_block_structure (rtx head, rtx end, rtx bb_note, basic_block after)
static basic_block
rtl_create_basic_block (void *headp, void *endp, basic_block after)
{
- rtx head = headp, end = endp;
+ rtx head = (rtx) headp, end = (rtx) endp;
basic_block bb;
/* Grow the basic block array if needed. */
@@ -489,7 +489,7 @@ static basic_block
rtl_split_block (basic_block bb, void *insnp)
{
basic_block new_bb;
- rtx insn = insnp;
+ rtx insn = (rtx) insnp;
edge e;
edge_iterator ei;
@@ -1601,7 +1601,7 @@ rtl_dump_bb (basic_block bb, FILE *outf, int indent)
rtx last;
char *s_indent;
- s_indent = alloca ((size_t) indent + 1);
+ s_indent = (char *) alloca ((size_t) indent + 1);
memset (s_indent, ' ', (size_t) indent);
s_indent[indent] = '\0';
@@ -2337,7 +2337,7 @@ purge_all_dead_edges (void)
static basic_block
cfg_layout_split_block (basic_block bb, void *insnp)
{
- rtx insn = insnp;
+ rtx insn = (rtx) insnp;
basic_block new_bb = rtl_split_block (bb, insn);
new_bb->il.rtl->footer = bb->il.rtl->footer;
@@ -2915,7 +2915,7 @@ void
init_rtl_bb_info (basic_block bb)
{
gcc_assert (!bb->il.rtl);
- bb->il.rtl = ggc_alloc_cleared (sizeof (struct rtl_bb_info));
+ bb->il.rtl = (struct rtl_bb_info *) ggc_alloc_cleared (sizeof (struct rtl_bb_info));
}
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 3e5dab1f94e..f5f4fbc0499 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -317,7 +317,7 @@ cgraph_edge (struct cgraph_node *node, tree call_stmt)
int n = 0;
if (node->call_site_hash)
- return htab_find_with_hash (node->call_site_hash, call_stmt,
+ return (struct cgraph_edge *) htab_find_with_hash (node->call_site_hash, call_stmt,
htab_hash_pointer (call_stmt));
/* This loop may turn out to be performance problem. In such case adding
@@ -1038,20 +1038,20 @@ cgraph_clone_edge (struct cgraph_edge *e, struct cgraph_node *n,
tree call_stmt, gcov_type count_scale, int loop_nest,
bool update_original)
{
- struct cgraph_edge *new;
+ struct cgraph_edge *clone;
- new = cgraph_create_edge (n, e->callee, call_stmt,
+ clone = cgraph_create_edge (n, e->callee, call_stmt,
e->count * count_scale / REG_BR_PROB_BASE,
e->loop_nest + loop_nest);
- new->inline_failed = e->inline_failed;
+ clone->inline_failed = e->inline_failed;
if (update_original)
{
- e->count -= new->count;
+ e->count -= clone->count;
if (e->count < 0)
e->count = 0;
}
- return new;
+ return clone;
}
/* Create node representing clone of N executed COUNT times. Decrease
@@ -1064,25 +1064,25 @@ struct cgraph_node *
cgraph_clone_node (struct cgraph_node *n, gcov_type count, int loop_nest,
bool update_original)
{
- struct cgraph_node *new = cgraph_create_node ();
+ struct cgraph_node *clone = cgraph_create_node ();
struct cgraph_edge *e;
gcov_type count_scale;
- new->decl = n->decl;
- new->origin = n->origin;
- if (new->origin)
+ clone->decl = n->decl;
+ clone->origin = n->origin;
+ if (clone->origin)
{
- new->next_nested = new->origin->nested;
- new->origin->nested = new;
+ clone->next_nested = clone->origin->nested;
+ clone->origin->nested = clone;
}
- new->analyzed = n->analyzed;
- new->local = n->local;
- new->global = n->global;
- new->rtl = n->rtl;
- new->master_clone = n->master_clone;
- new->count = count;
+ clone->analyzed = n->analyzed;
+ clone->local = n->local;
+ clone->global = n->global;
+ clone->rtl = n->rtl;
+ clone->master_clone = n->master_clone;
+ clone->count = count;
if (n->count)
- count_scale = new->count * REG_BR_PROB_BASE / n->count;
+ count_scale = clone->count * REG_BR_PROB_BASE / n->count;
else
count_scale = 0;
if (update_original)
@@ -1093,16 +1093,16 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int loop_nest,
}
for (e = n->callees;e; e=e->next_callee)
- cgraph_clone_edge (e, new, e->call_stmt, count_scale, loop_nest,
+ cgraph_clone_edge (e, clone, e->call_stmt, count_scale, loop_nest,
update_original);
- new->next_clone = n->next_clone;
- new->prev_clone = n;
- n->next_clone = new;
- if (new->next_clone)
- new->next_clone->prev_clone = new;
+ clone->next_clone = n->next_clone;
+ clone->prev_clone = n;
+ n->next_clone = clone;
+ if (clone->next_clone)
+ clone->next_clone->prev_clone = clone;
- return new;
+ return clone;
}
/* Return true if N is an master_clone, (see cgraph_master_clone). */
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 309fb73f012..db44c7abc5d 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -530,7 +530,7 @@ record_reference (tree *tp, int *walk_subtrees, void *data)
cgraph_varpool_mark_needed_node (cgraph_varpool_node (t));
if (lang_hooks.callgraph.analyze_expr)
return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees,
- data);
+ (tree) data);
}
break;
@@ -556,7 +556,7 @@ record_reference (tree *tp, int *walk_subtrees, void *data)
}
if ((unsigned int) TREE_CODE (t) >= LAST_AND_UNUSED_TREE_CODE)
- return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees, data);
+ return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees, (tree) data);
break;
}
@@ -1325,9 +1325,11 @@ cgraph_expand_all_functions (void)
/* This is used to sort the node types by the cgraph order number. */
+enum cgraph_order_kind { ORDER_UNDEFINED = 0, ORDER_FUNCTION, ORDER_VAR, ORDER_ASM };
+
struct cgraph_order_sort
{
- enum { ORDER_UNDEFINED = 0, ORDER_FUNCTION, ORDER_VAR, ORDER_ASM } kind;
+ enum cgraph_order_kind kind;
union
{
struct cgraph_node *f;
diff --git a/gcc/collect2.c b/gcc/collect2.c
index 02edde835d5..cad61a6d6c8 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -55,7 +55,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#ifdef CROSS_COMPILE
#undef OBJECT_FORMAT_COFF
-#undef MD_EXEC_PREFIX
#undef REAL_LD_FILE_NAME
#undef REAL_NM_FILE_NAME
#undef REAL_STRIP_FILE_NAME
@@ -819,9 +818,9 @@ main (int argc, char **argv)
/* Do not invoke xcalloc before this point, since locale needs to be
set first, in case a diagnostic is issued. */
- ld1 = (const char **)(ld1_argv = xcalloc(sizeof (char *), argc+4));
- ld2 = (const char **)(ld2_argv = xcalloc(sizeof (char *), argc+11));
- object = (const char **)(object_lst = xcalloc(sizeof (char *), argc));
+ ld1 = (const char **)(ld1_argv = (char **) xcalloc(sizeof (char *), argc+4));
+ ld2 = (const char **)(ld2_argv = (char **) xcalloc(sizeof (char *), argc+11));
+ object = (const char **)(object_lst = (char **) xcalloc(sizeof (char *), argc));
#ifdef DEBUG
debug = 1;
@@ -848,7 +847,7 @@ main (int argc, char **argv)
#endif
obstack_begin (&temporary_obstack, 0);
- temporary_firstobj = obstack_alloc (&temporary_obstack, 0);
+ temporary_firstobj = (char *) obstack_alloc (&temporary_obstack, 0);
#ifndef HAVE_LD_DEMANGLE
current_demangling_style = auto_demangling;
@@ -866,7 +865,7 @@ main (int argc, char **argv)
-fno-exceptions -w */
num_c_args += 5;
- c_ptr = (const char **) (c_argv = xcalloc (sizeof (char *), num_c_args));
+ c_ptr = (const char **) (c_argv = (char **) xcalloc (sizeof (char *), num_c_args));
if (argc < 2)
fatal ("no arguments");
@@ -1599,7 +1598,7 @@ static long sequence_number = 0;
static void
add_to_list (struct head *head_ptr, const char *name)
{
- struct id *newid = xcalloc (sizeof (struct id) + strlen (name), 1);
+ struct id *newid = (struct id *) xcalloc (sizeof (struct id) + strlen (name), 1);
struct id *p;
strcpy (newid->name, name);
diff --git a/gcc/combine.c b/gcc/combine.c
index e85e9d1c477..c6736ac23ea 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -340,10 +340,12 @@ static int nonzero_sign_valid;
/* Record one modification to rtl structure
to be undone by storing old_contents into *where. */
+enum undo_kind { UNDO_RTX, UNDO_INT, UNDO_MODE };
+
struct undo
{
struct undo *next;
- enum { UNDO_RTX, UNDO_INT, UNDO_MODE } kind;
+ enum undo_kind kind;
union { rtx r; int i; enum machine_mode m; } old_contents;
union { rtx *r; int *i; } where;
};
@@ -1642,7 +1644,7 @@ struct likely_spilled_retval_info
static void
likely_spilled_retval_1 (rtx x, rtx set, void *data)
{
- struct likely_spilled_retval_info *info = data;
+ struct likely_spilled_retval_info *info = (struct likely_spilled_retval_info *) data;
unsigned regno, nregs;
unsigned new_mask;
@@ -1734,7 +1736,7 @@ adjust_for_new_dest (rtx insn)
/* The new insn will have a destination that was previously the destination
of an insn just above it. Call distribute_links to make a LOG_LINK from
the next use of that destination. */
- distribute_links (gen_rtx_INSN_LIST (VOIDmode, insn, NULL_RTX));
+ distribute_links (gen_rtx_INSN_LIST (REG_DEP_TRUE, insn, NULL_RTX));
}
/* Return TRUE if combine can reuse reg X in mode MODE.
@@ -3873,7 +3875,7 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy)
enum machine_mode op0_mode = VOIDmode;
const char *fmt;
int len, i;
- rtx new;
+ rtx tmp;
/* Two expressions are equal if they are identical copies of a shared
RTX or if they are both registers with the same register number
@@ -3928,14 +3930,14 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy)
&& GET_CODE (XVECEXP (x, 0, 0)) == SET
&& GET_CODE (SET_SRC (XVECEXP (x, 0, 0))) == ASM_OPERANDS)
{
- new = subst (XVECEXP (x, 0, 0), from, to, 0, unique_copy);
+ tmp = subst (XVECEXP (x, 0, 0), from, to, 0, unique_copy);
/* If this substitution failed, this whole thing fails. */
- if (GET_CODE (new) == CLOBBER
- && XEXP (new, 0) == const0_rtx)
- return new;
+ if (GET_CODE (tmp) == CLOBBER
+ && XEXP (tmp, 0) == const0_rtx)
+ return tmp;
- SUBST (XVECEXP (x, 0, 0), new);
+ SUBST (XVECEXP (x, 0, 0), tmp);
for (i = XVECLEN (x, 0) - 1; i >= 1; i--)
{
@@ -3945,14 +3947,14 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy)
&& GET_CODE (dest) != CC0
&& GET_CODE (dest) != PC)
{
- new = subst (dest, from, to, 0, unique_copy);
+ tmp = subst (dest, from, to, 0, unique_copy);
/* If this substitution failed, this whole thing fails. */
- if (GET_CODE (new) == CLOBBER
- && XEXP (new, 0) == const0_rtx)
- return new;
+ if (GET_CODE (tmp) == CLOBBER
+ && XEXP (tmp, 0) == const0_rtx)
+ return tmp;
- SUBST (SET_DEST (XVECEXP (x, 0, i)), new);
+ SUBST (SET_DEST (XVECEXP (x, 0, i)), tmp);
}
}
}
@@ -3985,33 +3987,33 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy)
{
if (COMBINE_RTX_EQUAL_P (XVECEXP (x, i, j), from))
{
- new = (unique_copy && n_occurrences
+ tmp = (unique_copy && n_occurrences
? copy_rtx (to) : to);
n_occurrences++;
}
else
{
- new = subst (XVECEXP (x, i, j), from, to, 0,
+ tmp = subst (XVECEXP (x, i, j), from, to, 0,
unique_copy);
/* If this substitution failed, this whole thing
fails. */
- if (GET_CODE (new) == CLOBBER
- && XEXP (new, 0) == const0_rtx)
- return new;
+ if (GET_CODE (tmp) == CLOBBER
+ && XEXP (tmp, 0) == const0_rtx)
+ return tmp;
}
- SUBST (XVECEXP (x, i, j), new);
+ SUBST (XVECEXP (x, i, j), tmp);
}
}
else if (fmt[i] == 'e')
{
/* If this is a register being set, ignore it. */
- new = XEXP (x, i);
+ tmp = XEXP (x, i);
if (in_dest
&& i == 0
&& (((code == SUBREG || code == ZERO_EXTRACT)
- && REG_P (new))
+ && REG_P (tmp))
|| code == STRICT_LOW_PART))
;
@@ -4052,7 +4054,7 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy)
return gen_rtx_CLOBBER (VOIDmode, const0_rtx);
#endif
- new = (unique_copy && n_occurrences ? copy_rtx (to) : to);
+ tmp = (unique_copy && n_occurrences ? copy_rtx (to) : to);
n_occurrences++;
}
else
@@ -4064,7 +4066,7 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy)
STRICT_LOW_PART, and ZERO_EXTRACT, which are the only
things aside from REG and MEM that should appear in a
SET_DEST. */
- new = subst (XEXP (x, i), from, to,
+ tmp = subst (XEXP (x, i), from, to,
(((in_dest
&& (code == SUBREG || code == STRICT_LOW_PART
|| code == ZERO_EXTRACT))
@@ -4077,30 +4079,30 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy)
well as prevent accidents where two CLOBBERs are considered
to be equal, thus producing an incorrect simplification. */
- if (GET_CODE (new) == CLOBBER && XEXP (new, 0) == const0_rtx)
- return new;
+ if (GET_CODE (tmp) == CLOBBER && XEXP (tmp, 0) == const0_rtx)
+ return tmp;
if (GET_CODE (x) == SUBREG
- && (GET_CODE (new) == CONST_INT
- || GET_CODE (new) == CONST_DOUBLE))
+ && (GET_CODE (tmp) == CONST_INT
+ || GET_CODE (tmp) == CONST_DOUBLE))
{
enum machine_mode mode = GET_MODE (x);
- x = simplify_subreg (GET_MODE (x), new,
+ x = simplify_subreg (GET_MODE (x), tmp,
GET_MODE (SUBREG_REG (x)),
SUBREG_BYTE (x));
if (! x)
x = gen_rtx_CLOBBER (mode, const0_rtx);
}
- else if (GET_CODE (new) == CONST_INT
+ else if (GET_CODE (tmp) == CONST_INT
&& GET_CODE (x) == ZERO_EXTEND)
{
x = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x),
- new, GET_MODE (XEXP (x, 0)));
+ tmp, GET_MODE (XEXP (x, 0)));
gcc_assert (x);
}
else
- SUBST (XEXP (x, i), new);
+ SUBST (XEXP (x, i), tmp);
}
}
}
@@ -5214,9 +5216,9 @@ simplify_set (rtx x)
/* Attempt to simplify CC user. */
if (GET_CODE (pat) == SET)
{
- rtx new = simplify_rtx (SET_SRC (pat));
- if (new != NULL_RTX)
- SUBST (SET_SRC (pat), new);
+ rtx tmp = simplify_rtx (SET_SRC (pat));
+ if (tmp != NULL_RTX)
+ SUBST (SET_SRC (pat), tmp);
}
/* Convert X into a no-op move. */
@@ -5949,7 +5951,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
enum machine_mode pos_mode = word_mode;
enum machine_mode extraction_mode = word_mode;
enum machine_mode tmode = mode_for_size (len, MODE_INT, 1);
- rtx new = 0;
+ rtx tmp = 0;
rtx orig_pos_rtx = pos_rtx;
HOST_WIDE_INT orig_pos;
@@ -5973,11 +5975,11 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
(ashift X (const_int C)), where LEN > C. Extract the
least significant (LEN - C) bits of X, giving an rtx
whose mode is MODE, then shift it left C times. */
- new = make_extraction (mode, XEXP (inner, 0),
+ tmp = make_extraction (mode, XEXP (inner, 0),
0, 0, len - INTVAL (XEXP (inner, 1)),
unsignedp, in_dest, in_compare);
- if (new != 0)
- return gen_rtx_ASHIFT (mode, new, XEXP (inner, 1));
+ if (tmp != 0)
+ return gen_rtx_ASHIFT (mode, tmp, XEXP (inner, 1));
}
inner_mode = GET_MODE (inner);
@@ -6033,7 +6035,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
else
offset = pos / BITS_PER_UNIT;
- new = adjust_address_nv (inner, tmode, offset);
+ tmp = adjust_address_nv (inner, tmode, offset);
}
else if (REG_P (inner))
{
@@ -6063,16 +6065,16 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
if (!validate_subreg (tmode, inner_mode, inner, final_word))
return NULL_RTX;
- new = gen_rtx_SUBREG (tmode, inner, final_word);
+ tmp = gen_rtx_SUBREG (tmode, inner, final_word);
}
else
- new = gen_lowpart (tmode, inner);
+ tmp = gen_lowpart (tmode, inner);
}
else
- new = inner;
+ tmp = inner;
}
else
- new = force_to_mode (inner, tmode,
+ tmp = force_to_mode (inner, tmode,
len >= HOST_BITS_PER_WIDE_INT
? ~(unsigned HOST_WIDE_INT) 0
: ((unsigned HOST_WIDE_INT) 1 << len) - 1,
@@ -6082,30 +6084,30 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
make a STRICT_LOW_PART unless we made a MEM. */
if (in_dest)
- return (MEM_P (new) ? new
- : (GET_CODE (new) != SUBREG
+ return (MEM_P (tmp) ? tmp
+ : (GET_CODE (tmp) != SUBREG
? gen_rtx_CLOBBER (tmode, const0_rtx)
- : gen_rtx_STRICT_LOW_PART (VOIDmode, new)));
+ : gen_rtx_STRICT_LOW_PART (VOIDmode, tmp)));
if (mode == tmode)
- return new;
+ return tmp;
- if (GET_CODE (new) == CONST_INT)
- return gen_int_mode (INTVAL (new), mode);
+ if (GET_CODE (tmp) == CONST_INT)
+ return gen_int_mode (INTVAL (tmp), mode);
/* If we know that no extraneous bits are set, and that the high
bit is not set, convert the extraction to the cheaper of
sign and zero extension, that are equivalent in these cases. */
if (flag_expensive_optimizations
&& (GET_MODE_BITSIZE (tmode) <= HOST_BITS_PER_WIDE_INT
- && ((nonzero_bits (new, tmode)
+ && ((nonzero_bits (tmp, tmode)
& ~(((unsigned HOST_WIDE_INT)
GET_MODE_MASK (tmode))
>> 1))
== 0)))
{
- rtx temp = gen_rtx_ZERO_EXTEND (mode, new);
- rtx temp1 = gen_rtx_SIGN_EXTEND (mode, new);
+ rtx temp = gen_rtx_ZERO_EXTEND (mode, tmp);
+ rtx temp1 = gen_rtx_SIGN_EXTEND (mode, tmp);
/* Prefer ZERO_EXTENSION, since it gives more information to
backends. */
@@ -6118,7 +6120,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
proper mode. */
return (gen_rtx_fmt_e (unsignedp ? ZERO_EXTEND : SIGN_EXTEND,
- mode, new));
+ mode, tmp));
}
/* Unless this is a COMPARE or we have a funny memory reference,
@@ -6322,12 +6324,12 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
pos_rtx = GEN_INT (pos);
/* Make the required operation. See if we can use existing rtx. */
- new = gen_rtx_fmt_eee (unsignedp ? ZERO_EXTRACT : SIGN_EXTRACT,
+ tmp = gen_rtx_fmt_eee (unsignedp ? ZERO_EXTRACT : SIGN_EXTRACT,
extraction_mode, inner, GEN_INT (len), pos_rtx);
if (! in_dest)
- new = gen_lowpart (mode, new);
+ tmp = gen_lowpart (mode, tmp);
- return new;
+ return tmp;
}
/* See if X contains an ASHIFT of COUNT or more bits that can be commuted
@@ -6403,7 +6405,7 @@ make_compound_operation (rtx x, enum rtx_code in_code)
rtx rhs, lhs;
enum rtx_code next_code;
int i;
- rtx new = 0;
+ rtx tmp = 0;
rtx tem;
const char *fmt;
@@ -6428,8 +6430,8 @@ make_compound_operation (rtx x, enum rtx_code in_code)
&& INTVAL (XEXP (x, 1)) < HOST_BITS_PER_WIDE_INT
&& INTVAL (XEXP (x, 1)) >= 0)
{
- new = make_compound_operation (XEXP (x, 0), next_code);
- new = gen_rtx_MULT (mode, new,
+ tmp = make_compound_operation (XEXP (x, 0), next_code);
+ tmp = gen_rtx_MULT (mode, tmp,
GEN_INT ((HOST_WIDE_INT) 1
<< INTVAL (XEXP (x, 1))));
}
@@ -6446,8 +6448,8 @@ make_compound_operation (rtx x, enum rtx_code in_code)
if (GET_CODE (XEXP (x, 0)) == LSHIFTRT
&& (i = exact_log2 (INTVAL (XEXP (x, 1)) + 1)) >= 0)
{
- new = make_compound_operation (XEXP (XEXP (x, 0), 0), next_code);
- new = make_extraction (mode, new, 0, XEXP (XEXP (x, 0), 1), i, 1,
+ tmp = make_compound_operation (XEXP (XEXP (x, 0), 0), next_code);
+ tmp = make_extraction (mode, tmp, 0, XEXP (XEXP (x, 0), 1), i, 1,
0, in_code == COMPARE);
}
@@ -6457,9 +6459,9 @@ make_compound_operation (rtx x, enum rtx_code in_code)
&& GET_CODE (SUBREG_REG (XEXP (x, 0))) == LSHIFTRT
&& (i = exact_log2 (INTVAL (XEXP (x, 1)) + 1)) >= 0)
{
- new = make_compound_operation (XEXP (SUBREG_REG (XEXP (x, 0)), 0),
+ tmp = make_compound_operation (XEXP (SUBREG_REG (XEXP (x, 0)), 0),
next_code);
- new = make_extraction (GET_MODE (SUBREG_REG (XEXP (x, 0))), new, 0,
+ tmp = make_extraction (GET_MODE (SUBREG_REG (XEXP (x, 0))), tmp, 0,
XEXP (SUBREG_REG (XEXP (x, 0)), 1), i, 1,
0, in_code == COMPARE);
}
@@ -6471,12 +6473,12 @@ make_compound_operation (rtx x, enum rtx_code in_code)
&& (i = exact_log2 (INTVAL (XEXP (x, 1)) + 1)) >= 0)
{
/* Apply the distributive law, and then try to make extractions. */
- new = gen_rtx_fmt_ee (GET_CODE (XEXP (x, 0)), mode,
+ tmp = gen_rtx_fmt_ee (GET_CODE (XEXP (x, 0)), mode,
gen_rtx_AND (mode, XEXP (XEXP (x, 0), 0),
XEXP (x, 1)),
gen_rtx_AND (mode, XEXP (XEXP (x, 0), 1),
XEXP (x, 1)));
- new = make_compound_operation (new, in_code);
+ tmp = make_compound_operation (tmp, in_code);
}
/* If we are have (and (rotate X C) M) and C is larger than the number
@@ -6487,8 +6489,8 @@ make_compound_operation (rtx x, enum rtx_code in_code)
&& (i = exact_log2 (INTVAL (XEXP (x, 1)) + 1)) >= 0
&& i <= INTVAL (XEXP (XEXP (x, 0), 1)))
{
- new = make_compound_operation (XEXP (XEXP (x, 0), 0), next_code);
- new = make_extraction (mode, new,
+ tmp = make_compound_operation (XEXP (XEXP (x, 0), 0), next_code);
+ tmp = make_extraction (mode, tmp,
(GET_MODE_BITSIZE (mode)
- INTVAL (XEXP (XEXP (x, 0), 1))),
NULL_RTX, i, 1, 0, in_code == COMPARE);
@@ -6521,7 +6523,7 @@ make_compound_operation (rtx x, enum rtx_code in_code)
If it doesn't end up being a ZERO_EXTEND, we will ignore it unless
we are in a COMPARE. */
else if ((i = exact_log2 (INTVAL (XEXP (x, 1)) + 1)) >= 0)
- new = make_extraction (mode,
+ tmp = make_extraction (mode,
make_compound_operation (XEXP (x, 0),
next_code),
0, NULL_RTX, i, 1, 0, in_code == COMPARE);
@@ -6530,7 +6532,7 @@ make_compound_operation (rtx x, enum rtx_code in_code)
convert this into the appropriate bit extract. */
else if (in_code == COMPARE
&& (i = exact_log2 (INTVAL (XEXP (x, 1)))) >= 0)
- new = make_extraction (mode,
+ tmp = make_extraction (mode,
make_compound_operation (XEXP (x, 0),
next_code),
i, NULL_RTX, 1, 1, 0, 1);
@@ -6545,7 +6547,7 @@ make_compound_operation (rtx x, enum rtx_code in_code)
&& mode_width <= HOST_BITS_PER_WIDE_INT
&& (nonzero_bits (XEXP (x, 0), mode) & (1 << (mode_width - 1))) == 0)
{
- new = gen_rtx_ASHIFTRT (mode,
+ tmp = gen_rtx_ASHIFTRT (mode,
make_compound_operation (XEXP (x, 0),
next_code),
XEXP (x, 1));
@@ -6565,8 +6567,8 @@ make_compound_operation (rtx x, enum rtx_code in_code)
&& GET_CODE (XEXP (lhs, 1)) == CONST_INT
&& INTVAL (rhs) >= INTVAL (XEXP (lhs, 1)))
{
- new = make_compound_operation (XEXP (lhs, 0), next_code);
- new = make_extraction (mode, new,
+ tmp = make_compound_operation (XEXP (lhs, 0), next_code);
+ tmp = make_extraction (mode, tmp,
INTVAL (rhs) - INTVAL (XEXP (lhs, 1)),
NULL_RTX, mode_width - INTVAL (rhs),
code == LSHIFTRT, 0, in_code == COMPARE);
@@ -6583,8 +6585,8 @@ make_compound_operation (rtx x, enum rtx_code in_code)
&& (OBJECT_P (SUBREG_REG (lhs))))
&& GET_CODE (rhs) == CONST_INT
&& INTVAL (rhs) < HOST_BITS_PER_WIDE_INT
- && (new = extract_left_shift (lhs, INTVAL (rhs))) != 0)
- new = make_extraction (mode, make_compound_operation (new, next_code),
+ && (tmp = extract_left_shift (lhs, INTVAL (rhs))) != 0)
+ tmp = make_extraction (mode, make_compound_operation (tmp, next_code),
0, NULL_RTX, mode_width - INTVAL (rhs),
code == LSHIFTRT, 0, in_code == COMPARE);
@@ -6629,9 +6631,9 @@ make_compound_operation (rtx x, enum rtx_code in_code)
break;
}
- if (new)
+ if (tmp)
{
- x = gen_lowpart (mode, new);
+ x = gen_lowpart (mode, tmp);
code = GET_CODE (x);
}
@@ -6640,8 +6642,8 @@ make_compound_operation (rtx x, enum rtx_code in_code)
for (i = 0; i < GET_RTX_LENGTH (code); i++)
if (fmt[i] == 'e')
{
- new = make_compound_operation (XEXP (x, i), next_code);
- SUBST (XEXP (x, i), new);
+ tmp = make_compound_operation (XEXP (x, i), next_code);
+ SUBST (XEXP (x, i), tmp);
}
/* If this is a commutative operation, the changes to the operands
@@ -7650,16 +7652,16 @@ known_cond (rtx x, enum rtx_code cond, rtx reg, rtx val)
else if (code == SUBREG)
{
enum machine_mode inner_mode = GET_MODE (SUBREG_REG (x));
- rtx new, r = known_cond (SUBREG_REG (x), cond, reg, val);
+ rtx tmp, r = known_cond (SUBREG_REG (x), cond, reg, val);
if (SUBREG_REG (x) != r)
{
/* We must simplify subreg here, before we lose track of the
original inner_mode. */
- new = simplify_subreg (GET_MODE (x), r,
+ tmp = simplify_subreg (GET_MODE (x), r,
inner_mode, SUBREG_BYTE (x));
- if (new)
- return new;
+ if (tmp)
+ return tmp;
else
SUBST (SUBREG_REG (x), r);
}
@@ -7675,16 +7677,16 @@ known_cond (rtx x, enum rtx_code cond, rtx reg, rtx val)
else if (code == ZERO_EXTEND)
{
enum machine_mode inner_mode = GET_MODE (XEXP (x, 0));
- rtx new, r = known_cond (XEXP (x, 0), cond, reg, val);
+ rtx tmp, r = known_cond (XEXP (x, 0), cond, reg, val);
if (XEXP (x, 0) != r)
{
/* We must simplify the zero_extend here, before we lose
track of the original inner_mode. */
- new = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x),
+ tmp = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x),
r, inner_mode);
- if (new)
- return new;
+ if (tmp)
+ return tmp;
else
SUBST (XEXP (x, 0), r);
}
@@ -8531,7 +8533,7 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode,
enum rtx_code outer_op = UNKNOWN;
HOST_WIDE_INT outer_const = 0;
int complement_p = 0;
- rtx new, x;
+ rtx tmp, x;
/* Make sure and truncate the "natural" shift on the way in. We don't
want to do this inside the loop as it makes it more difficult to
@@ -8653,10 +8655,10 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode,
case ZERO_EXTEND:
case SIGN_EXTRACT:
case ZERO_EXTRACT:
- new = expand_compound_operation (varop);
- if (new != varop)
+ tmp = expand_compound_operation (varop);
+ if (tmp != varop)
{
- varop = new;
+ varop = tmp;
continue;
}
break;
@@ -8671,12 +8673,12 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode,
&& (tmode = mode_for_size (GET_MODE_BITSIZE (mode) - count,
MODE_INT, 1)) != BLKmode)
{
- new = adjust_address_nv (varop, tmode,
+ tmp = adjust_address_nv (varop, tmode,
BYTES_BIG_ENDIAN ? 0
: count / BITS_PER_UNIT);
varop = gen_rtx_fmt_e (code == ASHIFTRT ? SIGN_EXTEND
- : ZERO_EXTEND, mode, new);
+ : ZERO_EXTEND, mode, tmp);
count = 0;
continue;
}
@@ -8897,10 +8899,10 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode,
&& GET_CODE (XEXP (varop, 0)) == CONST_INT
&& GET_CODE (XEXP (varop, 1)) != CONST_INT)
{
- rtx new = simplify_const_binary_operation (code, mode,
+ rtx tmp = simplify_const_binary_operation (code, mode,
XEXP (varop, 0),
GEN_INT (count));
- varop = gen_rtx_fmt_ee (code, mode, new, XEXP (varop, 1));
+ varop = gen_rtx_fmt_ee (code, mode, tmp, XEXP (varop, 1));
count = 0;
continue;
}
@@ -8951,12 +8953,12 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode,
&& !(code == ASHIFTRT && GET_CODE (varop) == XOR
&& 0 > trunc_int_for_mode (INTVAL (XEXP (varop, 1)),
shift_mode))
- && (new = simplify_const_binary_operation (code, result_mode,
+ && (tmp = simplify_const_binary_operation (code, result_mode,
XEXP (varop, 1),
GEN_INT (count))) != 0
- && GET_CODE (new) == CONST_INT
+ && GET_CODE (tmp) == CONST_INT
&& merge_outer_ops (&outer_op, &outer_const, GET_CODE (varop),
- INTVAL (new), result_mode, &complement_p))
+ INTVAL (tmp), result_mode, &complement_p))
{
varop = XEXP (varop, 0);
continue;
@@ -9079,12 +9081,12 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode,
/* (ashift (plus foo C) N) is (plus (ashift foo N) C'). */
if (code == ASHIFT
&& GET_CODE (XEXP (varop, 1)) == CONST_INT
- && (new = simplify_const_binary_operation (ASHIFT, result_mode,
+ && (tmp = simplify_const_binary_operation (ASHIFT, result_mode,
XEXP (varop, 1),
GEN_INT (count))) != 0
- && GET_CODE (new) == CONST_INT
+ && GET_CODE (tmp) == CONST_INT
&& merge_outer_ops (&outer_op, &outer_const, PLUS,
- INTVAL (new), result_mode, &complement_p))
+ INTVAL (tmp), result_mode, &complement_p))
{
varop = XEXP (varop, 0);
continue;
@@ -9098,12 +9100,12 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode,
if (code == LSHIFTRT
&& GET_CODE (XEXP (varop, 1)) == CONST_INT
&& mode_signbit_p (result_mode, XEXP (varop, 1))
- && (new = simplify_const_binary_operation (code, result_mode,
+ && (tmp = simplify_const_binary_operation (code, result_mode,
XEXP (varop, 1),
GEN_INT (count))) != 0
- && GET_CODE (new) == CONST_INT
+ && GET_CODE (tmp) == CONST_INT
&& merge_outer_ops (&outer_op, &outer_const, XOR,
- INTVAL (new), result_mode, &complement_p))
+ INTVAL (tmp), result_mode, &complement_p))
{
varop = XEXP (varop, 0);
continue;
@@ -10890,11 +10892,11 @@ record_value_for_reg (rtx reg, rtx insn, rtx value)
reg_stat[i].last_set = insn;
reg_stat[i].last_set_value = 0;
- reg_stat[i].last_set_mode = 0;
+ reg_stat[i].last_set_mode = VOIDmode;
reg_stat[i].last_set_nonzero_bits = 0;
reg_stat[i].last_set_sign_bit_copies = 0;
reg_stat[i].last_death = 0;
- reg_stat[i].truncated_to_mode = 0;
+ reg_stat[i].truncated_to_mode = VOIDmode;
}
/* Mark registers that are being referenced in this value. */
@@ -11031,11 +11033,11 @@ record_dead_and_set_regs (rtx insn)
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i))
{
reg_stat[i].last_set_value = 0;
- reg_stat[i].last_set_mode = 0;
+ reg_stat[i].last_set_mode = VOIDmode;
reg_stat[i].last_set_nonzero_bits = 0;
reg_stat[i].last_set_sign_bit_copies = 0;
reg_stat[i].last_death = 0;
- reg_stat[i].truncated_to_mode = 0;
+ reg_stat[i].truncated_to_mode = VOIDmode;
}
last_call_cuid = mem_last_set = INSN_CUID (insn);
@@ -12427,7 +12429,7 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2,
REG_N_DEATHS (REGNO (XEXP (note, 0)))++;
REG_NOTES (place2) = gen_rtx_fmt_ee (GET_CODE (note),
- REG_NOTE_KIND (note),
+ (enum machine_mode) REG_NOTE_KIND (note),
XEXP (note, 0),
REG_NOTES (place2));
}
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 0b3da82231e..dc44b424af5 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -6605,7 +6605,7 @@ alpha_expand_builtin (tree exp, rtx target,
insn_op = &insn_data[icode].operand[arity + nonvoid];
- op[arity] = expand_expr (arg, NULL_RTX, insn_op->mode, 0);
+ op[arity] = expand_expr (arg, NULL_RTX, insn_op->mode, EXPAND_NORMAL);
if (!(*insn_op->predicate) (op[arity], insn_op->mode))
op[arity] = copy_to_mode_reg (insn_op->mode, op[arity]);
diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h
index 83545877190..3877cff3c4f 100644
--- a/gcc/config/alpha/vms.h
+++ b/gcc/config/alpha/vms.h
@@ -353,9 +353,6 @@ do { \
#define NAME__MAIN "__gccmain"
#define SYMBOL__MAIN __gccmain
-#define MD_EXEC_PREFIX "/gnu/lib/gcc-lib/"
-#define MD_STARTFILE_PREFIX "/gnu/lib/gcc-lib/"
-
/* Specify the list of include file directories. */
#define INCLUDE_DEFAULTS \
{ \
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
index 4e0d77b3341..021eb09a95b 100644
--- a/gcc/config/arm/arm-protos.h
+++ b/gcc/config/arm/arm-protos.h
@@ -26,7 +26,7 @@
extern void arm_override_options (void);
extern int use_return_insn (int, rtx);
-extern int arm_regno_class (int);
+extern enum reg_class arm_regno_class (int);
extern void arm_load_pic_register (unsigned long);
extern int arm_volatile_func (void);
extern const char *arm_output_epilogue (rtx);
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index d6f11be9721..61a7493be80 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -57,7 +57,47 @@
typedef struct minipool_node Mnode;
typedef struct minipool_fixup Mfix;
-const struct attribute_spec arm_attribute_table[];
+static tree arm_handle_fndecl_attribute (tree *, tree, tree, int, bool *);
+static tree arm_handle_isr_attribute (tree *, tree, tree, int, bool *);
+#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
+static tree arm_handle_notshared_attribute (tree *, tree, tree, int, bool *);
+#endif
+
+/* Table of machine attributes. */
+const struct attribute_spec arm_attribute_table[] =
+{
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ /* Function calls made to this symbol must be done indirectly, because
+ it may lie outside of the 26 bit addressing range of a normal function
+ call. */
+ { "long_call", 0, 0, false, true, true, NULL },
+ /* Whereas these functions are always known to reside within the 26 bit
+ addressing range. */
+ { "short_call", 0, 0, false, true, true, NULL },
+ /* Interrupt Service Routines have special prologue and epilogue requirements. */
+ { "isr", 0, 1, false, false, false, arm_handle_isr_attribute },
+ { "interrupt", 0, 1, false, false, false, arm_handle_isr_attribute },
+ { "naked", 0, 0, true, false, false, arm_handle_fndecl_attribute },
+#ifdef ARM_PE
+ /* ARM/PE has three new attributes:
+ interfacearm - ?
+ dllexport - for exporting a function/variable that will live in a dll
+ dllimport - for importing a function/variable from a dll
+
+ Microsoft allows multiple declspecs in one __declspec, separating
+ them with spaces. We do NOT support this. Instead, use __declspec
+ multiple times.
+ */
+ { "dllimport", 0, 0, true, false, false, NULL },
+ { "dllexport", 0, 0, true, false, false, NULL },
+ { "interfacearm", 0, 0, true, false, false, arm_handle_fndecl_attribute },
+#elif TARGET_DLLIMPORT_DECL_ATTRIBUTES
+ { "dllimport", 0, 0, false, false, false, handle_dll_attribute },
+ { "dllexport", 0, 0, false, false, false, handle_dll_attribute },
+ { "notshared", 0, 0, false, true, false, arm_handle_notshared_attribute },
+#endif
+ { NULL, 0, 0, false, false, false, NULL }
+};
/* Forward function declarations. */
static arm_stack_offsets *arm_get_frame_offsets (void);
@@ -107,11 +147,6 @@ static unsigned long arm_compute_save_reg0_reg12_mask (void);
static unsigned long arm_compute_save_reg_mask (void);
static unsigned long arm_isr_value (tree);
static unsigned long arm_compute_func_type (void);
-static tree arm_handle_fndecl_attribute (tree *, tree, tree, int, bool *);
-static tree arm_handle_isr_attribute (tree *, tree, tree, int, bool *);
-#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
-static tree arm_handle_notshared_attribute (tree *, tree, tree, int, bool *);
-#endif
static void arm_output_function_epilogue (FILE *, HOST_WIDE_INT);
static void arm_output_function_prologue (FILE *, HOST_WIDE_INT);
static void thumb_output_function_prologue (FILE *, HOST_WIDE_INT);
@@ -655,12 +690,12 @@ static const struct fpu_desc all_fpus[] =
static const enum fputype fp_model_for_fpu[] =
{
/* No FP hardware. */
- ARM_FP_MODEL_UNKNOWN, /* FPUTYPE_NONE */
- ARM_FP_MODEL_FPA, /* FPUTYPE_FPA */
- ARM_FP_MODEL_FPA, /* FPUTYPE_FPA_EMU2 */
- ARM_FP_MODEL_FPA, /* FPUTYPE_FPA_EMU3 */
- ARM_FP_MODEL_MAVERICK, /* FPUTYPE_MAVERICK */
- ARM_FP_MODEL_VFP /* FPUTYPE_VFP */
+ (enum fputype) ARM_FP_MODEL_UNKNOWN, /* FPUTYPE_NONE */
+ (enum fputype) ARM_FP_MODEL_FPA, /* FPUTYPE_FPA */
+ (enum fputype) ARM_FP_MODEL_FPA, /* FPUTYPE_FPA_EMU2 */
+ (enum fputype) ARM_FP_MODEL_FPA, /* FPUTYPE_FPA_EMU3 */
+ (enum fputype) ARM_FP_MODEL_MAVERICK, /* FPUTYPE_MAVERICK */
+ (enum fputype) ARM_FP_MODEL_VFP /* FPUTYPE_VFP */
};
@@ -943,13 +978,13 @@ arm_override_options (void)
unsigned int sought;
enum processor_type cpu;
- cpu = TARGET_CPU_DEFAULT;
+ cpu = (enum processor_type) TARGET_CPU_DEFAULT;
if (cpu == arm_none)
{
#ifdef SUBTARGET_CPU_DEFAULT
/* Use the subtarget default CPU if none was specified by
configure. */
- cpu = SUBTARGET_CPU_DEFAULT;
+ cpu = (enum processor_type) SUBTARGET_CPU_DEFAULT;
#endif
/* Default to ARM6. */
if (cpu == arm_none)
@@ -1172,7 +1207,7 @@ arm_override_options (void)
{
arm_fpu_arch = all_fpus[i].fpu;
arm_fpu_tune = arm_fpu_arch;
- arm_fp_model = fp_model_for_fpu[arm_fpu_arch];
+ arm_fp_model = (enum arm_fp_model)fp_model_for_fpu[arm_fpu_arch];
break;
}
}
@@ -1201,7 +1236,7 @@ arm_override_options (void)
arm_fpu_tune = FPUTYPE_FPA;
else
arm_fpu_tune = arm_fpu_arch;
- arm_fp_model = fp_model_for_fpu[arm_fpu_arch];
+ arm_fp_model = (enum arm_fp_model)fp_model_for_fpu[arm_fpu_arch];
gcc_assert (arm_fp_model != ARM_FP_MODEL_UNKNOWN);
}
@@ -2827,41 +2862,6 @@ arm_pr_long_calls_off (struct cpp_reader * pfile ATTRIBUTE_UNUSED)
arm_pragma_long_calls = OFF;
}
-/* Table of machine attributes. */
-const struct attribute_spec arm_attribute_table[] =
-{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- /* Function calls made to this symbol must be done indirectly, because
- it may lie outside of the 26 bit addressing range of a normal function
- call. */
- { "long_call", 0, 0, false, true, true, NULL },
- /* Whereas these functions are always known to reside within the 26 bit
- addressing range. */
- { "short_call", 0, 0, false, true, true, NULL },
- /* Interrupt Service Routines have special prologue and epilogue requirements. */
- { "isr", 0, 1, false, false, false, arm_handle_isr_attribute },
- { "interrupt", 0, 1, false, false, false, arm_handle_isr_attribute },
- { "naked", 0, 0, true, false, false, arm_handle_fndecl_attribute },
-#ifdef ARM_PE
- /* ARM/PE has three new attributes:
- interfacearm - ?
- dllexport - for exporting a function/variable that will live in a dll
- dllimport - for importing a function/variable from a dll
-
- Microsoft allows multiple declspecs in one __declspec, separating
- them with spaces. We do NOT support this. Instead, use __declspec
- multiple times.
- */
- { "dllimport", 0, 0, true, false, false, NULL },
- { "dllexport", 0, 0, true, false, false, NULL },
- { "interfacearm", 0, 0, true, false, false, arm_handle_fndecl_attribute },
-#elif TARGET_DLLIMPORT_DECL_ATTRIBUTES
- { "dllimport", 0, 0, false, false, false, handle_dll_attribute },
- { "dllexport", 0, 0, false, false, false, handle_dll_attribute },
- { "notshared", 0, 0, false, true, false, arm_handle_notshared_attribute },
-#endif
- { NULL, 0, 0, false, false, false, NULL }
-};
/* Handle an attribute requiring a FUNCTION_DECL;
arguments as in struct attribute_spec.handler. */
@@ -3021,7 +3021,7 @@ arm_encode_call_attribute (tree decl, int flag)
if (DECL_WEAK (decl) && flag == SHORT_CALL_FLAG_CHAR)
return;
- newstr = alloca (len + 2);
+ newstr = (char *) alloca (len + 2);
newstr[0] = flag;
strcpy (newstr + 1, str);
@@ -4185,7 +4185,7 @@ thumb_legitimize_reload_address (rtx *x_p,
x = copy_rtx (x);
push_reload (orig_x, NULL_RTX, x_p, NULL, MODE_BASE_REG_CLASS (mode),
- Pmode, VOIDmode, 0, 0, opnum, type);
+ Pmode, VOIDmode, 0, 0, opnum, (enum reload_type) type);
return x;
}
@@ -4202,7 +4202,7 @@ thumb_legitimize_reload_address (rtx *x_p,
x = copy_rtx (x);
push_reload (orig_x, NULL_RTX, x_p, NULL, MODE_BASE_REG_CLASS (mode),
- Pmode, VOIDmode, 0, 0, opnum, type);
+ Pmode, VOIDmode, 0, 0, opnum, (enum reload_type) type);
return x;
}
@@ -4625,8 +4625,8 @@ arm_rtx_costs_1 (rtx x, enum rtx_code code, enum rtx_code outer)
}
/* RTX costs when optimizing for size. */
-static bool
-arm_size_rtx_costs (rtx x, int code, int outer_code, int *total)
+static inline bool
+do_arm_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code, int *total)
{
enum machine_mode mode = GET_MODE (x);
@@ -4845,10 +4845,16 @@ arm_size_rtx_costs (rtx x, int code, int outer_code, int *total)
}
}
+static bool
+arm_size_rtx_costs (rtx x, int code, int outer_code, int *total)
+{
+ return do_arm_size_rtx_costs (x, (enum rtx_code)code, (enum rtx_code)outer_code, total);
+}
+
/* RTX costs for cores with a slow MUL implementation. */
-static bool
-arm_slowmul_rtx_costs (rtx x, int code, int outer_code, int *total)
+static inline bool
+do_arm_slowmul_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code, int *total)
{
enum machine_mode mode = GET_MODE (x);
@@ -4898,11 +4904,16 @@ arm_slowmul_rtx_costs (rtx x, int code, int outer_code, int *total)
}
}
+static bool
+arm_slowmul_rtx_costs (rtx x, int code, int outer_code, int *total)
+{
+ return do_arm_slowmul_rtx_costs (x, (enum rtx_code)code, (enum rtx_code)outer_code, total);
+}
/* RTX cost for cores with a fast multiply unit (M variants). */
-static bool
-arm_fastmul_rtx_costs (rtx x, int code, int outer_code, int *total)
+static inline bool
+do_arm_fastmul_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code, int *total)
{
enum machine_mode mode = GET_MODE (x);
@@ -4964,11 +4975,16 @@ arm_fastmul_rtx_costs (rtx x, int code, int outer_code, int *total)
}
}
+static bool
+arm_fastmul_rtx_costs (rtx x, int code, int outer_code, int *total)
+{
+ return do_arm_fastmul_rtx_costs (x, (enum rtx_code)code, (enum rtx_code)outer_code, total);
+}
/* RTX cost for XScale CPUs. */
-static bool
-arm_xscale_rtx_costs (rtx x, int code, int outer_code, int *total)
+static inline bool
+do_arm_xscale_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code, int *total)
{
enum machine_mode mode = GET_MODE (x);
@@ -5045,11 +5061,16 @@ arm_xscale_rtx_costs (rtx x, int code, int outer_code, int *total)
}
}
+static bool
+arm_xscale_rtx_costs (rtx x, int code, int outer_code, int *total)
+{
+ return do_arm_xscale_rtx_costs (x, (enum rtx_code)code, (enum rtx_code)outer_code, total);
+}
/* RTX costs for 9e (and later) cores. */
-static bool
-arm_9e_rtx_costs (rtx x, int code, int outer_code, int *total)
+static inline bool
+do_arm_9e_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code, int *total)
{
enum machine_mode mode = GET_MODE (x);
int nonreg_cost;
@@ -5110,6 +5131,13 @@ arm_9e_rtx_costs (rtx x, int code, int outer_code, int *total)
return true;
}
}
+
+static bool
+arm_9e_rtx_costs (rtx x, int code, int outer_code, int *total)
+{
+ return do_arm_9e_rtx_costs (x, (enum rtx_code)code, (enum rtx_code)outer_code, total);
+}
+
/* All address computations that can be done are free, but rtx cost returns
the same for practically all of them. So we weight the different types
of address here in the order (most pref first):
@@ -5788,7 +5816,7 @@ adjacent_mem_locations (rtx a, rtx b)
/* Don't accept any offset that will require multiple
instructions to handle, since this would cause the
arith_adjacentmem pattern to output an overlong sequence. */
- if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1))
+ if (!const_ok_for_op (PLUS, (enum rtx_code) val0) || !const_ok_for_op (PLUS, (enum rtx_code) val1))
return 0;
/* Don't allow an eliminable register: register elimination can make
@@ -11429,7 +11457,7 @@ get_arm_condition_code (rtx comparison)
if (comp_code == EQ)
return ARM_INVERSE_CONDITION_CODE (code);
- return code;
+ return (enum arm_cond_code) code;
case CC_NOOVmode:
switch (comp_code)
@@ -11936,7 +11964,7 @@ arm_hard_regno_mode_ok (unsigned int regno, enum machine_mode mode)
&& regno <= LAST_FPA_REGNUM);
}
-int
+enum reg_class
arm_regno_class (int regno)
{
if (TARGET_THUMB)
@@ -12079,7 +12107,7 @@ static const struct builtin_description bdesc_2arg[] =
{
#define IWMMXT_BUILTIN(code, string, builtin) \
{ FL_IWMMXT, CODE_FOR_##code, "__builtin_arm_" string, \
- ARM_BUILTIN_##builtin, 0, 0 },
+ ARM_BUILTIN_##builtin, UNKNOWN, 0 },
IWMMXT_BUILTIN (addv8qi3, "waddb", WADDB)
IWMMXT_BUILTIN (addv4hi3, "waddh", WADDH)
@@ -12141,7 +12169,7 @@ static const struct builtin_description bdesc_2arg[] =
IWMMXT_BUILTIN (iwmmxt_wmaddu, "wmaddu", WMADDU)
#define IWMMXT_BUILTIN2(code, builtin) \
- { FL_IWMMXT, CODE_FOR_##code, NULL, ARM_BUILTIN_##builtin, 0, 0 },
+ { FL_IWMMXT, CODE_FOR_##code, NULL, ARM_BUILTIN_##builtin, UNKNOWN, 0 },
IWMMXT_BUILTIN2 (iwmmxt_wpackhss, WPACKHSS)
IWMMXT_BUILTIN2 (iwmmxt_wpackwss, WPACKWSS)
@@ -12430,99 +12458,99 @@ arm_init_iwmmxt_builtins (void)
gcc_unreachable ();
}
- def_mbuiltin (d->mask, d->name, type, d->code);
+ def_mbuiltin (d->mask, d->name, type, (enum built_in_function)d->code);
}
/* Add the remaining MMX insns with somewhat more complicated types. */
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wzero", di_ftype_void, ARM_BUILTIN_WZERO);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_setwcx", void_ftype_int_int, ARM_BUILTIN_SETWCX);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_getwcx", int_ftype_int, ARM_BUILTIN_GETWCX);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsllh", v4hi_ftype_v4hi_di, ARM_BUILTIN_WSLLH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsllw", v2si_ftype_v2si_di, ARM_BUILTIN_WSLLW);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wslld", di_ftype_di_di, ARM_BUILTIN_WSLLD);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsllhi", v4hi_ftype_v4hi_int, ARM_BUILTIN_WSLLHI);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsllwi", v2si_ftype_v2si_int, ARM_BUILTIN_WSLLWI);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wslldi", di_ftype_di_int, ARM_BUILTIN_WSLLDI);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrlh", v4hi_ftype_v4hi_di, ARM_BUILTIN_WSRLH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrlw", v2si_ftype_v2si_di, ARM_BUILTIN_WSRLW);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrld", di_ftype_di_di, ARM_BUILTIN_WSRLD);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrlhi", v4hi_ftype_v4hi_int, ARM_BUILTIN_WSRLHI);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrlwi", v2si_ftype_v2si_int, ARM_BUILTIN_WSRLWI);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrldi", di_ftype_di_int, ARM_BUILTIN_WSRLDI);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrah", v4hi_ftype_v4hi_di, ARM_BUILTIN_WSRAH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsraw", v2si_ftype_v2si_di, ARM_BUILTIN_WSRAW);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrad", di_ftype_di_di, ARM_BUILTIN_WSRAD);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrahi", v4hi_ftype_v4hi_int, ARM_BUILTIN_WSRAHI);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrawi", v2si_ftype_v2si_int, ARM_BUILTIN_WSRAWI);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsradi", di_ftype_di_int, ARM_BUILTIN_WSRADI);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrorh", v4hi_ftype_v4hi_di, ARM_BUILTIN_WRORH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrorw", v2si_ftype_v2si_di, ARM_BUILTIN_WRORW);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrord", di_ftype_di_di, ARM_BUILTIN_WRORD);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrorhi", v4hi_ftype_v4hi_int, ARM_BUILTIN_WRORHI);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrorwi", v2si_ftype_v2si_int, ARM_BUILTIN_WRORWI);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrordi", di_ftype_di_int, ARM_BUILTIN_WRORDI);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wshufh", v4hi_ftype_v4hi_int, ARM_BUILTIN_WSHUFH);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsadb", v2si_ftype_v8qi_v8qi, ARM_BUILTIN_WSADB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsadh", v2si_ftype_v4hi_v4hi, ARM_BUILTIN_WSADH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsadbz", v2si_ftype_v8qi_v8qi, ARM_BUILTIN_WSADBZ);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsadhz", v2si_ftype_v4hi_v4hi, ARM_BUILTIN_WSADHZ);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmsb", int_ftype_v8qi_int, ARM_BUILTIN_TEXTRMSB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmsh", int_ftype_v4hi_int, ARM_BUILTIN_TEXTRMSH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmsw", int_ftype_v2si_int, ARM_BUILTIN_TEXTRMSW);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmub", int_ftype_v8qi_int, ARM_BUILTIN_TEXTRMUB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmuh", int_ftype_v4hi_int, ARM_BUILTIN_TEXTRMUH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmuw", int_ftype_v2si_int, ARM_BUILTIN_TEXTRMUW);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tinsrb", v8qi_ftype_v8qi_int_int, ARM_BUILTIN_TINSRB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tinsrh", v4hi_ftype_v4hi_int_int, ARM_BUILTIN_TINSRH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tinsrw", v2si_ftype_v2si_int_int, ARM_BUILTIN_TINSRW);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_waccb", di_ftype_v8qi, ARM_BUILTIN_WACCB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wacch", di_ftype_v4hi, ARM_BUILTIN_WACCH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_waccw", di_ftype_v2si, ARM_BUILTIN_WACCW);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmovmskb", int_ftype_v8qi, ARM_BUILTIN_TMOVMSKB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmovmskh", int_ftype_v4hi, ARM_BUILTIN_TMOVMSKH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmovmskw", int_ftype_v2si, ARM_BUILTIN_TMOVMSKW);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackhss", v8qi_ftype_v4hi_v4hi, ARM_BUILTIN_WPACKHSS);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackhus", v8qi_ftype_v4hi_v4hi, ARM_BUILTIN_WPACKHUS);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackwus", v4hi_ftype_v2si_v2si, ARM_BUILTIN_WPACKWUS);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackwss", v4hi_ftype_v2si_v2si, ARM_BUILTIN_WPACKWSS);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackdus", v2si_ftype_di_di, ARM_BUILTIN_WPACKDUS);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackdss", v2si_ftype_di_di, ARM_BUILTIN_WPACKDSS);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehub", v4hi_ftype_v8qi, ARM_BUILTIN_WUNPCKEHUB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehuh", v2si_ftype_v4hi, ARM_BUILTIN_WUNPCKEHUH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehuw", di_ftype_v2si, ARM_BUILTIN_WUNPCKEHUW);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehsb", v4hi_ftype_v8qi, ARM_BUILTIN_WUNPCKEHSB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehsh", v2si_ftype_v4hi, ARM_BUILTIN_WUNPCKEHSH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehsw", di_ftype_v2si, ARM_BUILTIN_WUNPCKEHSW);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckelub", v4hi_ftype_v8qi, ARM_BUILTIN_WUNPCKELUB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckeluh", v2si_ftype_v4hi, ARM_BUILTIN_WUNPCKELUH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckeluw", di_ftype_v2si, ARM_BUILTIN_WUNPCKELUW);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckelsb", v4hi_ftype_v8qi, ARM_BUILTIN_WUNPCKELSB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckelsh", v2si_ftype_v4hi, ARM_BUILTIN_WUNPCKELSH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckelsw", di_ftype_v2si, ARM_BUILTIN_WUNPCKELSW);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wmacs", di_ftype_di_v4hi_v4hi, ARM_BUILTIN_WMACS);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wmacsz", di_ftype_v4hi_v4hi, ARM_BUILTIN_WMACSZ);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wmacu", di_ftype_di_v4hi_v4hi, ARM_BUILTIN_WMACU);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_wmacuz", di_ftype_v4hi_v4hi, ARM_BUILTIN_WMACUZ);
-
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_walign", v8qi_ftype_v8qi_v8qi_int, ARM_BUILTIN_WALIGN);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmia", di_ftype_di_int_int, ARM_BUILTIN_TMIA);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmiaph", di_ftype_di_int_int, ARM_BUILTIN_TMIAPH);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmiabb", di_ftype_di_int_int, ARM_BUILTIN_TMIABB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmiabt", di_ftype_di_int_int, ARM_BUILTIN_TMIABT);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmiatb", di_ftype_di_int_int, ARM_BUILTIN_TMIATB);
- def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmiatt", di_ftype_di_int_int, ARM_BUILTIN_TMIATT);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wzero", di_ftype_void, (enum built_in_function)ARM_BUILTIN_WZERO);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_setwcx", void_ftype_int_int, (enum built_in_function)ARM_BUILTIN_SETWCX);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_getwcx", int_ftype_int, (enum built_in_function)ARM_BUILTIN_GETWCX);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsllh", v4hi_ftype_v4hi_di, (enum built_in_function)ARM_BUILTIN_WSLLH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsllw", v2si_ftype_v2si_di, (enum built_in_function)ARM_BUILTIN_WSLLW);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wslld", di_ftype_di_di, (enum built_in_function)ARM_BUILTIN_WSLLD);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsllhi", v4hi_ftype_v4hi_int, (enum built_in_function)ARM_BUILTIN_WSLLHI);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsllwi", v2si_ftype_v2si_int, (enum built_in_function)ARM_BUILTIN_WSLLWI);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wslldi", di_ftype_di_int, (enum built_in_function)ARM_BUILTIN_WSLLDI);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrlh", v4hi_ftype_v4hi_di, (enum built_in_function)ARM_BUILTIN_WSRLH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrlw", v2si_ftype_v2si_di, (enum built_in_function)ARM_BUILTIN_WSRLW);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrld", di_ftype_di_di, (enum built_in_function)ARM_BUILTIN_WSRLD);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrlhi", v4hi_ftype_v4hi_int, (enum built_in_function)ARM_BUILTIN_WSRLHI);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrlwi", v2si_ftype_v2si_int, (enum built_in_function)ARM_BUILTIN_WSRLWI);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrldi", di_ftype_di_int, (enum built_in_function)ARM_BUILTIN_WSRLDI);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrah", v4hi_ftype_v4hi_di, (enum built_in_function)ARM_BUILTIN_WSRAH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsraw", v2si_ftype_v2si_di, (enum built_in_function)ARM_BUILTIN_WSRAW);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrad", di_ftype_di_di, (enum built_in_function)ARM_BUILTIN_WSRAD);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrahi", v4hi_ftype_v4hi_int, (enum built_in_function)ARM_BUILTIN_WSRAHI);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsrawi", v2si_ftype_v2si_int, (enum built_in_function)ARM_BUILTIN_WSRAWI);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsradi", di_ftype_di_int, (enum built_in_function)ARM_BUILTIN_WSRADI);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrorh", v4hi_ftype_v4hi_di, (enum built_in_function)ARM_BUILTIN_WRORH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrorw", v2si_ftype_v2si_di, (enum built_in_function)ARM_BUILTIN_WRORW);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrord", di_ftype_di_di, (enum built_in_function)ARM_BUILTIN_WRORD);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrorhi", v4hi_ftype_v4hi_int, (enum built_in_function)ARM_BUILTIN_WRORHI);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrorwi", v2si_ftype_v2si_int, (enum built_in_function)ARM_BUILTIN_WRORWI);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wrordi", di_ftype_di_int, (enum built_in_function)ARM_BUILTIN_WRORDI);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wshufh", v4hi_ftype_v4hi_int, (enum built_in_function)ARM_BUILTIN_WSHUFH);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsadb", v2si_ftype_v8qi_v8qi, (enum built_in_function)ARM_BUILTIN_WSADB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsadh", v2si_ftype_v4hi_v4hi, (enum built_in_function)ARM_BUILTIN_WSADH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsadbz", v2si_ftype_v8qi_v8qi, (enum built_in_function)ARM_BUILTIN_WSADBZ);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wsadhz", v2si_ftype_v4hi_v4hi, (enum built_in_function)ARM_BUILTIN_WSADHZ);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmsb", int_ftype_v8qi_int, (enum built_in_function)ARM_BUILTIN_TEXTRMSB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmsh", int_ftype_v4hi_int, (enum built_in_function)ARM_BUILTIN_TEXTRMSH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmsw", int_ftype_v2si_int, (enum built_in_function)ARM_BUILTIN_TEXTRMSW);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmub", int_ftype_v8qi_int, (enum built_in_function)ARM_BUILTIN_TEXTRMUB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmuh", int_ftype_v4hi_int, (enum built_in_function)ARM_BUILTIN_TEXTRMUH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_textrmuw", int_ftype_v2si_int, (enum built_in_function)ARM_BUILTIN_TEXTRMUW);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tinsrb", v8qi_ftype_v8qi_int_int, (enum built_in_function)ARM_BUILTIN_TINSRB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tinsrh", v4hi_ftype_v4hi_int_int, (enum built_in_function)ARM_BUILTIN_TINSRH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tinsrw", v2si_ftype_v2si_int_int, (enum built_in_function)ARM_BUILTIN_TINSRW);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_waccb", di_ftype_v8qi, (enum built_in_function)ARM_BUILTIN_WACCB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wacch", di_ftype_v4hi, (enum built_in_function)ARM_BUILTIN_WACCH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_waccw", di_ftype_v2si, (enum built_in_function)ARM_BUILTIN_WACCW);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmovmskb", int_ftype_v8qi, (enum built_in_function)ARM_BUILTIN_TMOVMSKB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmovmskh", int_ftype_v4hi, (enum built_in_function)ARM_BUILTIN_TMOVMSKH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmovmskw", int_ftype_v2si, (enum built_in_function)ARM_BUILTIN_TMOVMSKW);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackhss", v8qi_ftype_v4hi_v4hi, (enum built_in_function)ARM_BUILTIN_WPACKHSS);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackhus", v8qi_ftype_v4hi_v4hi, (enum built_in_function)ARM_BUILTIN_WPACKHUS);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackwus", v4hi_ftype_v2si_v2si, (enum built_in_function)ARM_BUILTIN_WPACKWUS);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackwss", v4hi_ftype_v2si_v2si, (enum built_in_function)ARM_BUILTIN_WPACKWSS);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackdus", v2si_ftype_di_di, (enum built_in_function)ARM_BUILTIN_WPACKDUS);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wpackdss", v2si_ftype_di_di, (enum built_in_function)ARM_BUILTIN_WPACKDSS);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehub", v4hi_ftype_v8qi, (enum built_in_function)ARM_BUILTIN_WUNPCKEHUB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehuh", v2si_ftype_v4hi, (enum built_in_function)ARM_BUILTIN_WUNPCKEHUH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehuw", di_ftype_v2si, (enum built_in_function)ARM_BUILTIN_WUNPCKEHUW);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehsb", v4hi_ftype_v8qi, (enum built_in_function)ARM_BUILTIN_WUNPCKEHSB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehsh", v2si_ftype_v4hi, (enum built_in_function)ARM_BUILTIN_WUNPCKEHSH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckehsw", di_ftype_v2si, (enum built_in_function)ARM_BUILTIN_WUNPCKEHSW);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckelub", v4hi_ftype_v8qi, (enum built_in_function)ARM_BUILTIN_WUNPCKELUB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckeluh", v2si_ftype_v4hi, (enum built_in_function)ARM_BUILTIN_WUNPCKELUH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckeluw", di_ftype_v2si, (enum built_in_function)ARM_BUILTIN_WUNPCKELUW);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckelsb", v4hi_ftype_v8qi, (enum built_in_function)ARM_BUILTIN_WUNPCKELSB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckelsh", v2si_ftype_v4hi, (enum built_in_function)ARM_BUILTIN_WUNPCKELSH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wunpckelsw", di_ftype_v2si, (enum built_in_function)ARM_BUILTIN_WUNPCKELSW);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wmacs", di_ftype_di_v4hi_v4hi, (enum built_in_function)ARM_BUILTIN_WMACS);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wmacsz", di_ftype_v4hi_v4hi, (enum built_in_function)ARM_BUILTIN_WMACSZ);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wmacu", di_ftype_di_v4hi_v4hi, (enum built_in_function)ARM_BUILTIN_WMACU);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_wmacuz", di_ftype_v4hi_v4hi, (enum built_in_function)ARM_BUILTIN_WMACUZ);
+
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_walign", v8qi_ftype_v8qi_v8qi_int, (enum built_in_function)ARM_BUILTIN_WALIGN);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmia", di_ftype_di_int_int, (enum built_in_function)ARM_BUILTIN_TMIA);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmiaph", di_ftype_di_int_int, (enum built_in_function)ARM_BUILTIN_TMIAPH);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmiabb", di_ftype_di_int_int, (enum built_in_function)ARM_BUILTIN_TMIABB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmiabt", di_ftype_di_int_int, (enum built_in_function)ARM_BUILTIN_TMIABT);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmiatb", di_ftype_di_int_int, (enum built_in_function)ARM_BUILTIN_TMIATB);
+ def_mbuiltin (FL_IWMMXT, "__builtin_arm_tmiatt", di_ftype_di_int_int, (enum built_in_function)ARM_BUILTIN_TMIATT);
}
static void
@@ -12534,7 +12562,7 @@ arm_init_tls_builtins (void)
ftype = build_function_type (ptr_type_node, void_list_node);
lang_hooks.builtin_function ("__builtin_thread_pointer", ftype,
- ARM_BUILTIN_THREAD_POINTER, BUILT_IN_MD,
+ (enum built_in_function)ARM_BUILTIN_THREAD_POINTER, BUILT_IN_MD,
NULL, const_nothrow);
}
@@ -15518,7 +15546,7 @@ arm_emit_tls_decoration (FILE *fp, rtx x)
rtx val;
val = XVECEXP (x, 0, 0);
- reloc = INTVAL (XVECEXP (x, 0, 1));
+ reloc = (enum tls_reloc) INTVAL (XVECEXP (x, 0, 1));
output_addr_const (fp, val);
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 26d397726db..721610109c8 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1695,7 +1695,7 @@ typedef struct
TARGET_ARM ? 12 : 20)), \
FNADDR); \
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
- 0, VOIDmode, 2, TRAMP, Pmode, \
+ LCT_NORMAL, VOIDmode, 2, TRAMP, Pmode, \
plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode); \
}
#endif
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index b28e3d01a57..81658689f8c 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -4824,12 +4824,12 @@
&& GET_CODE (base = XEXP (base, 0)) == REG))
&& REGNO_POINTER_ALIGN (REGNO (base)) >= 32)
{
- rtx new;
+ rtx tmp;
- new = widen_memory_access (operands[1], SImode,
+ tmp = widen_memory_access (operands[1], SImode,
((INTVAL (offset) & ~3)
- INTVAL (offset)));
- emit_insn (gen_movsi (reg, new));
+ emit_insn (gen_movsi (reg, tmp));
if (((INTVAL (offset) & 2) != 0)
^ (BYTES_BIG_ENDIAN ? 1 : 0))
{
@@ -8037,7 +8037,7 @@
if (REGNO (src) == R0_REGNUM)
src = gen_rtx_REG (TImode, R0_REGNUM);
- XVECEXP (par, 0, i) = gen_rtx_EXPR_LIST (VOIDmode, src,
+ XVECEXP (par, 0, i) = gen_rtx_EXPR_LIST (REG_DEP_TRUE, src,
GEN_INT (size));
size += GET_MODE_SIZE (GET_MODE (src));
}
diff --git a/gcc/config/arm/uclinux-elf.h b/gcc/config/arm/uclinux-elf.h
index 9f112cddaa2..e731da9ac87 100644
--- a/gcc/config/arm/uclinux-elf.h
+++ b/gcc/config/arm/uclinux-elf.h
@@ -35,10 +35,6 @@
/* Do not assume anything about header files. */
#define NO_IMPLICIT_EXTERN_C
-/* The GNU C++ standard library requires that these macros be defined. */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c
index 3757523a620..e93d6d1c9c9 100644
--- a/gcc/config/c4x/c4x.c
+++ b/gcc/config/c4x/c4x.c
@@ -4405,7 +4405,7 @@ c4x_expand_builtin (tree exp, rtx target,
{
case C4X_BUILTIN_FIX:
arg0 = TREE_VALUE (arglist);
- r0 = expand_expr (arg0, NULL_RTX, QFmode, 0);
+ r0 = expand_expr (arg0, NULL_RTX, QFmode, EXPAND_NORMAL);
if (! target || ! register_operand (target, QImode))
target = gen_reg_rtx (QImode);
emit_insn (gen_fixqfqi_clobber (target, r0));
@@ -4413,7 +4413,7 @@ c4x_expand_builtin (tree exp, rtx target,
case C4X_BUILTIN_FIX_ANSI:
arg0 = TREE_VALUE (arglist);
- r0 = expand_expr (arg0, NULL_RTX, QFmode, 0);
+ r0 = expand_expr (arg0, NULL_RTX, QFmode, EXPAND_NORMAL);
if (! target || ! register_operand (target, QImode))
target = gen_reg_rtx (QImode);
emit_insn (gen_fix_truncqfqi2 (target, r0));
@@ -4424,8 +4424,8 @@ c4x_expand_builtin (tree exp, rtx target,
break;
arg0 = TREE_VALUE (arglist);
arg1 = TREE_VALUE (TREE_CHAIN (arglist));
- r0 = expand_expr (arg0, NULL_RTX, QImode, 0);
- r1 = expand_expr (arg1, NULL_RTX, QImode, 0);
+ r0 = expand_expr (arg0, NULL_RTX, QImode, EXPAND_NORMAL);
+ r1 = expand_expr (arg1, NULL_RTX, QImode, EXPAND_NORMAL);
if (! target || ! register_operand (target, QImode))
target = gen_reg_rtx (QImode);
emit_insn (gen_mulqi3_24_clobber (target, r0, r1));
@@ -4435,7 +4435,7 @@ c4x_expand_builtin (tree exp, rtx target,
if (TARGET_C3X)
break;
arg0 = TREE_VALUE (arglist);
- r0 = expand_expr (arg0, NULL_RTX, QFmode, 0);
+ r0 = expand_expr (arg0, NULL_RTX, QFmode, EXPAND_NORMAL);
if (! target || ! register_operand (target, QFmode))
target = gen_reg_rtx (QFmode);
emit_insn (gen_toieee (target, r0));
@@ -4445,7 +4445,7 @@ c4x_expand_builtin (tree exp, rtx target,
if (TARGET_C3X)
break;
arg0 = TREE_VALUE (arglist);
- r0 = expand_expr (arg0, NULL_RTX, QFmode, 0);
+ r0 = expand_expr (arg0, NULL_RTX, QFmode, EXPAND_NORMAL);
if (register_operand (r0, QFmode))
{
r1 = assign_stack_local (QFmode, GET_MODE_SIZE (QFmode), 0);
@@ -4461,7 +4461,7 @@ c4x_expand_builtin (tree exp, rtx target,
if (TARGET_C3X)
break;
arg0 = TREE_VALUE (arglist);
- r0 = expand_expr (arg0, NULL_RTX, QFmode, 0);
+ r0 = expand_expr (arg0, NULL_RTX, QFmode, EXPAND_NORMAL);
if (! target || ! register_operand (target, QFmode))
target = gen_reg_rtx (QFmode);
emit_insn (gen_rcpfqf_clobber (target, r0));
diff --git a/gcc/config/chorus.h b/gcc/config/chorus.h
index 14cb3a02357..b0698fddf28 100644
--- a/gcc/config/chorus.h
+++ b/gcc/config/chorus.h
@@ -36,6 +36,3 @@ Boston, MA 02110-1301, USA. */
/* Type used for wchar_t, as a string used in a declaration. */
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
-
-#undef LINK_SPEC
-#define LINK_SPEC ""
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index dc0c163fc0c..2f5de99993f 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -1222,7 +1222,7 @@ cris_reload_address_legitimized (rtx x,
int itype,
int ind_levels ATTRIBUTE_UNUSED)
{
- enum reload_type type = itype;
+ enum reload_type type = (enum reload_type) itype;
rtx op0, op1;
rtx *op0p;
rtx *op1p;
@@ -1698,14 +1698,14 @@ cris_rtx_costs (rtx x, int code, int outer_code, int *total)
&& GET_CODE (XEXP (x, 0)) != CONST_INT
&& !CONST_OK_FOR_LETTER_P (INTVAL (XEXP (x, 1)), 'I'))
{
- *total = (rtx_cost (XEXP (x, 0), outer_code) + 2
+ *total = (rtx_cost (XEXP (x, 0), (enum rtx_code) outer_code) + 2
+ 2 * GET_MODE_NUNITS (GET_MODE (XEXP (x, 0))));
return true;
}
return false;
case ZERO_EXTEND: case SIGN_EXTEND:
- *total = rtx_cost (XEXP (x, 0), outer_code);
+ *total = rtx_cost (XEXP (x, 0), (enum rtx_code) outer_code);
return true;
default:
@@ -2286,7 +2286,7 @@ cris_init_expanders (void)
static struct machine_function *
cris_init_machine_status (void)
{
- return ggc_alloc_cleared (sizeof (struct machine_function));
+ return (struct machine_function *) ggc_alloc_cleared (sizeof (struct machine_function));
}
/* Split a 2 word move (DI or presumably DF) into component parts.
diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c
index 51dbf5c9560..ffe8d830263 100644
--- a/gcc/config/darwin-c.c
+++ b/gcc/config/darwin-c.c
@@ -182,7 +182,7 @@ darwin_pragma_ms_struct (cpp_reader *pfile ATTRIBUTE_UNUSED)
BAD ("junk at end of '#pragma ms_struct'");
}
-static struct {
+static struct frameworks_s {
size_t len;
const char *name;
cpp_dir* dir;
@@ -214,7 +214,7 @@ add_framework (const char *name, size_t len, cpp_dir *dir)
{
max_frameworks = i*2;
max_frameworks += i == 0;
- frameworks_in_use = xrealloc (frameworks_in_use,
+ frameworks_in_use = (struct frameworks_s *) xrealloc (frameworks_in_use,
max_frameworks*sizeof(*frameworks_in_use));
}
dir_name = XNEWVEC (char, len + 1);
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 587a327c870..616967e2268 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -365,7 +365,7 @@ machopic_indirection_hash (const void *slot)
static int
machopic_indirection_eq (const void *slot, const void *key)
{
- return strcmp (((const machopic_indirection *) slot)->ptr_name, key) == 0;
+ return strcmp (((const machopic_indirection *) slot)->ptr_name, (const char *) key) == 0;
}
/* Return the name of the non-lazy pointer (if STUB_P is false) or
@@ -419,7 +419,7 @@ machopic_indirection_name (rtx sym_ref, bool stub_p)
else
suffix = NON_LAZY_POINTER_SUFFIX;
- buffer = alloca (strlen ("&L")
+ buffer = (char *) alloca (strlen ("&L")
+ strlen (prefix)
+ namelen
+ strlen (suffix)
@@ -960,7 +960,7 @@ machopic_output_indirection (void **slot, void *data)
sym_name = IDENTIFIER_POINTER (id);
}
- sym = alloca (strlen (sym_name) + 2);
+ sym = (char *) alloca (strlen (sym_name) + 2);
if (sym_name[0] == '*' || sym_name[0] == '&')
strcpy (sym, sym_name + 1);
else if (sym_name[0] == '-' || sym_name[0] == '+')
@@ -968,7 +968,7 @@ machopic_output_indirection (void **slot, void *data)
else
sprintf (sym, "%s%s", user_label_prefix, sym_name);
- stub = alloca (strlen (ptr_name) + 2);
+ stub = (char *) alloca (strlen (ptr_name) + 2);
if (ptr_name[0] == '*' || ptr_name[0] == '&')
strcpy (stub, ptr_name + 1);
else
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 82b7cbfd8c2..4dd5778ffda 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -8696,7 +8696,7 @@ frv_read_argument (tree *arglistptr)
{
tree next = TREE_VALUE (*arglistptr);
*arglistptr = TREE_CHAIN (*arglistptr);
- return expand_expr (next, NULL_RTX, VOIDmode, 0);
+ return expand_normal (next);
}
/* Like frv_read_argument, but interpret the argument as the number
diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h
index 4e9f471b978..5d01681359a 100644
--- a/gcc/config/i386/djgpp.h
+++ b/gcc/config/i386/djgpp.h
@@ -65,14 +65,6 @@ Boston, MA 02110-1301, USA. */
#undef STANDARD_INCLUDE_DIR
#define STANDARD_INCLUDE_DIR "/dev/env/DJDIR/include/"
-/* Search for as.exe and ld.exe in DJGPP's binary directory. */
-#undef MD_EXEC_PREFIX
-#define MD_EXEC_PREFIX "/dev/env/DJDIR/bin/"
-
-/* Standard DJGPP library and startup files */
-#undef MD_STARTFILE_PREFIX
-#define MD_STARTFILE_PREFIX "/dev/env/DJDIR/lib/"
-
/* Correctly handle absolute filename detection in cp/xref.c */
#define FILE_NAME_ABSOLUTE_P(NAME) \
(((NAME)[0] == '/') || ((NAME)[0] == '\\') || \
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 8b2c798077c..ac537f8da47 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1141,7 +1141,6 @@ static int ix86_save_reg (unsigned int, int);
static void ix86_compute_frame_layout (struct ix86_frame *);
static int ix86_comp_type_attributes (tree, tree);
static int ix86_function_regparm (tree, tree);
-const struct attribute_spec ix86_attribute_table[];
static bool ix86_function_ok_for_sibcall (tree, tree);
static tree ix86_handle_cconv_attribute (tree *, tree, tree, int, bool *);
static int ix86_value_regno (enum machine_mode, tree, tree);
@@ -1207,6 +1206,41 @@ static section *x86_64_elf_select_section (tree decl, int reloc,
unsigned HOST_WIDE_INT align)
ATTRIBUTE_UNUSED;
+/* Table of valid machine attributes. */
+/* Table of valid machine attributes. */
+const struct attribute_spec ix86_attribute_table[] =
+{
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ /* Stdcall attribute says callee is responsible for popping arguments
+ if they are not variable. */
+ { "stdcall", 0, 0, false, true, true, ix86_handle_cconv_attribute },
+ /* Fastcall attribute says callee is responsible for popping arguments
+ if they are not variable. */
+ { "fastcall", 0, 0, false, true, true, ix86_handle_cconv_attribute },
+ /* Cdecl attribute says the callee is a normal C declaration */
+ { "cdecl", 0, 0, false, true, true, ix86_handle_cconv_attribute },
+ /* Regparm attribute specifies how many integer arguments are to be
+ passed in registers. */
+ { "regparm", 1, 1, false, true, true, ix86_handle_cconv_attribute },
+ /* Sseregparm attribute says we are using x86_64 calling conventions
+ for FP arguments. */
+ { "sseregparm", 0, 0, false, true, true, ix86_handle_cconv_attribute },
+ /* force_align_arg_pointer says this function realigns the stack at entry. */
+ { (const char *)&ix86_force_align_arg_pointer_string, 0, 0,
+ false, true, true, ix86_handle_cconv_attribute },
+#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
+ { "dllimport", 0, 0, false, false, false, handle_dll_attribute },
+ { "dllexport", 0, 0, false, false, false, handle_dll_attribute },
+ { "shared", 0, 0, true, false, false, ix86_handle_shared_attribute },
+#endif
+ { "ms_struct", 0, 0, false, false, false, ix86_handle_struct_attribute },
+ { "gcc_struct", 0, 0, false, false, false, ix86_handle_struct_attribute },
+#ifdef SUBTARGET_ATTRIBUTE_TABLE
+ SUBTARGET_ATTRIBUTE_TABLE,
+#endif
+ { NULL, 0, 0, false, false, false, NULL }
+};
+
/* Initialize the GCC target structure. */
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE ix86_attribute_table
@@ -1463,71 +1497,74 @@ override_options (void)
};
static const char * const cpu_names[] = TARGET_CPU_DEFAULT_NAMES;
+ enum pta_flags
+ {
+ PTA_NONE,
+ PTA_SSE = 1,
+ PTA_SSE2 = 2,
+ PTA_SSE3 = 4,
+ PTA_MMX = 8,
+ PTA_PREFETCH_SSE = 16,
+ PTA_3DNOW = 32,
+ PTA_3DNOW_A = 64,
+ PTA_64BIT = 128
+ };
+
static struct pta
{
const char *const name; /* processor name or nickname. */
const enum processor_type processor;
- const enum pta_flags
- {
- PTA_SSE = 1,
- PTA_SSE2 = 2,
- PTA_SSE3 = 4,
- PTA_MMX = 8,
- PTA_PREFETCH_SSE = 16,
- PTA_3DNOW = 32,
- PTA_3DNOW_A = 64,
- PTA_64BIT = 128
- } flags;
+ const enum pta_flags flags;
}
const processor_alias_table[] =
{
- {"i386", PROCESSOR_I386, 0},
- {"i486", PROCESSOR_I486, 0},
- {"i586", PROCESSOR_PENTIUM, 0},
- {"pentium", PROCESSOR_PENTIUM, 0},
+ {"i386", PROCESSOR_I386, PTA_NONE},
+ {"i486", PROCESSOR_I486, PTA_NONE},
+ {"i586", PROCESSOR_PENTIUM, PTA_NONE},
+ {"pentium", PROCESSOR_PENTIUM, PTA_NONE},
{"pentium-mmx", PROCESSOR_PENTIUM, PTA_MMX},
{"winchip-c6", PROCESSOR_I486, PTA_MMX},
- {"winchip2", PROCESSOR_I486, PTA_MMX | PTA_3DNOW},
- {"c3", PROCESSOR_I486, PTA_MMX | PTA_3DNOW},
- {"c3-2", PROCESSOR_PENTIUMPRO, PTA_MMX | PTA_PREFETCH_SSE | PTA_SSE},
- {"i686", PROCESSOR_PENTIUMPRO, 0},
- {"pentiumpro", PROCESSOR_PENTIUMPRO, 0},
+ {"winchip2", PROCESSOR_I486, (enum pta_flags) (PTA_MMX | PTA_3DNOW)},
+ {"c3", PROCESSOR_I486, (enum pta_flags) (PTA_MMX | PTA_3DNOW)},
+ {"c3-2", PROCESSOR_PENTIUMPRO, (enum pta_flags) (PTA_MMX | PTA_PREFETCH_SSE | PTA_SSE)},
+ {"i686", PROCESSOR_PENTIUMPRO, PTA_NONE},
+ {"pentiumpro", PROCESSOR_PENTIUMPRO, PTA_NONE},
{"pentium2", PROCESSOR_PENTIUMPRO, PTA_MMX},
- {"pentium3", PROCESSOR_PENTIUMPRO, PTA_MMX | PTA_SSE | PTA_PREFETCH_SSE},
- {"pentium3m", PROCESSOR_PENTIUMPRO, PTA_MMX | PTA_SSE | PTA_PREFETCH_SSE},
- {"pentium-m", PROCESSOR_PENTIUMPRO, PTA_MMX | PTA_SSE | PTA_PREFETCH_SSE | PTA_SSE2},
- {"pentium4", PROCESSOR_PENTIUM4, PTA_SSE | PTA_SSE2
- | PTA_MMX | PTA_PREFETCH_SSE},
- {"pentium4m", PROCESSOR_PENTIUM4, PTA_SSE | PTA_SSE2
- | PTA_MMX | PTA_PREFETCH_SSE},
- {"prescott", PROCESSOR_NOCONA, PTA_SSE | PTA_SSE2 | PTA_SSE3
- | PTA_MMX | PTA_PREFETCH_SSE},
- {"nocona", PROCESSOR_NOCONA, PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_64BIT
- | PTA_MMX | PTA_PREFETCH_SSE},
+ {"pentium3", PROCESSOR_PENTIUMPRO, (enum pta_flags) (PTA_MMX | PTA_SSE | PTA_PREFETCH_SSE)},
+ {"pentium3m", PROCESSOR_PENTIUMPRO, (enum pta_flags) (PTA_MMX | PTA_SSE | PTA_PREFETCH_SSE)},
+ {"pentium-m", PROCESSOR_PENTIUMPRO, (enum pta_flags) (PTA_MMX | PTA_SSE | PTA_PREFETCH_SSE | PTA_SSE2)},
+ {"pentium4", PROCESSOR_PENTIUM4, (enum pta_flags) (PTA_SSE | PTA_SSE2
+ | PTA_MMX | PTA_PREFETCH_SSE)},
+ {"pentium4m", PROCESSOR_PENTIUM4, (enum pta_flags) (PTA_SSE | PTA_SSE2
+ | PTA_MMX | PTA_PREFETCH_SSE)},
+ {"prescott", PROCESSOR_NOCONA, (enum pta_flags) (PTA_SSE | PTA_SSE2 | PTA_SSE3
+ | PTA_MMX | PTA_PREFETCH_SSE)},
+ {"nocona", PROCESSOR_NOCONA, (enum pta_flags) (PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_64BIT
+ | PTA_MMX | PTA_PREFETCH_SSE)},
{"k6", PROCESSOR_K6, PTA_MMX},
- {"k6-2", PROCESSOR_K6, PTA_MMX | PTA_3DNOW},
- {"k6-3", PROCESSOR_K6, PTA_MMX | PTA_3DNOW},
- {"athlon", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
- | PTA_3DNOW_A},
- {"athlon-tbird", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE
- | PTA_3DNOW | PTA_3DNOW_A},
- {"athlon-4", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
- | PTA_3DNOW_A | PTA_SSE},
- {"athlon-xp", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
- | PTA_3DNOW_A | PTA_SSE},
- {"athlon-mp", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
- | PTA_3DNOW_A | PTA_SSE},
- {"x86-64", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_64BIT
- | PTA_SSE | PTA_SSE2 },
- {"k8", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT
- | PTA_3DNOW_A | PTA_SSE | PTA_SSE2},
- {"opteron", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT
- | PTA_3DNOW_A | PTA_SSE | PTA_SSE2},
- {"athlon64", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT
- | PTA_3DNOW_A | PTA_SSE | PTA_SSE2},
- {"athlon-fx", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT
- | PTA_3DNOW_A | PTA_SSE | PTA_SSE2},
- {"generic32", PROCESSOR_GENERIC32, 0 /* flags are only used for -march switch. */ },
+ {"k6-2", PROCESSOR_K6, (enum pta_flags) (PTA_MMX | PTA_3DNOW)},
+ {"k6-3", PROCESSOR_K6, (enum pta_flags) (PTA_MMX | PTA_3DNOW)},
+ {"athlon", PROCESSOR_ATHLON, (enum pta_flags) (PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
+ | PTA_3DNOW_A)},
+ {"athlon-tbird", PROCESSOR_ATHLON, (enum pta_flags) (PTA_MMX | PTA_PREFETCH_SSE
+ | PTA_3DNOW | PTA_3DNOW_A)},
+ {"athlon-4", PROCESSOR_ATHLON, (enum pta_flags) (PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
+ | PTA_3DNOW_A | PTA_SSE)},
+ {"athlon-xp", PROCESSOR_ATHLON, (enum pta_flags)(PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
+ | PTA_3DNOW_A | PTA_SSE)},
+ {"athlon-mp", PROCESSOR_ATHLON, (enum pta_flags)(PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
+ | PTA_3DNOW_A | PTA_SSE)},
+ {"x86-64", PROCESSOR_K8, (enum pta_flags)(PTA_MMX | PTA_PREFETCH_SSE | PTA_64BIT
+ | PTA_SSE | PTA_SSE2)},
+ {"k8", PROCESSOR_K8, (enum pta_flags)(PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT
+ | PTA_3DNOW_A | PTA_SSE | PTA_SSE2)},
+ {"opteron", PROCESSOR_K8, (enum pta_flags)(PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT
+ | PTA_3DNOW_A | PTA_SSE | PTA_SSE2)},
+ {"athlon64", PROCESSOR_K8, (enum pta_flags)(PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT
+ | PTA_3DNOW_A | PTA_SSE | PTA_SSE2)},
+ {"athlon-fx", PROCESSOR_K8, (enum pta_flags)(PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT
+ | PTA_3DNOW_A | PTA_SSE | PTA_SSE2)},
+ {"generic32", PROCESSOR_GENERIC32, PTA_NONE /* flags are only used for -march switch. */ },
{"generic64", PROCESSOR_GENERIC64, PTA_64BIT /* flags are only used for -march switch. */ },
};
@@ -1951,7 +1988,7 @@ override_options (void)
ix86_fpmath = FPMATH_SSE;
}
else
- ix86_fpmath = FPMATH_SSE | FPMATH_387;
+ ix86_fpmath = (enum fpmath_unit) (FPMATH_SSE | FPMATH_387);
}
else
error ("bad value (%s) for -mfpmath= switch", ix86_fpmath_string);
@@ -2117,7 +2154,7 @@ x86_64_elf_unique_section (tree decl, int reloc)
name = targetm.strip_name_encoding (name);
nlen = strlen (name);
- string = alloca (nlen + plen + 1);
+ string = (char *) alloca (nlen + plen + 1);
memcpy (string, prefix, plen);
memcpy (string + plen, name, nlen + 1);
@@ -2202,39 +2239,6 @@ optimization_options (int level, int size ATTRIBUTE_UNUSED)
#endif
}
-/* Table of valid machine attributes. */
-const struct attribute_spec ix86_attribute_table[] =
-{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- /* Stdcall attribute says callee is responsible for popping arguments
- if they are not variable. */
- { "stdcall", 0, 0, false, true, true, ix86_handle_cconv_attribute },
- /* Fastcall attribute says callee is responsible for popping arguments
- if they are not variable. */
- { "fastcall", 0, 0, false, true, true, ix86_handle_cconv_attribute },
- /* Cdecl attribute says the callee is a normal C declaration */
- { "cdecl", 0, 0, false, true, true, ix86_handle_cconv_attribute },
- /* Regparm attribute specifies how many integer arguments are to be
- passed in registers. */
- { "regparm", 1, 1, false, true, true, ix86_handle_cconv_attribute },
- /* Sseregparm attribute says we are using x86_64 calling conventions
- for FP arguments. */
- { "sseregparm", 0, 0, false, true, true, ix86_handle_cconv_attribute },
- /* force_align_arg_pointer says this function realigns the stack at entry. */
- { (const char *)&ix86_force_align_arg_pointer_string, 0, 0,
- false, true, true, ix86_handle_cconv_attribute },
-#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
- { "dllimport", 0, 0, false, false, false, handle_dll_attribute },
- { "dllexport", 0, 0, false, false, false, handle_dll_attribute },
- { "shared", 0, 0, true, false, false, ix86_handle_shared_attribute },
-#endif
- { "ms_struct", 0, 0, false, false, false, ix86_handle_struct_attribute },
- { "gcc_struct", 0, 0, false, false, false, ix86_handle_struct_attribute },
-#ifdef SUBTARGET_ATTRIBUTE_TABLE
- SUBTARGET_ATTRIBUTE_TABLE,
-#endif
- { NULL, 0, 0, false, false, false, NULL }
-};
/* Decide whether we can make a sibling call to a function. DECL is the
declaration of the function being targeted by the call and EXP is the
@@ -2844,7 +2848,7 @@ gen_reg_or_parallel (enum machine_mode mode, enum machine_mode orig_mode,
else
{
tmp = gen_rtx_REG (mode, regno);
- tmp = gen_rtx_EXPR_LIST (VOIDmode, tmp, const0_rtx);
+ tmp = gen_rtx_EXPR_LIST (REG_DEP_TRUE, tmp, const0_rtx);
tmp = gen_rtx_PARALLEL (orig_mode, gen_rtvec (1, tmp));
}
@@ -3186,15 +3190,15 @@ static int
examine_argument (enum machine_mode mode, tree type, int in_return,
int *int_nregs, int *sse_nregs)
{
- enum x86_64_reg_class class[MAX_CLASSES];
- int n = classify_argument (mode, type, class, 0);
+ enum x86_64_reg_class regclass[MAX_CLASSES];
+ int n = classify_argument (mode, type, regclass, 0);
*int_nregs = 0;
*sse_nregs = 0;
if (!n)
return 0;
for (n--; n >= 0; n--)
- switch (class[n])
+ switch (regclass[n])
{
case X86_64_INTEGER_CLASS:
case X86_64_INTEGERSI_CLASS:
@@ -3237,7 +3241,7 @@ construct_container (enum machine_mode mode, enum machine_mode orig_mode,
enum machine_mode tmpmode;
int bytes =
(mode == BLKmode) ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode);
- enum x86_64_reg_class class[MAX_CLASSES];
+ enum x86_64_reg_class regclass[MAX_CLASSES];
int n;
int i;
int nexps = 0;
@@ -3245,7 +3249,7 @@ construct_container (enum machine_mode mode, enum machine_mode orig_mode,
rtx exp[MAX_CLASSES];
rtx ret;
- n = classify_argument (mode, type, class, 0);
+ n = classify_argument (mode, type, regclass, 0);
if (TARGET_DEBUG_ARG)
{
if (!n)
@@ -3255,7 +3259,7 @@ construct_container (enum machine_mode mode, enum machine_mode orig_mode,
fprintf (stderr, "Classes:");
for (i = 0; i < n; i++)
{
- fprintf (stderr, " %s", x86_64_reg_class_name[class[i]]);
+ fprintf (stderr, " %s", x86_64_reg_class_name[regclass[i]]);
}
fprintf (stderr, "\n");
}
@@ -3307,7 +3311,7 @@ construct_container (enum machine_mode mode, enum machine_mode orig_mode,
/* First construct simple cases. Avoid SCmode, since we want to use
single register to pass this type. */
if (n == 1 && mode != SCmode)
- switch (class[0])
+ switch (regclass[0])
{
case X86_64_INTEGER_CLASS:
case X86_64_INTEGERSI_CLASS:
@@ -3325,14 +3329,14 @@ construct_container (enum machine_mode mode, enum machine_mode orig_mode,
default:
gcc_unreachable ();
}
- if (n == 2 && class[0] == X86_64_SSE_CLASS && class[1] == X86_64_SSEUP_CLASS
+ if (n == 2 && regclass[0] == X86_64_SSE_CLASS && regclass[1] == X86_64_SSEUP_CLASS
&& mode != BLKmode)
return gen_rtx_REG (mode, SSE_REGNO (sse_regno));
if (n == 2
- && class[0] == X86_64_X87_CLASS && class[1] == X86_64_X87UP_CLASS)
+ && regclass[0] == X86_64_X87_CLASS && regclass[1] == X86_64_X87UP_CLASS)
return gen_rtx_REG (XFmode, FIRST_STACK_REG);
- if (n == 2 && class[0] == X86_64_INTEGER_CLASS
- && class[1] == X86_64_INTEGER_CLASS
+ if (n == 2 && regclass[0] == X86_64_INTEGER_CLASS
+ && regclass[1] == X86_64_INTEGER_CLASS
&& (mode == CDImode || mode == TImode || mode == TFmode)
&& intreg[0] + 1 == intreg[1])
return gen_rtx_REG (mode, intreg[0]);
@@ -3340,7 +3344,7 @@ construct_container (enum machine_mode mode, enum machine_mode orig_mode,
/* Otherwise figure out the entries of the PARALLEL. */
for (i = 0; i < n; i++)
{
- switch (class[i])
+ switch (regclass[i])
{
case X86_64_NO_CLASS:
break;
@@ -3349,38 +3353,38 @@ construct_container (enum machine_mode mode, enum machine_mode orig_mode,
/* Merge TImodes on aligned occasions here too. */
if (i * 8 + 8 > bytes)
tmpmode = mode_for_size ((bytes - i * 8) * BITS_PER_UNIT, MODE_INT, 0);
- else if (class[i] == X86_64_INTEGERSI_CLASS)
+ else if (regclass[i] == X86_64_INTEGERSI_CLASS)
tmpmode = SImode;
else
tmpmode = DImode;
/* We've requested 24 bytes we don't have mode for. Use DImode. */
if (tmpmode == BLKmode)
tmpmode = DImode;
- exp [nexps++] = gen_rtx_EXPR_LIST (VOIDmode,
+ exp [nexps++] = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (tmpmode, *intreg),
GEN_INT (i*8));
intreg++;
break;
case X86_64_SSESF_CLASS:
- exp [nexps++] = gen_rtx_EXPR_LIST (VOIDmode,
+ exp [nexps++] = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (SFmode,
SSE_REGNO (sse_regno)),
GEN_INT (i*8));
sse_regno++;
break;
case X86_64_SSEDF_CLASS:
- exp [nexps++] = gen_rtx_EXPR_LIST (VOIDmode,
+ exp [nexps++] = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (DFmode,
SSE_REGNO (sse_regno)),
GEN_INT (i*8));
sse_regno++;
break;
case X86_64_SSE_CLASS:
- if (i < n - 1 && class[i + 1] == X86_64_SSEUP_CLASS)
+ if (i < n - 1 && regclass[i + 1] == X86_64_SSEUP_CLASS)
tmpmode = TImode;
else
tmpmode = DImode;
- exp [nexps++] = gen_rtx_EXPR_LIST (VOIDmode,
+ exp [nexps++] = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (tmpmode,
SSE_REGNO (sse_regno)),
GEN_INT (i*8));
@@ -6512,7 +6516,7 @@ static rtx
legitimize_pic_address (rtx orig, rtx reg)
{
rtx addr = orig;
- rtx new = orig;
+ rtx fresh = orig;
rtx base;
#if TARGET_MACHO
@@ -6526,7 +6530,7 @@ legitimize_pic_address (rtx orig, rtx reg)
#endif
if (TARGET_64BIT && legitimate_pic_address_disp_p (addr))
- new = addr;
+ fresh = addr;
else if (TARGET_64BIT
&& ix86_cmodel != CM_SMALL_PIC
&& local_symbolic_operand (addr, Pmode))
@@ -6541,25 +6545,25 @@ legitimize_pic_address (rtx orig, rtx reg)
addr = XEXP (addr, 0);
if (GET_CODE (addr) == PLUS)
{
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, XEXP (addr, 0)), UNSPEC_GOTOFF);
- new = gen_rtx_PLUS (Pmode, new, XEXP (addr, 1));
+ fresh = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, XEXP (addr, 0)), UNSPEC_GOTOFF);
+ fresh = gen_rtx_PLUS (Pmode, fresh, XEXP (addr, 1));
}
else
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTOFF);
- new = gen_rtx_CONST (Pmode, new);
+ fresh = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTOFF);
+ fresh = gen_rtx_CONST (Pmode, fresh);
if (!reg)
tmpreg = gen_reg_rtx (Pmode);
else
tmpreg = reg;
- emit_move_insn (tmpreg, new);
+ emit_move_insn (tmpreg, fresh);
if (reg != 0)
{
- new = expand_simple_binop (Pmode, PLUS, reg, pic_offset_table_rtx,
+ fresh = expand_simple_binop (Pmode, PLUS, reg, pic_offset_table_rtx,
tmpreg, 1, OPTAB_DIRECT);
- new = reg;
+ fresh = reg;
}
- else new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, tmpreg);
+ else fresh = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, tmpreg);
}
else if (!TARGET_64BIT && local_symbolic_operand (addr, Pmode))
{
@@ -6572,36 +6576,36 @@ legitimize_pic_address (rtx orig, rtx reg)
addr = XEXP (addr, 0);
if (GET_CODE (addr) == PLUS)
{
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, XEXP (addr, 0)), UNSPEC_GOTOFF);
- new = gen_rtx_PLUS (Pmode, new, XEXP (addr, 1));
+ fresh = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, XEXP (addr, 0)), UNSPEC_GOTOFF);
+ fresh = gen_rtx_PLUS (Pmode, fresh, XEXP (addr, 1));
}
else
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTOFF);
- new = gen_rtx_CONST (Pmode, new);
- new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new);
+ fresh = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTOFF);
+ fresh = gen_rtx_CONST (Pmode, fresh);
+ fresh = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, fresh);
if (reg != 0)
{
- emit_move_insn (reg, new);
- new = reg;
+ emit_move_insn (reg, fresh);
+ fresh = reg;
}
}
else if (GET_CODE (addr) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (addr) == 0)
{
if (TARGET_64BIT)
{
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTPCREL);
- new = gen_rtx_CONST (Pmode, new);
- new = gen_const_mem (Pmode, new);
- set_mem_alias_set (new, ix86_GOT_alias_set ());
+ fresh = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTPCREL);
+ fresh = gen_rtx_CONST (Pmode, fresh);
+ fresh = gen_const_mem (Pmode, fresh);
+ set_mem_alias_set (fresh, ix86_GOT_alias_set ());
if (reg == 0)
reg = gen_reg_rtx (Pmode);
/* Use directly gen_movsi, otherwise the address is loaded
into register for CSE. We don't want to CSE this addresses,
instead we CSE addresses from the GOT table, so skip this. */
- emit_insn (gen_movsi (reg, new));
- new = reg;
+ emit_insn (gen_movsi (reg, fresh));
+ fresh = reg;
}
else
{
@@ -6610,16 +6614,16 @@ legitimize_pic_address (rtx orig, rtx reg)
if (reload_in_progress)
regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1;
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOT);
- new = gen_rtx_CONST (Pmode, new);
- new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new);
- new = gen_const_mem (Pmode, new);
- set_mem_alias_set (new, ix86_GOT_alias_set ());
+ fresh = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOT);
+ fresh = gen_rtx_CONST (Pmode, fresh);
+ fresh = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, fresh);
+ fresh = gen_const_mem (Pmode, fresh);
+ set_mem_alias_set (fresh, ix86_GOT_alias_set ());
if (reg == 0)
reg = gen_reg_rtx (Pmode);
- emit_move_insn (reg, new);
- new = reg;
+ emit_move_insn (reg, fresh);
+ fresh = reg;
}
}
else
@@ -6630,10 +6634,10 @@ legitimize_pic_address (rtx orig, rtx reg)
if (reg)
{
emit_move_insn (reg, addr);
- new = reg;
+ fresh = reg;
}
else
- new = force_reg (Pmode, addr);
+ fresh = force_reg (Pmode, addr);
}
else if (GET_CODE (addr) == CONST)
{
@@ -6661,16 +6665,16 @@ legitimize_pic_address (rtx orig, rtx reg)
{
if (reload_in_progress)
regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1;
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op0),
+ fresh = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op0),
UNSPEC_GOTOFF);
- new = gen_rtx_PLUS (Pmode, new, op1);
- new = gen_rtx_CONST (Pmode, new);
- new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new);
+ fresh = gen_rtx_PLUS (Pmode, fresh, op1);
+ fresh = gen_rtx_CONST (Pmode, fresh);
+ fresh = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, fresh);
if (reg != 0)
{
- emit_move_insn (reg, new);
- new = reg;
+ emit_move_insn (reg, fresh);
+ fresh = reg;
}
}
else
@@ -6680,31 +6684,31 @@ legitimize_pic_address (rtx orig, rtx reg)
{
if (!x86_64_immediate_operand (op1, Pmode))
op1 = force_reg (Pmode, op1);
- new = gen_rtx_PLUS (Pmode, force_reg (Pmode, op0), op1);
+ fresh = gen_rtx_PLUS (Pmode, force_reg (Pmode, op0), op1);
}
}
}
else
{
base = legitimize_pic_address (XEXP (addr, 0), reg);
- new = legitimize_pic_address (XEXP (addr, 1),
+ fresh = legitimize_pic_address (XEXP (addr, 1),
base == reg ? NULL_RTX : reg);
- if (GET_CODE (new) == CONST_INT)
- new = plus_constant (base, INTVAL (new));
+ if (GET_CODE (fresh) == CONST_INT)
+ fresh = plus_constant (base, INTVAL (fresh));
else
{
- if (GET_CODE (new) == PLUS && CONSTANT_P (XEXP (new, 1)))
+ if (GET_CODE (fresh) == PLUS && CONSTANT_P (XEXP (fresh, 1)))
{
- base = gen_rtx_PLUS (Pmode, base, XEXP (new, 0));
- new = XEXP (new, 1);
+ base = gen_rtx_PLUS (Pmode, base, XEXP (fresh, 0));
+ fresh = XEXP (fresh, 1);
}
- new = gen_rtx_PLUS (Pmode, base, new);
+ fresh = gen_rtx_PLUS (Pmode, base, fresh);
}
}
}
}
- return new;
+ return fresh;
}
/* Load the thread pointer. If TO_REG is true, force it into a register. */
@@ -6778,8 +6782,8 @@ legitimize_tls_address (rtx x, enum tls_model model, int for_mov)
insns = get_insns ();
end_sequence ();
- note = gen_rtx_EXPR_LIST (VOIDmode, const0_rtx, NULL);
- note = gen_rtx_EXPR_LIST (VOIDmode, ix86_tls_get_addr (), note);
+ note = gen_rtx_EXPR_LIST (REG_DEP_TRUE, const0_rtx, NULL);
+ note = gen_rtx_EXPR_LIST (REG_DEP_TRUE, ix86_tls_get_addr (), note);
emit_libcall_block (insns, base, rax, note);
}
else if (TARGET_64BIT && TARGET_GNU2_TLS)
@@ -6906,7 +6910,7 @@ rtx
legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, enum machine_mode mode)
{
int changed = 0;
- unsigned log;
+ enum tls_model log;
if (TARGET_DEBUG_ADDR)
{
@@ -6915,7 +6919,7 @@ legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, enum machine_mode mode)
debug_rtx (x);
}
- log = GET_CODE (x) == SYMBOL_REF ? SYMBOL_REF_TLS_MODEL (x) : 0;
+ log = GET_CODE (x) == SYMBOL_REF ? SYMBOL_REF_TLS_MODEL (x) : TLS_MODEL_NONE;
if (log)
return legitimize_tls_address (x, log, false);
if (GET_CODE (x) == CONST
@@ -6936,7 +6940,7 @@ legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, enum machine_mode mode)
&& (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) < 4)
{
changed = 1;
- log = INTVAL (XEXP (x, 1));
+ log = (enum tls_model) INTVAL (XEXP (x, 1));
x = gen_rtx_MULT (Pmode, force_reg (Pmode, XEXP (x, 0)),
GEN_INT (1 << log));
}
@@ -6950,7 +6954,7 @@ legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, enum machine_mode mode)
&& (unsigned HOST_WIDE_INT) INTVAL (XEXP (XEXP (x, 0), 1)) < 4)
{
changed = 1;
- log = INTVAL (XEXP (XEXP (x, 0), 1));
+ log = (enum tls_model) INTVAL (XEXP (XEXP (x, 0), 1));
XEXP (x, 0) = gen_rtx_MULT (Pmode,
force_reg (Pmode, XEXP (XEXP (x, 0), 0)),
GEN_INT (1 << log));
@@ -6961,7 +6965,7 @@ legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, enum machine_mode mode)
&& (unsigned HOST_WIDE_INT) INTVAL (XEXP (XEXP (x, 1), 1)) < 4)
{
changed = 1;
- log = INTVAL (XEXP (XEXP (x, 1), 1));
+ log = (enum tls_model) INTVAL (XEXP (XEXP (x, 1), 1));
XEXP (x, 1) = gen_rtx_MULT (Pmode,
force_reg (Pmode, XEXP (XEXP (x, 1), 0)),
GEN_INT (1 << log));
@@ -8502,7 +8506,7 @@ emit_i387_cw_initialization (int mode)
rtx stored_mode = assign_386_stack_local (HImode, SLOT_CW_STORED);
rtx new_mode;
- int slot;
+ enum ix86_stack_slot slot;
rtx reg = gen_reg_rtx (HImode);
@@ -13372,7 +13376,7 @@ ix86_init_machine_status (void)
{
struct machine_function *f;
- f = ggc_alloc_cleared (sizeof (struct machine_function));
+ f = (struct machine_function *) ggc_alloc_cleared (sizeof (struct machine_function));
f->use_fast_prologue_epilogue_nregs = -1;
f->tls_descriptor_call_expanded_p = 0;
@@ -14544,14 +14548,14 @@ static const struct builtin_description bdesc_comi[] =
static const struct builtin_description bdesc_2arg[] =
{
/* SSE */
- { MASK_SSE, CODE_FOR_addv4sf3, "__builtin_ia32_addps", IX86_BUILTIN_ADDPS, 0, 0 },
- { MASK_SSE, CODE_FOR_subv4sf3, "__builtin_ia32_subps", IX86_BUILTIN_SUBPS, 0, 0 },
- { MASK_SSE, CODE_FOR_mulv4sf3, "__builtin_ia32_mulps", IX86_BUILTIN_MULPS, 0, 0 },
- { MASK_SSE, CODE_FOR_divv4sf3, "__builtin_ia32_divps", IX86_BUILTIN_DIVPS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_vmaddv4sf3, "__builtin_ia32_addss", IX86_BUILTIN_ADDSS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_vmsubv4sf3, "__builtin_ia32_subss", IX86_BUILTIN_SUBSS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_vmmulv4sf3, "__builtin_ia32_mulss", IX86_BUILTIN_MULSS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_vmdivv4sf3, "__builtin_ia32_divss", IX86_BUILTIN_DIVSS, 0, 0 },
+ { MASK_SSE, CODE_FOR_addv4sf3, "__builtin_ia32_addps", IX86_BUILTIN_ADDPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_subv4sf3, "__builtin_ia32_subps", IX86_BUILTIN_SUBPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_mulv4sf3, "__builtin_ia32_mulps", IX86_BUILTIN_MULPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_divv4sf3, "__builtin_ia32_divps", IX86_BUILTIN_DIVPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_vmaddv4sf3, "__builtin_ia32_addss", IX86_BUILTIN_ADDSS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_vmsubv4sf3, "__builtin_ia32_subss", IX86_BUILTIN_SUBSS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_vmmulv4sf3, "__builtin_ia32_mulss", IX86_BUILTIN_MULSS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_vmdivv4sf3, "__builtin_ia32_divss", IX86_BUILTIN_DIVSS, UNKNOWN, 0 },
{ MASK_SSE, CODE_FOR_sse_maskcmpv4sf3, "__builtin_ia32_cmpeqps", IX86_BUILTIN_CMPEQPS, EQ, 0 },
{ MASK_SSE, CODE_FOR_sse_maskcmpv4sf3, "__builtin_ia32_cmpltps", IX86_BUILTIN_CMPLTPS, LT, 0 },
@@ -14582,112 +14586,112 @@ static const struct builtin_description bdesc_2arg[] =
BUILTIN_DESC_SWAP_OPERANDS },
{ MASK_SSE, CODE_FOR_sse_vmmaskcmpv4sf3, "__builtin_ia32_cmpordss", IX86_BUILTIN_CMPORDSS, UNORDERED, 0 },
- { MASK_SSE, CODE_FOR_sminv4sf3, "__builtin_ia32_minps", IX86_BUILTIN_MINPS, 0, 0 },
- { MASK_SSE, CODE_FOR_smaxv4sf3, "__builtin_ia32_maxps", IX86_BUILTIN_MAXPS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_vmsminv4sf3, "__builtin_ia32_minss", IX86_BUILTIN_MINSS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_vmsmaxv4sf3, "__builtin_ia32_maxss", IX86_BUILTIN_MAXSS, 0, 0 },
+ { MASK_SSE, CODE_FOR_sminv4sf3, "__builtin_ia32_minps", IX86_BUILTIN_MINPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_smaxv4sf3, "__builtin_ia32_maxps", IX86_BUILTIN_MAXPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_vmsminv4sf3, "__builtin_ia32_minss", IX86_BUILTIN_MINSS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_vmsmaxv4sf3, "__builtin_ia32_maxss", IX86_BUILTIN_MAXSS, UNKNOWN, 0 },
- { MASK_SSE, CODE_FOR_andv4sf3, "__builtin_ia32_andps", IX86_BUILTIN_ANDPS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_nandv4sf3, "__builtin_ia32_andnps", IX86_BUILTIN_ANDNPS, 0, 0 },
- { MASK_SSE, CODE_FOR_iorv4sf3, "__builtin_ia32_orps", IX86_BUILTIN_ORPS, 0, 0 },
- { MASK_SSE, CODE_FOR_xorv4sf3, "__builtin_ia32_xorps", IX86_BUILTIN_XORPS, 0, 0 },
+ { MASK_SSE, CODE_FOR_andv4sf3, "__builtin_ia32_andps", IX86_BUILTIN_ANDPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_nandv4sf3, "__builtin_ia32_andnps", IX86_BUILTIN_ANDNPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_iorv4sf3, "__builtin_ia32_orps", IX86_BUILTIN_ORPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_xorv4sf3, "__builtin_ia32_xorps", IX86_BUILTIN_XORPS, UNKNOWN, 0 },
- { MASK_SSE, CODE_FOR_sse_movss, "__builtin_ia32_movss", IX86_BUILTIN_MOVSS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_movhlps, "__builtin_ia32_movhlps", IX86_BUILTIN_MOVHLPS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_movlhps, "__builtin_ia32_movlhps", IX86_BUILTIN_MOVLHPS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_unpckhps, "__builtin_ia32_unpckhps", IX86_BUILTIN_UNPCKHPS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_unpcklps, "__builtin_ia32_unpcklps", IX86_BUILTIN_UNPCKLPS, 0, 0 },
+ { MASK_SSE, CODE_FOR_sse_movss, "__builtin_ia32_movss", IX86_BUILTIN_MOVSS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_movhlps, "__builtin_ia32_movhlps", IX86_BUILTIN_MOVHLPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_movlhps, "__builtin_ia32_movlhps", IX86_BUILTIN_MOVLHPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_unpckhps, "__builtin_ia32_unpckhps", IX86_BUILTIN_UNPCKHPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_unpcklps, "__builtin_ia32_unpcklps", IX86_BUILTIN_UNPCKLPS, UNKNOWN, 0 },
/* MMX */
- { MASK_MMX, CODE_FOR_mmx_addv8qi3, "__builtin_ia32_paddb", IX86_BUILTIN_PADDB, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_addv4hi3, "__builtin_ia32_paddw", IX86_BUILTIN_PADDW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_addv2si3, "__builtin_ia32_paddd", IX86_BUILTIN_PADDD, 0, 0 },
- { MASK_SSE2, CODE_FOR_mmx_adddi3, "__builtin_ia32_paddq", IX86_BUILTIN_PADDQ, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_subv8qi3, "__builtin_ia32_psubb", IX86_BUILTIN_PSUBB, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_subv4hi3, "__builtin_ia32_psubw", IX86_BUILTIN_PSUBW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_subv2si3, "__builtin_ia32_psubd", IX86_BUILTIN_PSUBD, 0, 0 },
- { MASK_SSE2, CODE_FOR_mmx_subdi3, "__builtin_ia32_psubq", IX86_BUILTIN_PSUBQ, 0, 0 },
-
- { MASK_MMX, CODE_FOR_mmx_ssaddv8qi3, "__builtin_ia32_paddsb", IX86_BUILTIN_PADDSB, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_ssaddv4hi3, "__builtin_ia32_paddsw", IX86_BUILTIN_PADDSW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_sssubv8qi3, "__builtin_ia32_psubsb", IX86_BUILTIN_PSUBSB, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_sssubv4hi3, "__builtin_ia32_psubsw", IX86_BUILTIN_PSUBSW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_usaddv8qi3, "__builtin_ia32_paddusb", IX86_BUILTIN_PADDUSB, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_usaddv4hi3, "__builtin_ia32_paddusw", IX86_BUILTIN_PADDUSW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_ussubv8qi3, "__builtin_ia32_psubusb", IX86_BUILTIN_PSUBUSB, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_ussubv4hi3, "__builtin_ia32_psubusw", IX86_BUILTIN_PSUBUSW, 0, 0 },
-
- { MASK_MMX, CODE_FOR_mmx_mulv4hi3, "__builtin_ia32_pmullw", IX86_BUILTIN_PMULLW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_smulv4hi3_highpart, "__builtin_ia32_pmulhw", IX86_BUILTIN_PMULHW, 0, 0 },
- { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_umulv4hi3_highpart, "__builtin_ia32_pmulhuw", IX86_BUILTIN_PMULHUW, 0, 0 },
-
- { MASK_MMX, CODE_FOR_mmx_andv2si3, "__builtin_ia32_pand", IX86_BUILTIN_PAND, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_nandv2si3, "__builtin_ia32_pandn", IX86_BUILTIN_PANDN, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_iorv2si3, "__builtin_ia32_por", IX86_BUILTIN_POR, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_xorv2si3, "__builtin_ia32_pxor", IX86_BUILTIN_PXOR, 0, 0 },
-
- { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_uavgv8qi3, "__builtin_ia32_pavgb", IX86_BUILTIN_PAVGB, 0, 0 },
- { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_uavgv4hi3, "__builtin_ia32_pavgw", IX86_BUILTIN_PAVGW, 0, 0 },
-
- { MASK_MMX, CODE_FOR_mmx_eqv8qi3, "__builtin_ia32_pcmpeqb", IX86_BUILTIN_PCMPEQB, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_eqv4hi3, "__builtin_ia32_pcmpeqw", IX86_BUILTIN_PCMPEQW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_eqv2si3, "__builtin_ia32_pcmpeqd", IX86_BUILTIN_PCMPEQD, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_gtv8qi3, "__builtin_ia32_pcmpgtb", IX86_BUILTIN_PCMPGTB, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_gtv4hi3, "__builtin_ia32_pcmpgtw", IX86_BUILTIN_PCMPGTW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_gtv2si3, "__builtin_ia32_pcmpgtd", IX86_BUILTIN_PCMPGTD, 0, 0 },
-
- { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_umaxv8qi3, "__builtin_ia32_pmaxub", IX86_BUILTIN_PMAXUB, 0, 0 },
- { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_smaxv4hi3, "__builtin_ia32_pmaxsw", IX86_BUILTIN_PMAXSW, 0, 0 },
- { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_uminv8qi3, "__builtin_ia32_pminub", IX86_BUILTIN_PMINUB, 0, 0 },
- { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_sminv4hi3, "__builtin_ia32_pminsw", IX86_BUILTIN_PMINSW, 0, 0 },
-
- { MASK_MMX, CODE_FOR_mmx_punpckhbw, "__builtin_ia32_punpckhbw", IX86_BUILTIN_PUNPCKHBW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_punpckhwd, "__builtin_ia32_punpckhwd", IX86_BUILTIN_PUNPCKHWD, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_punpckhdq, "__builtin_ia32_punpckhdq", IX86_BUILTIN_PUNPCKHDQ, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_punpcklbw, "__builtin_ia32_punpcklbw", IX86_BUILTIN_PUNPCKLBW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_punpcklwd, "__builtin_ia32_punpcklwd", IX86_BUILTIN_PUNPCKLWD, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_punpckldq, "__builtin_ia32_punpckldq", IX86_BUILTIN_PUNPCKLDQ, 0, 0 },
+ { MASK_MMX, CODE_FOR_mmx_addv8qi3, "__builtin_ia32_paddb", IX86_BUILTIN_PADDB, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_addv4hi3, "__builtin_ia32_paddw", IX86_BUILTIN_PADDW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_addv2si3, "__builtin_ia32_paddd", IX86_BUILTIN_PADDD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_mmx_adddi3, "__builtin_ia32_paddq", IX86_BUILTIN_PADDQ, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_subv8qi3, "__builtin_ia32_psubb", IX86_BUILTIN_PSUBB, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_subv4hi3, "__builtin_ia32_psubw", IX86_BUILTIN_PSUBW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_subv2si3, "__builtin_ia32_psubd", IX86_BUILTIN_PSUBD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_mmx_subdi3, "__builtin_ia32_psubq", IX86_BUILTIN_PSUBQ, UNKNOWN, 0 },
+
+ { MASK_MMX, CODE_FOR_mmx_ssaddv8qi3, "__builtin_ia32_paddsb", IX86_BUILTIN_PADDSB, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_ssaddv4hi3, "__builtin_ia32_paddsw", IX86_BUILTIN_PADDSW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_sssubv8qi3, "__builtin_ia32_psubsb", IX86_BUILTIN_PSUBSB, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_sssubv4hi3, "__builtin_ia32_psubsw", IX86_BUILTIN_PSUBSW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_usaddv8qi3, "__builtin_ia32_paddusb", IX86_BUILTIN_PADDUSB, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_usaddv4hi3, "__builtin_ia32_paddusw", IX86_BUILTIN_PADDUSW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_ussubv8qi3, "__builtin_ia32_psubusb", IX86_BUILTIN_PSUBUSB, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_ussubv4hi3, "__builtin_ia32_psubusw", IX86_BUILTIN_PSUBUSW, UNKNOWN, 0 },
+
+ { MASK_MMX, CODE_FOR_mmx_mulv4hi3, "__builtin_ia32_pmullw", IX86_BUILTIN_PMULLW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_smulv4hi3_highpart, "__builtin_ia32_pmulhw", IX86_BUILTIN_PMULHW, UNKNOWN, 0 },
+ { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_umulv4hi3_highpart, "__builtin_ia32_pmulhuw", IX86_BUILTIN_PMULHUW, UNKNOWN, 0 },
+
+ { MASK_MMX, CODE_FOR_mmx_andv2si3, "__builtin_ia32_pand", IX86_BUILTIN_PAND, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_nandv2si3, "__builtin_ia32_pandn", IX86_BUILTIN_PANDN, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_iorv2si3, "__builtin_ia32_por", IX86_BUILTIN_POR, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_xorv2si3, "__builtin_ia32_pxor", IX86_BUILTIN_PXOR, UNKNOWN, 0 },
+
+ { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_uavgv8qi3, "__builtin_ia32_pavgb", IX86_BUILTIN_PAVGB, UNKNOWN, 0 },
+ { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_uavgv4hi3, "__builtin_ia32_pavgw", IX86_BUILTIN_PAVGW, UNKNOWN, 0 },
+
+ { MASK_MMX, CODE_FOR_mmx_eqv8qi3, "__builtin_ia32_pcmpeqb", IX86_BUILTIN_PCMPEQB, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_eqv4hi3, "__builtin_ia32_pcmpeqw", IX86_BUILTIN_PCMPEQW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_eqv2si3, "__builtin_ia32_pcmpeqd", IX86_BUILTIN_PCMPEQD, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_gtv8qi3, "__builtin_ia32_pcmpgtb", IX86_BUILTIN_PCMPGTB, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_gtv4hi3, "__builtin_ia32_pcmpgtw", IX86_BUILTIN_PCMPGTW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_gtv2si3, "__builtin_ia32_pcmpgtd", IX86_BUILTIN_PCMPGTD, UNKNOWN, 0 },
+
+ { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_umaxv8qi3, "__builtin_ia32_pmaxub", IX86_BUILTIN_PMAXUB, UNKNOWN, 0 },
+ { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_smaxv4hi3, "__builtin_ia32_pmaxsw", IX86_BUILTIN_PMAXSW, UNKNOWN, 0 },
+ { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_uminv8qi3, "__builtin_ia32_pminub", IX86_BUILTIN_PMINUB, UNKNOWN, 0 },
+ { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_sminv4hi3, "__builtin_ia32_pminsw", IX86_BUILTIN_PMINSW, UNKNOWN, 0 },
+
+ { MASK_MMX, CODE_FOR_mmx_punpckhbw, "__builtin_ia32_punpckhbw", IX86_BUILTIN_PUNPCKHBW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_punpckhwd, "__builtin_ia32_punpckhwd", IX86_BUILTIN_PUNPCKHWD, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_punpckhdq, "__builtin_ia32_punpckhdq", IX86_BUILTIN_PUNPCKHDQ, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_punpcklbw, "__builtin_ia32_punpcklbw", IX86_BUILTIN_PUNPCKLBW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_punpcklwd, "__builtin_ia32_punpcklwd", IX86_BUILTIN_PUNPCKLWD, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_punpckldq, "__builtin_ia32_punpckldq", IX86_BUILTIN_PUNPCKLDQ, UNKNOWN, 0 },
/* Special. */
- { MASK_MMX, CODE_FOR_mmx_packsswb, 0, IX86_BUILTIN_PACKSSWB, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_packssdw, 0, IX86_BUILTIN_PACKSSDW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_packuswb, 0, IX86_BUILTIN_PACKUSWB, 0, 0 },
-
- { MASK_SSE, CODE_FOR_sse_cvtpi2ps, 0, IX86_BUILTIN_CVTPI2PS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_cvtsi2ss, 0, IX86_BUILTIN_CVTSI2SS, 0, 0 },
- { MASK_SSE | MASK_64BIT, CODE_FOR_sse_cvtsi2ssq, 0, IX86_BUILTIN_CVTSI642SS, 0, 0 },
-
- { MASK_MMX, CODE_FOR_mmx_ashlv4hi3, 0, IX86_BUILTIN_PSLLW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_ashlv4hi3, 0, IX86_BUILTIN_PSLLWI, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_ashlv2si3, 0, IX86_BUILTIN_PSLLD, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_ashlv2si3, 0, IX86_BUILTIN_PSLLDI, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_ashldi3, 0, IX86_BUILTIN_PSLLQ, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_ashldi3, 0, IX86_BUILTIN_PSLLQI, 0, 0 },
-
- { MASK_MMX, CODE_FOR_mmx_lshrv4hi3, 0, IX86_BUILTIN_PSRLW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_lshrv4hi3, 0, IX86_BUILTIN_PSRLWI, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_lshrv2si3, 0, IX86_BUILTIN_PSRLD, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_lshrv2si3, 0, IX86_BUILTIN_PSRLDI, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_lshrdi3, 0, IX86_BUILTIN_PSRLQ, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_lshrdi3, 0, IX86_BUILTIN_PSRLQI, 0, 0 },
-
- { MASK_MMX, CODE_FOR_mmx_ashrv4hi3, 0, IX86_BUILTIN_PSRAW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_ashrv4hi3, 0, IX86_BUILTIN_PSRAWI, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_ashrv2si3, 0, IX86_BUILTIN_PSRAD, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_ashrv2si3, 0, IX86_BUILTIN_PSRADI, 0, 0 },
-
- { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_psadbw, 0, IX86_BUILTIN_PSADBW, 0, 0 },
- { MASK_MMX, CODE_FOR_mmx_pmaddwd, 0, IX86_BUILTIN_PMADDWD, 0, 0 },
+ { MASK_MMX, CODE_FOR_mmx_packsswb, 0, IX86_BUILTIN_PACKSSWB, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_packssdw, 0, IX86_BUILTIN_PACKSSDW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_packuswb, 0, IX86_BUILTIN_PACKUSWB, UNKNOWN, 0 },
+
+ { MASK_SSE, CODE_FOR_sse_cvtpi2ps, 0, IX86_BUILTIN_CVTPI2PS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_cvtsi2ss, 0, IX86_BUILTIN_CVTSI2SS, UNKNOWN, 0 },
+ { MASK_SSE | MASK_64BIT, CODE_FOR_sse_cvtsi2ssq, 0, IX86_BUILTIN_CVTSI642SS, UNKNOWN, 0 },
+
+ { MASK_MMX, CODE_FOR_mmx_ashlv4hi3, 0, IX86_BUILTIN_PSLLW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_ashlv4hi3, 0, IX86_BUILTIN_PSLLWI, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_ashlv2si3, 0, IX86_BUILTIN_PSLLD, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_ashlv2si3, 0, IX86_BUILTIN_PSLLDI, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_ashldi3, 0, IX86_BUILTIN_PSLLQ, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_ashldi3, 0, IX86_BUILTIN_PSLLQI, UNKNOWN, 0 },
+
+ { MASK_MMX, CODE_FOR_mmx_lshrv4hi3, 0, IX86_BUILTIN_PSRLW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_lshrv4hi3, 0, IX86_BUILTIN_PSRLWI, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_lshrv2si3, 0, IX86_BUILTIN_PSRLD, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_lshrv2si3, 0, IX86_BUILTIN_PSRLDI, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_lshrdi3, 0, IX86_BUILTIN_PSRLQ, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_lshrdi3, 0, IX86_BUILTIN_PSRLQI, UNKNOWN, 0 },
+
+ { MASK_MMX, CODE_FOR_mmx_ashrv4hi3, 0, IX86_BUILTIN_PSRAW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_ashrv4hi3, 0, IX86_BUILTIN_PSRAWI, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_ashrv2si3, 0, IX86_BUILTIN_PSRAD, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_ashrv2si3, 0, IX86_BUILTIN_PSRADI, UNKNOWN, 0 },
+
+ { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_psadbw, 0, IX86_BUILTIN_PSADBW, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_mmx_pmaddwd, 0, IX86_BUILTIN_PMADDWD, UNKNOWN, 0 },
/* SSE2 */
- { MASK_SSE2, CODE_FOR_addv2df3, "__builtin_ia32_addpd", IX86_BUILTIN_ADDPD, 0, 0 },
- { MASK_SSE2, CODE_FOR_subv2df3, "__builtin_ia32_subpd", IX86_BUILTIN_SUBPD, 0, 0 },
- { MASK_SSE2, CODE_FOR_mulv2df3, "__builtin_ia32_mulpd", IX86_BUILTIN_MULPD, 0, 0 },
- { MASK_SSE2, CODE_FOR_divv2df3, "__builtin_ia32_divpd", IX86_BUILTIN_DIVPD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_vmaddv2df3, "__builtin_ia32_addsd", IX86_BUILTIN_ADDSD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_vmsubv2df3, "__builtin_ia32_subsd", IX86_BUILTIN_SUBSD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_vmmulv2df3, "__builtin_ia32_mulsd", IX86_BUILTIN_MULSD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_vmdivv2df3, "__builtin_ia32_divsd", IX86_BUILTIN_DIVSD, 0, 0 },
+ { MASK_SSE2, CODE_FOR_addv2df3, "__builtin_ia32_addpd", IX86_BUILTIN_ADDPD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_subv2df3, "__builtin_ia32_subpd", IX86_BUILTIN_SUBPD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_mulv2df3, "__builtin_ia32_mulpd", IX86_BUILTIN_MULPD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_divv2df3, "__builtin_ia32_divpd", IX86_BUILTIN_DIVPD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_vmaddv2df3, "__builtin_ia32_addsd", IX86_BUILTIN_ADDSD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_vmsubv2df3, "__builtin_ia32_subsd", IX86_BUILTIN_SUBSD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_vmmulv2df3, "__builtin_ia32_mulsd", IX86_BUILTIN_MULSD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_vmdivv2df3, "__builtin_ia32_divsd", IX86_BUILTIN_DIVSD, UNKNOWN, 0 },
{ MASK_SSE2, CODE_FOR_sse2_maskcmpv2df3, "__builtin_ia32_cmpeqpd", IX86_BUILTIN_CMPEQPD, EQ, 0 },
{ MASK_SSE2, CODE_FOR_sse2_maskcmpv2df3, "__builtin_ia32_cmpltpd", IX86_BUILTIN_CMPLTPD, LT, 0 },
@@ -14714,152 +14718,152 @@ static const struct builtin_description bdesc_2arg[] =
{ MASK_SSE2, CODE_FOR_sse2_vmmaskcmpv2df3, "__builtin_ia32_cmpnlesd", IX86_BUILTIN_CMPNLESD, UNGT, 0 },
{ MASK_SSE2, CODE_FOR_sse2_vmmaskcmpv2df3, "__builtin_ia32_cmpordsd", IX86_BUILTIN_CMPORDSD, ORDERED, 0 },
- { MASK_SSE2, CODE_FOR_sminv2df3, "__builtin_ia32_minpd", IX86_BUILTIN_MINPD, 0, 0 },
- { MASK_SSE2, CODE_FOR_smaxv2df3, "__builtin_ia32_maxpd", IX86_BUILTIN_MAXPD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_vmsminv2df3, "__builtin_ia32_minsd", IX86_BUILTIN_MINSD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_vmsmaxv2df3, "__builtin_ia32_maxsd", IX86_BUILTIN_MAXSD, 0, 0 },
+ { MASK_SSE2, CODE_FOR_sminv2df3, "__builtin_ia32_minpd", IX86_BUILTIN_MINPD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_smaxv2df3, "__builtin_ia32_maxpd", IX86_BUILTIN_MAXPD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_vmsminv2df3, "__builtin_ia32_minsd", IX86_BUILTIN_MINSD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_vmsmaxv2df3, "__builtin_ia32_maxsd", IX86_BUILTIN_MAXSD, UNKNOWN, 0 },
- { MASK_SSE2, CODE_FOR_andv2df3, "__builtin_ia32_andpd", IX86_BUILTIN_ANDPD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_nandv2df3, "__builtin_ia32_andnpd", IX86_BUILTIN_ANDNPD, 0, 0 },
- { MASK_SSE2, CODE_FOR_iorv2df3, "__builtin_ia32_orpd", IX86_BUILTIN_ORPD, 0, 0 },
- { MASK_SSE2, CODE_FOR_xorv2df3, "__builtin_ia32_xorpd", IX86_BUILTIN_XORPD, 0, 0 },
+ { MASK_SSE2, CODE_FOR_andv2df3, "__builtin_ia32_andpd", IX86_BUILTIN_ANDPD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_nandv2df3, "__builtin_ia32_andnpd", IX86_BUILTIN_ANDNPD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_iorv2df3, "__builtin_ia32_orpd", IX86_BUILTIN_ORPD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_xorv2df3, "__builtin_ia32_xorpd", IX86_BUILTIN_XORPD, UNKNOWN, 0 },
- { MASK_SSE2, CODE_FOR_sse2_movsd, "__builtin_ia32_movsd", IX86_BUILTIN_MOVSD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_unpckhpd, "__builtin_ia32_unpckhpd", IX86_BUILTIN_UNPCKHPD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_unpcklpd, "__builtin_ia32_unpcklpd", IX86_BUILTIN_UNPCKLPD, 0, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_movsd, "__builtin_ia32_movsd", IX86_BUILTIN_MOVSD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_unpckhpd, "__builtin_ia32_unpckhpd", IX86_BUILTIN_UNPCKHPD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_unpcklpd, "__builtin_ia32_unpcklpd", IX86_BUILTIN_UNPCKLPD, UNKNOWN, 0 },
/* SSE2 MMX */
- { MASK_SSE2, CODE_FOR_addv16qi3, "__builtin_ia32_paddb128", IX86_BUILTIN_PADDB128, 0, 0 },
- { MASK_SSE2, CODE_FOR_addv8hi3, "__builtin_ia32_paddw128", IX86_BUILTIN_PADDW128, 0, 0 },
- { MASK_SSE2, CODE_FOR_addv4si3, "__builtin_ia32_paddd128", IX86_BUILTIN_PADDD128, 0, 0 },
- { MASK_SSE2, CODE_FOR_addv2di3, "__builtin_ia32_paddq128", IX86_BUILTIN_PADDQ128, 0, 0 },
- { MASK_SSE2, CODE_FOR_subv16qi3, "__builtin_ia32_psubb128", IX86_BUILTIN_PSUBB128, 0, 0 },
- { MASK_SSE2, CODE_FOR_subv8hi3, "__builtin_ia32_psubw128", IX86_BUILTIN_PSUBW128, 0, 0 },
- { MASK_SSE2, CODE_FOR_subv4si3, "__builtin_ia32_psubd128", IX86_BUILTIN_PSUBD128, 0, 0 },
- { MASK_SSE2, CODE_FOR_subv2di3, "__builtin_ia32_psubq128", IX86_BUILTIN_PSUBQ128, 0, 0 },
-
- { MASK_MMX, CODE_FOR_sse2_ssaddv16qi3, "__builtin_ia32_paddsb128", IX86_BUILTIN_PADDSB128, 0, 0 },
- { MASK_MMX, CODE_FOR_sse2_ssaddv8hi3, "__builtin_ia32_paddsw128", IX86_BUILTIN_PADDSW128, 0, 0 },
- { MASK_MMX, CODE_FOR_sse2_sssubv16qi3, "__builtin_ia32_psubsb128", IX86_BUILTIN_PSUBSB128, 0, 0 },
- { MASK_MMX, CODE_FOR_sse2_sssubv8hi3, "__builtin_ia32_psubsw128", IX86_BUILTIN_PSUBSW128, 0, 0 },
- { MASK_MMX, CODE_FOR_sse2_usaddv16qi3, "__builtin_ia32_paddusb128", IX86_BUILTIN_PADDUSB128, 0, 0 },
- { MASK_MMX, CODE_FOR_sse2_usaddv8hi3, "__builtin_ia32_paddusw128", IX86_BUILTIN_PADDUSW128, 0, 0 },
- { MASK_MMX, CODE_FOR_sse2_ussubv16qi3, "__builtin_ia32_psubusb128", IX86_BUILTIN_PSUBUSB128, 0, 0 },
- { MASK_MMX, CODE_FOR_sse2_ussubv8hi3, "__builtin_ia32_psubusw128", IX86_BUILTIN_PSUBUSW128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_mulv8hi3, "__builtin_ia32_pmullw128", IX86_BUILTIN_PMULLW128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_smulv8hi3_highpart, "__builtin_ia32_pmulhw128", IX86_BUILTIN_PMULHW128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_andv2di3, "__builtin_ia32_pand128", IX86_BUILTIN_PAND128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_nandv2di3, "__builtin_ia32_pandn128", IX86_BUILTIN_PANDN128, 0, 0 },
- { MASK_SSE2, CODE_FOR_iorv2di3, "__builtin_ia32_por128", IX86_BUILTIN_POR128, 0, 0 },
- { MASK_SSE2, CODE_FOR_xorv2di3, "__builtin_ia32_pxor128", IX86_BUILTIN_PXOR128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_sse2_uavgv16qi3, "__builtin_ia32_pavgb128", IX86_BUILTIN_PAVGB128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_uavgv8hi3, "__builtin_ia32_pavgw128", IX86_BUILTIN_PAVGW128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_sse2_eqv16qi3, "__builtin_ia32_pcmpeqb128", IX86_BUILTIN_PCMPEQB128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_eqv8hi3, "__builtin_ia32_pcmpeqw128", IX86_BUILTIN_PCMPEQW128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_eqv4si3, "__builtin_ia32_pcmpeqd128", IX86_BUILTIN_PCMPEQD128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_gtv16qi3, "__builtin_ia32_pcmpgtb128", IX86_BUILTIN_PCMPGTB128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_gtv8hi3, "__builtin_ia32_pcmpgtw128", IX86_BUILTIN_PCMPGTW128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_gtv4si3, "__builtin_ia32_pcmpgtd128", IX86_BUILTIN_PCMPGTD128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_umaxv16qi3, "__builtin_ia32_pmaxub128", IX86_BUILTIN_PMAXUB128, 0, 0 },
- { MASK_SSE2, CODE_FOR_smaxv8hi3, "__builtin_ia32_pmaxsw128", IX86_BUILTIN_PMAXSW128, 0, 0 },
- { MASK_SSE2, CODE_FOR_uminv16qi3, "__builtin_ia32_pminub128", IX86_BUILTIN_PMINUB128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sminv8hi3, "__builtin_ia32_pminsw128", IX86_BUILTIN_PMINSW128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_sse2_punpckhbw, "__builtin_ia32_punpckhbw128", IX86_BUILTIN_PUNPCKHBW128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_punpckhwd, "__builtin_ia32_punpckhwd128", IX86_BUILTIN_PUNPCKHWD128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_punpckhdq, "__builtin_ia32_punpckhdq128", IX86_BUILTIN_PUNPCKHDQ128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_punpckhqdq, "__builtin_ia32_punpckhqdq128", IX86_BUILTIN_PUNPCKHQDQ128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_punpcklbw, "__builtin_ia32_punpcklbw128", IX86_BUILTIN_PUNPCKLBW128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_punpcklwd, "__builtin_ia32_punpcklwd128", IX86_BUILTIN_PUNPCKLWD128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_punpckldq, "__builtin_ia32_punpckldq128", IX86_BUILTIN_PUNPCKLDQ128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_punpcklqdq, "__builtin_ia32_punpcklqdq128", IX86_BUILTIN_PUNPCKLQDQ128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_sse2_packsswb, "__builtin_ia32_packsswb128", IX86_BUILTIN_PACKSSWB128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_packssdw, "__builtin_ia32_packssdw128", IX86_BUILTIN_PACKSSDW128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_packuswb, "__builtin_ia32_packuswb128", IX86_BUILTIN_PACKUSWB128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_sse2_umulv8hi3_highpart, "__builtin_ia32_pmulhuw128", IX86_BUILTIN_PMULHUW128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_psadbw, 0, IX86_BUILTIN_PSADBW128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_sse2_umulsidi3, 0, IX86_BUILTIN_PMULUDQ, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_umulv2siv2di3, 0, IX86_BUILTIN_PMULUDQ128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_ashlv8hi3, 0, IX86_BUILTIN_PSLLWI128, 0, 0 },
- { MASK_SSE2, CODE_FOR_ashlv4si3, 0, IX86_BUILTIN_PSLLDI128, 0, 0 },
- { MASK_SSE2, CODE_FOR_ashlv2di3, 0, IX86_BUILTIN_PSLLQI128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_lshrv8hi3, 0, IX86_BUILTIN_PSRLWI128, 0, 0 },
- { MASK_SSE2, CODE_FOR_lshrv4si3, 0, IX86_BUILTIN_PSRLDI128, 0, 0 },
- { MASK_SSE2, CODE_FOR_lshrv2di3, 0, IX86_BUILTIN_PSRLQI128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_ashrv8hi3, 0, IX86_BUILTIN_PSRAWI128, 0, 0 },
- { MASK_SSE2, CODE_FOR_ashrv4si3, 0, IX86_BUILTIN_PSRADI128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_sse2_pmaddwd, 0, IX86_BUILTIN_PMADDWD128, 0, 0 },
-
- { MASK_SSE2, CODE_FOR_sse2_cvtsi2sd, 0, IX86_BUILTIN_CVTSI2SD, 0, 0 },
- { MASK_SSE2 | MASK_64BIT, CODE_FOR_sse2_cvtsi2sdq, 0, IX86_BUILTIN_CVTSI642SD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvtsd2ss, 0, IX86_BUILTIN_CVTSD2SS, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvtss2sd, 0, IX86_BUILTIN_CVTSS2SD, 0, 0 },
+ { MASK_SSE2, CODE_FOR_addv16qi3, "__builtin_ia32_paddb128", IX86_BUILTIN_PADDB128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_addv8hi3, "__builtin_ia32_paddw128", IX86_BUILTIN_PADDW128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_addv4si3, "__builtin_ia32_paddd128", IX86_BUILTIN_PADDD128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_addv2di3, "__builtin_ia32_paddq128", IX86_BUILTIN_PADDQ128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_subv16qi3, "__builtin_ia32_psubb128", IX86_BUILTIN_PSUBB128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_subv8hi3, "__builtin_ia32_psubw128", IX86_BUILTIN_PSUBW128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_subv4si3, "__builtin_ia32_psubd128", IX86_BUILTIN_PSUBD128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_subv2di3, "__builtin_ia32_psubq128", IX86_BUILTIN_PSUBQ128, UNKNOWN, 0 },
+
+ { MASK_MMX, CODE_FOR_sse2_ssaddv16qi3, "__builtin_ia32_paddsb128", IX86_BUILTIN_PADDSB128, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_sse2_ssaddv8hi3, "__builtin_ia32_paddsw128", IX86_BUILTIN_PADDSW128, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_sse2_sssubv16qi3, "__builtin_ia32_psubsb128", IX86_BUILTIN_PSUBSB128, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_sse2_sssubv8hi3, "__builtin_ia32_psubsw128", IX86_BUILTIN_PSUBSW128, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_sse2_usaddv16qi3, "__builtin_ia32_paddusb128", IX86_BUILTIN_PADDUSB128, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_sse2_usaddv8hi3, "__builtin_ia32_paddusw128", IX86_BUILTIN_PADDUSW128, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_sse2_ussubv16qi3, "__builtin_ia32_psubusb128", IX86_BUILTIN_PSUBUSB128, UNKNOWN, 0 },
+ { MASK_MMX, CODE_FOR_sse2_ussubv8hi3, "__builtin_ia32_psubusw128", IX86_BUILTIN_PSUBUSW128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_mulv8hi3, "__builtin_ia32_pmullw128", IX86_BUILTIN_PMULLW128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_smulv8hi3_highpart, "__builtin_ia32_pmulhw128", IX86_BUILTIN_PMULHW128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_andv2di3, "__builtin_ia32_pand128", IX86_BUILTIN_PAND128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_nandv2di3, "__builtin_ia32_pandn128", IX86_BUILTIN_PANDN128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_iorv2di3, "__builtin_ia32_por128", IX86_BUILTIN_POR128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_xorv2di3, "__builtin_ia32_pxor128", IX86_BUILTIN_PXOR128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_sse2_uavgv16qi3, "__builtin_ia32_pavgb128", IX86_BUILTIN_PAVGB128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_uavgv8hi3, "__builtin_ia32_pavgw128", IX86_BUILTIN_PAVGW128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_sse2_eqv16qi3, "__builtin_ia32_pcmpeqb128", IX86_BUILTIN_PCMPEQB128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_eqv8hi3, "__builtin_ia32_pcmpeqw128", IX86_BUILTIN_PCMPEQW128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_eqv4si3, "__builtin_ia32_pcmpeqd128", IX86_BUILTIN_PCMPEQD128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_gtv16qi3, "__builtin_ia32_pcmpgtb128", IX86_BUILTIN_PCMPGTB128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_gtv8hi3, "__builtin_ia32_pcmpgtw128", IX86_BUILTIN_PCMPGTW128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_gtv4si3, "__builtin_ia32_pcmpgtd128", IX86_BUILTIN_PCMPGTD128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_umaxv16qi3, "__builtin_ia32_pmaxub128", IX86_BUILTIN_PMAXUB128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_smaxv8hi3, "__builtin_ia32_pmaxsw128", IX86_BUILTIN_PMAXSW128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_uminv16qi3, "__builtin_ia32_pminub128", IX86_BUILTIN_PMINUB128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sminv8hi3, "__builtin_ia32_pminsw128", IX86_BUILTIN_PMINSW128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_sse2_punpckhbw, "__builtin_ia32_punpckhbw128", IX86_BUILTIN_PUNPCKHBW128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_punpckhwd, "__builtin_ia32_punpckhwd128", IX86_BUILTIN_PUNPCKHWD128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_punpckhdq, "__builtin_ia32_punpckhdq128", IX86_BUILTIN_PUNPCKHDQ128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_punpckhqdq, "__builtin_ia32_punpckhqdq128", IX86_BUILTIN_PUNPCKHQDQ128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_punpcklbw, "__builtin_ia32_punpcklbw128", IX86_BUILTIN_PUNPCKLBW128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_punpcklwd, "__builtin_ia32_punpcklwd128", IX86_BUILTIN_PUNPCKLWD128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_punpckldq, "__builtin_ia32_punpckldq128", IX86_BUILTIN_PUNPCKLDQ128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_punpcklqdq, "__builtin_ia32_punpcklqdq128", IX86_BUILTIN_PUNPCKLQDQ128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_sse2_packsswb, "__builtin_ia32_packsswb128", IX86_BUILTIN_PACKSSWB128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_packssdw, "__builtin_ia32_packssdw128", IX86_BUILTIN_PACKSSDW128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_packuswb, "__builtin_ia32_packuswb128", IX86_BUILTIN_PACKUSWB128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_sse2_umulv8hi3_highpart, "__builtin_ia32_pmulhuw128", IX86_BUILTIN_PMULHUW128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_psadbw, 0, IX86_BUILTIN_PSADBW128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_sse2_umulsidi3, 0, IX86_BUILTIN_PMULUDQ, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_umulv2siv2di3, 0, IX86_BUILTIN_PMULUDQ128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_ashlv8hi3, 0, IX86_BUILTIN_PSLLWI128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_ashlv4si3, 0, IX86_BUILTIN_PSLLDI128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_ashlv2di3, 0, IX86_BUILTIN_PSLLQI128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_lshrv8hi3, 0, IX86_BUILTIN_PSRLWI128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_lshrv4si3, 0, IX86_BUILTIN_PSRLDI128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_lshrv2di3, 0, IX86_BUILTIN_PSRLQI128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_ashrv8hi3, 0, IX86_BUILTIN_PSRAWI128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_ashrv4si3, 0, IX86_BUILTIN_PSRADI128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_sse2_pmaddwd, 0, IX86_BUILTIN_PMADDWD128, UNKNOWN, 0 },
+
+ { MASK_SSE2, CODE_FOR_sse2_cvtsi2sd, 0, IX86_BUILTIN_CVTSI2SD, UNKNOWN, 0 },
+ { MASK_SSE2 | MASK_64BIT, CODE_FOR_sse2_cvtsi2sdq, 0, IX86_BUILTIN_CVTSI642SD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvtsd2ss, 0, IX86_BUILTIN_CVTSD2SS, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvtss2sd, 0, IX86_BUILTIN_CVTSS2SD, UNKNOWN, 0 },
/* SSE3 MMX */
- { MASK_SSE3, CODE_FOR_sse3_addsubv4sf3, "__builtin_ia32_addsubps", IX86_BUILTIN_ADDSUBPS, 0, 0 },
- { MASK_SSE3, CODE_FOR_sse3_addsubv2df3, "__builtin_ia32_addsubpd", IX86_BUILTIN_ADDSUBPD, 0, 0 },
- { MASK_SSE3, CODE_FOR_sse3_haddv4sf3, "__builtin_ia32_haddps", IX86_BUILTIN_HADDPS, 0, 0 },
- { MASK_SSE3, CODE_FOR_sse3_haddv2df3, "__builtin_ia32_haddpd", IX86_BUILTIN_HADDPD, 0, 0 },
- { MASK_SSE3, CODE_FOR_sse3_hsubv4sf3, "__builtin_ia32_hsubps", IX86_BUILTIN_HSUBPS, 0, 0 },
- { MASK_SSE3, CODE_FOR_sse3_hsubv2df3, "__builtin_ia32_hsubpd", IX86_BUILTIN_HSUBPD, 0, 0 }
+ { MASK_SSE3, CODE_FOR_sse3_addsubv4sf3, "__builtin_ia32_addsubps", IX86_BUILTIN_ADDSUBPS, UNKNOWN, 0 },
+ { MASK_SSE3, CODE_FOR_sse3_addsubv2df3, "__builtin_ia32_addsubpd", IX86_BUILTIN_ADDSUBPD, UNKNOWN, 0 },
+ { MASK_SSE3, CODE_FOR_sse3_haddv4sf3, "__builtin_ia32_haddps", IX86_BUILTIN_HADDPS, UNKNOWN, 0 },
+ { MASK_SSE3, CODE_FOR_sse3_haddv2df3, "__builtin_ia32_haddpd", IX86_BUILTIN_HADDPD, UNKNOWN, 0 },
+ { MASK_SSE3, CODE_FOR_sse3_hsubv4sf3, "__builtin_ia32_hsubps", IX86_BUILTIN_HSUBPS, UNKNOWN, 0 },
+ { MASK_SSE3, CODE_FOR_sse3_hsubv2df3, "__builtin_ia32_hsubpd", IX86_BUILTIN_HSUBPD, UNKNOWN, 0 }
};
static const struct builtin_description bdesc_1arg[] =
{
- { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_pmovmskb, 0, IX86_BUILTIN_PMOVMSKB, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_movmskps, 0, IX86_BUILTIN_MOVMSKPS, 0, 0 },
+ { MASK_SSE | MASK_3DNOW_A, CODE_FOR_mmx_pmovmskb, 0, IX86_BUILTIN_PMOVMSKB, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_movmskps, 0, IX86_BUILTIN_MOVMSKPS, UNKNOWN, 0 },
- { MASK_SSE, CODE_FOR_sqrtv4sf2, 0, IX86_BUILTIN_SQRTPS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_rsqrtv4sf2, 0, IX86_BUILTIN_RSQRTPS, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_rcpv4sf2, 0, IX86_BUILTIN_RCPPS, 0, 0 },
+ { MASK_SSE, CODE_FOR_sqrtv4sf2, 0, IX86_BUILTIN_SQRTPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_rsqrtv4sf2, 0, IX86_BUILTIN_RSQRTPS, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_rcpv4sf2, 0, IX86_BUILTIN_RCPPS, UNKNOWN, 0 },
- { MASK_SSE, CODE_FOR_sse_cvtps2pi, 0, IX86_BUILTIN_CVTPS2PI, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_cvtss2si, 0, IX86_BUILTIN_CVTSS2SI, 0, 0 },
- { MASK_SSE | MASK_64BIT, CODE_FOR_sse_cvtss2siq, 0, IX86_BUILTIN_CVTSS2SI64, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_cvttps2pi, 0, IX86_BUILTIN_CVTTPS2PI, 0, 0 },
- { MASK_SSE, CODE_FOR_sse_cvttss2si, 0, IX86_BUILTIN_CVTTSS2SI, 0, 0 },
- { MASK_SSE | MASK_64BIT, CODE_FOR_sse_cvttss2siq, 0, IX86_BUILTIN_CVTTSS2SI64, 0, 0 },
+ { MASK_SSE, CODE_FOR_sse_cvtps2pi, 0, IX86_BUILTIN_CVTPS2PI, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_cvtss2si, 0, IX86_BUILTIN_CVTSS2SI, UNKNOWN, 0 },
+ { MASK_SSE | MASK_64BIT, CODE_FOR_sse_cvtss2siq, 0, IX86_BUILTIN_CVTSS2SI64, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_cvttps2pi, 0, IX86_BUILTIN_CVTTPS2PI, UNKNOWN, 0 },
+ { MASK_SSE, CODE_FOR_sse_cvttss2si, 0, IX86_BUILTIN_CVTTSS2SI, UNKNOWN, 0 },
+ { MASK_SSE | MASK_64BIT, CODE_FOR_sse_cvttss2siq, 0, IX86_BUILTIN_CVTTSS2SI64, UNKNOWN, 0 },
- { MASK_SSE2, CODE_FOR_sse2_pmovmskb, 0, IX86_BUILTIN_PMOVMSKB128, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_movmskpd, 0, IX86_BUILTIN_MOVMSKPD, 0, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_pmovmskb, 0, IX86_BUILTIN_PMOVMSKB128, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_movmskpd, 0, IX86_BUILTIN_MOVMSKPD, UNKNOWN, 0 },
- { MASK_SSE2, CODE_FOR_sqrtv2df2, 0, IX86_BUILTIN_SQRTPD, 0, 0 },
+ { MASK_SSE2, CODE_FOR_sqrtv2df2, 0, IX86_BUILTIN_SQRTPD, UNKNOWN, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvtdq2pd, 0, IX86_BUILTIN_CVTDQ2PD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvtdq2ps, 0, IX86_BUILTIN_CVTDQ2PS, 0, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvtdq2pd, 0, IX86_BUILTIN_CVTDQ2PD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvtdq2ps, 0, IX86_BUILTIN_CVTDQ2PS, UNKNOWN, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvtpd2dq, 0, IX86_BUILTIN_CVTPD2DQ, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvtpd2pi, 0, IX86_BUILTIN_CVTPD2PI, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvtpd2ps, 0, IX86_BUILTIN_CVTPD2PS, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvttpd2dq, 0, IX86_BUILTIN_CVTTPD2DQ, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvttpd2pi, 0, IX86_BUILTIN_CVTTPD2PI, 0, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvtpd2dq, 0, IX86_BUILTIN_CVTPD2DQ, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvtpd2pi, 0, IX86_BUILTIN_CVTPD2PI, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvtpd2ps, 0, IX86_BUILTIN_CVTPD2PS, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvttpd2dq, 0, IX86_BUILTIN_CVTTPD2DQ, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvttpd2pi, 0, IX86_BUILTIN_CVTTPD2PI, UNKNOWN, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvtpi2pd, 0, IX86_BUILTIN_CVTPI2PD, 0, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvtpi2pd, 0, IX86_BUILTIN_CVTPI2PD, UNKNOWN, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvtsd2si, 0, IX86_BUILTIN_CVTSD2SI, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvttsd2si, 0, IX86_BUILTIN_CVTTSD2SI, 0, 0 },
- { MASK_SSE2 | MASK_64BIT, CODE_FOR_sse2_cvtsd2siq, 0, IX86_BUILTIN_CVTSD2SI64, 0, 0 },
- { MASK_SSE2 | MASK_64BIT, CODE_FOR_sse2_cvttsd2siq, 0, IX86_BUILTIN_CVTTSD2SI64, 0, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvtsd2si, 0, IX86_BUILTIN_CVTSD2SI, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvttsd2si, 0, IX86_BUILTIN_CVTTSD2SI, UNKNOWN, 0 },
+ { MASK_SSE2 | MASK_64BIT, CODE_FOR_sse2_cvtsd2siq, 0, IX86_BUILTIN_CVTSD2SI64, UNKNOWN, 0 },
+ { MASK_SSE2 | MASK_64BIT, CODE_FOR_sse2_cvttsd2siq, 0, IX86_BUILTIN_CVTTSD2SI64, UNKNOWN, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvtps2dq, 0, IX86_BUILTIN_CVTPS2DQ, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvtps2pd, 0, IX86_BUILTIN_CVTPS2PD, 0, 0 },
- { MASK_SSE2, CODE_FOR_sse2_cvttps2dq, 0, IX86_BUILTIN_CVTTPS2DQ, 0, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvtps2dq, 0, IX86_BUILTIN_CVTPS2DQ, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvtps2pd, 0, IX86_BUILTIN_CVTPS2PD, UNKNOWN, 0 },
+ { MASK_SSE2, CODE_FOR_sse2_cvttps2dq, 0, IX86_BUILTIN_CVTTPS2DQ, UNKNOWN, 0 },
/* SSE3 */
- { MASK_SSE3, CODE_FOR_sse3_movshdup, 0, IX86_BUILTIN_MOVSHDUP, 0, 0 },
- { MASK_SSE3, CODE_FOR_sse3_movsldup, 0, IX86_BUILTIN_MOVSLDUP, 0, 0 },
+ { MASK_SSE3, CODE_FOR_sse3_movshdup, 0, IX86_BUILTIN_MOVSHDUP, UNKNOWN, 0 },
+ { MASK_SSE3, CODE_FOR_sse3_movsldup, 0, IX86_BUILTIN_MOVSLDUP, UNKNOWN, 0 },
};
static void
@@ -15233,220 +15237,220 @@ ix86_init_mmx_sse_builtins (void)
|| d->icode == CODE_FOR_sse2_vmmaskcmpv2df3)
type = v2di_ftype_v2df_v2df;
- def_builtin (d->mask, d->name, type, d->code);
+ def_builtin (d->mask, d->name, type, (enum built_in_function) d->code);
}
/* Add the remaining MMX insns with somewhat more complicated types. */
- def_builtin (MASK_MMX, "__builtin_ia32_emms", void_ftype_void, IX86_BUILTIN_EMMS);
- def_builtin (MASK_MMX, "__builtin_ia32_psllw", v4hi_ftype_v4hi_di, IX86_BUILTIN_PSLLW);
- def_builtin (MASK_MMX, "__builtin_ia32_pslld", v2si_ftype_v2si_di, IX86_BUILTIN_PSLLD);
- def_builtin (MASK_MMX, "__builtin_ia32_psllq", di_ftype_di_di, IX86_BUILTIN_PSLLQ);
+ def_builtin (MASK_MMX, "__builtin_ia32_emms", void_ftype_void, (enum built_in_function)IX86_BUILTIN_EMMS);
+ def_builtin (MASK_MMX, "__builtin_ia32_psllw", v4hi_ftype_v4hi_di, (enum built_in_function)IX86_BUILTIN_PSLLW);
+ def_builtin (MASK_MMX, "__builtin_ia32_pslld", v2si_ftype_v2si_di, (enum built_in_function)IX86_BUILTIN_PSLLD);
+ def_builtin (MASK_MMX, "__builtin_ia32_psllq", di_ftype_di_di, (enum built_in_function)IX86_BUILTIN_PSLLQ);
- def_builtin (MASK_MMX, "__builtin_ia32_psrlw", v4hi_ftype_v4hi_di, IX86_BUILTIN_PSRLW);
- def_builtin (MASK_MMX, "__builtin_ia32_psrld", v2si_ftype_v2si_di, IX86_BUILTIN_PSRLD);
- def_builtin (MASK_MMX, "__builtin_ia32_psrlq", di_ftype_di_di, IX86_BUILTIN_PSRLQ);
+ def_builtin (MASK_MMX, "__builtin_ia32_psrlw", v4hi_ftype_v4hi_di, (enum built_in_function)IX86_BUILTIN_PSRLW);
+ def_builtin (MASK_MMX, "__builtin_ia32_psrld", v2si_ftype_v2si_di, (enum built_in_function)IX86_BUILTIN_PSRLD);
+ def_builtin (MASK_MMX, "__builtin_ia32_psrlq", di_ftype_di_di, (enum built_in_function)IX86_BUILTIN_PSRLQ);
- def_builtin (MASK_MMX, "__builtin_ia32_psraw", v4hi_ftype_v4hi_di, IX86_BUILTIN_PSRAW);
- def_builtin (MASK_MMX, "__builtin_ia32_psrad", v2si_ftype_v2si_di, IX86_BUILTIN_PSRAD);
+ def_builtin (MASK_MMX, "__builtin_ia32_psraw", v4hi_ftype_v4hi_di, (enum built_in_function)IX86_BUILTIN_PSRAW);
+ def_builtin (MASK_MMX, "__builtin_ia32_psrad", v2si_ftype_v2si_di, (enum built_in_function)IX86_BUILTIN_PSRAD);
- def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_pshufw", v4hi_ftype_v4hi_int, IX86_BUILTIN_PSHUFW);
- def_builtin (MASK_MMX, "__builtin_ia32_pmaddwd", v2si_ftype_v4hi_v4hi, IX86_BUILTIN_PMADDWD);
+ def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_pshufw", v4hi_ftype_v4hi_int, (enum built_in_function)IX86_BUILTIN_PSHUFW);
+ def_builtin (MASK_MMX, "__builtin_ia32_pmaddwd", v2si_ftype_v4hi_v4hi, (enum built_in_function)IX86_BUILTIN_PMADDWD);
/* comi/ucomi insns. */
for (i = 0, d = bdesc_comi; i < ARRAY_SIZE (bdesc_comi); i++, d++)
if (d->mask == MASK_SSE2)
- def_builtin (d->mask, d->name, int_ftype_v2df_v2df, d->code);
+ def_builtin (d->mask, d->name, int_ftype_v2df_v2df, (enum built_in_function)d->code);
else
- def_builtin (d->mask, d->name, int_ftype_v4sf_v4sf, d->code);
+ def_builtin (d->mask, d->name, int_ftype_v4sf_v4sf, (enum built_in_function)d->code);
- def_builtin (MASK_MMX, "__builtin_ia32_packsswb", v8qi_ftype_v4hi_v4hi, IX86_BUILTIN_PACKSSWB);
- def_builtin (MASK_MMX, "__builtin_ia32_packssdw", v4hi_ftype_v2si_v2si, IX86_BUILTIN_PACKSSDW);
- def_builtin (MASK_MMX, "__builtin_ia32_packuswb", v8qi_ftype_v4hi_v4hi, IX86_BUILTIN_PACKUSWB);
+ def_builtin (MASK_MMX, "__builtin_ia32_packsswb", v8qi_ftype_v4hi_v4hi, (enum built_in_function)IX86_BUILTIN_PACKSSWB);
+ def_builtin (MASK_MMX, "__builtin_ia32_packssdw", v4hi_ftype_v2si_v2si, (enum built_in_function)IX86_BUILTIN_PACKSSDW);
+ def_builtin (MASK_MMX, "__builtin_ia32_packuswb", v8qi_ftype_v4hi_v4hi, (enum built_in_function)IX86_BUILTIN_PACKUSWB);
- def_builtin (MASK_SSE, "__builtin_ia32_ldmxcsr", void_ftype_unsigned, IX86_BUILTIN_LDMXCSR);
- def_builtin (MASK_SSE, "__builtin_ia32_stmxcsr", unsigned_ftype_void, IX86_BUILTIN_STMXCSR);
- def_builtin (MASK_SSE, "__builtin_ia32_cvtpi2ps", v4sf_ftype_v4sf_v2si, IX86_BUILTIN_CVTPI2PS);
- def_builtin (MASK_SSE, "__builtin_ia32_cvtps2pi", v2si_ftype_v4sf, IX86_BUILTIN_CVTPS2PI);
- def_builtin (MASK_SSE, "__builtin_ia32_cvtsi2ss", v4sf_ftype_v4sf_int, IX86_BUILTIN_CVTSI2SS);
- def_builtin (MASK_SSE | MASK_64BIT, "__builtin_ia32_cvtsi642ss", v4sf_ftype_v4sf_int64, IX86_BUILTIN_CVTSI642SS);
- def_builtin (MASK_SSE, "__builtin_ia32_cvtss2si", int_ftype_v4sf, IX86_BUILTIN_CVTSS2SI);
- def_builtin (MASK_SSE | MASK_64BIT, "__builtin_ia32_cvtss2si64", int64_ftype_v4sf, IX86_BUILTIN_CVTSS2SI64);
- def_builtin (MASK_SSE, "__builtin_ia32_cvttps2pi", v2si_ftype_v4sf, IX86_BUILTIN_CVTTPS2PI);
- def_builtin (MASK_SSE, "__builtin_ia32_cvttss2si", int_ftype_v4sf, IX86_BUILTIN_CVTTSS2SI);
- def_builtin (MASK_SSE | MASK_64BIT, "__builtin_ia32_cvttss2si64", int64_ftype_v4sf, IX86_BUILTIN_CVTTSS2SI64);
+ def_builtin (MASK_SSE, "__builtin_ia32_ldmxcsr", void_ftype_unsigned, (enum built_in_function)IX86_BUILTIN_LDMXCSR);
+ def_builtin (MASK_SSE, "__builtin_ia32_stmxcsr", unsigned_ftype_void, (enum built_in_function)IX86_BUILTIN_STMXCSR);
+ def_builtin (MASK_SSE, "__builtin_ia32_cvtpi2ps", v4sf_ftype_v4sf_v2si, (enum built_in_function)IX86_BUILTIN_CVTPI2PS);
+ def_builtin (MASK_SSE, "__builtin_ia32_cvtps2pi", v2si_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_CVTPS2PI);
+ def_builtin (MASK_SSE, "__builtin_ia32_cvtsi2ss", v4sf_ftype_v4sf_int, (enum built_in_function)IX86_BUILTIN_CVTSI2SS);
+ def_builtin (MASK_SSE | MASK_64BIT, "__builtin_ia32_cvtsi642ss", v4sf_ftype_v4sf_int64, (enum built_in_function)IX86_BUILTIN_CVTSI642SS);
+ def_builtin (MASK_SSE, "__builtin_ia32_cvtss2si", int_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_CVTSS2SI);
+ def_builtin (MASK_SSE | MASK_64BIT, "__builtin_ia32_cvtss2si64", int64_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_CVTSS2SI64);
+ def_builtin (MASK_SSE, "__builtin_ia32_cvttps2pi", v2si_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_CVTTPS2PI);
+ def_builtin (MASK_SSE, "__builtin_ia32_cvttss2si", int_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_CVTTSS2SI);
+ def_builtin (MASK_SSE | MASK_64BIT, "__builtin_ia32_cvttss2si64", int64_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_CVTTSS2SI64);
- def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_maskmovq", void_ftype_v8qi_v8qi_pchar, IX86_BUILTIN_MASKMOVQ);
+ def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_maskmovq", void_ftype_v8qi_v8qi_pchar, (enum built_in_function)IX86_BUILTIN_MASKMOVQ);
- def_builtin (MASK_SSE, "__builtin_ia32_loadups", v4sf_ftype_pcfloat, IX86_BUILTIN_LOADUPS);
- def_builtin (MASK_SSE, "__builtin_ia32_storeups", void_ftype_pfloat_v4sf, IX86_BUILTIN_STOREUPS);
+ def_builtin (MASK_SSE, "__builtin_ia32_loadups", v4sf_ftype_pcfloat, (enum built_in_function)IX86_BUILTIN_LOADUPS);
+ def_builtin (MASK_SSE, "__builtin_ia32_storeups", void_ftype_pfloat_v4sf, (enum built_in_function)IX86_BUILTIN_STOREUPS);
- def_builtin (MASK_SSE, "__builtin_ia32_loadhps", v4sf_ftype_v4sf_pv2si, IX86_BUILTIN_LOADHPS);
- def_builtin (MASK_SSE, "__builtin_ia32_loadlps", v4sf_ftype_v4sf_pv2si, IX86_BUILTIN_LOADLPS);
- def_builtin (MASK_SSE, "__builtin_ia32_storehps", void_ftype_pv2si_v4sf, IX86_BUILTIN_STOREHPS);
- def_builtin (MASK_SSE, "__builtin_ia32_storelps", void_ftype_pv2si_v4sf, IX86_BUILTIN_STORELPS);
+ def_builtin (MASK_SSE, "__builtin_ia32_loadhps", v4sf_ftype_v4sf_pv2si, (enum built_in_function)IX86_BUILTIN_LOADHPS);
+ def_builtin (MASK_SSE, "__builtin_ia32_loadlps", v4sf_ftype_v4sf_pv2si, (enum built_in_function)IX86_BUILTIN_LOADLPS);
+ def_builtin (MASK_SSE, "__builtin_ia32_storehps", void_ftype_pv2si_v4sf, (enum built_in_function)IX86_BUILTIN_STOREHPS);
+ def_builtin (MASK_SSE, "__builtin_ia32_storelps", void_ftype_pv2si_v4sf, (enum built_in_function)IX86_BUILTIN_STORELPS);
- def_builtin (MASK_SSE, "__builtin_ia32_movmskps", int_ftype_v4sf, IX86_BUILTIN_MOVMSKPS);
- def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_pmovmskb", int_ftype_v8qi, IX86_BUILTIN_PMOVMSKB);
- def_builtin (MASK_SSE, "__builtin_ia32_movntps", void_ftype_pfloat_v4sf, IX86_BUILTIN_MOVNTPS);
- def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_movntq", void_ftype_pdi_di, IX86_BUILTIN_MOVNTQ);
+ def_builtin (MASK_SSE, "__builtin_ia32_movmskps", int_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_MOVMSKPS);
+ def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_pmovmskb", int_ftype_v8qi, (enum built_in_function)IX86_BUILTIN_PMOVMSKB);
+ def_builtin (MASK_SSE, "__builtin_ia32_movntps", void_ftype_pfloat_v4sf, (enum built_in_function)IX86_BUILTIN_MOVNTPS);
+ def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_movntq", void_ftype_pdi_di, (enum built_in_function)IX86_BUILTIN_MOVNTQ);
- def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_sfence", void_ftype_void, IX86_BUILTIN_SFENCE);
+ def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_sfence", void_ftype_void, (enum built_in_function)IX86_BUILTIN_SFENCE);
- def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_psadbw", di_ftype_v8qi_v8qi, IX86_BUILTIN_PSADBW);
+ def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_psadbw", di_ftype_v8qi_v8qi, (enum built_in_function)IX86_BUILTIN_PSADBW);
- def_builtin (MASK_SSE, "__builtin_ia32_rcpps", v4sf_ftype_v4sf, IX86_BUILTIN_RCPPS);
- def_builtin (MASK_SSE, "__builtin_ia32_rcpss", v4sf_ftype_v4sf, IX86_BUILTIN_RCPSS);
- def_builtin (MASK_SSE, "__builtin_ia32_rsqrtps", v4sf_ftype_v4sf, IX86_BUILTIN_RSQRTPS);
- def_builtin (MASK_SSE, "__builtin_ia32_rsqrtss", v4sf_ftype_v4sf, IX86_BUILTIN_RSQRTSS);
- def_builtin (MASK_SSE, "__builtin_ia32_sqrtps", v4sf_ftype_v4sf, IX86_BUILTIN_SQRTPS);
- def_builtin (MASK_SSE, "__builtin_ia32_sqrtss", v4sf_ftype_v4sf, IX86_BUILTIN_SQRTSS);
+ def_builtin (MASK_SSE, "__builtin_ia32_rcpps", v4sf_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_RCPPS);
+ def_builtin (MASK_SSE, "__builtin_ia32_rcpss", v4sf_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_RCPSS);
+ def_builtin (MASK_SSE, "__builtin_ia32_rsqrtps", v4sf_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_RSQRTPS);
+ def_builtin (MASK_SSE, "__builtin_ia32_rsqrtss", v4sf_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_RSQRTSS);
+ def_builtin (MASK_SSE, "__builtin_ia32_sqrtps", v4sf_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_SQRTPS);
+ def_builtin (MASK_SSE, "__builtin_ia32_sqrtss", v4sf_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_SQRTSS);
- def_builtin (MASK_SSE, "__builtin_ia32_shufps", v4sf_ftype_v4sf_v4sf_int, IX86_BUILTIN_SHUFPS);
+ def_builtin (MASK_SSE, "__builtin_ia32_shufps", v4sf_ftype_v4sf_v4sf_int, (enum built_in_function)IX86_BUILTIN_SHUFPS);
/* Original 3DNow! */
- def_builtin (MASK_3DNOW, "__builtin_ia32_femms", void_ftype_void, IX86_BUILTIN_FEMMS);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pavgusb", v8qi_ftype_v8qi_v8qi, IX86_BUILTIN_PAVGUSB);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pf2id", v2si_ftype_v2sf, IX86_BUILTIN_PF2ID);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfacc", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFACC);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfadd", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFADD);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfcmpeq", v2si_ftype_v2sf_v2sf, IX86_BUILTIN_PFCMPEQ);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfcmpge", v2si_ftype_v2sf_v2sf, IX86_BUILTIN_PFCMPGE);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfcmpgt", v2si_ftype_v2sf_v2sf, IX86_BUILTIN_PFCMPGT);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfmax", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFMAX);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfmin", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFMIN);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfmul", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFMUL);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfrcp", v2sf_ftype_v2sf, IX86_BUILTIN_PFRCP);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfrcpit1", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFRCPIT1);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfrcpit2", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFRCPIT2);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfrsqrt", v2sf_ftype_v2sf, IX86_BUILTIN_PFRSQRT);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfrsqit1", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFRSQIT1);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfsub", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFSUB);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pfsubr", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFSUBR);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pi2fd", v2sf_ftype_v2si, IX86_BUILTIN_PI2FD);
- def_builtin (MASK_3DNOW, "__builtin_ia32_pmulhrw", v4hi_ftype_v4hi_v4hi, IX86_BUILTIN_PMULHRW);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_femms", void_ftype_void, (enum built_in_function)IX86_BUILTIN_FEMMS);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pavgusb", v8qi_ftype_v8qi_v8qi, (enum built_in_function)IX86_BUILTIN_PAVGUSB);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pf2id", v2si_ftype_v2sf, (enum built_in_function)IX86_BUILTIN_PF2ID);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfacc", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFACC);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfadd", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFADD);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfcmpeq", v2si_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFCMPEQ);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfcmpge", v2si_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFCMPGE);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfcmpgt", v2si_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFCMPGT);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfmax", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFMAX);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfmin", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFMIN);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfmul", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFMUL);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfrcp", v2sf_ftype_v2sf, (enum built_in_function)IX86_BUILTIN_PFRCP);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfrcpit1", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFRCPIT1);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfrcpit2", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFRCPIT2);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfrsqrt", v2sf_ftype_v2sf, (enum built_in_function)IX86_BUILTIN_PFRSQRT);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfrsqit1", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFRSQIT1);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfsub", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFSUB);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pfsubr", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFSUBR);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pi2fd", v2sf_ftype_v2si, (enum built_in_function)IX86_BUILTIN_PI2FD);
+ def_builtin (MASK_3DNOW, "__builtin_ia32_pmulhrw", v4hi_ftype_v4hi_v4hi, (enum built_in_function)IX86_BUILTIN_PMULHRW);
/* 3DNow! extension as used in the Athlon CPU. */
- def_builtin (MASK_3DNOW_A, "__builtin_ia32_pf2iw", v2si_ftype_v2sf, IX86_BUILTIN_PF2IW);
- def_builtin (MASK_3DNOW_A, "__builtin_ia32_pfnacc", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFNACC);
- def_builtin (MASK_3DNOW_A, "__builtin_ia32_pfpnacc", v2sf_ftype_v2sf_v2sf, IX86_BUILTIN_PFPNACC);
- def_builtin (MASK_3DNOW_A, "__builtin_ia32_pi2fw", v2sf_ftype_v2si, IX86_BUILTIN_PI2FW);
- def_builtin (MASK_3DNOW_A, "__builtin_ia32_pswapdsf", v2sf_ftype_v2sf, IX86_BUILTIN_PSWAPDSF);
- def_builtin (MASK_3DNOW_A, "__builtin_ia32_pswapdsi", v2si_ftype_v2si, IX86_BUILTIN_PSWAPDSI);
+ def_builtin (MASK_3DNOW_A, "__builtin_ia32_pf2iw", v2si_ftype_v2sf, (enum built_in_function)IX86_BUILTIN_PF2IW);
+ def_builtin (MASK_3DNOW_A, "__builtin_ia32_pfnacc", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFNACC);
+ def_builtin (MASK_3DNOW_A, "__builtin_ia32_pfpnacc", v2sf_ftype_v2sf_v2sf, (enum built_in_function)IX86_BUILTIN_PFPNACC);
+ def_builtin (MASK_3DNOW_A, "__builtin_ia32_pi2fw", v2sf_ftype_v2si, (enum built_in_function)IX86_BUILTIN_PI2FW);
+ def_builtin (MASK_3DNOW_A, "__builtin_ia32_pswapdsf", v2sf_ftype_v2sf, (enum built_in_function)IX86_BUILTIN_PSWAPDSF);
+ def_builtin (MASK_3DNOW_A, "__builtin_ia32_pswapdsi", v2si_ftype_v2si, (enum built_in_function)IX86_BUILTIN_PSWAPDSI);
/* SSE2 */
- def_builtin (MASK_SSE2, "__builtin_ia32_maskmovdqu", void_ftype_v16qi_v16qi_pchar, IX86_BUILTIN_MASKMOVDQU);
+ def_builtin (MASK_SSE2, "__builtin_ia32_maskmovdqu", void_ftype_v16qi_v16qi_pchar, (enum built_in_function)IX86_BUILTIN_MASKMOVDQU);
- def_builtin (MASK_SSE2, "__builtin_ia32_loadupd", v2df_ftype_pcdouble, IX86_BUILTIN_LOADUPD);
- def_builtin (MASK_SSE2, "__builtin_ia32_storeupd", void_ftype_pdouble_v2df, IX86_BUILTIN_STOREUPD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_loadupd", v2df_ftype_pcdouble, (enum built_in_function)IX86_BUILTIN_LOADUPD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_storeupd", void_ftype_pdouble_v2df, (enum built_in_function)IX86_BUILTIN_STOREUPD);
- def_builtin (MASK_SSE2, "__builtin_ia32_loadhpd", v2df_ftype_v2df_pcdouble, IX86_BUILTIN_LOADHPD);
- def_builtin (MASK_SSE2, "__builtin_ia32_loadlpd", v2df_ftype_v2df_pcdouble, IX86_BUILTIN_LOADLPD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_loadhpd", v2df_ftype_v2df_pcdouble, (enum built_in_function)IX86_BUILTIN_LOADHPD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_loadlpd", v2df_ftype_v2df_pcdouble, (enum built_in_function)IX86_BUILTIN_LOADLPD);
- def_builtin (MASK_SSE2, "__builtin_ia32_movmskpd", int_ftype_v2df, IX86_BUILTIN_MOVMSKPD);
- def_builtin (MASK_SSE2, "__builtin_ia32_pmovmskb128", int_ftype_v16qi, IX86_BUILTIN_PMOVMSKB128);
- def_builtin (MASK_SSE2, "__builtin_ia32_movnti", void_ftype_pint_int, IX86_BUILTIN_MOVNTI);
- def_builtin (MASK_SSE2, "__builtin_ia32_movntpd", void_ftype_pdouble_v2df, IX86_BUILTIN_MOVNTPD);
- def_builtin (MASK_SSE2, "__builtin_ia32_movntdq", void_ftype_pv2di_v2di, IX86_BUILTIN_MOVNTDQ);
+ def_builtin (MASK_SSE2, "__builtin_ia32_movmskpd", int_ftype_v2df, (enum built_in_function)IX86_BUILTIN_MOVMSKPD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_pmovmskb128", int_ftype_v16qi, (enum built_in_function)IX86_BUILTIN_PMOVMSKB128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_movnti", void_ftype_pint_int, (enum built_in_function)IX86_BUILTIN_MOVNTI);
+ def_builtin (MASK_SSE2, "__builtin_ia32_movntpd", void_ftype_pdouble_v2df, (enum built_in_function)IX86_BUILTIN_MOVNTPD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_movntdq", void_ftype_pv2di_v2di, (enum built_in_function)IX86_BUILTIN_MOVNTDQ);
- def_builtin (MASK_SSE2, "__builtin_ia32_pshufd", v4si_ftype_v4si_int, IX86_BUILTIN_PSHUFD);
- def_builtin (MASK_SSE2, "__builtin_ia32_pshuflw", v8hi_ftype_v8hi_int, IX86_BUILTIN_PSHUFLW);
- def_builtin (MASK_SSE2, "__builtin_ia32_pshufhw", v8hi_ftype_v8hi_int, IX86_BUILTIN_PSHUFHW);
- def_builtin (MASK_SSE2, "__builtin_ia32_psadbw128", v2di_ftype_v16qi_v16qi, IX86_BUILTIN_PSADBW128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_pshufd", v4si_ftype_v4si_int, (enum built_in_function)IX86_BUILTIN_PSHUFD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_pshuflw", v8hi_ftype_v8hi_int, (enum built_in_function)IX86_BUILTIN_PSHUFLW);
+ def_builtin (MASK_SSE2, "__builtin_ia32_pshufhw", v8hi_ftype_v8hi_int, (enum built_in_function)IX86_BUILTIN_PSHUFHW);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psadbw128", v2di_ftype_v16qi_v16qi, (enum built_in_function)IX86_BUILTIN_PSADBW128);
- def_builtin (MASK_SSE2, "__builtin_ia32_sqrtpd", v2df_ftype_v2df, IX86_BUILTIN_SQRTPD);
- def_builtin (MASK_SSE2, "__builtin_ia32_sqrtsd", v2df_ftype_v2df, IX86_BUILTIN_SQRTSD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_sqrtpd", v2df_ftype_v2df, (enum built_in_function)IX86_BUILTIN_SQRTPD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_sqrtsd", v2df_ftype_v2df, (enum built_in_function)IX86_BUILTIN_SQRTSD);
- def_builtin (MASK_SSE2, "__builtin_ia32_shufpd", v2df_ftype_v2df_v2df_int, IX86_BUILTIN_SHUFPD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_shufpd", v2df_ftype_v2df_v2df_int, (enum built_in_function)IX86_BUILTIN_SHUFPD);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtdq2pd", v2df_ftype_v4si, IX86_BUILTIN_CVTDQ2PD);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtdq2ps", v4sf_ftype_v4si, IX86_BUILTIN_CVTDQ2PS);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtdq2pd", v2df_ftype_v4si, (enum built_in_function)IX86_BUILTIN_CVTDQ2PD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtdq2ps", v4sf_ftype_v4si, (enum built_in_function)IX86_BUILTIN_CVTDQ2PS);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtpd2dq", v4si_ftype_v2df, IX86_BUILTIN_CVTPD2DQ);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtpd2pi", v2si_ftype_v2df, IX86_BUILTIN_CVTPD2PI);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtpd2ps", v4sf_ftype_v2df, IX86_BUILTIN_CVTPD2PS);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvttpd2dq", v4si_ftype_v2df, IX86_BUILTIN_CVTTPD2DQ);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvttpd2pi", v2si_ftype_v2df, IX86_BUILTIN_CVTTPD2PI);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtpd2dq", v4si_ftype_v2df, (enum built_in_function)IX86_BUILTIN_CVTPD2DQ);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtpd2pi", v2si_ftype_v2df, (enum built_in_function)IX86_BUILTIN_CVTPD2PI);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtpd2ps", v4sf_ftype_v2df, (enum built_in_function)IX86_BUILTIN_CVTPD2PS);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvttpd2dq", v4si_ftype_v2df, (enum built_in_function)IX86_BUILTIN_CVTTPD2DQ);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvttpd2pi", v2si_ftype_v2df, (enum built_in_function)IX86_BUILTIN_CVTTPD2PI);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtpi2pd", v2df_ftype_v2si, IX86_BUILTIN_CVTPI2PD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtpi2pd", v2df_ftype_v2si, (enum built_in_function)IX86_BUILTIN_CVTPI2PD);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtsd2si", int_ftype_v2df, IX86_BUILTIN_CVTSD2SI);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvttsd2si", int_ftype_v2df, IX86_BUILTIN_CVTTSD2SI);
- def_builtin (MASK_SSE2 | MASK_64BIT, "__builtin_ia32_cvtsd2si64", int64_ftype_v2df, IX86_BUILTIN_CVTSD2SI64);
- def_builtin (MASK_SSE2 | MASK_64BIT, "__builtin_ia32_cvttsd2si64", int64_ftype_v2df, IX86_BUILTIN_CVTTSD2SI64);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtsd2si", int_ftype_v2df, (enum built_in_function)IX86_BUILTIN_CVTSD2SI);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvttsd2si", int_ftype_v2df, (enum built_in_function)IX86_BUILTIN_CVTTSD2SI);
+ def_builtin (MASK_SSE2 | MASK_64BIT, "__builtin_ia32_cvtsd2si64", int64_ftype_v2df, (enum built_in_function)IX86_BUILTIN_CVTSD2SI64);
+ def_builtin (MASK_SSE2 | MASK_64BIT, "__builtin_ia32_cvttsd2si64", int64_ftype_v2df, (enum built_in_function)IX86_BUILTIN_CVTTSD2SI64);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtps2dq", v4si_ftype_v4sf, IX86_BUILTIN_CVTPS2DQ);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtps2pd", v2df_ftype_v4sf, IX86_BUILTIN_CVTPS2PD);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvttps2dq", v4si_ftype_v4sf, IX86_BUILTIN_CVTTPS2DQ);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtps2dq", v4si_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_CVTPS2DQ);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtps2pd", v2df_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_CVTPS2PD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvttps2dq", v4si_ftype_v4sf, (enum built_in_function)IX86_BUILTIN_CVTTPS2DQ);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtsi2sd", v2df_ftype_v2df_int, IX86_BUILTIN_CVTSI2SD);
- def_builtin (MASK_SSE2 | MASK_64BIT, "__builtin_ia32_cvtsi642sd", v2df_ftype_v2df_int64, IX86_BUILTIN_CVTSI642SD);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtsd2ss", v4sf_ftype_v4sf_v2df, IX86_BUILTIN_CVTSD2SS);
- def_builtin (MASK_SSE2, "__builtin_ia32_cvtss2sd", v2df_ftype_v2df_v4sf, IX86_BUILTIN_CVTSS2SD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtsi2sd", v2df_ftype_v2df_int, (enum built_in_function)IX86_BUILTIN_CVTSI2SD);
+ def_builtin (MASK_SSE2 | MASK_64BIT, "__builtin_ia32_cvtsi642sd", v2df_ftype_v2df_int64, (enum built_in_function)IX86_BUILTIN_CVTSI642SD);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtsd2ss", v4sf_ftype_v4sf_v2df, (enum built_in_function)IX86_BUILTIN_CVTSD2SS);
+ def_builtin (MASK_SSE2, "__builtin_ia32_cvtss2sd", v2df_ftype_v2df_v4sf, (enum built_in_function)IX86_BUILTIN_CVTSS2SD);
- def_builtin (MASK_SSE2, "__builtin_ia32_clflush", void_ftype_pcvoid, IX86_BUILTIN_CLFLUSH);
- def_builtin (MASK_SSE2, "__builtin_ia32_lfence", void_ftype_void, IX86_BUILTIN_LFENCE);
- def_builtin (MASK_SSE2, "__builtin_ia32_mfence", void_ftype_void, IX86_BUILTIN_MFENCE);
+ def_builtin (MASK_SSE2, "__builtin_ia32_clflush", void_ftype_pcvoid, (enum built_in_function)IX86_BUILTIN_CLFLUSH);
+ def_builtin (MASK_SSE2, "__builtin_ia32_lfence", void_ftype_void, (enum built_in_function)IX86_BUILTIN_LFENCE);
+ def_builtin (MASK_SSE2, "__builtin_ia32_mfence", void_ftype_void, (enum built_in_function)IX86_BUILTIN_MFENCE);
- def_builtin (MASK_SSE2, "__builtin_ia32_loaddqu", v16qi_ftype_pcchar, IX86_BUILTIN_LOADDQU);
- def_builtin (MASK_SSE2, "__builtin_ia32_storedqu", void_ftype_pchar_v16qi, IX86_BUILTIN_STOREDQU);
+ def_builtin (MASK_SSE2, "__builtin_ia32_loaddqu", v16qi_ftype_pcchar, (enum built_in_function)IX86_BUILTIN_LOADDQU);
+ def_builtin (MASK_SSE2, "__builtin_ia32_storedqu", void_ftype_pchar_v16qi, (enum built_in_function)IX86_BUILTIN_STOREDQU);
- def_builtin (MASK_SSE2, "__builtin_ia32_pmuludq", di_ftype_v2si_v2si, IX86_BUILTIN_PMULUDQ);
- def_builtin (MASK_SSE2, "__builtin_ia32_pmuludq128", v2di_ftype_v4si_v4si, IX86_BUILTIN_PMULUDQ128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_pmuludq", di_ftype_v2si_v2si, (enum built_in_function)IX86_BUILTIN_PMULUDQ);
+ def_builtin (MASK_SSE2, "__builtin_ia32_pmuludq128", v2di_ftype_v4si_v4si, (enum built_in_function)IX86_BUILTIN_PMULUDQ128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psllw128", v8hi_ftype_v8hi_v2di, IX86_BUILTIN_PSLLW128);
- def_builtin (MASK_SSE2, "__builtin_ia32_pslld128", v4si_ftype_v4si_v2di, IX86_BUILTIN_PSLLD128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psllq128", v2di_ftype_v2di_v2di, IX86_BUILTIN_PSLLQ128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psllw128", v8hi_ftype_v8hi_v2di, (enum built_in_function)IX86_BUILTIN_PSLLW128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_pslld128", v4si_ftype_v4si_v2di, (enum built_in_function)IX86_BUILTIN_PSLLD128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psllq128", v2di_ftype_v2di_v2di, (enum built_in_function)IX86_BUILTIN_PSLLQ128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psrlw128", v8hi_ftype_v8hi_v2di, IX86_BUILTIN_PSRLW128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psrld128", v4si_ftype_v4si_v2di, IX86_BUILTIN_PSRLD128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psrlq128", v2di_ftype_v2di_v2di, IX86_BUILTIN_PSRLQ128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psrlw128", v8hi_ftype_v8hi_v2di, (enum built_in_function)IX86_BUILTIN_PSRLW128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psrld128", v4si_ftype_v4si_v2di, (enum built_in_function)IX86_BUILTIN_PSRLD128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psrlq128", v2di_ftype_v2di_v2di, (enum built_in_function)IX86_BUILTIN_PSRLQ128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psraw128", v8hi_ftype_v8hi_v2di, IX86_BUILTIN_PSRAW128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psrad128", v4si_ftype_v4si_v2di, IX86_BUILTIN_PSRAD128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psraw128", v8hi_ftype_v8hi_v2di, (enum built_in_function)IX86_BUILTIN_PSRAW128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psrad128", v4si_ftype_v4si_v2di, (enum built_in_function)IX86_BUILTIN_PSRAD128);
- def_builtin (MASK_SSE2, "__builtin_ia32_pslldqi128", v2di_ftype_v2di_int, IX86_BUILTIN_PSLLDQI128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psllwi128", v8hi_ftype_v8hi_int, IX86_BUILTIN_PSLLWI128);
- def_builtin (MASK_SSE2, "__builtin_ia32_pslldi128", v4si_ftype_v4si_int, IX86_BUILTIN_PSLLDI128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psllqi128", v2di_ftype_v2di_int, IX86_BUILTIN_PSLLQI128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_pslldqi128", v2di_ftype_v2di_int, (enum built_in_function)IX86_BUILTIN_PSLLDQI128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psllwi128", v8hi_ftype_v8hi_int, (enum built_in_function)IX86_BUILTIN_PSLLWI128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_pslldi128", v4si_ftype_v4si_int, (enum built_in_function)IX86_BUILTIN_PSLLDI128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psllqi128", v2di_ftype_v2di_int, (enum built_in_function)IX86_BUILTIN_PSLLQI128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psrldqi128", v2di_ftype_v2di_int, IX86_BUILTIN_PSRLDQI128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psrlwi128", v8hi_ftype_v8hi_int, IX86_BUILTIN_PSRLWI128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psrldi128", v4si_ftype_v4si_int, IX86_BUILTIN_PSRLDI128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psrlqi128", v2di_ftype_v2di_int, IX86_BUILTIN_PSRLQI128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psrldqi128", v2di_ftype_v2di_int, (enum built_in_function)IX86_BUILTIN_PSRLDQI128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psrlwi128", v8hi_ftype_v8hi_int, (enum built_in_function)IX86_BUILTIN_PSRLWI128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psrldi128", v4si_ftype_v4si_int, (enum built_in_function)IX86_BUILTIN_PSRLDI128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psrlqi128", v2di_ftype_v2di_int, (enum built_in_function)IX86_BUILTIN_PSRLQI128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psrawi128", v8hi_ftype_v8hi_int, IX86_BUILTIN_PSRAWI128);
- def_builtin (MASK_SSE2, "__builtin_ia32_psradi128", v4si_ftype_v4si_int, IX86_BUILTIN_PSRADI128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psrawi128", v8hi_ftype_v8hi_int, (enum built_in_function)IX86_BUILTIN_PSRAWI128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_psradi128", v4si_ftype_v4si_int, (enum built_in_function)IX86_BUILTIN_PSRADI128);
- def_builtin (MASK_SSE2, "__builtin_ia32_pmaddwd128", v4si_ftype_v8hi_v8hi, IX86_BUILTIN_PMADDWD128);
+ def_builtin (MASK_SSE2, "__builtin_ia32_pmaddwd128", v4si_ftype_v8hi_v8hi, (enum built_in_function)IX86_BUILTIN_PMADDWD128);
/* Prescott New Instructions. */
def_builtin (MASK_SSE3, "__builtin_ia32_monitor",
void_ftype_pcvoid_unsigned_unsigned,
- IX86_BUILTIN_MONITOR);
+ (enum built_in_function)IX86_BUILTIN_MONITOR);
def_builtin (MASK_SSE3, "__builtin_ia32_mwait",
void_ftype_unsigned_unsigned,
- IX86_BUILTIN_MWAIT);
+ (enum built_in_function)IX86_BUILTIN_MWAIT);
def_builtin (MASK_SSE3, "__builtin_ia32_movshdup",
v4sf_ftype_v4sf,
- IX86_BUILTIN_MOVSHDUP);
+ (enum built_in_function)IX86_BUILTIN_MOVSHDUP);
def_builtin (MASK_SSE3, "__builtin_ia32_movsldup",
v4sf_ftype_v4sf,
- IX86_BUILTIN_MOVSLDUP);
+ (enum built_in_function)IX86_BUILTIN_MOVSLDUP);
def_builtin (MASK_SSE3, "__builtin_ia32_lddqu",
- v16qi_ftype_pcchar, IX86_BUILTIN_LDDQU);
+ v16qi_ftype_pcchar, (enum built_in_function)IX86_BUILTIN_LDDQU);
/* Access to the vec_init patterns. */
ftype = build_function_type_list (V2SI_type_node, integer_type_node,
integer_type_node, NULL_TREE);
def_builtin (MASK_MMX, "__builtin_ia32_vec_init_v2si",
- ftype, IX86_BUILTIN_VEC_INIT_V2SI);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_INIT_V2SI);
ftype = build_function_type_list (V4HI_type_node, short_integer_type_node,
short_integer_type_node,
short_integer_type_node,
short_integer_type_node, NULL_TREE);
def_builtin (MASK_MMX, "__builtin_ia32_vec_init_v4hi",
- ftype, IX86_BUILTIN_VEC_INIT_V4HI);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_INIT_V4HI);
ftype = build_function_type_list (V8QI_type_node, char_type_node,
char_type_node, char_type_node,
@@ -15454,57 +15458,57 @@ ix86_init_mmx_sse_builtins (void)
char_type_node, char_type_node,
char_type_node, NULL_TREE);
def_builtin (MASK_MMX, "__builtin_ia32_vec_init_v8qi",
- ftype, IX86_BUILTIN_VEC_INIT_V8QI);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_INIT_V8QI);
/* Access to the vec_extract patterns. */
ftype = build_function_type_list (double_type_node, V2DF_type_node,
integer_type_node, NULL_TREE);
def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2df",
- ftype, IX86_BUILTIN_VEC_EXT_V2DF);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_EXT_V2DF);
ftype = build_function_type_list (long_long_integer_type_node,
V2DI_type_node, integer_type_node,
NULL_TREE);
def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2di",
- ftype, IX86_BUILTIN_VEC_EXT_V2DI);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_EXT_V2DI);
ftype = build_function_type_list (float_type_node, V4SF_type_node,
integer_type_node, NULL_TREE);
def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v4sf",
- ftype, IX86_BUILTIN_VEC_EXT_V4SF);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_EXT_V4SF);
ftype = build_function_type_list (intSI_type_node, V4SI_type_node,
integer_type_node, NULL_TREE);
def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v4si",
- ftype, IX86_BUILTIN_VEC_EXT_V4SI);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_EXT_V4SI);
ftype = build_function_type_list (intHI_type_node, V8HI_type_node,
integer_type_node, NULL_TREE);
def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v8hi",
- ftype, IX86_BUILTIN_VEC_EXT_V8HI);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_EXT_V8HI);
ftype = build_function_type_list (intHI_type_node, V4HI_type_node,
integer_type_node, NULL_TREE);
def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_vec_ext_v4hi",
- ftype, IX86_BUILTIN_VEC_EXT_V4HI);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_EXT_V4HI);
ftype = build_function_type_list (intSI_type_node, V2SI_type_node,
integer_type_node, NULL_TREE);
def_builtin (MASK_MMX, "__builtin_ia32_vec_ext_v2si",
- ftype, IX86_BUILTIN_VEC_EXT_V2SI);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_EXT_V2SI);
/* Access to the vec_set patterns. */
ftype = build_function_type_list (V8HI_type_node, V8HI_type_node,
intHI_type_node,
integer_type_node, NULL_TREE);
def_builtin (MASK_SSE, "__builtin_ia32_vec_set_v8hi",
- ftype, IX86_BUILTIN_VEC_SET_V8HI);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_SET_V8HI);
ftype = build_function_type_list (V4HI_type_node, V4HI_type_node,
intHI_type_node,
integer_type_node, NULL_TREE);
def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_vec_set_v4hi",
- ftype, IX86_BUILTIN_VEC_SET_V4HI);
+ ftype, (enum built_in_function)IX86_BUILTIN_VEC_SET_V4HI);
}
/* Errors in the source file can cause expand_expr to return const0_rtx
@@ -15892,8 +15896,8 @@ ix86_expand_vec_set_builtin (tree arglist)
mode1 = TYPE_MODE (TREE_TYPE (TREE_TYPE (arg0)));
gcc_assert (VECTOR_MODE_P (tmode));
- op0 = expand_expr (arg0, NULL_RTX, tmode, 0);
- op1 = expand_expr (arg1, NULL_RTX, mode1, 0);
+ op0 = expand_expr (arg0, NULL_RTX, tmode, EXPAND_NORMAL);
+ op1 = expand_expr (arg1, NULL_RTX, mode1, EXPAND_NORMAL);
elt = get_element_number (TREE_TYPE (arg0), arg2);
if (GET_MODE (op1) != mode1 && GET_MODE (op1) != VOIDmode)
@@ -16447,18 +16451,18 @@ ix86_free_from_memory (enum machine_mode mode)
Narrow ALL_REGS to GENERAL_REGS. This supports allowing movsf and
movdf to do mem-to-mem moves through integer regs. */
enum reg_class
-ix86_preferred_reload_class (rtx x, enum reg_class class)
+ix86_preferred_reload_class (rtx x, enum reg_class regclass)
{
enum machine_mode mode = GET_MODE (x);
/* We're only allowed to return a subclass of CLASS. Many of the
following checks fail for NO_REGS, so eliminate that early. */
- if (class == NO_REGS)
+ if (regclass == NO_REGS)
return NO_REGS;
/* All classes can load zeros. */
if (x == CONST0_RTX (mode))
- return class;
+ return regclass;
/* Force constants into memory if we are loading a (nonzero) constant into
an MMX or SSE register. This is because there are no MMX/SSE instructions
@@ -16475,8 +16479,8 @@ ix86_preferred_reload_class (rtx x, enum reg_class class)
if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != VOIDmode)
{
/* General regs can load everything. */
- if (reg_class_subset_p (class, GENERAL_REGS))
- return class;
+ if (reg_class_subset_p (regclass, GENERAL_REGS))
+ return regclass;
/* Floats can load 0 and 1 plus some others. Note that we eliminated
zero above. We only want to wind up preferring 80387 registers if
@@ -16485,14 +16489,14 @@ ix86_preferred_reload_class (rtx x, enum reg_class class)
&& standard_80387_constant_p (x))
{
/* Limit class to non-sse. */
- if (class == FLOAT_SSE_REGS)
+ if (regclass == FLOAT_SSE_REGS)
return FLOAT_REGS;
- if (class == FP_TOP_SSE_REGS)
+ if (regclass == FP_TOP_SSE_REGS)
return FP_TOP_REG;
- if (class == FP_SECOND_SSE_REGS)
+ if (regclass == FP_SECOND_SSE_REGS)
return FP_SECOND_REG;
- if (class == FLOAT_INT_REGS || class == FLOAT_REGS)
- return class;
+ if (regclass == FLOAT_INT_REGS || regclass == FLOAT_REGS)
+ return regclass;
}
return NO_REGS;
@@ -16502,20 +16506,20 @@ ix86_preferred_reload_class (rtx x, enum reg_class class)
(plus soft-fp const_int). Which can only be computed into general
regs. */
if (GET_CODE (x) == PLUS)
- return reg_class_subset_p (class, GENERAL_REGS) ? class : NO_REGS;
+ return reg_class_subset_p (regclass, GENERAL_REGS) ? regclass : NO_REGS;
/* QImode constants are easy to load, but non-constant QImode data
must go into Q_REGS. */
if (GET_MODE (x) == QImode && !CONSTANT_P (x))
{
- if (reg_class_subset_p (class, Q_REGS))
- return class;
- if (reg_class_subset_p (Q_REGS, class))
+ if (reg_class_subset_p (regclass, Q_REGS))
+ return regclass;
+ if (reg_class_subset_p (Q_REGS, regclass))
return Q_REGS;
return NO_REGS;
}
- return class;
+ return regclass;
}
/* Discourage putting floating-point values in SSE registers unless
@@ -16610,17 +16614,17 @@ ix86_secondary_memory_needed (enum reg_class class1, enum reg_class class2,
bool
ix86_cannot_change_mode_class (enum machine_mode from, enum machine_mode to,
- enum reg_class class)
+ enum reg_class regclass)
{
if (from == to)
return false;
/* x87 registers can't do subreg at all, as all values are reformatted
to extended precision. */
- if (MAYBE_FLOAT_CLASS_P (class))
+ if (MAYBE_FLOAT_CLASS_P (regclass))
return true;
- if (MAYBE_SSE_CLASS_P (class) || MAYBE_MMX_CLASS_P (class))
+ if (MAYBE_SSE_CLASS_P (regclass) || MAYBE_MMX_CLASS_P (regclass))
{
/* Vector registers do not support QI or HImode loads. If we don't
disallow a change to these modes, reload will assume it's ok to
@@ -16825,9 +16829,9 @@ ix86_modes_tieable_p (enum machine_mode mode1, enum machine_mode mode2)
Q_REGS classes.
*/
int
-ix86_memory_move_cost (enum machine_mode mode, enum reg_class class, int in)
+ix86_memory_move_cost (enum machine_mode mode, enum reg_class regclass, int in)
{
- if (FLOAT_CLASS_P (class))
+ if (FLOAT_CLASS_P (regclass))
{
int index;
switch (mode)
@@ -16846,7 +16850,7 @@ ix86_memory_move_cost (enum machine_mode mode, enum reg_class class, int in)
}
return in ? ix86_cost->fp_load [index] : ix86_cost->fp_store [index];
}
- if (SSE_CLASS_P (class))
+ if (SSE_CLASS_P (regclass))
{
int index;
switch (GET_MODE_SIZE (mode))
@@ -16865,7 +16869,7 @@ ix86_memory_move_cost (enum machine_mode mode, enum reg_class class, int in)
}
return in ? ix86_cost->sse_load [index] : ix86_cost->sse_store [index];
}
- if (MMX_CLASS_P (class))
+ if (MMX_CLASS_P (regclass))
{
int index;
switch (GET_MODE_SIZE (mode))
@@ -16885,10 +16889,10 @@ ix86_memory_move_cost (enum machine_mode mode, enum reg_class class, int in)
{
case 1:
if (in)
- return (Q_CLASS_P (class) ? ix86_cost->int_load[0]
+ return (Q_CLASS_P (regclass) ? ix86_cost->int_load[0]
: ix86_cost->movzbl_load);
else
- return (Q_CLASS_P (class) ? ix86_cost->int_store[0]
+ return (Q_CLASS_P (regclass) ? ix86_cost->int_store[0]
: ix86_cost->int_store[0] + 4);
break;
case 2:
@@ -17066,7 +17070,7 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total)
*total = (ix86_cost->mult_init[MODE_INDEX (mode)]
+ nbits * ix86_cost->mult_bit
- + rtx_cost (op0, outer_code) + rtx_cost (op1, outer_code));
+ + rtx_cost (op0, (enum rtx_code) outer_code) + rtx_cost (op1, (enum rtx_code) outer_code));
return true;
}
@@ -17096,10 +17100,10 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total)
if (val == 2 || val == 4 || val == 8)
{
*total = ix86_cost->lea;
- *total += rtx_cost (XEXP (XEXP (x, 0), 1), outer_code);
+ *total += rtx_cost (XEXP (XEXP (x, 0), 1), (enum rtx_code) outer_code);
*total += rtx_cost (XEXP (XEXP (XEXP (x, 0), 0), 0),
- outer_code);
- *total += rtx_cost (XEXP (x, 1), outer_code);
+ (enum rtx_code) outer_code);
+ *total += rtx_cost (XEXP (x, 1), (enum rtx_code) outer_code);
return true;
}
}
@@ -17110,17 +17114,17 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total)
if (val == 2 || val == 4 || val == 8)
{
*total = ix86_cost->lea;
- *total += rtx_cost (XEXP (XEXP (x, 0), 0), outer_code);
- *total += rtx_cost (XEXP (x, 1), outer_code);
+ *total += rtx_cost (XEXP (XEXP (x, 0), 0), (enum rtx_code) outer_code);
+ *total += rtx_cost (XEXP (x, 1), (enum rtx_code) outer_code);
return true;
}
}
else if (GET_CODE (XEXP (x, 0)) == PLUS)
{
*total = ix86_cost->lea;
- *total += rtx_cost (XEXP (XEXP (x, 0), 0), outer_code);
- *total += rtx_cost (XEXP (XEXP (x, 0), 1), outer_code);
- *total += rtx_cost (XEXP (x, 1), outer_code);
+ *total += rtx_cost (XEXP (XEXP (x, 0), 0), (enum rtx_code) outer_code);
+ *total += rtx_cost (XEXP (XEXP (x, 0), 1), (enum rtx_code) outer_code);
+ *total += rtx_cost (XEXP (x, 1), (enum rtx_code) outer_code);
return true;
}
}
@@ -17140,9 +17144,9 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total)
if (!TARGET_64BIT && mode == DImode)
{
*total = (ix86_cost->add * 2
- + (rtx_cost (XEXP (x, 0), outer_code)
+ + (rtx_cost (XEXP (x, 0), (enum rtx_code) outer_code)
<< (GET_MODE (XEXP (x, 0)) != DImode))
- + (rtx_cost (XEXP (x, 1), outer_code)
+ + (rtx_cost (XEXP (x, 1), (enum rtx_code) outer_code)
<< (GET_MODE (XEXP (x, 1)) != DImode)));
return true;
}
@@ -17172,8 +17176,8 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total)
/* This kind of construct is implemented using test[bwl].
Treat it as if we had an AND. */
*total = (ix86_cost->add
- + rtx_cost (XEXP (XEXP (x, 0), 0), outer_code)
- + rtx_cost (const1_rtx, outer_code));
+ + rtx_cost (XEXP (XEXP (x, 0), 0), (enum rtx_code) outer_code)
+ + rtx_cost (const1_rtx, (enum rtx_code) outer_code));
return true;
}
return false;
@@ -17461,17 +17465,17 @@ x86_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED,
HOST_WIDE_INT vcall_offset, tree function)
{
rtx xops[3];
- rtx this = x86_this_parameter (function);
+ rtx this_par = x86_this_parameter (function);
rtx this_reg, tmp;
/* If VCALL_OFFSET, we'll need THIS in a register. Might as well
pull it in now and let DELTA benefit. */
- if (REG_P (this))
- this_reg = this;
+ if (REG_P (this_par))
+ this_reg = this_par;
else if (vcall_offset)
{
/* Put the this parameter into %eax. */
- xops[0] = this;
+ xops[0] = this_par;
xops[1] = this_reg = gen_rtx_REG (Pmode, 0);
output_asm_insn ("mov{l}\t{%0, %1|%1, %0}", xops);
}
@@ -17482,7 +17486,7 @@ x86_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED,
if (delta)
{
xops[0] = GEN_INT (delta);
- xops[1] = this_reg ? this_reg : this;
+ xops[1] = this_reg ? this_reg : this_par;
if (TARGET_64BIT)
{
if (!x86_64_general_operand (xops[0], DImode))
@@ -17491,7 +17495,7 @@ x86_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED,
xops[1] = tmp;
output_asm_insn ("mov{q}\t{%1, %0|%0, %1}", xops);
xops[0] = tmp;
- xops[1] = this;
+ xops[1] = this_par;
}
output_asm_insn ("add{q}\t{%0, %1|%1, %0}", xops);
}
@@ -17538,10 +17542,10 @@ x86_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED,
}
/* If necessary, drop THIS back to its stack slot. */
- if (this_reg && this_reg != this)
+ if (this_reg && this_reg != this_par)
{
xops[0] = this_reg;
- xops[1] = this;
+ xops[1] = this_par;
output_asm_insn ("mov{l}\t{%0, %1|%1, %0}", xops);
}
diff --git a/gcc/config/i386/netware.h b/gcc/config/i386/netware.h
index 3630765c7aa..e15728183fd 100644
--- a/gcc/config/i386/netware.h
+++ b/gcc/config/i386/netware.h
@@ -41,7 +41,6 @@ Boston, MA 02110-1301, USA. */
#undef ENDFILE_SPEC
#define ENDFILE_SPEC ""
-#undef RELATIVE_PREFIX_NOT_LINKDIR
#undef LIBGCC_SPEC
#define TARGET_OS_CPP_BUILTINS() \
diff --git a/gcc/config/i386/nto.h b/gcc/config/i386/nto.h
index 1095a631319..f8a216128f6 100644
--- a/gcc/config/i386/nto.h
+++ b/gcc/config/i386/nto.h
@@ -40,9 +40,6 @@ Boston, MA 02110-1301, USA. */
} \
while (0)
-#undef THREAD_MODEL_SPEC
-#define THREAD_MODEL_SPEC "posix"
-
#ifdef CROSS_COMPILE
#define SYSROOT_SUFFIX_SPEC "x86"
#endif
diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h
index 026ffd832fb..7f875f2399a 100644
--- a/gcc/config/i386/sco5.h
+++ b/gcc/config/i386/sco5.h
@@ -150,18 +150,8 @@ Boston, MA 02110-1301, USA. */
link so that -lintl will work for other systems. The same goes for
header files. We want /usr/gnu/include searched for before the system
header files. Hence the -isystem /usr/gnu/include in the CPP_SPEC.
- We get /usr/gnu/lib first by virtue of the MD_STARTFILE_PREFIX below.
*/
-#define MD_STARTFILE_PREFIX "/usr/gnu/lib/"
-#define MD_STARTFILE_PREFIX_1 "/usr/ccs/lib/"
-
-#if USE_GAS
-# define MD_EXEC_PREFIX "/usr/gnu/bin/"
-#else
-# define MD_EXEC_PREFIX "/usr/ccs/bin/elf/"
-#endif
-
/* Always use the system linker, please. */
#ifndef DEFAULT_LINKER
# define DEFAULT_LINKER "/usr/ccs/bin/elf/ld"
diff --git a/gcc/config/i386/uwin.h b/gcc/config/i386/uwin.h
index 38d218ef6e6..9f20feeb412 100644
--- a/gcc/config/i386/uwin.h
+++ b/gcc/config/i386/uwin.h
@@ -27,8 +27,6 @@ Boston, MA 02110-1301, USA. */
#define STANDARD_INCLUDE_COMPONENT "UWIN"
#define SYSTEM_INCLUDE_DIR "/usr/gnu/include"
-#undef MD_STARTFILE_PREFIX
-#define MD_STARTFILE_PREFIX "/usr/gnu/lib/"
#undef MAYBE_UWIN_CPP_BUILTINS
#define MAYBE_UWIN_CPP_BUILTINS() \
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 8a98b2457c4..606f1b3a580 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -9427,9 +9427,9 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
unsigned int this_parmno;
unsigned int this_regno;
- reload_completed = 1;
- epilogue_completed = 1;
- no_new_pseudos = 1;
+ reload_completed = true;
+ epilogue_completed = true;
+ no_new_pseudos = true;
reset_block_changes ();
/* Set things up as ia64_expand_prologue might. */
@@ -9537,8 +9537,8 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
SIBLING_CALL_P (insn) = 1;
/* Code generation for calls relies on splitting. */
- reload_completed = 1;
- epilogue_completed = 1;
+ reload_completed = true;
+ epilogue_completed = true;
try_split (PATTERN (insn), insn, 0);
emit_barrier ();
@@ -9556,9 +9556,9 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
final (insn, file, 1);
final_end_function ();
- reload_completed = 0;
- epilogue_completed = 0;
- no_new_pseudos = 0;
+ reload_completed = false;
+ epilogue_completed = false;
+ no_new_pseudos = false;
}
/* Worker function for TARGET_STRUCT_VALUE_RTX. */
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index 4b1cb3e5233..9df87548f49 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -2587,7 +2587,7 @@ expand_one_builtin (enum insn_code icode, rtx target, tree arglist,
{
arg[i] = TREE_VALUE (arglist);
arglist = TREE_CHAIN (arglist);
- op[i] = expand_expr (arg[i], NULL_RTX, VOIDmode, 0);
+ op[i] = expand_normal (arg[i]);
mode[i] = insn_data[icode].operand[i].mode;
if (code[i] == CONST_INT && GET_CODE (op[i]) != CONST_INT)
error ("argument %qd is not a constant", i + 1);
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index 59e3e8538f9..44464a75df7 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -30,9 +30,6 @@ Boston, MA 02110-1301, USA. */
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static
@@ -64,10 +61,6 @@ Boston, MA 02110-1301, USA. */
#define CC1_SPEC "%{profile:-p}"
#endif
-/* The GNU C++ standard library requires that these macros be defined. */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
#undef LIB_SPEC
#define LIB_SPEC \
"%{pthread:-lpthread} \
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index 1b7069d4a16..9db2178f32b 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -1573,7 +1573,7 @@ expand_prologue (void)
int regno;
rtx scratch;
- gcc_assert (reload_completed == 1);
+ gcc_assert (reload_completed);
size = get_frame_size ();
@@ -1678,7 +1678,7 @@ expand_epilogue (void)
int return_size;
rtx scratch;
- gcc_assert (reload_completed == 1);
+ gcc_assert (reload_completed);
size = get_frame_size ();
@@ -5432,7 +5432,7 @@ m68hc11_rtx_costs (rtx x, int code, int outer_code, int *total)
if (outer_code == SET && x == const0_rtx)
/* After reload, the reload_cse pass checks the cost to change
a SET into a PLUS. Make const0 cheap then. */
- *total = 1 - reload_completed;
+ *total = (reload_completed ? 0: 1);
else
*total = 0;
return true;
diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
index bed5e316dd0..8b4a7c9d460 100644
--- a/gcc/config/mips/linux.h
+++ b/gcc/config/mips/linux.h
@@ -46,9 +46,6 @@ Boston, MA 02110-1301, USA. */
#define TARGET_VERSION fprintf (stderr, " (MIPS GNU/Linux with ELF)");
#endif
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
/* If we don't set MASK_ABICALLS, we can't default to PIC. */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT MASK_ABICALLS
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 26ea020d0b8..66715cac8ef 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -247,6 +247,7 @@ enum mips_builtin_type
/* Enumerates the codes above as MIPS_FP_COND_<X>. */
#define DECLARE_MIPS_COND(X) MIPS_FP_COND_ ## X
enum mips_fp_condition {
+ MIPS_FP_COND_NONE,
MIPS_FP_CONDITIONS (DECLARE_MIPS_COND)
};
@@ -763,7 +764,7 @@ const struct mips_cpu_info mips_cpu_info_table[] = {
{ "sr71000", PROCESSOR_SR71000, 64 },
/* End marker */
- { 0, 0, 0 }
+ { 0, PROCESSOR_NONE, 0 }
};
/* Default costs. If these are used for a processor we should look
@@ -3512,7 +3513,7 @@ mips_block_move_straight (rtx dest, rtx src, HOST_WIDE_INT length)
delta = bits / BITS_PER_UNIT;
/* Allocate a buffer for the temporary registers. */
- regs = alloca (sizeof (rtx) * length / delta);
+ regs = (rtx *)alloca (sizeof (rtx) * length / delta);
/* Load as many BITS-sized chunks as possible. Use a normal load if
the source has enough alignment, otherwise use left/right pairs. */
@@ -3895,7 +3896,7 @@ function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
reg = gen_rtx_REG (DImode, GP_ARG_FIRST + info.reg_offset + i);
XVECEXP (ret, 0, i)
- = gen_rtx_EXPR_LIST (VOIDmode, reg,
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, reg,
GEN_INT (bitpos / BITS_PER_UNIT));
bitpos += BITS_PER_WORD;
@@ -3926,10 +3927,10 @@ function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
else
{
gcc_assert (info.stack_words == 0);
- real = gen_rtx_EXPR_LIST (VOIDmode,
+ real = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (inner, reg),
const0_rtx);
- imag = gen_rtx_EXPR_LIST (VOIDmode,
+ imag = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (inner,
reg + info.reg_words / 2),
GEN_INT (GET_MODE_SIZE (inner)));
@@ -4986,7 +4987,7 @@ override_options (void)
mode = (enum machine_mode) ((int)mode + 1))
{
register int size = GET_MODE_SIZE (mode);
- register enum mode_class class = GET_MODE_CLASS (mode);
+ register enum mode_class cls = GET_MODE_CLASS (mode);
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
{
@@ -5016,8 +5017,8 @@ override_options (void)
else if (FP_REG_P (regno))
temp = ((regno % FP_INC) == 0)
- && (((class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT
- || class == MODE_VECTOR_FLOAT)
+ && (((cls == MODE_FLOAT || cls == MODE_COMPLEX_FLOAT
+ || cls == MODE_VECTOR_FLOAT)
&& size <= UNITS_PER_FPVALUE)
/* Allow integer modes that fit into a single
register. We need to put integers into FPRs
@@ -5025,7 +5026,7 @@ override_options (void)
We can't allow sizes smaller than a word,
the FPU has no appropriate load/store
instructions for those. */
- || (class == MODE_INT
+ || (cls == MODE_INT
&& size >= MIN_UNITS_PER_WORD
&& size <= UNITS_PER_FPREG)
/* Allow TFmode for CCmode reloads. */
@@ -5038,7 +5039,7 @@ override_options (void)
&& size == 2 * UNITS_PER_WORD)));
else if (ALL_COP_REG_P (regno))
- temp = (class == MODE_INT && size <= UNITS_PER_WORD);
+ temp = (cls == MODE_INT && size <= UNITS_PER_WORD);
else
temp = 0;
@@ -7126,11 +7127,11 @@ mips_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree function)
{
- rtx this, temp1, temp2, insn, fnaddr;
+ rtx it, temp1, temp2, insn, fnaddr;
/* Pretend to be a post-reload pass while generating rtl. */
- no_new_pseudos = 1;
- reload_completed = 1;
+ no_new_pseudos = true;
+ reload_completed = true;
reset_block_changes ();
/* Pick a global pointer for -mabicalls. Use $15 rather than $28
@@ -7149,9 +7150,9 @@ mips_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Find out which register contains the "this" pointer. */
if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function))
- this = gen_rtx_REG (Pmode, GP_ARG_FIRST + 1);
+ it = gen_rtx_REG (Pmode, GP_ARG_FIRST + 1);
else
- this = gen_rtx_REG (Pmode, GP_ARG_FIRST);
+ it = gen_rtx_REG (Pmode, GP_ARG_FIRST);
/* Add DELTA to THIS. */
if (delta != 0)
@@ -7162,7 +7163,7 @@ mips_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
emit_move_insn (temp1, offset);
offset = temp1;
}
- emit_insn (gen_add3_insn (this, this, offset));
+ emit_insn (gen_add3_insn (it, it, offset));
}
/* If needed, add *(*THIS + VCALL_OFFSET) to THIS. */
@@ -7171,14 +7172,14 @@ mips_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
rtx addr;
/* Set TEMP1 to *THIS. */
- emit_move_insn (temp1, gen_rtx_MEM (Pmode, this));
+ emit_move_insn (temp1, gen_rtx_MEM (Pmode, it));
/* Set ADDR to a legitimate address for *THIS + VCALL_OFFSET. */
addr = mips_add_offset (temp2, temp1, vcall_offset);
/* Load the offset and add it to THIS. */
emit_move_insn (temp1, gen_rtx_MEM (Pmode, addr));
- emit_insn (gen_add3_insn (this, this, temp1));
+ emit_insn (gen_add3_insn (it, it, temp1));
}
/* Jump to the target function. Use a sibcall if direct jumps are
@@ -7225,8 +7226,8 @@ mips_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Clean up the vars set above. Note that final_end_function resets
the global pointer for us. */
- reload_completed = 0;
- no_new_pseudos = 0;
+ reload_completed = false;
+ no_new_pseudos = false;
}
/* Returns nonzero if X contains a SYMBOL_REF. */
@@ -7468,10 +7469,10 @@ mips_return_fpr_pair (enum machine_mode mode,
return gen_rtx_PARALLEL
(mode,
gen_rtvec (2,
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (mode1, FP_RETURN),
GEN_INT (offset1)),
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (mode2, FP_RETURN + inc),
GEN_INT (offset2))));
@@ -7591,7 +7592,7 @@ mips_callee_copies (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
bool
mips_cannot_change_mode_class (enum machine_mode from,
- enum machine_mode to, enum reg_class class)
+ enum machine_mode to, enum reg_class regclass)
{
if (MIN (GET_MODE_SIZE (from), GET_MODE_SIZE (to)) <= UNITS_PER_WORD
&& MAX (GET_MODE_SIZE (from), GET_MODE_SIZE (to)) > UNITS_PER_WORD)
@@ -7602,7 +7603,7 @@ mips_cannot_change_mode_class (enum machine_mode from,
registers, the first register always holds the low word.
We therefore can't allow FPRs to change between single-word
and multi-word modes. */
- if (FP_INC > 1 && reg_classes_intersect_p (FP_REGS, class))
+ if (FP_INC > 1 && reg_classes_intersect_p (FP_REGS, regclass))
return true;
}
else
@@ -7613,7 +7614,7 @@ mips_cannot_change_mode_class (enum machine_mode from,
and multi-word modes.
This rule applies to both the original HI/LO pair and the new
DSP accumulators. */
- if (reg_classes_intersect_p (ACC_REGS, class))
+ if (reg_classes_intersect_p (ACC_REGS, regclass))
return true;
}
}
@@ -7624,7 +7625,7 @@ mips_cannot_change_mode_class (enum machine_mode from,
if (TARGET_FLOAT64
&& from == SImode
&& GET_MODE_SIZE (to) >= UNITS_PER_WORD
- && reg_classes_intersect_p (FP_REGS, class))
+ && reg_classes_intersect_p (FP_REGS, regclass))
return true;
return false;
}
@@ -7648,23 +7649,23 @@ mips_dangerous_for_la25_p (rtx x)
/* Implement PREFERRED_RELOAD_CLASS. */
enum reg_class
-mips_preferred_reload_class (rtx x, enum reg_class class)
+mips_preferred_reload_class (rtx x, enum reg_class cls)
{
- if (mips_dangerous_for_la25_p (x) && reg_class_subset_p (LEA_REGS, class))
+ if (mips_dangerous_for_la25_p (x) && reg_class_subset_p (LEA_REGS, cls))
return LEA_REGS;
if (TARGET_HARD_FLOAT
&& FLOAT_MODE_P (GET_MODE (x))
- && reg_class_subset_p (FP_REGS, class))
+ && reg_class_subset_p (FP_REGS, cls))
return FP_REGS;
- if (reg_class_subset_p (GR_REGS, class))
- class = GR_REGS;
+ if (reg_class_subset_p (GR_REGS, cls))
+ cls = GR_REGS;
- if (TARGET_MIPS16 && reg_class_subset_p (M16_REGS, class))
- class = M16_REGS;
+ if (TARGET_MIPS16 && reg_class_subset_p (M16_REGS, cls))
+ cls = M16_REGS;
- return class;
+ return cls;
}
/* This function returns the register class required for a secondary
@@ -7674,7 +7675,7 @@ mips_preferred_reload_class (rtx x, enum reg_class class)
NO_REGS means that no secondary register is required. */
enum reg_class
-mips_secondary_reload_class (enum reg_class class,
+mips_secondary_reload_class (enum reg_class cls,
enum machine_mode mode, rtx x, int in_p)
{
enum reg_class gr_regs = TARGET_MIPS16 ? M16_REGS : GR_REGS;
@@ -7689,7 +7690,7 @@ mips_secondary_reload_class (enum reg_class class,
if (mips_dangerous_for_la25_p (x))
{
gr_regs = LEA_REGS;
- if (TEST_HARD_REG_BIT (reg_class_contents[(int) class], 25))
+ if (TEST_HARD_REG_BIT (reg_class_contents[(int) cls], 25))
return gr_regs;
}
@@ -7697,7 +7698,7 @@ mips_secondary_reload_class (enum reg_class class,
requires a general register.
This rule applies to both the original HI/LO pair and the new
DSP accumulators. */
- if (reg_class_subset_p (class, ACC_REGS))
+ if (reg_class_subset_p (cls, ACC_REGS))
{
if (TARGET_MIPS16 && in_p)
{
@@ -7713,14 +7714,14 @@ mips_secondary_reload_class (enum reg_class class,
/* We can't really copy to HI or LO at all in mips16 mode. */
return M16_REGS;
}
- return class == gr_regs ? NO_REGS : gr_regs;
+ return cls == gr_regs ? NO_REGS : gr_regs;
}
/* We can only copy a value to a condition code register from a
floating point register, and even then we require a scratch
floating point register. We can only copy a value out of a
condition code register into a general register. */
- if (class == ST_REGS)
+ if (cls == ST_REGS)
{
if (in_p)
return FP_REGS;
@@ -7730,10 +7731,10 @@ mips_secondary_reload_class (enum reg_class class,
{
if (! in_p)
return FP_REGS;
- return class == gr_regs ? NO_REGS : gr_regs;
+ return cls == gr_regs ? NO_REGS : gr_regs;
}
- if (class == FP_REGS)
+ if (cls == FP_REGS)
{
if (MEM_P (x))
{
@@ -7768,7 +7769,7 @@ mips_secondary_reload_class (enum reg_class class,
requires an M16_REG. */
if (TARGET_MIPS16)
{
- if (class != M16_REGS && class != M16_NA_REGS)
+ if (cls != M16_REGS && cls != M16_NA_REGS)
{
if (gp_reg_p)
return NO_REGS;
@@ -7776,7 +7777,7 @@ mips_secondary_reload_class (enum reg_class class,
}
if (! gp_reg_p)
{
- if (class == M16_REGS || class == M16_NA_REGS)
+ if (cls == M16_REGS || cls == M16_NA_REGS)
return NO_REGS;
return M16_REGS;
}
@@ -7797,10 +7798,9 @@ mips_secondary_reload_class (enum reg_class class,
considered to be 4 bytes wide. */
int
-mips_class_max_nregs (enum reg_class class ATTRIBUTE_UNUSED,
- enum machine_mode mode)
+mips_class_max_nregs (enum reg_class cls, enum machine_mode mode)
{
- if (class == ST_REGS)
+ if (cls == ST_REGS)
return (GET_MODE_SIZE (mode) + 3) / 4;
else
return (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
@@ -8122,7 +8122,7 @@ build_mips16_call_stub (rtx retval, rtx fn, rtx arg_size, int fp_code)
/* Put the register usage information on the CALL. */
CALL_INSN_FUNCTION_USAGE (insn) =
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_USE (VOIDmode, gen_rtx_REG (Pmode, 2)),
CALL_INSN_FUNCTION_USAGE (insn));
@@ -8133,7 +8133,7 @@ build_mips16_call_stub (rtx retval, rtx fn, rtx arg_size, int fp_code)
code. */
if (fpret)
CALL_INSN_FUNCTION_USAGE (insn) =
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_USE (VOIDmode,
gen_rtx_REG (word_mode, 18)),
CALL_INSN_FUNCTION_USAGE (insn));
@@ -8322,7 +8322,7 @@ build_mips16_call_stub (rtx retval, rtx fn, rtx arg_size, int fp_code)
insn = emit_call_insn (insn);
CALL_INSN_FUNCTION_USAGE (insn) =
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_USE (VOIDmode, gen_rtx_REG (word_mode, 18)),
CALL_INSN_FUNCTION_USAGE (insn));
@@ -8496,7 +8496,7 @@ mips16_insn_length (rtx insn)
static int
mips16_rewrite_pool_refs (rtx *x, void *data)
{
- struct mips16_constant_pool *pool = data;
+ struct mips16_constant_pool *pool = (struct mips16_constant_pool *)data;
if (GET_CODE (*x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (*x))
*x = gen_rtx_LABEL_REF (Pmode, add_constant (pool,
get_pool_constant (*x),
@@ -8650,7 +8650,7 @@ static int
mips_sim_wait_regs_2 (rtx *x, void *data)
{
if (REG_P (*x))
- mips_sim_wait_reg (data, mips_sim_insn, *x);
+ mips_sim_wait_reg ((struct mips_sim *)data, mips_sim_insn, *x);
return 0;
}
@@ -8705,7 +8705,7 @@ mips_sim_record_set (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
struct mips_sim *state;
unsigned int i;
- state = data;
+ state = (struct mips_sim *)data;
if (REG_P (x))
for (i = 0; i < HARD_REGNO_NREGS (REGNO (x), GET_MODE (x)); i++)
{
@@ -9769,7 +9769,7 @@ static rtx vr4130_last_insn;
static void
vr4130_true_reg_dependence_p_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
{
- rtx *insn_ptr = data;
+ rtx *insn_ptr = (rtx *)data;
if (REG_P (x)
&& *insn_ptr != 0
&& reg_referenced_p (x, PATTERN (*insn_ptr)))
@@ -10029,7 +10029,7 @@ struct builtin_description
/* Define a MIPS_BUILTIN_DIRECT function for instruction CODE_FOR_mips_<INSN>.
FUNCTION_TYPE and TARGET_FLAGS are builtin_description fields. */
#define DIRECT_BUILTIN(INSN, FUNCTION_TYPE, TARGET_FLAGS) \
- { CODE_FOR_mips_ ## INSN, 0, "__builtin_mips_" #INSN, \
+ { CODE_FOR_mips_ ## INSN, MIPS_FP_COND_NONE, "__builtin_mips_" #INSN, \
MIPS_BUILTIN_DIRECT, FUNCTION_TYPE, TARGET_FLAGS }
/* Define __builtin_mips_<INSN>_<COND>_{s,d}, both of which require
@@ -10148,13 +10148,13 @@ static const struct builtin_description sb1_bdesc[] =
CODE_FOR_mips_<INSN>. FUNCTION_TYPE and TARGET_FLAGS are
builtin_description fields. */
#define DIRECT_NO_TARGET_BUILTIN(INSN, FUNCTION_TYPE, TARGET_FLAGS) \
- { CODE_FOR_mips_ ## INSN, 0, "__builtin_mips_" #INSN, \
+ { CODE_FOR_mips_ ## INSN, MIPS_FP_COND_NONE, "__builtin_mips_" #INSN, \
MIPS_BUILTIN_DIRECT_NO_TARGET, FUNCTION_TYPE, TARGET_FLAGS }
/* Define __builtin_mips_bposge<VALUE>. <VALUE> is 32 for the MIPS32 DSP
branch instruction. TARGET_FLAGS is a builtin_description field. */
#define BPOSGE_BUILTIN(VALUE, TARGET_FLAGS) \
- { CODE_FOR_mips_bposge, 0, "__builtin_mips_bposge" #VALUE, \
+ { CODE_FOR_mips_bposge, MIPS_FP_COND_NONE, "__builtin_mips_bposge" #VALUE, \
MIPS_BUILTIN_BPOSGE ## VALUE, MIPS_SI_FTYPE_VOID, TARGET_FLAGS }
static const struct builtin_description dsp_bdesc[] =
@@ -10603,7 +10603,7 @@ mips_init_builtins (void)
for (d = m->bdesc; d < &m->bdesc[m->size]; d++)
if ((d->target_flags & target_flags) == d->target_flags)
lang_hooks.builtin_function (d->name, types[d->function_type],
- d - m->bdesc + offset,
+ (enum built_in_function) (d - m->bdesc + offset),
BUILT_IN_MD, NULL, NULL);
offset += m->size;
}
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index ba77d8636af..995f07d1486 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -32,6 +32,7 @@ Boston, MA 02110-1301, USA. */
the cpu attribute in the mips.md machine description. */
enum processor_type {
+ PROCESSOR_NONE,
PROCESSOR_R3000,
PROCESSOR_4KC,
PROCESSOR_4KP,
@@ -2098,7 +2099,7 @@ typedef struct mips_args {
/* ??? Should check the return value for errors. */ \
if (mips_cache_flush_func && mips_cache_flush_func[0]) \
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mips_cache_flush_func), \
- 0, VOIDmode, 3, ADDR, Pmode, \
+ LCT_NORMAL, VOIDmode, 3, ADDR, Pmode, \
GEN_INT (TRAMPOLINE_SIZE), TYPE_MODE (integer_type_node),\
GEN_INT (3), TYPE_MODE (integer_type_node)); \
}
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 969d22fa00f..1f8c55b6198 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -373,7 +373,11 @@
;; Is it a single instruction?
(define_attr "single_insn" "no,yes"
- (symbol_ref "get_attr_length (insn) == (TARGET_MIPS16 ? 2 : 4)"))
+ (const
+ (if_then_else (eq (symbol_ref "get_attr_length (insn)")
+ (symbol_ref "(TARGET_MIPS16 ? 2 : 4)"))
+ (const_string "yes")
+ (const_string "no"))))
;; Can the instruction be put into a delay slot?
(define_attr "can_delay" "no,yes"
diff --git a/gcc/config/mips/netbsd.h b/gcc/config/mips/netbsd.h
index 6b335ca34ee..d99e8431fc3 100644
--- a/gcc/config/mips/netbsd.h
+++ b/gcc/config/mips/netbsd.h
@@ -127,10 +127,6 @@ Boston, MA 02110-1301, USA. */
while (0)
-/* Clean up after the generic MIPS/ELF configuration. */
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
/* Extra specs we need. */
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h
index bc07e5b391a..737a8f2f9fa 100644
--- a/gcc/config/pa/pa-hpux10.h
+++ b/gcc/config/pa/pa-hpux10.h
@@ -116,27 +116,6 @@ Boston, MA 02110-1301, USA. */
%{p:%{!pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
%{pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}"
-#undef THREAD_MODEL_SPEC
-#define THREAD_MODEL_SPEC "%{!threads:single}%{threads:dce}"
-
-/* Under hpux10, the normal location of the `ld' and `as' programs is the
- /usr/ccs/bin directory. */
-
-#ifndef CROSS_COMPILE
-#undef MD_EXEC_PREFIX
-#define MD_EXEC_PREFIX "/usr/ccs/bin/"
-#endif
-
-/* Under hpux10, the normal location of the various *crt*.o files is
- the /usr/ccs/lib directory. However, the profiling files are in
- /opt/langtools/lib. */
-
-#ifndef CROSS_COMPILE
-#undef MD_STARTFILE_PREFIX
-#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
-#define MD_STARTFILE_PREFIX_1 "/opt/langtools/lib/"
-#endif
-
/* hpux10 has the new HP assembler. It's still lousy, but it's a whole lot
better than the assembler shipped with older versions of hpux. */
#undef NEW_HP_ASSEMBLER
diff --git a/gcc/config/pa/pa-hpux11.h b/gcc/config/pa/pa-hpux11.h
index 819dea157a4..bded13a3f92 100644
--- a/gcc/config/pa/pa-hpux11.h
+++ b/gcc/config/pa/pa-hpux11.h
@@ -144,24 +144,6 @@ Boston, MA 02110-1301, USA. */
"%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}} \
%{!munix=93:unix95%O%s}}"
-/* Under hpux11, the normal location of the `ld' and `as' programs is the
- /usr/ccs/bin directory. */
-
-#ifndef CROSS_COMPILE
-#undef MD_EXEC_PREFIX
-#define MD_EXEC_PREFIX "/usr/ccs/bin/"
-#endif
-
-/* Under hpux11 the normal location of the various *crt*.o files is
- the /usr/ccs/lib directory. However, the profiling files are in
- /opt/langtools/lib. */
-
-#ifndef CROSS_COMPILE
-#undef MD_STARTFILE_PREFIX
-#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
-#define MD_STARTFILE_PREFIX_1 "/opt/langtools/lib/"
-#endif
-
/* hpux11 has the new HP assembler. It's still lousy, but it's a whole lot
better than the assembler shipped with older versions of hpux. */
#undef NEW_HP_ASSEMBLER
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 1f576507210..2e938ac4a50 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -224,15 +224,6 @@ do { \
#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
#endif
-/* This macro defines command-line switches that modify the default
- target name.
-
- The definition is be an initializer for an array of structures. Each
- array element has have three elements: the switch name, one of the
- enumeration codes ADD or DELETE to indicate whether the string should be
- inserted or deleted, and the string to be inserted or deleted. */
-#define MODIFY_TARGET_NAME {{"-32", DELETE, "64"}, {"-64", ADD, "64"}}
-
/* Make gcc agree with <machine/ansi.h> */
#define SIZE_TYPE "unsigned int"
diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h
index c5c6802ca61..9b53c26f2fb 100644
--- a/gcc/config/pa/pa64-hpux.h
+++ b/gcc/config/pa/pa64-hpux.h
@@ -101,20 +101,6 @@ Boston, MA 02110-1301, USA. */
#undef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/pa20_64/"
-/* Under hpux11 the normal location of the various pa20_64 *crt*.o files
- is the /usr/ccs/lib/pa20_64 directory. Some files may also be in the
- /opt/langtools/lib/pa20_64 directory. */
-
-#ifndef CROSS_COMPILE
-#undef MD_STARTFILE_PREFIX
-#define MD_STARTFILE_PREFIX "/usr/ccs/lib/pa20_64/"
-#endif
-
-#ifndef CROSS_COMPILE
-#undef MD_STARTFILE_PREFIX_1
-#define MD_STARTFILE_PREFIX_1 "/opt/langtools/lib/pa20_64/"
-#endif
-
/* This macro specifies the biggest alignment supported by the object
file format of this machine.
diff --git a/gcc/config/rs6000/beos.h b/gcc/config/rs6000/beos.h
index cea5ca87352..52c37664ac5 100644
--- a/gcc/config/rs6000/beos.h
+++ b/gcc/config/rs6000/beos.h
@@ -86,9 +86,6 @@
#undef LIB_SPEC
#define LIB_SPEC ""
-#undef LINK_SPEC
-#define LINK_SPEC ""
-
#undef STARTFILE_SPEC
#define STARTFILE_SPEC ""
diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
index 3df356fca1a..7251c71ab12 100644
--- a/gcc/config/rs6000/linux.h
+++ b/gcc/config/rs6000/linux.h
@@ -21,9 +21,6 @@
Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
/* Linux doesn't support saving and restoring 64-bit regs in a 32-bit
process. */
#define OS_MISSING_POWERPC64 1
@@ -50,12 +47,6 @@
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
-/* The GNU C++ standard library currently requires _GNU_SOURCE being
- defined on glibc-based systems. This temporary hack accomplishes this,
- it should go away as soon as libstdc++-v3 has a real fix. */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
#undef LINK_SHLIB_SPEC
#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index f52b2451abe..5fab39e805b 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -273,10 +273,6 @@ extern int dot_symbols;
#define SETUP_FRAME_ADDRESSES() \
do { if (TARGET_64BIT) rs6000_aix_emit_builtin_unwind_init (); } while (0)
-/* Override svr4.h */
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
/* Linux doesn't support saving and restoring 64-bit regs in a 32-bit
process. */
#define OS_MISSING_POWERPC64 !TARGET_64BIT
@@ -312,12 +308,6 @@ extern int dot_symbols;
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
-/* The GNU C++ standard library currently requires _GNU_SOURCE being
- defined on glibc-based systems. This temporary hack accomplishes this,
- it should go away as soon as libstdc++-v3 has a real fix. */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
#undef LINK_SHLIB_SPEC
#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index 67416c20e62..b28de78bcfa 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -2388,7 +2388,7 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
{ ALTIVEC_BUILTIN_VCMPGE_P, ALTIVEC_BUILTIN_VCMPGEFP_P,
RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V4SF, RS6000_BTI_V4SF },
- { 0, 0, 0, 0, 0, 0 }
+ { ALTIVEC_BUILTIN_none, ALTIVEC_BUILTIN_none, 0, 0, 0, 0 }
};
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index d8d0db10b7c..49e0e3d968e 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -246,7 +246,7 @@ static GTY(()) section *toc_section;
int rs6000_alignment_flags;
/* True for any options that were explicitly set. */
-struct {
+struct rs6000_explicit_options_s {
bool aix_struct_ret; /* True if -maix-struct-ret was used. */
bool alignment; /* True if -malign- was used. */
bool abi; /* True if -mabi=spe/nospe was used. */
@@ -1097,7 +1097,7 @@ rs6000_init_hard_regno_mode_ok (void)
for (r = 0; r < FIRST_PSEUDO_REGISTER; ++r)
for (m = 0; m < NUM_MACHINE_MODES; ++m)
- if (rs6000_hard_regno_mode_ok (r, m))
+ if (rs6000_hard_regno_mode_ok (r, (enum machine_mode) m))
rs6000_hard_regno_mode_ok_p[m][r] = true;
}
@@ -1421,7 +1421,7 @@ rs6000_override_options (const char *default_cpu)
else if (! strcmp (rs6000_sched_costly_dep_str, "store_to_load"))
rs6000_sched_costly_dep = store_to_load_dep_costly;
else
- rs6000_sched_costly_dep = atoi (rs6000_sched_costly_dep_str);
+ rs6000_sched_costly_dep = (enum rs6000_dependence_cost) atoi (rs6000_sched_costly_dep_str);
}
/* Handle -minsert-sched-nops option. */
@@ -1437,7 +1437,7 @@ rs6000_override_options (const char *default_cpu)
else if (! strcmp (rs6000_sched_insert_nops_str, "regroup_exact"))
rs6000_sched_insert_nops = sched_finish_regroup_exact;
else
- rs6000_sched_insert_nops = atoi (rs6000_sched_insert_nops_str);
+ rs6000_sched_insert_nops = (enum rs6000_nop_insertion) atoi (rs6000_sched_insert_nops_str);
}
#ifdef TARGET_REGNAMES
@@ -2849,7 +2849,7 @@ legitimate_indexed_address_p (rtx x, int strict)
&& INT_REG_OK_FOR_INDEX_P (op0, strict))));
}
-inline bool
+bool
legitimate_indirect_address_p (rtx x, int strict)
{
return GET_CODE (x) == REG && INT_REG_OK_FOR_BASE_P (x, strict);
@@ -4826,14 +4826,14 @@ spe_build_register_parallel (enum machine_mode mode, int gregno)
{
case DFmode:
r1 = gen_rtx_REG (DImode, gregno);
- r1 = gen_rtx_EXPR_LIST (VOIDmode, r1, const0_rtx);
+ r1 = gen_rtx_EXPR_LIST (REG_DEP_TRUE, r1, const0_rtx);
return gen_rtx_PARALLEL (mode, gen_rtvec (1, r1));
case DCmode:
r1 = gen_rtx_REG (DImode, gregno);
- r1 = gen_rtx_EXPR_LIST (VOIDmode, r1, const0_rtx);
+ r1 = gen_rtx_EXPR_LIST (REG_DEP_TRUE, r1, const0_rtx);
r3 = gen_rtx_REG (DImode, gregno + 2);
- r3 = gen_rtx_EXPR_LIST (VOIDmode, r3, GEN_INT (8));
+ r3 = gen_rtx_EXPR_LIST (REG_DEP_TRUE, r3, GEN_INT (8));
return gen_rtx_PARALLEL (mode, gen_rtvec (2, r1, r3));
default:
@@ -4878,9 +4878,9 @@ rs6000_spe_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
enum machine_mode m = SImode;
r1 = gen_rtx_REG (m, gregno);
- r1 = gen_rtx_EXPR_LIST (m, r1, const0_rtx);
+ r1 = gen_rtx_EXPR_LIST ((enum reg_note) m, r1, const0_rtx);
r2 = gen_rtx_REG (m, gregno + 1);
- r2 = gen_rtx_EXPR_LIST (m, r2, GEN_INT (4));
+ r2 = gen_rtx_EXPR_LIST ((enum reg_note) m, r2, GEN_INT (4));
return gen_rtx_PARALLEL (mode, gen_rtvec (2, r1, r2));
}
else
@@ -4954,7 +4954,7 @@ rs6000_darwin64_record_arg_flush (CUMULATIVE_ARGS *cum,
regno = GP_ARG_MIN_REG + this_regno;
reg = gen_rtx_REG (mode, regno);
rvec[(*k)++] =
- gen_rtx_EXPR_LIST (VOIDmode, reg, GEN_INT (intoffset));
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE, reg, GEN_INT (intoffset));
this_regno += 1;
intoffset = (intoffset | (UNITS_PER_WORD-1)) + 1;
@@ -5004,7 +5004,7 @@ rs6000_darwin64_record_arg_recurse (CUMULATIVE_ARGS *cum, tree type,
#endif
rs6000_darwin64_record_arg_flush (cum, bitpos, rvec, k);
rvec[(*k)++]
- = gen_rtx_EXPR_LIST (VOIDmode,
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (mode, cum->fregno++),
GEN_INT (bitpos / BITS_PER_UNIT));
if (mode == TFmode)
@@ -5014,7 +5014,7 @@ rs6000_darwin64_record_arg_recurse (CUMULATIVE_ARGS *cum, tree type,
{
rs6000_darwin64_record_arg_flush (cum, bitpos, rvec, k);
rvec[(*k)++]
- = gen_rtx_EXPR_LIST (VOIDmode,
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (mode, cum->vregno++),
GEN_INT (bitpos / BITS_PER_UNIT));
}
@@ -5072,7 +5072,7 @@ rs6000_darwin64_record_arg (CUMULATIVE_ARGS *orig_cum, tree type,
if (retval)
return NULL_RTX; /* doesn't go in registers at all */
kbase = 0;
- rvec[0] = gen_rtx_EXPR_LIST (VOIDmode, NULL_RTX, const0_rtx);
+ rvec[0] = gen_rtx_EXPR_LIST (REG_DEP_TRUE, NULL_RTX, const0_rtx);
}
if (k > 1 || cum->use_stack)
return gen_rtx_PARALLEL (BLKmode, gen_rtvec_v (k - kbase, &rvec[kbase]));
@@ -5112,14 +5112,14 @@ rs6000_mixed_function_arg (enum machine_mode mode, tree type, int align_words)
store the whole arg to memory is often more efficient than code
to store pieces, and we know that space is available in the right
place for the whole arg. */
- rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, NULL_RTX, const0_rtx);
+ rvec[k++] = gen_rtx_EXPR_LIST (REG_DEP_TRUE, NULL_RTX, const0_rtx);
i = 0;
do
{
rtx r = gen_rtx_REG (SImode, GP_ARG_MIN_REG + align_words);
rtx off = GEN_INT (i++ * 4);
- rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
+ rvec[k++] = gen_rtx_EXPR_LIST (REG_DEP_TRUE, r, off);
}
while (++align_words < GP_ARG_NUM_REG && --n_units != 0);
@@ -5213,9 +5213,9 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
}
return gen_rtx_PARALLEL (mode,
gen_rtvec (2,
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
slot, const0_rtx),
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (mode, cum->vregno),
const0_rtx)));
}
@@ -5361,14 +5361,14 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
rs6000_mixed_function_arg for why the normal
function_arg_partial_nregs scheme doesn't work
in this case. */
- rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, NULL_RTX,
+ rvec[k++] = gen_rtx_EXPR_LIST (REG_DEP_TRUE, NULL_RTX,
const0_rtx);
do
{
r = gen_rtx_REG (rmode,
GP_ARG_MIN_REG + align_words);
off = GEN_INT (i++ * GET_MODE_SIZE (rmode));
- rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
+ rvec[k++] = gen_rtx_EXPR_LIST (REG_DEP_TRUE, r, off);
}
while (++align_words < GP_ARG_NUM_REG && --n_words != 0);
}
@@ -5376,17 +5376,17 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
{
/* The whole arg fits in gprs. */
r = gen_rtx_REG (mode, GP_ARG_MIN_REG + align_words);
- rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, const0_rtx);
+ rvec[k++] = gen_rtx_EXPR_LIST (REG_DEP_TRUE, r, const0_rtx);
}
}
else
/* It's entirely in memory. */
- rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, NULL_RTX, const0_rtx);
+ rvec[k++] = gen_rtx_EXPR_LIST (REG_DEP_TRUE, NULL_RTX, const0_rtx);
}
/* Describe where this piece goes in the fprs. */
r = gen_rtx_REG (fmode, cum->fregno);
- rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, const0_rtx);
+ rvec[k++] = gen_rtx_EXPR_LIST (REG_DEP_TRUE, r, const0_rtx);
return gen_rtx_PARALLEL (mode, gen_rtvec_v (k, rvec));
}
@@ -6053,7 +6053,7 @@ def_builtin (int mask, const char *name, tree type, int code)
abort ();
rs6000_builtin_decls[code] =
- lang_hooks.builtin_function (name, type, code, BUILT_IN_MD,
+ lang_hooks.builtin_function (name, type, (enum built_in_function) code, BUILT_IN_MD,
NULL, NULL_TREE);
}
}
@@ -6534,9 +6534,9 @@ static const struct builtin_description_predicates bdesc_altivec_preds[] =
{ MASK_ALTIVEC, CODE_FOR_altivec_predicate_v16qi, "*vcmpgtsb.", "__builtin_altivec_vcmpgtsb_p", ALTIVEC_BUILTIN_VCMPGTSB_P },
{ MASK_ALTIVEC, CODE_FOR_altivec_predicate_v16qi, "*vcmpgtub.", "__builtin_altivec_vcmpgtub_p", ALTIVEC_BUILTIN_VCMPGTUB_P },
- { MASK_ALTIVEC, 0, NULL, "__builtin_vec_vcmpeq_p", ALTIVEC_BUILTIN_VCMPEQ_P },
- { MASK_ALTIVEC, 0, NULL, "__builtin_vec_vcmpgt_p", ALTIVEC_BUILTIN_VCMPGT_P },
- { MASK_ALTIVEC, 0, NULL, "__builtin_vec_vcmpge_p", ALTIVEC_BUILTIN_VCMPGE_P }
+ { MASK_ALTIVEC, CODE_FOR_nothing, NULL, "__builtin_vec_vcmpeq_p", ALTIVEC_BUILTIN_VCMPEQ_P },
+ { MASK_ALTIVEC, CODE_FOR_nothing, NULL, "__builtin_vec_vcmpgt_p", ALTIVEC_BUILTIN_VCMPGT_P },
+ { MASK_ALTIVEC, CODE_FOR_nothing, NULL, "__builtin_vec_vcmpge_p", ALTIVEC_BUILTIN_VCMPGE_P }
};
/* SPE predicates. */
@@ -7304,8 +7304,8 @@ altivec_expand_vec_set_builtin (tree arglist)
mode1 = TYPE_MODE (TREE_TYPE (TREE_TYPE (arg0)));
gcc_assert (VECTOR_MODE_P (tmode));
- op0 = expand_expr (arg0, NULL_RTX, tmode, 0);
- op1 = expand_expr (arg1, NULL_RTX, mode1, 0);
+ op0 = expand_expr (arg0, NULL_RTX, tmode, EXPAND_NORMAL);
+ op1 = expand_expr (arg1, NULL_RTX, mode1, EXPAND_NORMAL);
elt = get_element_number (TREE_TYPE (arg0), arg2);
if (GET_MODE (op1) != mode1 && GET_MODE (op1) != VOIDmode)
@@ -8580,7 +8580,7 @@ altivec_init_builtins (void)
decl = lang_hooks.builtin_function ("__builtin_altivec_mask_for_load",
v16qi_ftype_long_pcvoid,
- ALTIVEC_BUILTIN_MASK_FOR_LOAD,
+ (enum built_in_function) ALTIVEC_BUILTIN_MASK_FOR_LOAD,
BUILT_IN_MD, NULL,
tree_cons (get_identifier ("const"),
NULL_TREE, NULL_TREE));
@@ -9921,7 +9921,7 @@ mems_ok_for_quad_peep (rtx mem1, rtx mem2)
NO_REGS is returned. */
enum reg_class
-rs6000_secondary_reload_class (enum reg_class class,
+rs6000_secondary_reload_class (enum reg_class kind,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx in)
{
@@ -9940,7 +9940,7 @@ rs6000_secondary_reload_class (enum reg_class class,
On Darwin, pic addresses require a load from memory, which
needs a base register. */
- if (class != BASE_REGS
+ if (kind != BASE_REGS
&& (GET_CODE (in) == SYMBOL_REF
|| GET_CODE (in) == HIGH
|| GET_CODE (in) == LABEL_REF
@@ -9969,22 +9969,22 @@ rs6000_secondary_reload_class (enum reg_class class,
/* We can place anything into GENERAL_REGS and can put GENERAL_REGS
into anything. */
- if (class == GENERAL_REGS || class == BASE_REGS
+ if (kind == GENERAL_REGS || kind == BASE_REGS
|| (regno >= 0 && INT_REGNO_P (regno)))
return NO_REGS;
/* Constants, memory, and FP registers can go into FP registers. */
if ((regno == -1 || FP_REGNO_P (regno))
- && (class == FLOAT_REGS || class == NON_SPECIAL_REGS))
+ && (kind == FLOAT_REGS || kind == NON_SPECIAL_REGS))
return NO_REGS;
/* Memory, and AltiVec registers can go into AltiVec registers. */
if ((regno == -1 || ALTIVEC_REGNO_P (regno))
- && class == ALTIVEC_REGS)
+ && kind == ALTIVEC_REGS)
return NO_REGS;
/* We can copy among the CR registers. */
- if ((class == CR_REGS || class == CR0_REGS)
+ if ((kind == CR_REGS || kind == CR0_REGS)
&& regno >= 0 && CR_REGNO_P (regno))
return NO_REGS;
@@ -10078,7 +10078,7 @@ rs6000_got_register (rtx value ATTRIBUTE_UNUSED)
static struct machine_function *
rs6000_init_machine_status (void)
{
- return ggc_alloc_cleared (sizeof (machine_function));
+ return (struct machine_function *) ggc_alloc_cleared (sizeof (machine_function));
}
/* These macros test for integers and extract the low-order bits. */
@@ -10939,7 +10939,7 @@ print_operand_address (FILE *file, rtx x)
char *newname;
name = XSTR (symref, 0);
- newname = alloca (strlen (name) + sizeof ("@toc"));
+ newname = (char *) alloca (strlen (name) + sizeof ("@toc"));
strcpy (newname, name);
strcat (newname, "@toc");
XSTR (symref, 0) = newname;
@@ -15580,11 +15580,11 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree function)
{
- rtx this, insn, funexp;
+ rtx it, insn, funexp;
- reload_completed = 1;
- epilogue_completed = 1;
- no_new_pseudos = 1;
+ reload_completed = true;
+ epilogue_completed = true;
+ no_new_pseudos = true;
reset_block_changes ();
/* Mark the end of the (empty) prologue. */
@@ -15593,17 +15593,17 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Find the "this" pointer. If the function returns a structure,
the structure return pointer is in r3. */
if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function))
- this = gen_rtx_REG (Pmode, 4);
+ it = gen_rtx_REG (Pmode, 4);
else
- this = gen_rtx_REG (Pmode, 3);
+ it = gen_rtx_REG (Pmode, 3);
/* Apply the constant offset, if required. */
if (delta)
{
rtx delta_rtx = GEN_INT (delta);
emit_insn (TARGET_32BIT
- ? gen_addsi3 (this, this, delta_rtx)
- : gen_adddi3 (this, this, delta_rtx));
+ ? gen_addsi3 (it, it, delta_rtx)
+ : gen_adddi3 (it, it, delta_rtx));
}
/* Apply the offset from the vtable, if required. */
@@ -15612,7 +15612,7 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
rtx vcall_offset_rtx = GEN_INT (vcall_offset);
rtx tmp = gen_rtx_REG (Pmode, 12);
- emit_move_insn (tmp, gen_rtx_MEM (Pmode, this));
+ emit_move_insn (tmp, gen_rtx_MEM (Pmode, it));
if (((unsigned HOST_WIDE_INT) vcall_offset) + 0x8000 >= 0x10000)
{
emit_insn (TARGET_32BIT
@@ -15627,8 +15627,8 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
emit_move_insn (tmp, gen_rtx_MEM (Pmode, loc));
}
emit_insn (TARGET_32BIT
- ? gen_addsi3 (this, this, tmp)
- : gen_adddi3 (this, this, tmp));
+ ? gen_addsi3 (it, it, tmp)
+ : gen_adddi3 (it, it, tmp));
}
/* Generate a tail call to the target function. */
@@ -15671,9 +15671,9 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
final (insn, file, 1);
final_end_function ();
- reload_completed = 0;
- epilogue_completed = 0;
- no_new_pseudos = 0;
+ reload_completed = false;
+ epilogue_completed = false;
+ no_new_pseudos = false;
}
/* A quick summary of the various types of 'constant-pool tables'
@@ -15861,12 +15861,12 @@ output_toc (FILE *file, rtx x, int labelno, enum machine_mode mode)
toc_hash_table = htab_create_ggc (1021, toc_hash_function,
toc_hash_eq, NULL);
- h = ggc_alloc (sizeof (*h));
+ h = (struct toc_hash_struct *) ggc_alloc (sizeof (*h));
h->key = x;
h->key_mode = mode;
h->labelno = labelno;
- found = htab_find_slot (toc_hash_table, h, 1);
+ found = htab_find_slot (toc_hash_table, h, INSERT);
if (*found == NULL)
*found = h;
else /* This is indeed a duplicate.
@@ -16287,7 +16287,7 @@ output_profile_hook (int labelno ATTRIBUTE_UNUSED)
# define NO_PROFILE_COUNTERS 0
#endif
if (NO_PROFILE_COUNTERS)
- emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 0);
+ emit_library_call (init_one_libfunc (RS6000_MCOUNT), LCT_NORMAL, VOIDmode, 0);
else
{
char buf[30];
@@ -16298,7 +16298,7 @@ output_profile_hook (int labelno ATTRIBUTE_UNUSED)
label_name = (*targetm.strip_name_encoding) (ggc_strdup (buf));
fun = gen_rtx_SYMBOL_REF (Pmode, label_name);
- emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 1,
+ emit_library_call (init_one_libfunc (RS6000_MCOUNT), LCT_NORMAL, VOIDmode, 1,
fun, Pmode);
}
}
@@ -16318,7 +16318,7 @@ output_profile_hook (int labelno ATTRIBUTE_UNUSED)
caller_addr_regno = 0;
#endif
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mcount_name),
- 0, VOIDmode, 1,
+ LCT_NORMAL, VOIDmode, 1,
gen_rtx_REG (Pmode, caller_addr_regno), Pmode);
}
}
@@ -17162,7 +17162,7 @@ redefine_groups (FILE *dump, int sched_verbose, rtx prev_head_insn, rtx tail)
/* Initialize. */
issue_rate = rs6000_issue_rate ();
- group_insns = alloca (issue_rate * sizeof (rtx));
+ group_insns = (rtx *) alloca (issue_rate * sizeof (rtx));
for (i = 0; i < issue_rate; i++)
{
group_insns[i] = 0;
@@ -17382,7 +17382,7 @@ rs6000_initialize_trampoline (rtx addr, rtx fnaddr, rtx cxt)
case ABI_DARWIN:
case ABI_V4:
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__trampoline_setup"),
- FALSE, VOIDmode, 4,
+ LCT_NORMAL, VOIDmode, 4,
addr, Pmode,
GEN_INT (rs6000_trampoline_size ()), SImode,
fnaddr, Pmode,
@@ -18054,10 +18054,10 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub)
length = strlen (symb);
- symbol_name = alloca (length + 32);
+ symbol_name = (char *) alloca (length + 32);
GEN_SYMBOL_NAME_FOR_SYMBOL (symbol_name, symb, length);
- lazy_ptr_name = alloca (length + 32);
+ lazy_ptr_name = (char *) alloca (length + 32);
GEN_LAZY_PTR_NAME_FOR_SYMBOL (lazy_ptr_name, symb, length);
if (flag_pic == 2)
@@ -18073,7 +18073,7 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub)
fprintf (file, "\t.indirect_symbol %s\n", symbol_name);
label++;
- local_label_0 = alloca (sizeof ("\"L00000000000$spb\""));
+ local_label_0 = (char *) alloca (sizeof ("\"L00000000000$spb\""));
sprintf (local_label_0, "\"L%011d$spb\"", label);
fprintf (file, "\tmflr r0\n");
@@ -19031,17 +19031,17 @@ rs6000_register_move_cost (enum machine_mode mode,
or from memory. */
int
-rs6000_memory_move_cost (enum machine_mode mode, enum reg_class class,
+rs6000_memory_move_cost (enum machine_mode mode, enum reg_class kind,
int in ATTRIBUTE_UNUSED)
{
- if (reg_classes_intersect_p (class, GENERAL_REGS))
+ if (reg_classes_intersect_p (kind, GENERAL_REGS))
return 4 * hard_regno_nregs[0][mode];
- else if (reg_classes_intersect_p (class, FLOAT_REGS))
+ else if (reg_classes_intersect_p (kind, FLOAT_REGS))
return 4 * hard_regno_nregs[32][mode];
- else if (reg_classes_intersect_p (class, ALTIVEC_REGS))
+ else if (reg_classes_intersect_p (kind, ALTIVEC_REGS))
return 4 * hard_regno_nregs[FIRST_ALTIVEC_REGNO][mode];
else
- return 4 + rs6000_register_move_cost (mode, class, GENERAL_REGS);
+ return 4 + rs6000_register_move_cost (mode, kind, GENERAL_REGS);
}
/* Newton-Raphson approximation of single-precision floating point divide n/d.
@@ -19171,9 +19171,9 @@ rs6000_complex_function_value (enum machine_mode mode)
if (inner_bytes >= 8)
return gen_rtx_REG (mode, regno);
- r1 = gen_rtx_EXPR_LIST (inner, gen_rtx_REG (inner, regno),
+ r1 = gen_rtx_EXPR_LIST ((enum reg_note) inner, gen_rtx_REG (inner, regno),
const0_rtx);
- r2 = gen_rtx_EXPR_LIST (inner, gen_rtx_REG (inner, regno + 1),
+ r2 = gen_rtx_EXPR_LIST ((enum reg_note) inner, gen_rtx_REG (inner, regno + 1),
GEN_INT (inner_bytes));
return gen_rtx_PARALLEL (mode, gen_rtvec (2, r1, r2));
}
@@ -19219,10 +19219,10 @@ rs6000_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
/* Long long return value need be split in -mpowerpc64, 32bit ABI. */
return gen_rtx_PARALLEL (DImode,
gen_rtvec (2,
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (SImode, GP_ARG_RETURN),
const0_rtx),
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (SImode,
GP_ARG_RETURN + 1),
GEN_INT (4))));
@@ -19231,18 +19231,18 @@ rs6000_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
{
return gen_rtx_PARALLEL (DCmode,
gen_rtvec (4,
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (SImode, GP_ARG_RETURN),
const0_rtx),
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (SImode,
GP_ARG_RETURN + 1),
GEN_INT (4)),
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (SImode,
GP_ARG_RETURN + 2),
GEN_INT (8)),
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (SImode,
GP_ARG_RETURN + 3),
GEN_INT (12))));
@@ -19287,10 +19287,10 @@ rs6000_libcall_value (enum machine_mode mode)
/* Long long return value need be split in -mpowerpc64, 32bit ABI. */
return gen_rtx_PARALLEL (DImode,
gen_rtvec (2,
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (SImode, GP_ARG_RETURN),
const0_rtx),
- gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (SImode,
GP_ARG_RETURN + 1),
GEN_INT (4))));
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 1edb09703f6..d7f033c1dc0 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -2240,6 +2240,7 @@ extern int frame_pointer_needed;
enum rs6000_builtins
{
+ ALTIVEC_BUILTIN_none,
/* AltiVec builtins. */
ALTIVEC_BUILTIN_ST_INTERNAL_4si,
ALTIVEC_BUILTIN_LD_INTERNAL_4si,
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 8ff390d6edc..d82e6be2b5f 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -120,9 +120,6 @@ msched-prolog
Target Report Var(TARGET_SCHED_PROLOG) Init(1)
Schedule the start and end of the procedure
-msched-epilog
-Target Undocumented Var(TARGET_SCHED_PROLOG) VarExists
-
maix-struct-return
Target Report RejectNegative Var(aix_struct_return)
Return all structures in memory (AIX default)
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index b6aeee11293..d0e8c81c9ee 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -8225,7 +8225,7 @@ s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
insn_op = &insn_data[icode].operand[arity + nonvoid];
- op[arity] = expand_expr (arg, NULL_RTX, insn_op->mode, 0);
+ op[arity] = expand_expr (arg, NULL_RTX, insn_op->mode, EXPAND_NORMAL);
if (!(*insn_op->predicate) (op[arity], insn_op->mode))
op[arity] = copy_to_mode_reg (insn_op->mode, op[arity]);
diff --git a/gcc/config/s390/tpf.h b/gcc/config/s390/tpf.h
index f0a63f7d255..869a1ee619f 100644
--- a/gcc/config/s390/tpf.h
+++ b/gcc/config/s390/tpf.h
@@ -91,10 +91,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#undef CC1_SPEC
#define CC1_SPEC "%{!fverbose-asm: -fverbose-asm}"
-/* The GNU C++ standard library requires that these macros be defined. */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
#undef ASM_SPEC
#define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*} \
-alshd=%b.lst"
diff --git a/gcc/config/sh/predicates.md b/gcc/config/sh/predicates.md
index 1578afb73de..ef9ddc91760 100644
--- a/gcc/config/sh/predicates.md
+++ b/gcc/config/sh/predicates.md
@@ -23,7 +23,7 @@
(define_predicate "trapping_target_operand"
(match_code "if_then_else")
{
- rtx cond, mem, res, tar, and;
+ rtx cond, mem, res, tar, xand;
if (GET_MODE (op) != PDImode)
return 0;
@@ -50,12 +50,12 @@
return 0;
if (GET_CODE (cond) != EQ)
return 0;
- and = XEXP (cond, 0);
- return (GET_CODE (and) == AND
- && rtx_equal_p (XEXP (and, 0), tar)
- && GET_CODE (XEXP (and, 1)) == CONST_INT
+ xand = XEXP (cond, 0);
+ return (GET_CODE (xand) == AND
+ && rtx_equal_p (XEXP (xand, 0), tar)
+ && GET_CODE (XEXP (xand, 1)) == CONST_INT
&& GET_CODE (XEXP (cond, 1)) == CONST_INT
- && INTVAL (XEXP (and, 1)) == 3
+ && INTVAL (XEXP (xand, 1)) == 3
&& INTVAL (XEXP (cond, 1)) == 3);
})
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 15eae4c7cd7..0e6cfed03e5 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -195,7 +195,6 @@ static int calc_live_regs (HARD_REG_SET *);
static void mark_use (rtx, rtx *);
static HOST_WIDE_INT rounded_frame_size (int);
static rtx mark_constant_pool_use (rtx);
-const struct attribute_spec sh_attribute_table[];
static tree sh_handle_interrupt_handler_attribute (tree *, tree, tree, int, bool *);
static tree sh_handle_sp_switch_attribute (tree *, tree, tree, int, bool *);
static tree sh_handle_trap_exit_attribute (tree *, tree, tree, int, bool *);
@@ -273,6 +272,53 @@ static int sh_dwarf_calling_convention (tree);
static int hard_regs_intersect_p (HARD_REG_SET *, HARD_REG_SET *);
+/* Supported attributes:
+
+ interrupt_handler -- specifies this function is an interrupt handler.
+
+ trapa_handler - like above, but don't save all registers.
+
+ sp_switch -- specifies an alternate stack for an interrupt handler
+ to run on.
+
+ trap_exit -- use a trapa to exit an interrupt function instead of
+ an rte instruction.
+
+ nosave_low_regs - don't save r0..r7 in an interrupt handler.
+ This is useful on the SH3 and upwards,
+ which has a separate set of low regs for User and Supervisor modes.
+ This should only be used for the lowest level of interrupts. Higher levels
+ of interrupts must save the registers in case they themselves are
+ interrupted.
+
+ renesas -- use Renesas calling/layout conventions (functions and
+ structures).
+
+*/
+
+const struct attribute_spec sh_attribute_table[] =
+{
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ { "interrupt_handler", 0, 0, true, false, false, sh_handle_interrupt_handler_attribute },
+ { "sp_switch", 1, 1, true, false, false, sh_handle_sp_switch_attribute },
+ { "trap_exit", 1, 1, true, false, false, sh_handle_trap_exit_attribute },
+ { "renesas", 0, 0, false, true, false, sh_handle_renesas_attribute },
+ { "trapa_handler", 0, 0, true, false, false, sh_handle_interrupt_handler_attribute },
+ { "nosave_low_regs", 0, 0, true, false, false, sh_handle_interrupt_handler_attribute },
+#ifdef SYMBIAN
+ /* Symbian support adds three new attributes:
+ dllexport - for exporting a function/variable that will live in a dll
+ dllimport - for importing a function/variable from a dll
+
+ Microsoft allows multiple declspecs in one __declspec, separating
+ them with spaces. We do NOT support this. Instead, use __declspec
+ multiple times. */
+ { "dllimport", 0, 0, true, false, false, sh_symbian_handle_dll_attribute },
+ { "dllexport", 0, 0, true, false, false, sh_symbian_handle_dll_attribute },
+#endif
+ { NULL, 0, 0, false, false, false, NULL }
+};
+
/* Initialize the GCC target structure. */
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE sh_attribute_table
@@ -1231,9 +1277,9 @@ prepare_move_operands (rtx operands[], enum machine_mode mode)
{
/* This is like change_address_1 (operands[0], mode, 0, 1) ,
except that we can't use that function because it is static. */
- rtx new = change_address (operands[0], mode, 0);
- MEM_COPY_ATTRIBUTES (new, operands[0]);
- operands[0] = new;
+ rtx tmp = change_address (operands[0], mode, 0);
+ MEM_COPY_ATTRIBUTES (tmp, operands[0]);
+ operands[0] = tmp;
}
/* This case can happen while generating code to move the result
@@ -1265,7 +1311,7 @@ prepare_move_operands (rtx operands[], enum machine_mode mode)
else
opc = NULL_RTX;
- if ((tls_kind = tls_symbolic_operand (op1, Pmode)))
+ if ((tls_kind = (enum tls_model) tls_symbolic_operand (op1, Pmode)))
{
rtx tga_op1, tga_ret, tmp, tmp2;
@@ -1431,7 +1477,7 @@ from_compare (rtx *operands, int code)
else
insn = gen_rtx_SET (VOIDmode,
gen_rtx_REG (SImode, T_REG),
- gen_rtx_fmt_ee (code, SImode,
+ gen_rtx_fmt_ee ((enum rtx_code) code, SImode,
sh_compare_op0, sh_compare_op1));
if ((TARGET_SH4 || TARGET_SH2A) && GET_MODE_CLASS (mode) == MODE_FLOAT)
{
@@ -1544,14 +1590,14 @@ print_slot (rtx insn)
const char *
output_far_jump (rtx insn, rtx op)
{
- struct { rtx lab, reg, op; } this;
+ struct { rtx lab, reg, op; } it;
rtx braf_base_lab = NULL_RTX;
const char *jump;
int far;
int offset = branch_dest (insn) - INSN_ADDRESSES (INSN_UID (insn));
rtx prev;
- this.lab = gen_label_rtx ();
+ it.lab = gen_label_rtx ();
if (TARGET_SH2
&& offset >= -32764
@@ -1577,10 +1623,10 @@ output_far_jump (rtx insn, rtx op)
if (GET_CODE ((prev = prev_nonnote_insn (insn))) == INSN
&& INSN_CODE (prev) == CODE_FOR_indirect_jump_scratch)
{
- this.reg = SET_DEST (XVECEXP (PATTERN (prev), 0, 0));
- if (REGNO (this.reg) == R0_REG && flag_pic && ! TARGET_SH2)
+ it.reg = SET_DEST (XVECEXP (PATTERN (prev), 0, 0));
+ if (REGNO (it.reg) == R0_REG && flag_pic && ! TARGET_SH2)
jump = "mov.l r1,@-r15; mova %O0,r0; mov.l @r0,r1; add r1,r0; mov.l @r15+,r1; jmp @%1";
- output_asm_insn (jump, &this.lab);
+ output_asm_insn (jump, &it.lab);
if (dbr_sequence_length ())
print_slot (final_sequence);
else
@@ -1592,7 +1638,7 @@ output_far_jump (rtx insn, rtx op)
if (dbr_sequence_length ())
print_slot (final_sequence);
- this.reg = gen_rtx_REG (SImode, 13);
+ it.reg = gen_rtx_REG (SImode, 13);
/* We must keep the stack aligned to 8-byte boundaries on SH5.
Fortunately, MACL is fixed and call-clobbered, and we never
need its value across jumps, so save r13 in it instead of in
@@ -1601,7 +1647,7 @@ output_far_jump (rtx insn, rtx op)
output_asm_insn ("lds r13, macl", 0);
else
output_asm_insn ("mov.l r13,@-r15", 0);
- output_asm_insn (jump, &this.lab);
+ output_asm_insn (jump, &it.lab);
if (TARGET_SH5)
output_asm_insn ("sts macl, r13", 0);
else
@@ -1615,16 +1661,16 @@ output_far_jump (rtx insn, rtx op)
}
if (far)
output_asm_insn (".align 2", 0);
- (*targetm.asm_out.internal_label) (asm_out_file, "L", CODE_LABEL_NUMBER (this.lab));
- this.op = op;
+ (*targetm.asm_out.internal_label) (asm_out_file, "L", CODE_LABEL_NUMBER (it.lab));
+ it.op = op;
if (far && flag_pic)
{
if (TARGET_SH2)
- this.lab = braf_base_lab;
- output_asm_insn (".long %O2-%O0", &this.lab);
+ it.lab = braf_base_lab;
+ output_asm_insn (".long %O2-%O0", &it.lab);
}
else
- output_asm_insn (far ? ".long %O2" : ".word %O2-%O0", &this.lab);
+ output_asm_insn (far ? ".long %O2" : ".word %O2-%O0", &it.lab);
return "";
}
@@ -1722,7 +1768,7 @@ output_branch (int logic, rtx insn, rtx *operands)
}
const char *
-output_branchy_insn (enum rtx_code code, const char *template,
+output_branchy_insn (enum rtx_code code, const char *templ,
rtx insn, rtx *operands)
{
rtx next_insn = NEXT_INSN (insn);
@@ -1738,7 +1784,7 @@ output_branchy_insn (enum rtx_code code, const char *template,
INSN_ADDRESSES_NEW (operands[9],
INSN_ADDRESSES (INSN_UID (next_insn))
+ get_attr_length (next_insn));
- return template;
+ return templ;
}
else
{
@@ -1750,7 +1796,7 @@ output_branchy_insn (enum rtx_code code, const char *template,
/* branch_true */
src = XEXP (src, 1);
operands[9] = src;
- return template;
+ return templ;
}
}
}
@@ -1759,7 +1805,7 @@ output_branchy_insn (enum rtx_code code, const char *template,
INSN_ADDRESSES_NEW (operands[9],
INSN_ADDRESSES (INSN_UID (insn))
+ get_attr_length (insn));
- return template;
+ return templ;
}
const char *
@@ -3093,7 +3139,7 @@ static rtx
add_constant (rtx x, enum machine_mode mode, rtx last_value)
{
int i;
- rtx lab, new;
+ rtx lab, tmp;
label_ref_list_t ref, newref;
/* First see if we've already got it. */
@@ -3109,14 +3155,14 @@ add_constant (rtx x, enum machine_mode mode, rtx last_value)
}
if (rtx_equal_p (x, pool_vector[i].value))
{
- lab = new = 0;
+ lab = tmp = 0;
if (! last_value
|| ! i
|| ! rtx_equal_p (last_value, pool_vector[i-1].value))
{
- new = gen_label_rtx ();
- LABEL_REFS (new) = pool_vector[i].label;
- pool_vector[i].label = lab = new;
+ tmp = gen_label_rtx ();
+ LABEL_REFS (tmp) = pool_vector[i].label;
+ pool_vector[i].label = lab = tmp;
}
if (lab && pool_window_label)
{
@@ -3126,8 +3172,8 @@ add_constant (rtx x, enum machine_mode mode, rtx last_value)
newref->next = ref;
pool_vector[pool_window_last].wend = newref;
}
- if (new)
- pool_window_label = new;
+ if (tmp)
+ pool_window_label = tmp;
pool_window_last = i;
return lab;
}
@@ -4021,7 +4067,7 @@ gen_block_redirect (rtx jump, int addr, int need_block)
rtx scan;
/* Don't look for the stack pointer as a scratch register,
it would cause trouble if an interrupt occurred. */
- unsigned try = 0x7fff, used;
+ unsigned check = 0x7fff, used;
int jump_left = flag_expensive_optimizations + 1;
/* It is likely that the most recent eligible instruction is wanted for
@@ -4042,7 +4088,7 @@ gen_block_redirect (rtx jump, int addr, int need_block)
&& GET_CODE (PATTERN (scan)) != CLOBBER
&& get_attr_in_delay_slot (scan) == IN_DELAY_SLOT_YES)
{
- try &= ~regs_used (PATTERN (scan), 0);
+ check &= ~regs_used (PATTERN (scan), 0);
break;
}
}
@@ -4060,9 +4106,9 @@ gen_block_redirect (rtx jump, int addr, int need_block)
if (code == CALL_INSN)
used |= regs_used (CALL_INSN_FUNCTION_USAGE (scan), 0);
dead |= (used >> 16) & ~used;
- if (dead & try)
+ if (dead & check)
{
- dead &= try;
+ dead &= check;
break;
}
if (code == JUMP_INSN)
@@ -4790,7 +4836,7 @@ sh_reorg (void)
/* If we are not optimizing, then there may not be
a note. */
if (note)
- PUT_MODE (note, REG_INC);
+ PUT_MODE (note, (enum machine_mode) REG_INC);
*last_float_addr = r0_inc_rtx;
}
@@ -6005,7 +6051,7 @@ sh_expand_prologue (void)
tmp_pnt = schedule.temps;
for (entry = &schedule.entries[1]; entry->mode != VOIDmode; entry++)
{
- enum machine_mode mode = entry->mode;
+ enum machine_mode mode = (enum machine_mode) entry->mode;
unsigned int reg = entry->reg;
rtx reg_rtx, mem_rtx, pre_dec = NULL_RTX;
rtx orig_reg_rtx;
@@ -6324,7 +6370,7 @@ sh_expand_epilogue (bool sibcall_p)
tmp_pnt = schedule.temps;
for (; entry->mode != VOIDmode; entry--)
{
- enum machine_mode mode = entry->mode;
+ enum machine_mode mode = (enum machine_mode) entry->mode;
int reg = entry->reg;
rtx reg_rtx, mem_rtx, post_inc = NULL_RTX, insn;
@@ -7212,12 +7258,12 @@ sh_function_arg (CUMULATIVE_ARGS *ca, enum machine_mode mode,
if (mode == SCmode && TARGET_SH4 && TARGET_LITTLE_ENDIAN
&& (! FUNCTION_ARG_SCmode_WART || (ROUND_REG (*ca, mode) & 1)))
{
- rtx r1 = gen_rtx_EXPR_LIST (VOIDmode,
+ rtx r1 = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (SFmode,
BASE_ARG_REG (mode)
+ (ROUND_REG (*ca, mode) ^ 1)),
const0_rtx);
- rtx r2 = gen_rtx_EXPR_LIST (VOIDmode,
+ rtx r2 = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (SFmode,
BASE_ARG_REG (mode)
+ ((ROUND_REG (*ca, mode) + 1) ^ 1)),
@@ -7649,53 +7695,6 @@ sh_insert_attributes (tree node, tree *attributes)
return;
}
-/* Supported attributes:
-
- interrupt_handler -- specifies this function is an interrupt handler.
-
- trapa_handler - like above, but don't save all registers.
-
- sp_switch -- specifies an alternate stack for an interrupt handler
- to run on.
-
- trap_exit -- use a trapa to exit an interrupt function instead of
- an rte instruction.
-
- nosave_low_regs - don't save r0..r7 in an interrupt handler.
- This is useful on the SH3 and upwards,
- which has a separate set of low regs for User and Supervisor modes.
- This should only be used for the lowest level of interrupts. Higher levels
- of interrupts must save the registers in case they themselves are
- interrupted.
-
- renesas -- use Renesas calling/layout conventions (functions and
- structures).
-
-*/
-
-const struct attribute_spec sh_attribute_table[] =
-{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt_handler", 0, 0, true, false, false, sh_handle_interrupt_handler_attribute },
- { "sp_switch", 1, 1, true, false, false, sh_handle_sp_switch_attribute },
- { "trap_exit", 1, 1, true, false, false, sh_handle_trap_exit_attribute },
- { "renesas", 0, 0, false, true, false, sh_handle_renesas_attribute },
- { "trapa_handler", 0, 0, true, false, false, sh_handle_interrupt_handler_attribute },
- { "nosave_low_regs", 0, 0, true, false, false, sh_handle_interrupt_handler_attribute },
-#ifdef SYMBIAN
- /* Symbian support adds three new attributes:
- dllexport - for exporting a function/variable that will live in a dll
- dllimport - for importing a function/variable from a dll
-
- Microsoft allows multiple declspecs in one __declspec, separating
- them with spaces. We do NOT support this. Instead, use __declspec
- multiple times. */
- { "dllimport", 0, 0, true, false, false, sh_symbian_handle_dll_attribute },
- { "dllexport", 0, 0, true, false, false, sh_symbian_handle_dll_attribute },
-#endif
- { NULL, 0, 0, false, false, false, NULL }
-};
-
/* Handle an "interrupt_handler" attribute; arguments as in
struct attribute_spec.handler. */
static tree
@@ -8216,7 +8215,7 @@ get_free_reg (HARD_REG_SET regs_live)
void
fpscr_set_from_mem (int mode, HARD_REG_SET regs_live)
{
- enum attr_fp_mode fp_mode = mode;
+ enum attr_fp_mode fp_mode = (enum attr_fp_mode) mode;
enum attr_fp_mode norm_mode = ACTUAL_NORMAL_MODE (FP_MODE);
rtx addr_reg = get_free_reg (regs_live);
@@ -8260,14 +8259,14 @@ sh_insn_length_adjustment (rtx insn)
{
int sum = 0;
rtx body = PATTERN (insn);
- const char *template;
+ const char *templ;
char c;
int maybe_label = 1;
if (GET_CODE (body) == ASM_INPUT)
- template = XSTR (body, 0);
+ templ = XSTR (body, 0);
else if (asm_noperands (body) >= 0)
- template
+ templ
= decode_asm_operands (body, NULL, NULL, NULL, NULL);
else
return 0;
@@ -8276,17 +8275,17 @@ sh_insn_length_adjustment (rtx insn)
int ppi_adjust = 0;
do
- c = *template++;
+ c = *templ++;
while (c == ' ' || c == '\t');
/* all sh-dsp parallel-processing insns start with p.
The only non-ppi sh insn starting with p is pref.
The only ppi starting with pr is prnd. */
- if ((c == 'p' || c == 'P') && strncasecmp ("re", template, 2))
+ if ((c == 'p' || c == 'P') && strncasecmp ("re", templ, 2))
ppi_adjust = 2;
/* The repeat pseudo-insn expands two three insns, a total of
six bytes in size. */
else if ((c == 'r' || c == 'R')
- && ! strncasecmp ("epeat", template, 5))
+ && ! strncasecmp ("epeat", templ, 5))
ppi_adjust = 4;
while (c && c != '\n' && ! IS_ASM_LOGICAL_LINE_SEPARATOR (c))
{
@@ -8298,7 +8297,7 @@ sh_insn_length_adjustment (rtx insn)
}
else if (c == '\'' || c == '"')
maybe_label = 0;
- c = *template++;
+ c = *templ++;
}
sum += ppi_adjust;
maybe_label = c != ':';
@@ -9239,7 +9238,7 @@ sh_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt)
if (TARGET_USERMODE)
emit_library_call (function_symbol (NULL, "__ic_invalidate",
FUNCTION_ORDINARY),
- 0, VOIDmode, 1, tramp, SImode);
+ LCT_NORMAL, VOIDmode, 1, tramp, SImode);
else
emit_insn (gen_ic_invalidate_line (tramp));
}
@@ -9474,7 +9473,7 @@ sh_media_init_builtins (void)
if (signature < SH_BLTIN_NUM_SHARED_SIGNATURES)
shared[signature] = type;
}
- lang_hooks.builtin_function (d->name, type, d - bdesc, BUILT_IN_MD,
+ lang_hooks.builtin_function (d->name, type, (enum built_in_function) (d - bdesc), BUILT_IN_MD,
NULL, NULL_TREE);
}
}
@@ -9578,7 +9577,7 @@ sh_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
argmode = TYPE_MODE (TREE_TYPE (arg));
if (argmode != opmode)
arg = build1 (NOP_EXPR, optype, arg);
- op[nop] = expand_expr (arg, NULL_RTX, opmode, 0);
+ op[nop] = expand_expr (arg, NULL_RTX, opmode, EXPAND_NORMAL);
if (! (*insn_data[icode].operand[nop].predicate) (op[nop], opmode))
op[nop] = copy_to_mode_reg (opmode, op[nop]);
}
@@ -9635,24 +9634,24 @@ sh_expand_binop_v2sf (enum rtx_code code, rtx op0, rtx op1, rtx op2)
is invalid. */
bool
sh_cannot_change_mode_class (enum machine_mode from, enum machine_mode to,
- enum reg_class class)
+ enum reg_class rc)
{
/* We want to enable the use of SUBREGs as a means to
VEC_SELECT a single element of a vector. */
if (to == SFmode && VECTOR_MODE_P (from) && GET_MODE_INNER (from) == SFmode)
- return (reg_classes_intersect_p (GENERAL_REGS, class));
+ return (reg_classes_intersect_p (GENERAL_REGS, rc));
if (GET_MODE_SIZE (from) != GET_MODE_SIZE (to))
{
if (TARGET_LITTLE_ENDIAN)
{
if (GET_MODE_SIZE (to) < 8 || GET_MODE_SIZE (from) < 8)
- return reg_classes_intersect_p (DF_REGS, class);
+ return reg_classes_intersect_p (DF_REGS, rc);
}
else
{
if (GET_MODE_SIZE (from) < 8)
- return reg_classes_intersect_p (DF_HI_REGS, class);
+ return reg_classes_intersect_p (DF_HI_REGS, rc);
}
}
return 0;
@@ -9772,16 +9771,16 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
{
CUMULATIVE_ARGS cum;
int structure_value_byref = 0;
- rtx this, this_value, sibcall, insns, funexp;
+ rtx it, this_value, sibcall, insns, funexp;
tree funtype = TREE_TYPE (function);
int simple_add = CONST_OK_FOR_ADD (delta);
int did_load = 0;
rtx scratch0, scratch1, scratch2;
unsigned i;
- reload_completed = 1;
- epilogue_completed = 1;
- no_new_pseudos = 1;
+ reload_completed = true;
+ epilogue_completed = true;
+ no_new_pseudos = true;
current_function_uses_only_leaf_regs = 1;
reset_block_changes ();
@@ -9802,7 +9801,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
FUNCTION_ARG_ADVANCE (cum, Pmode, ptype, 1);
}
- this = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
+ it = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
/* For SHcompact, we only have r0 for a scratch register: r1 is the
static chain pointer (even if you can't have nested virtual functions
@@ -9843,7 +9842,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
error ("Need a call-clobbered target register");
}
- this_value = plus_constant (this, delta);
+ this_value = plus_constant (it, delta);
if (vcall_offset
&& (simple_add || scratch0 != scratch1)
&& strict_memory_address_p (ptr_mode, this_value))
@@ -9855,11 +9854,11 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
if (!delta)
; /* Do nothing. */
else if (simple_add)
- emit_move_insn (this, this_value);
+ emit_move_insn (it, this_value);
else
{
emit_move_insn (scratch1, GEN_INT (delta));
- emit_insn (gen_add2_insn (this, scratch1));
+ emit_insn (gen_add2_insn (it, scratch1));
}
if (vcall_offset)
@@ -9867,7 +9866,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
rtx offset_addr;
if (!did_load)
- emit_load_ptr (scratch0, this);
+ emit_load_ptr (scratch0, it);
offset_addr = plus_constant (scratch0, vcall_offset);
if (strict_memory_address_p (ptr_mode, offset_addr))
@@ -9898,7 +9897,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
if (Pmode != ptr_mode)
scratch0 = gen_rtx_TRUNCATE (ptr_mode, scratch0);
- emit_insn (gen_add2_insn (this, scratch0));
+ emit_insn (gen_add2_insn (it, scratch0));
}
/* Generate a tail call to the target function. */
@@ -9933,7 +9932,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
}
sibcall = emit_call_insn (sibcall);
SIBLING_CALL_P (sibcall) = 1;
- use_reg (&CALL_INSN_FUNCTION_USAGE (sibcall), this);
+ use_reg (&CALL_INSN_FUNCTION_USAGE (sibcall), it);
emit_barrier ();
/* Run just enough of rest_of_compilation to do scheduling and get
@@ -9990,9 +9989,9 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
bitmap_obstack_release (NULL);
}
- reload_completed = 0;
- epilogue_completed = 0;
- no_new_pseudos = 0;
+ reload_completed = false;
+ epilogue_completed = false;
+ no_new_pseudos = false;
}
rtx
@@ -10614,19 +10613,19 @@ replace_n_hard_rtx (rtx x, rtx *replacements, int n_replacements, int modify)
if (GET_CODE (x) == SUBREG)
{
- rtx new = replace_n_hard_rtx (SUBREG_REG (x), replacements,
+ rtx tmp = replace_n_hard_rtx (SUBREG_REG (x), replacements,
n_replacements, modify);
- if (GET_CODE (new) == CONST_INT)
+ if (GET_CODE (tmp) == CONST_INT)
{
- x = simplify_subreg (GET_MODE (x), new,
+ x = simplify_subreg (GET_MODE (x), tmp,
GET_MODE (SUBREG_REG (x)),
SUBREG_BYTE (x));
if (! x)
abort ();
}
else if (modify)
- SUBREG_REG (x) = new;
+ SUBREG_REG (x) = tmp;
return x;
}
@@ -10674,18 +10673,18 @@ replace_n_hard_rtx (rtx x, rtx *replacements, int n_replacements, int modify)
}
else if (GET_CODE (x) == ZERO_EXTEND)
{
- rtx new = replace_n_hard_rtx (XEXP (x, 0), replacements,
+ rtx tmp = replace_n_hard_rtx (XEXP (x, 0), replacements,
n_replacements, modify);
- if (GET_CODE (new) == CONST_INT)
+ if (GET_CODE (tmp) == CONST_INT)
{
x = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x),
- new, GET_MODE (XEXP (x, 0)));
+ tmp, GET_MODE (XEXP (x, 0)));
if (! x)
abort ();
}
else if (modify)
- XEXP (x, 0) = new;
+ XEXP (x, 0) = tmp;
return x;
}
@@ -10693,26 +10692,26 @@ replace_n_hard_rtx (rtx x, rtx *replacements, int n_replacements, int modify)
fmt = GET_RTX_FORMAT (GET_CODE (x));
for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--)
{
- rtx new;
+ rtx tmp;
if (fmt[i] == 'e')
{
- new = replace_n_hard_rtx (XEXP (x, i), replacements,
+ tmp = replace_n_hard_rtx (XEXP (x, i), replacements,
n_replacements, modify);
- if (!new)
+ if (!tmp)
return NULL_RTX;
if (modify)
- XEXP (x, i) = new;
+ XEXP (x, i) = tmp;
}
else if (fmt[i] == 'E')
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
{
- new = replace_n_hard_rtx (XVECEXP (x, i, j), replacements,
+ tmp = replace_n_hard_rtx (XVECEXP (x, i, j), replacements,
n_replacements, modify);
- if (!new)
+ if (!tmp)
return NULL_RTX;
if (modify)
- XVECEXP (x, i, j) = new;
+ XVECEXP (x, i, j) = tmp;
}
}
@@ -10832,12 +10831,12 @@ shmedia_prepare_call_address (rtx fnaddr, int is_sibcall)
}
enum reg_class
-sh_secondary_reload (bool in_p, rtx x, enum reg_class class,
+sh_secondary_reload (bool in_p, rtx x, enum reg_class rc,
enum machine_mode mode, secondary_reload_info *sri)
{
if (in_p)
{
- if (REGCLASS_HAS_FP_REG (class)
+ if (REGCLASS_HAS_FP_REG (rc)
&& ! TARGET_SHMEDIA
&& immediate_operand ((x), mode)
&& ! ((fp_zero_operand (x) || fp_one_operand (x))
@@ -10857,24 +10856,24 @@ sh_secondary_reload (bool in_p, rtx x, enum reg_class class,
default:
abort ();
}
- if (class == FPUL_REGS
+ if (rc == FPUL_REGS
&& ((GET_CODE (x) == REG
&& (REGNO (x) == MACL_REG || REGNO (x) == MACH_REG
|| REGNO (x) == T_REG))
|| GET_CODE (x) == PLUS))
return GENERAL_REGS;
- if (class == FPUL_REGS && immediate_operand (x, mode))
+ if (rc == FPUL_REGS && immediate_operand (x, mode))
{
if (GET_CODE (x) == CONST_INT && CONST_OK_FOR_I08 (INTVAL (x)))
return GENERAL_REGS;
sri->icode = CODE_FOR_reload_insi__i_fpul;
return NO_REGS;
}
- if (class == FPSCR_REGS
+ if (rc == FPSCR_REGS
&& ((GET_CODE (x) == REG && REGNO (x) >= FIRST_PSEUDO_REGISTER)
|| (GET_CODE (x) == MEM && GET_CODE (XEXP (x, 0)) == PLUS)))
return GENERAL_REGS;
- if (REGCLASS_HAS_FP_REG (class)
+ if (REGCLASS_HAS_FP_REG (rc)
&& TARGET_SHMEDIA
&& immediate_operand (x, mode)
&& x != CONST0_RTX (GET_MODE (x))
@@ -10887,24 +10886,24 @@ sh_secondary_reload (bool in_p, rtx x, enum reg_class class,
? CODE_FOR_reload_inqi : CODE_FOR_reload_inhi);
return NO_REGS;
}
- if (TARGET_SHMEDIA && class == GENERAL_REGS
+ if (TARGET_SHMEDIA && rc == GENERAL_REGS
&& (GET_CODE (x) == LABEL_REF || PIC_DIRECT_ADDR_P (x)))
return TARGET_REGS;
} /* end of input-only processing. */
- if (((REGCLASS_HAS_FP_REG (class)
+ if (((REGCLASS_HAS_FP_REG (rc)
&& (GET_CODE (x) == REG
&& (GENERAL_OR_AP_REGISTER_P (REGNO (x))
|| (FP_REGISTER_P (REGNO (x)) && mode == SImode
&& TARGET_FMOVD))))
- || (REGCLASS_HAS_GENERAL_REG (class)
+ || (REGCLASS_HAS_GENERAL_REG (rc)
&& GET_CODE (x) == REG
&& FP_REGISTER_P (REGNO (x))))
&& ! TARGET_SHMEDIA
&& (mode == SFmode || mode == SImode))
return FPUL_REGS;
- if ((class == FPUL_REGS
- || (REGCLASS_HAS_FP_REG (class)
+ if ((rc == FPUL_REGS
+ || (REGCLASS_HAS_FP_REG (rc)
&& ! TARGET_SHMEDIA && mode == SImode))
&& (GET_CODE (x) == MEM
|| (GET_CODE (x) == REG
@@ -10912,20 +10911,20 @@ sh_secondary_reload (bool in_p, rtx x, enum reg_class class,
|| REGNO (x) == T_REG
|| system_reg_operand (x, VOIDmode)))))
{
- if (class == FPUL_REGS)
+ if (rc == FPUL_REGS)
return GENERAL_REGS;
return FPUL_REGS;
}
- if ((class == TARGET_REGS
- || (TARGET_SHMEDIA && class == SIBCALL_REGS))
+ if ((rc == TARGET_REGS
+ || (TARGET_SHMEDIA && rc == SIBCALL_REGS))
&& !EXTRA_CONSTRAINT_Csy (x)
&& (GET_CODE (x) != REG || ! GENERAL_REGISTER_P (REGNO (x))))
return GENERAL_REGS;
- if ((class == MAC_REGS || class == PR_REGS)
+ if ((rc == MAC_REGS || rc == PR_REGS)
&& GET_CODE (x) == REG && ! GENERAL_REGISTER_P (REGNO (x))
- && class != REGNO_REG_CLASS (REGNO (x)))
+ && rc != REGNO_REG_CLASS (REGNO (x)))
return GENERAL_REGS;
- if (class != GENERAL_REGS && GET_CODE (x) == REG
+ if (rc != GENERAL_REGS && GET_CODE (x) == REG
&& TARGET_REGISTER_P (REGNO (x)))
return GENERAL_REGS;
return NO_REGS;
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index fc4e1f282a4..9bd790e26be 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -530,35 +530,35 @@ do { \
= !flag_signaling_nans && TARGET_SH2E && ! TARGET_IEEE; \
if (TARGET_SH2E && !flag_finite_math_only) \
target_flags |= MASK_IEEE; \
- sh_cpu = CPU_SH1; \
+ sh_cpu = (enum processor_type) CPU_SH1; \
assembler_dialect = 0; \
if (TARGET_SH2) \
- sh_cpu = CPU_SH2; \
+ sh_cpu = (enum processor_type) CPU_SH2; \
if (TARGET_SH2E) \
- sh_cpu = CPU_SH2E; \
+ sh_cpu = (enum processor_type) CPU_SH2E; \
if (TARGET_SH2A) \
{ \
- sh_cpu = CPU_SH2A; \
+ sh_cpu = (enum processor_type) CPU_SH2A; \
if (TARGET_SH2A_DOUBLE) \
target_flags |= MASK_FMOVD; \
} \
if (TARGET_SH3) \
- sh_cpu = CPU_SH3; \
+ sh_cpu = (enum processor_type) CPU_SH3; \
if (TARGET_SH3E) \
- sh_cpu = CPU_SH3E; \
+ sh_cpu = (enum processor_type) CPU_SH3E; \
if (TARGET_SH4) \
{ \
assembler_dialect = 1; \
- sh_cpu = CPU_SH4; \
+ sh_cpu = (enum processor_type) CPU_SH4; \
} \
if (TARGET_SH4A_ARCH) \
{ \
assembler_dialect = 1; \
- sh_cpu = CPU_SH4A; \
+ sh_cpu = (enum processor_type) CPU_SH4A; \
} \
if (TARGET_SH5) \
{ \
- sh_cpu = CPU_SH5; \
+ sh_cpu = (enum processor_type) CPU_SH5; \
target_flags |= MASK_ALIGN_DOUBLE; \
if (TARGET_SHMEDIA_FPU) \
target_flags |= MASK_FMOVD; \
@@ -2105,14 +2105,14 @@ struct sh_args {
((MODE), \
gen_rtvec (2, \
gen_rtx_EXPR_LIST \
- (VOIDmode, \
+ (REG_DEP_TRUE, \
((CUM).arg_count[(int) SH_ARG_INT] < NPARM_REGS (SImode) \
? gen_rtx_REG ((MODE), FIRST_FP_PARM_REG \
+ (CUM).arg_count[(int) SH_ARG_FLOAT]) \
: NULL_RTX), \
const0_rtx), \
gen_rtx_EXPR_LIST \
- (VOIDmode, \
+ (REG_DEP_TRUE, \
((CUM).arg_count[(int) SH_ARG_INT] < NPARM_REGS (SImode) \
? gen_rtx_REG ((MODE), FIRST_PARM_REG \
+ (CUM).arg_count[(int) SH_ARG_INT]) \
@@ -2134,10 +2134,10 @@ struct sh_args {
: gen_rtx_PARALLEL ((MODE), \
gen_rtvec (2, \
gen_rtx_EXPR_LIST \
- (VOIDmode, NULL_RTX, \
+ (REG_DEP_TRUE, NULL_RTX, \
const0_rtx), \
gen_rtx_EXPR_LIST \
- (VOIDmode, gen_rtx_REG ((MODE), \
+ (REG_DEP_TRUE, gen_rtx_REG ((MODE), \
(REG)), \
const0_rtx))))
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
index 5af67a6a34d..5d798dfa528 100644
--- a/gcc/config/sparc/linux.h
+++ b/gcc/config/sparc/linux.h
@@ -37,9 +37,6 @@ Boston, MA 02110-1301, USA. */
/* Don't assume anything about the header files. */
#define NO_IMPLICIT_EXTERN_C
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static
@@ -76,10 +73,6 @@ Boston, MA 02110-1301, USA. */
%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
"
-/* The GNU C++ standard library requires that these macros be defined. */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (sparc GNU/Linux with ELF)");
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
index b0ddf4b3d3b..c752617ccbb 100644
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -38,9 +38,6 @@ Boston, MA 02110-1301, USA. */
/* Don't assume anything about the header files. */
#define NO_IMPLICIT_EXTERN_C
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
|| TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
|| TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3 \
@@ -86,10 +83,6 @@ Boston, MA 02110-1301, USA. */
"%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s\
%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
-/* The GNU C++ standard library requires that these macros be defined. */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (sparc64 GNU/Linux with ELF)");
diff --git a/gcc/config/sparc/netbsd-elf.h b/gcc/config/sparc/netbsd-elf.h
index b07fee3bc81..c541ea6dd1b 100644
--- a/gcc/config/sparc/netbsd-elf.h
+++ b/gcc/config/sparc/netbsd-elf.h
@@ -36,10 +36,6 @@ Boston, MA 02110-1301, USA. */
} \
while (0)
-/* Make sure these are undefined. */
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
/* CPP defines used by all NetBSD targets. */
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC "%(netbsd_cpp_spec)"
diff --git a/gcc/config/sparc/openbsd64.h b/gcc/config/sparc/openbsd64.h
index 49f8d2820bc..8e0873ee1e4 100644
--- a/gcc/config/sparc/openbsd64.h
+++ b/gcc/config/sparc/openbsd64.h
@@ -48,9 +48,6 @@ Boston, MA 02110-1301, USA. */
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC ""
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
/* Inherited from sp64-elf. */
#undef NO_IMPLICIT_EXTERN_C
diff --git a/gcc/config/sparc/sp64-elf.h b/gcc/config/sparc/sp64-elf.h
index 53f2144e86a..5c07fbdcc42 100644
--- a/gcc/config/sparc/sp64-elf.h
+++ b/gcc/config/sparc/sp64-elf.h
@@ -39,9 +39,6 @@ Boston, MA 02110-1301, USA. */
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC "-D__svr4__"
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
#undef ASM_SPEC
#define ASM_SPEC "\
%{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 692e46e5584..d69c31148c8 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -659,7 +659,7 @@ sparc_override_options (void)
{ "ultrasparc3", PROCESSOR_ULTRASPARC3, MASK_ISA, MASK_V9|MASK_DEPRECATED_V8_INSNS},
/* UltraSPARC T1 */
{ "niagara", PROCESSOR_NIAGARA, MASK_ISA, MASK_V9|MASK_DEPRECATED_V8_INSNS},
- { 0, 0, 0, 0 }
+ { 0, PROCESSOR_NONT, 0, 0 }
};
const struct cpu_table *cpu;
const struct sparc_cpu_select *sel;
@@ -697,7 +697,7 @@ sparc_override_options (void)
if (cmodel->name == NULL)
error ("bad value (%s) for -mcmodel= switch", sparc_cmodel_string);
else
- sparc_cmodel = cmodel->value;
+ sparc_cmodel = (enum cmodel)cmodel->value;
}
else
error ("-mcmodel= is not supported on 32 bit systems");
@@ -821,6 +821,8 @@ sparc_override_options (void)
case PROCESSOR_NIAGARA:
sparc_costs = &niagara_costs;
break;
+ case PROCESSOR_NONE:
+ break;
};
#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
@@ -3089,7 +3091,7 @@ legitimize_tls_address (rtx addr)
addr, const1_rtx));
}
CALL_INSN_FUNCTION_USAGE (insn)
- = gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_USE (VOIDmode, o0),
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, gen_rtx_USE (VOIDmode, o0),
CALL_INSN_FUNCTION_USAGE (insn));
insn = get_insns ();
end_sequence ();
@@ -3119,7 +3121,7 @@ legitimize_tls_address (rtx addr)
const1_rtx));
}
CALL_INSN_FUNCTION_USAGE (insn)
- = gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_USE (VOIDmode, o0),
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, gen_rtx_USE (VOIDmode, o0),
CALL_INSN_FUNCTION_USAGE (insn));
insn = get_insns ();
end_sequence ();
@@ -4774,7 +4776,7 @@ function_arg_record_value_3 (HOST_WIDE_INT bitpos,
regno = parms->regbase + this_slotno;
reg = gen_rtx_REG (mode, regno);
XVECEXP (parms->ret, 0, parms->stack + parms->nregs)
- = gen_rtx_EXPR_LIST (VOIDmode, reg, GEN_INT (intoffset));
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, reg, GEN_INT (intoffset));
this_slotno += 1;
intoffset = (intoffset | (UNITS_PER_WORD-1)) + 1;
@@ -4862,7 +4864,7 @@ function_arg_record_value_2 (tree type, HOST_WIDE_INT startbitpos,
reg = gen_rtx_REG (mode, regno);
pos = bitpos / BITS_PER_UNIT;
XVECEXP (parms->ret, 0, parms->stack + parms->nregs)
- = gen_rtx_EXPR_LIST (VOIDmode, reg, GEN_INT (pos));
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, reg, GEN_INT (pos));
parms->nregs += 1;
while (--nregs > 0)
{
@@ -4870,7 +4872,7 @@ function_arg_record_value_2 (tree type, HOST_WIDE_INT startbitpos,
reg = gen_rtx_REG (mode, regno);
pos += GET_MODE_SIZE (mode);
XVECEXP (parms->ret, 0, parms->stack + parms->nregs)
- = gen_rtx_EXPR_LIST (VOIDmode, reg, GEN_INT (pos));
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, reg, GEN_INT (pos));
parms->nregs += 1;
}
}
@@ -4971,7 +4973,7 @@ function_arg_record_value (tree type, enum machine_mode mode,
are not at the beginning of the structure. */
if (parms.stack)
XVECEXP (parms.ret, 0, 0)
- = gen_rtx_EXPR_LIST (VOIDmode, NULL_RTX, const0_rtx);
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, NULL_RTX, const0_rtx);
/* Fill in the entries. */
parms.nregs = 0;
@@ -5013,7 +5015,7 @@ function_arg_union_value (int size, enum machine_mode mode, int slotno,
{
/* Unions are passed left-justified. */
XVECEXP (regs, 0, i)
- = gen_rtx_EXPR_LIST (VOIDmode,
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (word_mode, regno),
GEN_INT (UNITS_PER_WORD * i));
regno++;
@@ -5043,7 +5045,7 @@ function_arg_vector_value (int size, enum machine_mode base_mode, int regno)
for (i = 0; i < nregs; i++)
{
XVECEXP (regs, 0, i)
- = gen_rtx_EXPR_LIST (VOIDmode,
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_REG (base_mode, regno),
GEN_INT (base_mode_size * i));
regno += base_mode_size / 4;
@@ -5175,15 +5177,15 @@ function_arg (const struct sparc_args *cum, enum machine_mode mode,
intreg = (SPARC_OUTGOING_INT_ARG_FIRST
+ (regno - SPARC_FP_ARG_FIRST) / 2);
- v0 = gen_rtx_EXPR_LIST (VOIDmode, reg, const0_rtx);
- v1 = gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (mode, intreg),
+ v0 = gen_rtx_EXPR_LIST (REG_DEP_TRUE, reg, const0_rtx);
+ v1 = gen_rtx_EXPR_LIST (REG_DEP_TRUE, gen_rtx_REG (mode, intreg),
const0_rtx);
return gen_rtx_PARALLEL (mode, gen_rtvec (2, v0, v1));
}
else
{
- v0 = gen_rtx_EXPR_LIST (VOIDmode, NULL_RTX, const0_rtx);
- v1 = gen_rtx_EXPR_LIST (VOIDmode, reg, const0_rtx);
+ v0 = gen_rtx_EXPR_LIST (REG_DEP_TRUE, NULL_RTX, const0_rtx);
+ v1 = gen_rtx_EXPR_LIST (REG_DEP_TRUE, reg, const0_rtx);
return gen_rtx_PARALLEL (mode, gen_rtvec (2, v0, v1));
}
}
@@ -7507,12 +7509,12 @@ static GTY(()) rtx sparc_addr_list;
void
sparc_defer_case_vector (rtx lab, rtx vec, int diff)
{
- vec = gen_rtx_EXPR_LIST (VOIDmode, lab, vec);
+ vec = gen_rtx_EXPR_LIST (REG_DEP_TRUE, lab, vec);
if (diff)
sparc_addr_diff_list
- = gen_rtx_EXPR_LIST (VOIDmode, vec, sparc_addr_diff_list);
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, vec, sparc_addr_diff_list);
else
- sparc_addr_list = gen_rtx_EXPR_LIST (VOIDmode, vec, sparc_addr_list);
+ sparc_addr_list = gen_rtx_EXPR_LIST (REG_DEP_TRUE, vec, sparc_addr_list);
}
static void
@@ -7918,49 +7920,49 @@ sparc_vis_init_builtins (void)
intDI_type_node, 0);
/* Packing and expanding vectors. */
- def_builtin ("__builtin_vis_fpack16", CODE_FOR_fpack16_vis, v4qi_ftype_v4hi);
- def_builtin ("__builtin_vis_fpack32", CODE_FOR_fpack32_vis,
+ def_builtin ("__builtin_vis_fpack16", (enum built_in_function)CODE_FOR_fpack16_vis, v4qi_ftype_v4hi);
+ def_builtin ("__builtin_vis_fpack32", (enum built_in_function)CODE_FOR_fpack32_vis,
v8qi_ftype_v2si_v8qi);
- def_builtin ("__builtin_vis_fpackfix", CODE_FOR_fpackfix_vis,
+ def_builtin ("__builtin_vis_fpackfix", (enum built_in_function)CODE_FOR_fpackfix_vis,
v2hi_ftype_v2si);
- def_builtin ("__builtin_vis_fexpand", CODE_FOR_fexpand_vis, v4hi_ftype_v4qi);
- def_builtin ("__builtin_vis_fpmerge", CODE_FOR_fpmerge_vis,
+ def_builtin ("__builtin_vis_fexpand", (enum built_in_function)CODE_FOR_fexpand_vis, v4hi_ftype_v4qi);
+ def_builtin ("__builtin_vis_fpmerge", (enum built_in_function)CODE_FOR_fpmerge_vis,
v8qi_ftype_v4qi_v4qi);
/* Multiplications. */
- def_builtin ("__builtin_vis_fmul8x16", CODE_FOR_fmul8x16_vis,
+ def_builtin ("__builtin_vis_fmul8x16", (enum built_in_function)CODE_FOR_fmul8x16_vis,
v4hi_ftype_v4qi_v4hi);
- def_builtin ("__builtin_vis_fmul8x16au", CODE_FOR_fmul8x16au_vis,
+ def_builtin ("__builtin_vis_fmul8x16au", (enum built_in_function)CODE_FOR_fmul8x16au_vis,
v4hi_ftype_v4qi_v2hi);
- def_builtin ("__builtin_vis_fmul8x16al", CODE_FOR_fmul8x16al_vis,
+ def_builtin ("__builtin_vis_fmul8x16al", (enum built_in_function)CODE_FOR_fmul8x16al_vis,
v4hi_ftype_v4qi_v2hi);
- def_builtin ("__builtin_vis_fmul8sux16", CODE_FOR_fmul8sux16_vis,
+ def_builtin ("__builtin_vis_fmul8sux16", (enum built_in_function)CODE_FOR_fmul8sux16_vis,
v4hi_ftype_v8qi_v4hi);
- def_builtin ("__builtin_vis_fmul8ulx16", CODE_FOR_fmul8ulx16_vis,
+ def_builtin ("__builtin_vis_fmul8ulx16", (enum built_in_function)CODE_FOR_fmul8ulx16_vis,
v4hi_ftype_v8qi_v4hi);
- def_builtin ("__builtin_vis_fmuld8sux16", CODE_FOR_fmuld8sux16_vis,
+ def_builtin ("__builtin_vis_fmuld8sux16", (enum built_in_function)CODE_FOR_fmuld8sux16_vis,
v2si_ftype_v4qi_v2hi);
- def_builtin ("__builtin_vis_fmuld8ulx16", CODE_FOR_fmuld8ulx16_vis,
+ def_builtin ("__builtin_vis_fmuld8ulx16", (enum built_in_function)CODE_FOR_fmuld8ulx16_vis,
v2si_ftype_v4qi_v2hi);
/* Data aligning. */
- def_builtin ("__builtin_vis_faligndatav4hi", CODE_FOR_faligndatav4hi_vis,
+ def_builtin ("__builtin_vis_faligndatav4hi", (enum built_in_function)CODE_FOR_faligndatav4hi_vis,
v4hi_ftype_v4hi_v4hi);
- def_builtin ("__builtin_vis_faligndatav8qi", CODE_FOR_faligndatav8qi_vis,
+ def_builtin ("__builtin_vis_faligndatav8qi", (enum built_in_function)CODE_FOR_faligndatav8qi_vis,
v8qi_ftype_v8qi_v8qi);
- def_builtin ("__builtin_vis_faligndatav2si", CODE_FOR_faligndatav2si_vis,
+ def_builtin ("__builtin_vis_faligndatav2si", (enum built_in_function)CODE_FOR_faligndatav2si_vis,
v2si_ftype_v2si_v2si);
- def_builtin ("__builtin_vis_faligndatadi", CODE_FOR_faligndatadi_vis,
+ def_builtin ("__builtin_vis_faligndatadi", (enum built_in_function)CODE_FOR_faligndatadi_vis,
di_ftype_di_di);
if (TARGET_ARCH64)
- def_builtin ("__builtin_vis_alignaddr", CODE_FOR_alignaddrdi_vis,
+ def_builtin ("__builtin_vis_alignaddr", (enum built_in_function)CODE_FOR_alignaddrdi_vis,
ptr_ftype_ptr_di);
else
- def_builtin ("__builtin_vis_alignaddr", CODE_FOR_alignaddrsi_vis,
+ def_builtin ("__builtin_vis_alignaddr", (enum built_in_function)CODE_FOR_alignaddrsi_vis,
ptr_ftype_ptr_si);
/* Pixel distance. */
- def_builtin ("__builtin_vis_pdist", CODE_FOR_pdist_vis,
+ def_builtin ("__builtin_vis_pdist", (enum built_in_function)CODE_FOR_pdist_vis,
di_ftype_v8qi_v8qi_di);
}
@@ -8530,12 +8532,12 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree function)
{
- rtx this, insn, funexp;
+ rtx it, insn, funexp;
unsigned int int_arg_first;
- reload_completed = 1;
- epilogue_completed = 1;
- no_new_pseudos = 1;
+ reload_completed = true;
+ epilogue_completed = true;
+ no_new_pseudos = true;
reset_block_changes ();
emit_note (NOTE_INSN_PROLOGUE_END);
@@ -8563,9 +8565,9 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Find the "this" pointer. Normally in %o0, but in ARCH64 if the function
returns a structure, the structure return pointer is there instead. */
if (TARGET_ARCH64 && aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function))
- this = gen_rtx_REG (Pmode, int_arg_first + 1);
+ it = gen_rtx_REG (Pmode, int_arg_first + 1);
else
- this = gen_rtx_REG (Pmode, int_arg_first);
+ it = gen_rtx_REG (Pmode, int_arg_first);
/* Add DELTA. When possible use a plain add, otherwise load it into
a register first. */
@@ -8581,7 +8583,7 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
}
/* THIS += DELTA. */
- emit_insn (gen_add2_insn (this, delta_rtx));
+ emit_insn (gen_add2_insn (it, delta_rtx));
}
/* Add the word at address (*THIS + VCALL_OFFSET). */
@@ -8593,7 +8595,7 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
gcc_assert (vcall_offset < 0);
/* SCRATCH = *THIS. */
- emit_move_insn (scratch, gen_rtx_MEM (Pmode, this));
+ emit_move_insn (scratch, gen_rtx_MEM (Pmode, it));
/* Prepare for adding VCALL_OFFSET. The difficulty is that we
may not have any available scratch register at this point. */
@@ -8633,7 +8635,7 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
vcall_offset_rtx)));
/* THIS += *(*THIS + VCALL_OFFSET). */
- emit_insn (gen_add2_insn (this, scratch));
+ emit_insn (gen_add2_insn (it, scratch));
}
/* Generate a tail call to the target function. */
@@ -8720,9 +8722,9 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
final (insn, file, 1);
final_end_function ();
- reload_completed = 0;
- epilogue_completed = 0;
- no_new_pseudos = 0;
+ reload_completed = false;
+ epilogue_completed = false;
+ no_new_pseudos = false;
}
/* Return true if sparc_output_mi_thunk would be able to output the
@@ -8743,7 +8745,7 @@ sparc_can_output_mi_thunk (tree thunk_fndecl ATTRIBUTE_UNUSED,
static struct machine_function *
sparc_init_machine_status (void)
{
- return ggc_alloc_cleared (sizeof (struct machine_function));
+ return (struct machine_function *) ggc_alloc_cleared (sizeof (struct machine_function));
}
/* Locate some local-dynamic symbol still in use by this function
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 8a2121cf27c..a9786a86def 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -519,6 +519,7 @@ extern enum cmodel sparc_cmodel;
/* Processor type.
These must match the values for the cpu attribute in sparc.md. */
enum processor_type {
+ PROCESSOR_NONE,
PROCESSOR_V7,
PROCESSOR_CYPRESS,
PROCESSOR_V8,
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index ed68f1e8a1e..4cd9cff331f 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -128,25 +128,25 @@
;; True if branch/call has empty delay slot and will emit a nop in it
(define_attr "empty_delay_slot" "false,true"
- (symbol_ref "empty_delay_slot (insn)"))
+ (symbol_ref "(enum attr_empty_delay_slot)empty_delay_slot (insn)"))
(define_attr "branch_type" "none,icc,fcc,reg"
(const_string "none"))
(define_attr "pic" "false,true"
- (symbol_ref "flag_pic != 0"))
+ (symbol_ref "(enum attr_pic)(flag_pic != 0)"))
(define_attr "calls_alloca" "false,true"
- (symbol_ref "current_function_calls_alloca != 0"))
+ (symbol_ref "(enum attr_calls_alloca)(current_function_calls_alloca != 0)"))
(define_attr "calls_eh_return" "false,true"
- (symbol_ref "current_function_calls_eh_return !=0 "))
+ (symbol_ref "(enum attr_calls_eh_return)(current_function_calls_eh_return !=0)"))
(define_attr "leaf_function" "false,true"
- (symbol_ref "current_function_uses_only_leaf_regs != 0"))
+ (symbol_ref "(enum attr_leaf_function)(current_function_uses_only_leaf_regs != 0)"))
(define_attr "delayed_branch" "false,true"
- (symbol_ref "flag_delayed_branch != 0"))
+ (symbol_ref "(enum attr_delayed_branch)(flag_delayed_branch != 0)"))
;; Length (in # of insns).
;; Beware that setting a length greater or equal to 3 for conditional branches
@@ -240,7 +240,7 @@
;; Attributes for instruction and branch scheduling
(define_attr "tls_call_delay" "false,true"
- (symbol_ref "tls_call_delay (insn)"))
+ (symbol_ref "(enum attr_tls_call_delay)tls_call_delay (insn)"))
(define_attr "in_call_delay" "false,true"
(cond [(eq_attr "type" "uncond_branch,branch,call,sibcall,call_no_delay_slot,multi")
@@ -255,10 +255,10 @@
(const_string "false"))))
(define_attr "eligible_for_sibcall_delay" "false,true"
- (symbol_ref "eligible_for_sibcall_delay (insn)"))
+ (symbol_ref "(enum attr_eligible_for_sibcall_delay)eligible_for_sibcall_delay (insn)"))
(define_attr "eligible_for_return_delay" "false,true"
- (symbol_ref "eligible_for_return_delay (insn)"))
+ (symbol_ref "(enum attr_eligible_for_return_delay)eligible_for_return_delay (insn)"))
;; ??? !v9: Should implement the notion of predelay slots for floating-point
;; branches. This would allow us to remove the nop always inserted before
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 32513d28e94..b8c7fd6ad65 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -2357,7 +2357,7 @@ xstormy16_expand_builtin(tree exp, rtx target,
for (a = 0; a < 10 && argtree; a++)
{
- args[a] = expand_expr (TREE_VALUE (argtree), NULL_RTX, VOIDmode, 0);
+ args[a] = expand_normal (TREE_VALUE (argtree));
argtree = TREE_CHAIN (argtree);
}
diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h
index faf04727f98..00364a042f1 100644
--- a/gcc/config/stormy16/stormy16.h
+++ b/gcc/config/stormy16/stormy16.h
@@ -46,12 +46,6 @@ Boston, MA 02110-1301, USA. */
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
-/* Defined in svr4.h for host compilers. */
-/* #define MD_EXEC_PREFIX "" */
-
-/* Defined in svr4.h for host compilers. */
-/* #define MD_STARTFILE_PREFIX "" */
-
/* Run-time target specifications */
diff --git a/gcc/config/svr4.h b/gcc/config/svr4.h
index 6fa88fcd821..3964a4ba181 100644
--- a/gcc/config/svr4.h
+++ b/gcc/config/svr4.h
@@ -81,22 +81,6 @@ Boston, MA 02110-1301, USA.
#define AS_NEEDS_DASH_FOR_PIPED_INPUT
-/* Under svr4, the normal location of the `ld' and `as' programs is the
- /usr/ccs/bin directory. */
-
-#ifndef CROSS_COMPILE
-#undef MD_EXEC_PREFIX
-#define MD_EXEC_PREFIX "/usr/ccs/bin/"
-#endif
-
-/* Under svr4, the normal location of the various *crt*.o files is the
- /usr/ccs/lib directory. */
-
-#ifndef CROSS_COMPILE
-#undef MD_STARTFILE_PREFIX
-#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
-#endif
-
/* Provide a LIB_SPEC appropriate for svr4. Here we tack on the default
standard C library (unless we are building a shared library). */
diff --git a/gcc/config/xtensa/elf.h b/gcc/config/xtensa/elf.h
index 34cf379cb0d..c4a49fdb674 100644
--- a/gcc/config/xtensa/elf.h
+++ b/gcc/config/xtensa/elf.h
@@ -30,9 +30,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-
#undef TARGET_VERSION
#define TARGET_VERSION fputs (" (Xtensa/ELF)", stderr);
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 7c8b3af9966..49ecebf743d 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2246,11 +2246,6 @@ EOF
gcc_cv_as_eh_frame=no
fi])
-if test $gcc_cv_as_eh_frame = buggy; then
- AC_DEFINE(USE_AS_TRADITIONAL_FORMAT, 1,
- [Define if your assembler mis-optimizes .eh_frame data.])
-fi
-
gcc_GAS_CHECK_FEATURE(section merging support, gcc_cv_as_shf_merge,
[elf,2,12,0], [--fatal-warnings],
[.section .rodata.str, "aMS", @progbits, 1])
diff --git a/gcc/conflict.c b/gcc/conflict.c
index 43f7860820e..1ef6592d1c6 100644
--- a/gcc/conflict.c
+++ b/gcc/conflict.c
@@ -201,7 +201,7 @@ conflict_graph_add (conflict_graph graph, int reg1, int reg2)
/* Allocate an arc. */
arc
- = obstack_alloc (&graph->arc_obstack,
+ = (conflict_graph_arc) obstack_alloc (&graph->arc_obstack,
sizeof (struct conflict_graph_arc_def));
/* Record the reg numbers. */
diff --git a/gcc/coverage.c b/gcc/coverage.c
index 5eaf4888fe3..de98ed22564 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -140,7 +140,7 @@ get_gcov_unsigned_t (void)
static hashval_t
htab_counts_entry_hash (const void *of)
{
- const counts_entry_t *entry = of;
+ const counts_entry_t *entry = (const counts_entry_t *) of;
return entry->ident * GCOV_COUNTERS + entry->ctr;
}
@@ -148,8 +148,8 @@ htab_counts_entry_hash (const void *of)
static int
htab_counts_entry_eq (const void *of1, const void *of2)
{
- const counts_entry_t *entry1 = of1;
- const counts_entry_t *entry2 = of2;
+ const counts_entry_t *entry1 = (const counts_entry_t *) of1;
+ const counts_entry_t *entry2 = (const counts_entry_t *) of2;
return entry1->ident == entry2->ident && entry1->ctr == entry2->ctr;
}
@@ -157,7 +157,7 @@ htab_counts_entry_eq (const void *of1, const void *of2)
static void
htab_counts_entry_del (void *of)
{
- counts_entry_t *entry = of;
+ counts_entry_t *entry = (counts_entry_t *) of;
free (entry->counts);
free (entry);
@@ -342,7 +342,7 @@ get_coverage_counts (unsigned counter, unsigned expected,
elt.ident = current_function_funcdef_no + 1;
elt.ctr = counter;
- entry = htab_find (counts_hash, &elt);
+ entry = (counts_entry_t *) htab_find (counts_hash, &elt);
if (!entry)
{
warning (0, "no coverage for function %qs found", IDENTIFIER_POINTER
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 7a6646f7200..74cbf705797 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -28,6 +28,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "output.h"
@@ -4231,7 +4232,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
else if (t->kind == ck_identity)
break;
}
- pedwarn ("invalid conversion from %qT to %qT", TREE_TYPE (expr), totype);
+ pedwarn ("invalid conversion from %q#T to %q#T", TREE_TYPE (expr), totype);
if (fn)
pedwarn (" initializing argument %P of %qD", argnum, fn);
return cp_convert (totype, expr);
@@ -5067,7 +5068,7 @@ build_java_interface_fn_ref (tree fn, tree instance)
java_iface_lookup_fn
= builtin_function ("_Jv_LookupInterfaceMethodIdx",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
}
/* Look up the pointer to the runtime java.lang.Class object for `instance'.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index e4bf89e3ddc..d759ce4b4e2 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -27,6 +27,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "flags.h"
@@ -583,7 +584,7 @@ build_vtbl_ref_1 (tree instance, tree idx)
if (fixed_type && !cdtorp)
{
tree binfo = lookup_base (fixed_type, basetype,
- ba_unique | ba_quiet, NULL);
+ (enum base_access) (ba_unique | ba_quiet), NULL);
if (binfo)
vtbl = unshare_expr (BINFO_VTABLE (binfo));
}
@@ -4462,7 +4463,7 @@ warn_about_ambiguous_bases (tree t)
{
basetype = BINFO_TYPE (base_binfo);
- if (!lookup_base (t, basetype, ba_unique | ba_quiet, NULL))
+ if (!lookup_base (t, basetype, (enum base_access) (ba_unique | ba_quiet), NULL))
warning (0, "direct base %qT inaccessible in %qT due to ambiguity",
basetype, t);
}
@@ -4474,7 +4475,7 @@ warn_about_ambiguous_bases (tree t)
{
basetype = BINFO_TYPE (binfo);
- if (!lookup_base (t, basetype, ba_unique | ba_quiet, NULL))
+ if (!lookup_base (t, basetype, (enum base_access) (ba_unique | ba_quiet), NULL))
warning (OPT_Wextra, "virtual base %qT inaccessible in %qT due to ambiguity",
basetype, t);
}
@@ -4624,7 +4625,7 @@ layout_class_type (tree t, tree *virtuals_p)
if (DECL_C_BIT_FIELD (field)
&& INT_CST_LT (TYPE_SIZE (type), DECL_SIZE (field)))
{
- integer_type_kind itk;
+ int itk;
tree integer_type;
bool was_unnamed_p = false;
/* We must allocate the bits as if suitably aligned for the
@@ -5991,7 +5992,7 @@ instantiate_type (tree lhstype, tree rhs, tsubst_flags_t flags)
tsubst_flags_t flags_in = flags;
tree access_path = NULL_TREE;
- flags &= ~tf_ptrmem_ok;
+ flags = (tsubst_flags_t) (flags & ~tf_ptrmem_ok);
if (TREE_CODE (lhstype) == UNKNOWN_TYPE)
{
@@ -6112,7 +6113,7 @@ instantiate_type (tree lhstype, tree rhs, tsubst_flags_t flags)
case ADDR_EXPR:
{
if (PTRMEM_OK_P (rhs))
- flags |= tf_ptrmem_ok;
+ flags = (tsubst_flags_t) (flags | tf_ptrmem_ok);
return instantiate_type (lhstype, TREE_OPERAND (rhs, 0), flags);
}
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index bdb2edf2f41..9e51dd1f325 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -24,6 +24,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "c-common.h"
@@ -579,7 +580,7 @@ cp_gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p)
break;
default:
- ret = c_gimplify_expr (expr_p, pre_p, post_p);
+ ret = (enum gimplify_status) c_gimplify_expr (expr_p, pre_p, post_p);
break;
}
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c
index 60503278930..ce46c23e555 100644
--- a/gcc/cp/cp-lang.c
+++ b/gcc/cp/cp-lang.c
@@ -23,6 +23,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "c-common.h"
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index f40be969695..c0a122db259 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -23,6 +23,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "c-common.h"
diff --git a/gcc/cp/cp-tree-code.h b/gcc/cp/cp-tree-code.h
new file mode 100644
index 00000000000..0af15ae4186
--- /dev/null
+++ b/gcc/cp/cp-tree-code.h
@@ -0,0 +1,40 @@
+/* Definitions for C++ codes of tree nodes.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
+
+/* Codes of tree nodes */
+
+#define DEFTREECODE(SYM, STRING, TYPE, NARGS) SYM,
+
+enum tree_code {
+#include "tree.def"
+
+ LAST_AND_UNUSED_TREE_CODE, /* A convenient way to get a value for
+ NUM_TREE_CODES. */
+ C_DUMMY_TREE_CODE = LAST_AND_UNUSED_TREE_CODE,
+#include "c-common.def"
+ LAST_C_TREE_CODE,
+ CP_DUMMY_TREE_CODE = LAST_C_TREE_CODE,
+#include "cp-tree.def"
+ LAST_CPLUS_TREE_CODE
+};
+
+#undef DEFTREECODE
+
+#define TREE_CODE_DEFINED 1
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 43b0202c940..51cf66eeaad 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -841,15 +841,6 @@ struct language_function GTY(())
((NODE) == error_mark_node \
|| ((NODE) && TREE_TYPE ((NODE)) == error_mark_node))
-/* C++ language-specific tree codes. */
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
-enum cplus_tree_code {
- CP_DUMMY_TREE_CODE = LAST_C_TREE_CODE,
-#include "cp-tree.def"
- LAST_CPLUS_TREE_CODE
-};
-#undef DEFTREECODE
-
/* TRUE if a tree code represents a statement. */
extern bool statement_code_p[MAX_TREE_CODES];
@@ -956,10 +947,10 @@ enum languages { lang_c, lang_cplusplus, lang_java };
/* Nonzero iff TYPE is uniquely derived from PARENT. Ignores
accessibility. */
#define UNIQUELY_DERIVED_FROM_P(PARENT, TYPE) \
- (lookup_base ((TYPE), (PARENT), ba_unique | ba_quiet, NULL) != NULL_TREE)
+ (lookup_base ((TYPE), (PARENT), (enum base_access) (ba_unique | ba_quiet), NULL) != NULL_TREE)
/* Nonzero iff TYPE is publicly & uniquely derived from PARENT. */
#define PUBLICLY_UNIQUELY_DERIVED_P(PARENT, TYPE) \
- (lookup_base ((TYPE), (PARENT), ba_ignore_scope | ba_check | ba_quiet, \
+ (lookup_base ((TYPE), (PARENT), (enum base_access) (ba_ignore_scope | ba_check | ba_quiet), \
NULL) != NULL_TREE)
/* Gives the visibility specification for a class type. */
@@ -3943,7 +3934,7 @@ extern tree register_dtor_fn (tree);
extern tmpl_spec_kind current_tmpl_spec_kind (int);
extern tree cp_fname_init (const char *, tree *);
extern tree builtin_function (const char *name, tree type,
- int code,
+ enum built_in_function code,
enum built_in_class cl,
const char *libname,
tree attrs);
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 6f61218b232..378bc26a5a2 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -30,6 +30,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "flags.h"
#include "cp-tree.h"
@@ -951,7 +952,7 @@ convert_to_void (tree expr, const char *implicit)
{
tree e;
enum tree_code code;
- enum tree_code_class class;
+ enum tree_code_class tcc;
e = expr;
/* We might like to warn about (say) "(int) f()", as the
@@ -968,10 +969,10 @@ convert_to_void (tree expr, const char *implicit)
e = TREE_OPERAND (e, 0);
code = TREE_CODE (e);
- class = TREE_CODE_CLASS (code);
- if (class == tcc_comparison
- || class == tcc_unary
- || (class == tcc_binary
+ tcc = TREE_CODE_CLASS (code);
+ if (tcc == tcc_comparison
+ || tcc == tcc_unary
+ || (tcc == tcc_binary
&& !(code == MODIFY_EXPR
|| code == INIT_EXPR
|| code == PREDECREMENT_EXPR
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index 5ceca61a4cb..de7c7e76db0 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -24,6 +24,8 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "coretypes.h"
#include "tm.h"
#include "real.h"
+#include "cp-tree-code.h"
+#include "tree.h"
#include "cxx-pretty-print.h"
#include "cp-tree.h"
#include "toplev.h"
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index a2a650d4ef3..af002818a2d 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -32,6 +32,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "expr.h"
@@ -801,12 +802,12 @@ insert_block (tree block)
itself, calling F for each. The DATA is passed to F as well. */
static int
-walk_namespaces_r (tree namespace, walk_namespaces_fn f, void* data)
+walk_namespaces_r (tree ns, walk_namespaces_fn f, void* data)
{
int result = 0;
- tree current = NAMESPACE_LEVEL (namespace)->namespaces;
+ tree current = NAMESPACE_LEVEL (ns)->namespaces;
- result |= (*f) (namespace, data);
+ result |= (*f) (ns, data);
for (; current; current = TREE_CHAIN (current))
result |= walk_namespaces_r (current, f, data);
@@ -828,9 +829,9 @@ walk_namespaces (walk_namespaces_fn f, void* data)
wrapup_global_declarations for this NAMESPACE. */
int
-wrapup_globals_for_namespace (tree namespace, void* data)
+wrapup_globals_for_namespace (tree ns, void* data)
{
- struct cp_binding_level *level = NAMESPACE_LEVEL (namespace);
+ struct cp_binding_level *level = NAMESPACE_LEVEL (ns);
VEC(tree,gc) *statics = level->static_decls;
tree *vec = VEC_address (tree, statics);
int len = VEC_length (tree, statics);
@@ -2866,7 +2867,7 @@ make_typename_type (tree context, tree name, enum tag_types tag_type,
return lookup_template_class (t, TREE_OPERAND (fullname, 1),
NULL_TREE, context,
/*entering_scope=*/0,
- tf_warning_or_error | tf_user);
+ (enum tsubst_flags_t) (tf_warning_or_error | tf_user));
if (DECL_ARTIFICIAL (t) || !(complain & tf_keep_type_decl))
t = TREE_TYPE (t);
@@ -3376,12 +3377,12 @@ builtin_function_1 (const char* name,
tree type,
tree context,
enum built_in_function code,
- enum built_in_class class,
+ enum built_in_class cl,
const char* libname,
tree attrs)
{
tree decl = build_library_fn_1 (get_identifier (name), ERROR_MARK, type);
- DECL_BUILT_IN_CLASS (decl) = class;
+ DECL_BUILT_IN_CLASS (decl) = cl;
DECL_FUNCTION_CODE (decl) = code;
DECL_CONTEXT (decl) = context;
@@ -3427,7 +3428,7 @@ builtin_function_1 (const char* name,
tree
builtin_function (const char* name,
tree type,
- int code,
+ enum built_in_function code,
enum built_in_class cl,
const char* libname,
tree attrs)
@@ -7354,7 +7355,7 @@ grokdeclarator (const cp_declarator *declarator,
}
type_quals |= cp_type_quals (type);
type = cp_build_qualified_type_real
- (type, type_quals, ((typedef_decl && !DECL_ARTIFICIAL (typedef_decl)
+ (type, type_quals, (enum tsubst_flags_t) ((typedef_decl && !DECL_ARTIFICIAL (typedef_decl)
? tf_ignore_bad_quals : 0) | tf_warning_or_error));
/* We might have ignored or rejected some of the qualifiers. */
type_quals = cp_type_quals (type);
@@ -10031,7 +10032,7 @@ finish_enum (tree enumtype)
int lowprec;
int highprec;
int precision;
- integer_type_kind itk;
+ int itk;
tree underlying_type = NULL_TREE;
/* We built up the VALUES in reverse order. */
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 3b23638e71a..15519596399 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -32,6 +32,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "expr.h"
@@ -1597,7 +1598,7 @@ constrain_visibility (tree decl, int visibility)
else if (visibility > DECL_VISIBILITY (decl)
&& !DECL_VISIBILITY_SPECIFIED (decl))
{
- DECL_VISIBILITY (decl) = visibility;
+ DECL_VISIBILITY (decl) = (enum symbol_visibility) visibility;
return true;
}
return false;
diff --git a/gcc/cp/dump.c b/gcc/cp/dump.c
index c63cfe2bd89..8d94ff2e74f 100644
--- a/gcc/cp/dump.c
+++ b/gcc/cp/dump.c
@@ -24,6 +24,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "tree-dump.h"
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index f87355893cb..dfc26907838 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -23,6 +23,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "real.h"
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index f97ab063dde..dc83f4b503c 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -27,6 +27,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "expr.h"
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index 40390028dff..4d84e82363f 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -26,6 +26,7 @@ Boston, MA 02110-1301, USA. */
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "flags.h"
#include "expr.h"
@@ -109,7 +110,7 @@ cxx_expand_expr (tree exp, rtx target, enum machine_mode tmode, int modifier,
{
case PTRMEM_CST:
return expand_expr (cplus_expand_constant (exp),
- target, tmode, modifier);
+ target, tmode, (enum expand_modifier) modifier);
case OFFSET_REF:
/* Offset refs should not make it through to here. */
@@ -121,7 +122,7 @@ cxx_expand_expr (tree exp, rtx target, enum machine_mode tmode, int modifier,
case BASELINK:
return expand_expr (BASELINK_FUNCTIONS (exp), target, tmode,
- modifier);
+ (enum expand_modifier) modifier);
default:
return c_expand_expr (exp, target, tmode, modifier, alt_rtl);
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index d92df5f6eba..e0128a3abe8 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -23,6 +23,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "expr.h"
@@ -60,15 +61,15 @@ is_friend (tree type, tree supplicant)
tree friends = FRIEND_DECLS (list);
for (; friends ; friends = TREE_CHAIN (friends))
{
- tree friend = TREE_VALUE (friends);
+ tree fr = TREE_VALUE (friends);
- if (friend == NULL_TREE)
+ if (fr == NULL_TREE)
continue;
- if (supplicant == friend)
+ if (supplicant == fr)
return 1;
- if (is_specialization_of_friend (supplicant, friend))
+ if (is_specialization_of_friend (supplicant, fr))
return 1;
}
break;
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 0c85c0fe8fd..e4a85f038a5 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -26,6 +26,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "expr.h"
@@ -324,13 +325,13 @@ perform_member_init (tree member, tree init)
{
tree decl;
tree type = TREE_TYPE (member);
- bool explicit;
+ bool expl;
- explicit = (init != NULL_TREE);
+ expl = (init != NULL_TREE);
/* Effective C++ rule 12 requires that all data members be
initialized. */
- if (warn_ecpp && !explicit && TREE_CODE (type) != ARRAY_TYPE)
+ if (warn_ecpp && !expl && TREE_CODE (type) != ARRAY_TYPE)
warning (OPT_Weffc__, "%J%qD should be initialized in the member initialization "
"list", current_function_decl, member);
@@ -357,7 +358,7 @@ perform_member_init (tree member, tree init)
}
else if (TYPE_NEEDS_CONSTRUCTING (type))
{
- if (explicit
+ if (expl
&& TREE_CODE (type) == ARRAY_TYPE
&& init != NULL_TREE
&& TREE_CHAIN (init) == NULL_TREE
@@ -375,7 +376,7 @@ perform_member_init (tree member, tree init)
{
if (init == NULL_TREE)
{
- if (explicit)
+ if (expl)
{
init = build_default_init (type, /*nelts=*/NULL_TREE);
if (TREE_CODE (type) == REFERENCE_TYPE)
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index d14a1baa926..3f0f942bb22 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -28,6 +28,7 @@ Boston, MA 02110-1301, USA. */
#include "coretypes.h"
#include "tm.h"
#include "input.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "cpplib.h"
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 74ff8543eb4..b16d72868ea 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -50,6 +50,7 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "tm_p.h"
#include "cp-tree.h"
@@ -1019,19 +1020,19 @@ write_template_prefix (const tree node)
tree type = DECL_P (node) ? TREE_TYPE (node) : node;
tree context = CP_DECL_CONTEXT (decl);
tree template_info;
- tree template;
+ tree templ;
tree substitution;
MANGLE_TRACE_TREE ("template-prefix", node);
/* Find the template decl. */
if (decl_is_template_id (decl, &template_info))
- template = TI_TEMPLATE (template_info);
+ templ = TI_TEMPLATE (template_info);
else
{
gcc_assert (CLASSTYPE_TEMPLATE_ID_P (type));
- template = TYPE_TI_TEMPLATE (type);
+ templ = TYPE_TI_TEMPLATE (type);
}
/* For a member template, though, the template name for the
@@ -1057,21 +1058,21 @@ write_template_prefix (const tree node)
substitution candidate by a TREE_LIST whose purpose is `Outer<int>'
and whose value is `Outer<T>::Inner<U>'. */
if (TYPE_P (context))
- substitution = build_tree_list (context, template);
+ substitution = build_tree_list (context, templ);
else
- substitution = template;
+ substitution = templ;
if (find_substitution (substitution))
return;
/* In G++ 3.2, the name of the template template parameter was used. */
- if (TREE_CODE (TREE_TYPE (template)) == TEMPLATE_TEMPLATE_PARM
+ if (TREE_CODE (TREE_TYPE (templ)) == TEMPLATE_TEMPLATE_PARM
&& !abi_version_at_least (2))
G.need_abi_warning = true;
- if (TREE_CODE (TREE_TYPE (template)) == TEMPLATE_TEMPLATE_PARM
+ if (TREE_CODE (TREE_TYPE (templ)) == TEMPLATE_TEMPLATE_PARM
&& abi_version_at_least (2))
- write_template_param (TREE_TYPE (template));
+ write_template_param (TREE_TYPE (templ));
else
{
write_prefix (context);
@@ -2469,24 +2470,24 @@ write_template_param (const tree parm)
static void
write_template_template_param (const tree parm)
{
- tree template = NULL_TREE;
+ tree templ = NULL_TREE;
/* PARM, a TEMPLATE_TEMPLATE_PARM, is an instantiation of the
template template parameter. The substitution candidate here is
only the template. */
if (TREE_CODE (parm) == BOUND_TEMPLATE_TEMPLATE_PARM)
{
- template
+ templ
= TI_TEMPLATE (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (parm));
- if (find_substitution (template))
+ if (find_substitution (templ))
return;
}
/* <template-param> encodes only the template parameter position,
not its template arguments, which is fine here. */
write_template_param (parm);
- if (template)
- add_substitution (template);
+ if (templ)
+ add_substitution (templ);
}
/* Non-terminal <substitution>.
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index ded0af04716..03a0278a5dc 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -27,6 +27,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "rtl.h"
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 3016bb0ad56..79065342564 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -24,6 +24,7 @@ Boston, MA 02110-1301, USA. */
#include "coretypes.h"
#include "tm.h"
#include "flags.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "name-lookup.h"
@@ -3179,18 +3180,18 @@ namespace_ancestor (tree ns1, tree ns2)
/* Process a namespace-alias declaration. */
void
-do_namespace_alias (tree alias, tree namespace)
+do_namespace_alias (tree alias, tree ns)
{
- if (namespace == error_mark_node)
+ if (ns == error_mark_node)
return;
- gcc_assert (TREE_CODE (namespace) == NAMESPACE_DECL);
+ gcc_assert (TREE_CODE (ns) == NAMESPACE_DECL);
- namespace = ORIGINAL_NAMESPACE (namespace);
+ ns = ORIGINAL_NAMESPACE (ns);
/* Build the alias. */
alias = build_lang_decl (NAMESPACE_DECL, alias, void_type_node);
- DECL_NAMESPACE_ALIAS (alias) = namespace;
+ DECL_NAMESPACE_ALIAS (alias) = ns;
DECL_EXTERNAL (alias) = 1;
DECL_CONTEXT (alias) = FROB_CONTEXT (current_scope ());
pushdecl (alias);
@@ -3328,46 +3329,46 @@ do_toplevel_using_decl (tree decl, tree scope, tree name)
/* Process a using-directive. */
void
-do_using_directive (tree namespace)
+do_using_directive (tree ns)
{
tree context = NULL_TREE;
- if (namespace == error_mark_node)
+ if (ns == error_mark_node)
return;
- gcc_assert (TREE_CODE (namespace) == NAMESPACE_DECL);
+ gcc_assert (TREE_CODE (ns) == NAMESPACE_DECL);
if (building_stmt_tree ())
- add_stmt (build_stmt (USING_STMT, namespace));
- namespace = ORIGINAL_NAMESPACE (namespace);
+ add_stmt (build_stmt (USING_STMT, ns));
+ ns = ORIGINAL_NAMESPACE (ns);
if (!toplevel_bindings_p ())
{
- push_using_directive (namespace);
+ push_using_directive (ns);
context = current_scope ();
}
else
{
/* direct usage */
- add_using_namespace (current_namespace, namespace, 0);
+ add_using_namespace (current_namespace, ns, 0);
if (current_namespace != global_namespace)
context = current_namespace;
}
/* Emit debugging info. */
if (!processing_template_decl)
- (*debug_hooks->imported_module_or_decl) (namespace, context);
+ (*debug_hooks->imported_module_or_decl) (ns, context);
}
/* Deal with a using-directive seen by the parser. Currently we only
handle attributes here, since they cannot appear inside a template. */
void
-parse_using_directive (tree namespace, tree attribs)
+parse_using_directive (tree ns, tree attribs)
{
tree a;
- do_using_directive (namespace);
+ do_using_directive (ns);
for (a = attribs; a; a = TREE_CHAIN (a))
{
@@ -3376,14 +3377,14 @@ parse_using_directive (tree namespace, tree attribs)
{
if (!toplevel_bindings_p ())
error ("strong using only meaningful at namespace scope");
- else if (namespace != error_mark_node)
+ else if (ns != error_mark_node)
{
- if (!is_ancestor (current_namespace, namespace))
+ if (!is_ancestor (current_namespace, ns))
error ("current namespace %qD does not enclose strongly used namespace %qD",
- current_namespace, namespace);
- DECL_NAMESPACE_ASSOCIATIONS (namespace)
+ current_namespace, ns);
+ DECL_NAMESPACE_ASSOCIATIONS (ns)
= tree_cons (current_namespace, 0,
- DECL_NAMESPACE_ASSOCIATIONS (namespace));
+ DECL_NAMESPACE_ASSOCIATIONS (ns));
}
}
else
@@ -3478,13 +3479,13 @@ merge_functions (tree s1, tree s2)
XXX I don't want to repeat the entire duplicate_decls here */
static void
-ambiguous_decl (tree name, struct scope_binding *old, cxx_binding *new,
+ambiguous_decl (tree name, struct scope_binding *old, cxx_binding *fresh,
int flags)
{
tree val, type;
gcc_assert (old != NULL);
/* Copy the value. */
- val = new->value;
+ val = fresh->value;
if (val)
switch (TREE_CODE (val))
{
@@ -3523,12 +3524,12 @@ ambiguous_decl (tree name, struct scope_binding *old, cxx_binding *new,
else
{
old->value = tree_cons (NULL_TREE, old->value,
- build_tree_list (NULL_TREE, new->value));
+ build_tree_list (NULL_TREE, fresh->value));
TREE_TYPE (old->value) = error_mark_node;
}
}
/* ... and copy the type. */
- type = new->type;
+ type = fresh->type;
if (LOOKUP_NAMESPACES_ONLY (flags))
type = NULL_TREE;
if (!old->type)
@@ -4600,21 +4601,21 @@ arg_assoc (struct arg_lookup *k, tree n)
If T is a template-id, its associated namespaces and classes
are the namespace in which the template is defined; for
member templates, the member template's class... */
- tree template = TREE_OPERAND (n, 0);
+ tree templ = TREE_OPERAND (n, 0);
tree args = TREE_OPERAND (n, 1);
tree ctx;
int ix;
- if (TREE_CODE (template) == COMPONENT_REF)
- template = TREE_OPERAND (template, 1);
+ if (TREE_CODE (templ) == COMPONENT_REF)
+ templ = TREE_OPERAND (templ, 1);
/* First, the template. There may actually be more than one if
this is an overloaded function template. But, in that case,
we only need the first; all the functions will be in the same
namespace. */
- template = OVL_CURRENT (template);
+ templ = OVL_CURRENT (templ);
- ctx = CP_DECL_CONTEXT (template);
+ ctx = CP_DECL_CONTEXT (templ);
if (TREE_CODE (ctx) == NAMESPACE_DECL)
{
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index 7ac24376ed1..a7f1de603ee 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -24,6 +24,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "rtl.h"
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 8d25db680fc..bb3455609a4 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -27,6 +27,7 @@
#include "dyn-string.h"
#include "varray.h"
#include "cpplib.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "c-pragma.h"
@@ -415,7 +416,7 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer ATTRIBUTE_UNUSED ,
/* Mark this token as a keyword. */
token->type = CPP_KEYWORD;
/* Record which keyword. */
- token->keyword = C_RID_CODE (token->value);
+ token->keyword = (enum rid) C_RID_CODE (token->value);
/* Update the value. Some keywords are mapped to particular
entities, rather than simply having the value of the
corresponding IDENTIFIER_NODE. For example, `__const' is
@@ -442,13 +443,13 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer ATTRIBUTE_UNUSED ,
case RID_THROW: token->keyword = RID_AT_THROW; break;
case RID_TRY: token->keyword = RID_AT_TRY; break;
case RID_CATCH: token->keyword = RID_AT_CATCH; break;
- default: token->keyword = C_RID_CODE (token->value);
+ default: token->keyword = (enum rid) C_RID_CODE (token->value);
}
}
else if (token->type == CPP_PRAGMA)
{
/* We smuggled the cpp_token->u.pragma value in an INTEGER_CST. */
- token->pragma_kind = TREE_INT_CST_LOW (token->value);
+ token->pragma_kind = (enum pragma_kind) TREE_INT_CST_LOW (token->value);
token->value = NULL;
}
}
@@ -2013,7 +2014,7 @@ cp_parser_check_decl_spec (cp_decl_specifier_seq *decl_specs)
{
cp_decl_spec ds;
- for (ds = ds_first; ds != ds_last; ++ds)
+ for (ds = ds_first; ds != ds_last; ds = (cp_decl_spec) (ds + 1))
{
unsigned count = decl_specs->specs[(int)ds];
if (count < 2)
@@ -4947,7 +4948,7 @@ cp_parser_unary_expression (cp_parser *parser, bool address_p, bool cast_p)
tree operand;
enum tree_code op;
- op = keyword == RID_ALIGNOF ? ALIGNOF_EXPR : SIZEOF_EXPR;
+ op = (keyword == RID_ALIGNOF ? ALIGNOF_EXPR : SIZEOF_EXPR);
/* Consume the token. */
cp_lexer_consume_token (parser->lexer);
/* Parse the operand. */
@@ -5744,7 +5745,7 @@ cp_parser_binary_expression (cp_parser* parser, bool cast_p)
(`PREC_ADDITIVE_EXPRESSION'). TOKEN is the CPP_PLUS token,
which will be used to actually build the additive expression. */
--sp;
- prec = sp->prec;
+ prec = (enum cp_parser_prec) sp->prec;
tree_type = sp->tree_type;
rhs = lhs;
lhs = sp->lhs;
@@ -7657,7 +7658,7 @@ cp_parser_decl_specifier_seq (cp_parser* parser,
int' to be considered a decl-specifier-seq, and issue the
error message later. */
if (type_spec && !is_cv_qualifier)
- flags |= CP_PARSER_FLAGS_NO_USER_DEFINED_TYPES;
+ flags = (enum cp_parser_flags) (flags | CP_PARSER_FLAGS_NO_USER_DEFINED_TYPES);
/* A constructor declarator cannot follow a type-specifier. */
if (type_spec)
{
@@ -7674,7 +7675,7 @@ cp_parser_decl_specifier_seq (cp_parser* parser,
decl_specs->any_specifiers_p = true;
/* After we see one decl-specifier, further decl-specifiers are
always optional. */
- flags |= CP_PARSER_FLAGS_OPTIONAL;
+ flags = (enum cp_parser_flags) (flags | CP_PARSER_FLAGS_OPTIONAL);
}
cp_parser_check_decl_spec (decl_specs);
@@ -8738,7 +8739,7 @@ cp_parser_template_id (cp_parser *parser,
bool check_dependency_p,
bool is_declaration)
{
- tree template;
+ tree templ;
tree arguments;
tree template_id;
cp_token_position start_of_id = 0;
@@ -8783,14 +8784,14 @@ cp_parser_template_id (cp_parser *parser,
/* Parse the template-name. */
is_identifier = false;
- template = cp_parser_template_name (parser, template_keyword_p,
+ templ = cp_parser_template_name (parser, template_keyword_p,
check_dependency_p,
is_declaration,
&is_identifier);
- if (template == error_mark_node || is_identifier)
+ if (templ == error_mark_node || is_identifier)
{
pop_deferring_access_checks ();
- return template;
+ return templ;
}
/* If we find the sequence `[:' after a template-name, it's probably
@@ -8849,10 +8850,10 @@ cp_parser_template_id (cp_parser *parser,
}
/* Build a representation of the specialization. */
- if (TREE_CODE (template) == IDENTIFIER_NODE)
- template_id = build_min_nt (TEMPLATE_ID_EXPR, template, arguments);
- else if (DECL_CLASS_TEMPLATE_P (template)
- || DECL_TEMPLATE_TEMPLATE_PARM_P (template))
+ if (TREE_CODE (templ) == IDENTIFIER_NODE)
+ template_id = build_min_nt (TEMPLATE_ID_EXPR, templ, arguments);
+ else if (DECL_CLASS_TEMPLATE_P (templ)
+ || DECL_TEMPLATE_TEMPLATE_PARM_P (templ))
{
bool entering_scope;
/* In "template <typename T> ... A<T>::", A<T> is the abstract A
@@ -8864,17 +8865,17 @@ cp_parser_template_id (cp_parser *parser,
&& cp_lexer_next_token_is (parser->lexer,
CPP_SCOPE));
template_id
- = finish_template_type (template, arguments, entering_scope);
+ = finish_template_type (templ, arguments, entering_scope);
}
else
{
/* If it's not a class-template or a template-template, it should be
a function-template. */
- gcc_assert ((DECL_FUNCTION_TEMPLATE_P (template)
- || TREE_CODE (template) == OVERLOAD
- || BASELINK_P (template)));
+ gcc_assert ((DECL_FUNCTION_TEMPLATE_P (templ)
+ || TREE_CODE (templ) == OVERLOAD
+ || BASELINK_P (templ)));
- template_id = lookup_template_function (template, arguments);
+ template_id = lookup_template_function (templ, arguments);
}
/* Retrieve any deferred checks. Do not pop this access checks yet
@@ -12133,7 +12134,7 @@ cp_parser_type_specifier_seq (cp_parser* parser,
then add a semantic restriction that if any decl-specifiers
that are not type-specifiers appear, the program is invalid. */
if (is_condition && !is_cv_qualifier)
- flags |= CP_PARSER_FLAGS_NO_USER_DEFINED_TYPES;
+ flags = (enum cp_parser_flags) (flags | CP_PARSER_FLAGS_NO_USER_DEFINED_TYPES);
}
cp_parser_check_decl_spec (type_specifier_seq);
@@ -17266,7 +17267,7 @@ cp_parser_objc_protocol_qualifiers (cp_parser* parser)
static tree
cp_parser_objc_typename (cp_parser* parser)
{
- tree typename = NULL_TREE;
+ tree tname = NULL_TREE;
if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN))
{
@@ -17281,10 +17282,10 @@ cp_parser_objc_typename (cp_parser* parser)
cp_type = cp_parser_type_id (parser);
cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'");
- typename = build_tree_list (proto_quals, cp_type);
+ tname = build_tree_list (proto_quals, cp_type);
}
- return typename;
+ return tname;
}
/* Check to see if TYPE refers to an Objective-C selector name. */
@@ -17341,7 +17342,7 @@ cp_parser_objc_method_keyword_params (cp_parser* parser)
while (cp_parser_objc_selector_p (token->type) || token->type == CPP_COLON)
{
- tree selector = NULL_TREE, typename, identifier;
+ tree selector = NULL_TREE, tname, identifier;
if (token->type != CPP_COLON)
selector = cp_parser_objc_selector (parser);
@@ -17353,13 +17354,13 @@ cp_parser_objc_method_keyword_params (cp_parser* parser)
maybe_unary_selector_p = false;
cp_parser_require (parser, CPP_COLON, "`:'");
- typename = cp_parser_objc_typename (parser);
+ tname = cp_parser_objc_typename (parser);
identifier = cp_parser_identifier (parser);
params
= chainon (params,
objc_build_keyword_decl (selector,
- typename,
+ tname,
identifier));
token = cp_lexer_peek_token (parser->lexer);
@@ -18143,7 +18144,7 @@ cp_parser_omp_clause_default (cp_parser *parser, tree list)
if (kind == OMP_CLAUSE_DEFAULT_UNSPECIFIED)
return list;
- check_no_duplicate_clause (list, OMP_CLAUSE_DEFAULT, "default");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_DEFAULT, "default");
c = build_omp_clause (OMP_CLAUSE_DEFAULT);
OMP_CLAUSE_CHAIN (c) = list;
OMP_CLAUSE_DEFAULT_KIND (c) = kind;
@@ -18170,7 +18171,7 @@ cp_parser_omp_clause_if (cp_parser *parser, tree list)
/*or_comma=*/false,
/*consume_paren=*/true);
- check_no_duplicate_clause (list, OMP_CLAUSE_IF, "if");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_IF, "if");
c = build_omp_clause (OMP_CLAUSE_IF);
OMP_CLAUSE_IF_EXPR (c) = t;
@@ -18187,7 +18188,7 @@ cp_parser_omp_clause_nowait (cp_parser *parser ATTRIBUTE_UNUSED, tree list)
{
tree c;
- check_no_duplicate_clause (list, OMP_CLAUSE_NOWAIT, "nowait");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_NOWAIT, "nowait");
c = build_omp_clause (OMP_CLAUSE_NOWAIT);
OMP_CLAUSE_CHAIN (c) = list;
@@ -18213,7 +18214,7 @@ cp_parser_omp_clause_num_threads (cp_parser *parser, tree list)
/*or_comma=*/false,
/*consume_paren=*/true);
- check_no_duplicate_clause (list, OMP_CLAUSE_NUM_THREADS, "num_threads");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_NUM_THREADS, "num_threads");
c = build_omp_clause (OMP_CLAUSE_NUM_THREADS);
OMP_CLAUSE_NUM_THREADS_EXPR (c) = t;
@@ -18230,7 +18231,7 @@ cp_parser_omp_clause_ordered (cp_parser *parser ATTRIBUTE_UNUSED, tree list)
{
tree c;
- check_no_duplicate_clause (list, OMP_CLAUSE_ORDERED, "ordered");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_ORDERED, "ordered");
c = build_omp_clause (OMP_CLAUSE_ORDERED);
OMP_CLAUSE_CHAIN (c) = list;
@@ -18370,7 +18371,7 @@ cp_parser_omp_clause_schedule (cp_parser *parser, tree list)
else if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "`,' or `)'"))
goto resync_fail;
- check_no_duplicate_clause (list, OMP_CLAUSE_SCHEDULE, "schedule");
+ check_no_duplicate_clause (list, (enum tree_code) OMP_CLAUSE_SCHEDULE, "schedule");
OMP_CLAUSE_CHAIN (c) = list;
return c;
@@ -18661,7 +18662,7 @@ static void
cp_parser_omp_flush (cp_parser *parser, cp_token *pragma_tok)
{
if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN))
- (void) cp_parser_omp_var_list (parser, 0, NULL);
+ (void) cp_parser_omp_var_list (parser, OMP_CLAUSE_ERROR, NULL);
cp_parser_require_pragma_eol (parser, pragma_tok);
finish_omp_flush ();
@@ -19046,7 +19047,7 @@ cp_parser_omp_threadprivate (cp_parser *parser, cp_token *pragma_tok)
{
tree vars;
- vars = cp_parser_omp_var_list (parser, 0, NULL);
+ vars = cp_parser_omp_var_list (parser, OMP_CLAUSE_ERROR, NULL);
cp_parser_require_pragma_eol (parser, pragma_tok);
if (!targetm.have_tls)
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 9a4626415c8..1241e7d78d7 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -31,6 +31,7 @@ Boston, MA 02110-1301, USA. */
#include "coretypes.h"
#include "tm.h"
#include "obstack.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "pointer-set.h"
#include "flags.h"
@@ -961,7 +962,7 @@ is_specialization_of (tree decl, tree tmpl)
FRIEND according to [temp.friend]. */
bool
-is_specialization_of_friend (tree decl, tree friend)
+is_specialization_of_friend (tree decl, tree fr)
{
bool need_template = true;
int template_depth;
@@ -972,23 +973,23 @@ is_specialization_of_friend (tree decl, tree friend)
/* For [temp.friend/6] when FRIEND is an ordinary member function
of a template class, we want to check if DECL is a specialization
if this. */
- if (TREE_CODE (friend) == FUNCTION_DECL
- && DECL_TEMPLATE_INFO (friend)
- && !DECL_USE_TEMPLATE (friend))
+ if (TREE_CODE (fr) == FUNCTION_DECL
+ && DECL_TEMPLATE_INFO (fr)
+ && !DECL_USE_TEMPLATE (fr))
{
/* We want a TEMPLATE_DECL for `is_specialization_of'. */
- friend = DECL_TI_TEMPLATE (friend);
+ fr = DECL_TI_TEMPLATE (fr);
need_template = false;
}
- else if (TREE_CODE (friend) == TEMPLATE_DECL
- && !PRIMARY_TEMPLATE_P (friend))
+ else if (TREE_CODE (fr) == TEMPLATE_DECL
+ && !PRIMARY_TEMPLATE_P (fr))
need_template = false;
/* There is nothing to do if this is not a template friend. */
- if (TREE_CODE (friend) != TEMPLATE_DECL)
+ if (TREE_CODE (fr) != TEMPLATE_DECL)
return false;
- if (is_specialization_of (decl, friend))
+ if (is_specialization_of (decl, fr))
return true;
/* [temp.friend/6]
@@ -1011,11 +1012,11 @@ is_specialization_of_friend (tree decl, tree friend)
nonzero. To determine if DECL is a friend of FRIEND, we first
check if the enclosing class is a specialization of another. */
- template_depth = template_class_depth (DECL_CONTEXT (friend));
+ template_depth = template_class_depth (DECL_CONTEXT (fr));
if (template_depth
&& DECL_CLASS_SCOPE_P (decl)
&& is_specialization_of (TYPE_NAME (DECL_CONTEXT (decl)),
- CLASSTYPE_TI_TEMPLATE (DECL_CONTEXT (friend))))
+ CLASSTYPE_TI_TEMPLATE (DECL_CONTEXT (fr))))
{
/* Next, we check the members themselves. In order to handle
a few tricky cases, such as when FRIEND's are
@@ -1068,7 +1069,7 @@ is_specialization_of_friend (tree decl, tree friend)
{
/* If both are templates, check template parameter list. */
tree friend_parms
- = tsubst_template_parms (DECL_TEMPLATE_PARMS (friend),
+ = tsubst_template_parms (DECL_TEMPLATE_PARMS (fr),
args, tf_none);
if (!comp_template_parms
(DECL_TEMPLATE_PARMS (DECL_TI_TEMPLATE (decl)),
@@ -1080,7 +1081,7 @@ is_specialization_of_friend (tree decl, tree friend)
else
decl_type = TREE_TYPE (decl);
- friend_type = tsubst_function_type (TREE_TYPE (friend), args,
+ friend_type = tsubst_function_type (TREE_TYPE (fr), args,
tf_none, NULL_TREE);
if (friend_type == error_mark_node)
return false;
@@ -1093,7 +1094,7 @@ is_specialization_of_friend (tree decl, tree friend)
`this' parameter. */
friend_args_type = TYPE_ARG_TYPES (friend_type);
decl_args_type = TYPE_ARG_TYPES (decl_type);
- if (DECL_NONSTATIC_MEMBER_FUNCTION_P (friend))
+ if (DECL_NONSTATIC_MEMBER_FUNCTION_P (fr))
friend_args_type = TREE_CHAIN (friend_args_type);
if (DECL_NONSTATIC_MEMBER_FUNCTION_P (decl))
decl_args_type = TREE_CHAIN (decl_args_type);
@@ -1120,12 +1121,12 @@ is_specialization_of_friend (tree decl, tree friend)
/* If both are templates, check the name of the two
TEMPLATE_DECL's first because is_friend didn't. */
if (DECL_NAME (CLASSTYPE_TI_TEMPLATE (decl_type))
- != DECL_NAME (friend))
+ != DECL_NAME (fr))
return false;
/* Now check template parameter list. */
friend_parms
- = tsubst_template_parms (DECL_TEMPLATE_PARMS (friend),
+ = tsubst_template_parms (DECL_TEMPLATE_PARMS (fr),
args, tf_none);
return comp_template_parms
(DECL_TEMPLATE_PARMS (CLASSTYPE_TI_TEMPLATE (decl_type)),
@@ -1133,7 +1134,7 @@ is_specialization_of_friend (tree decl, tree friend)
}
else
return (DECL_NAME (decl)
- == DECL_NAME (friend));
+ == DECL_NAME (fr));
}
}
return false;
@@ -2413,7 +2414,7 @@ process_template_parm (tree list, tree parm, bool is_non_type)
The top-level cv-qualifiers on the template-parameter are
ignored when determining its type. */
TREE_TYPE (parm) = TYPE_MAIN_VARIANT (TREE_TYPE (parm));
- if (invalid_nontype_parm_type_p (TREE_TYPE (parm), 1))
+ if (invalid_nontype_parm_type_p (TREE_TYPE (parm), tf_error))
{
err_parm_list = build_tree_list (defval, parm);
TREE_VALUE (err_parm_list) = error_mark_node;
@@ -3987,7 +3988,7 @@ convert_template_argument (tree parm,
arg = make_typename_type (TREE_OPERAND (arg, 0),
TREE_OPERAND (arg, 1),
typename_type,
- complain & tf_error);
+ (tsubst_flags_t) (complain & tf_error));
is_type = 1;
}
if (is_type != requires_type)
@@ -4479,7 +4480,7 @@ lookup_template_class (tree d1,
int entering_scope,
tsubst_flags_t complain)
{
- tree template = NULL_TREE, parmlist;
+ tree templ = NULL_TREE, parmlist;
tree t;
timevar_push (TV_NAME_LOOKUP);
@@ -4488,18 +4489,18 @@ lookup_template_class (tree d1,
{
tree value = innermost_non_namespace_value (d1);
if (value && DECL_TEMPLATE_TEMPLATE_PARM_P (value))
- template = value;
+ templ = value;
else
{
if (context)
push_decl_namespace (context);
- template = lookup_name (d1);
- template = maybe_get_template_decl_from_type_decl (template);
+ templ = lookup_name (d1);
+ templ = maybe_get_template_decl_from_type_decl (templ);
if (context)
pop_decl_namespace ();
}
- if (template)
- context = DECL_CONTEXT (template);
+ if (templ)
+ context = DECL_CONTEXT (templ);
}
else if (TREE_CODE (d1) == TYPE_DECL && IS_AGGR_TYPE (TREE_TYPE (d1)))
{
@@ -4512,37 +4513,37 @@ lookup_template_class (tree d1,
if (CLASSTYPE_TEMPLATE_INFO (type))
{
- template = CLASSTYPE_TI_TEMPLATE (type);
- d1 = DECL_NAME (template);
+ templ = CLASSTYPE_TI_TEMPLATE (type);
+ d1 = DECL_NAME (templ);
}
}
else if (TREE_CODE (d1) == ENUMERAL_TYPE
|| (TYPE_P (d1) && IS_AGGR_TYPE (d1)))
{
- template = TYPE_TI_TEMPLATE (d1);
- d1 = DECL_NAME (template);
+ templ = TYPE_TI_TEMPLATE (d1);
+ d1 = DECL_NAME (templ);
}
else if (TREE_CODE (d1) == TEMPLATE_DECL
&& TREE_CODE (DECL_TEMPLATE_RESULT (d1)) == TYPE_DECL)
{
- template = d1;
- d1 = DECL_NAME (template);
- context = DECL_CONTEXT (template);
+ templ = d1;
+ d1 = DECL_NAME (templ);
+ context = DECL_CONTEXT (templ);
}
/* Issue an error message if we didn't find a template. */
- if (! template)
+ if (! templ)
{
if (complain & tf_error)
error ("%qT is not a template", d1);
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, error_mark_node);
}
- if (TREE_CODE (template) != TEMPLATE_DECL
+ if (TREE_CODE (templ) != TEMPLATE_DECL
/* Make sure it's a user visible template, if it was named by
the user. */
- || ((complain & tf_user) && !DECL_TEMPLATE_PARM_P (template)
- && !PRIMARY_TEMPLATE_P (template)))
+ || ((complain & tf_user) && !DECL_TEMPLATE_PARM_P (templ)
+ && !PRIMARY_TEMPLATE_P (templ)))
{
if (complain & tf_error)
{
@@ -4553,9 +4554,9 @@ lookup_template_class (tree d1,
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, error_mark_node);
}
- complain &= ~tf_user;
+ complain = (tsubst_flags_t) (complain & ~tf_user);
- if (DECL_TEMPLATE_TEMPLATE_PARM_P (template))
+ if (DECL_TEMPLATE_TEMPLATE_PARM_P (templ))
{
/* Create a new TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM node to store
template arguments */
@@ -4563,7 +4564,7 @@ lookup_template_class (tree d1,
tree parm;
tree arglist2;
- parmlist = DECL_INNERMOST_TEMPLATE_PARMS (template);
+ parmlist = DECL_INNERMOST_TEMPLATE_PARMS (templ);
/* Consider an example where a template template parameter declared as
@@ -4584,21 +4585,21 @@ lookup_template_class (tree d1,
if (current_template_parms)
arglist = add_to_template_args (current_template_args (), arglist);
- arglist2 = coerce_template_parms (parmlist, arglist, template,
+ arglist2 = coerce_template_parms (parmlist, arglist, templ,
complain,
/*require_all_args=*/true,
/*use_default_args=*/true);
if (arglist2 == error_mark_node
|| (!uses_template_parms (arglist2)
- && check_instantiated_args (template, arglist2, complain)))
+ && check_instantiated_args (templ, arglist2, complain)))
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, error_mark_node);
- parm = bind_template_template_parm (TREE_TYPE (template), arglist2);
+ parm = bind_template_template_parm (TREE_TYPE (templ), arglist2);
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, parm);
}
else
{
- tree template_type = TREE_TYPE (template);
+ tree template_type = TREE_TYPE (templ);
tree gen_tmpl;
tree type_decl;
tree found = NULL_TREE;
@@ -4606,7 +4607,7 @@ lookup_template_class (tree d1,
int parm_depth;
int is_partial_instantiation;
- gen_tmpl = most_general_template (template);
+ gen_tmpl = most_general_template (templ);
parmlist = DECL_TEMPLATE_PARMS (gen_tmpl);
parm_depth = TMPL_PARMS_DEPTH (parmlist);
arg_depth = TMPL_ARGS_DEPTH (arglist);
@@ -4626,7 +4627,7 @@ lookup_template_class (tree d1,
<class U> struct S1<T>::S2'. We must fill in the missing
arguments. */
arglist
- = add_outermost_template_args (TYPE_TI_ARGS (TREE_TYPE (template)),
+ = add_outermost_template_args (TYPE_TI_ARGS (TREE_TYPE (templ)),
arglist);
arg_depth = TMPL_ARGS_DEPTH (arglist);
}
@@ -4636,7 +4637,7 @@ lookup_template_class (tree d1,
/* From here on, we're only interested in the most general
template. */
- template = gen_tmpl;
+ templ = gen_tmpl;
/* Calculate the BOUND_ARGS. These will be the args that are
actually tsubst'd into the definition to create the
@@ -4650,12 +4651,12 @@ lookup_template_class (tree d1,
tree bound_args = make_tree_vec (parm_depth);
for (i = saved_depth,
- t = DECL_TEMPLATE_PARMS (template);
+ t = DECL_TEMPLATE_PARMS (templ);
i > 0 && t != NULL_TREE;
--i, t = TREE_CHAIN (t))
{
tree a = coerce_template_parms (TREE_VALUE (t),
- arglist, template,
+ arglist, templ,
complain,
/*require_all_args=*/true,
/*use_default_args=*/true);
@@ -4686,7 +4687,7 @@ lookup_template_class (tree d1,
arglist
= coerce_template_parms (INNERMOST_TEMPLATE_PARMS (parmlist),
INNERMOST_TEMPLATE_ARGS (arglist),
- template,
+ templ,
complain,
/*require_all_args=*/true,
/*use_default_args=*/true);
@@ -4708,7 +4709,7 @@ lookup_template_class (tree d1,
{
found = template_type;
- if (!entering_scope && PRIMARY_TEMPLATE_P (template))
+ if (!entering_scope && PRIMARY_TEMPLATE_P (templ))
{
tree ctx;
@@ -4730,7 +4731,7 @@ lookup_template_class (tree d1,
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, found);
/* If we already have this specialization, return it. */
- found = retrieve_specialization (template, arglist,
+ found = retrieve_specialization (templ, arglist,
/*class_specializations_p=*/false);
if (found)
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, found);
@@ -4744,22 +4745,22 @@ lookup_template_class (tree d1,
/* If the deduced arguments are invalid, then the binding
failed. */
if (!is_partial_instantiation
- && check_instantiated_args (template,
+ && check_instantiated_args (templ,
INNERMOST_TEMPLATE_ARGS (arglist),
complain))
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, error_mark_node);
if (!is_partial_instantiation
- && !PRIMARY_TEMPLATE_P (template)
- && TREE_CODE (CP_DECL_CONTEXT (template)) == NAMESPACE_DECL)
+ && !PRIMARY_TEMPLATE_P (templ)
+ && TREE_CODE (CP_DECL_CONTEXT (templ)) == NAMESPACE_DECL)
{
- found = xref_tag_from_type (TREE_TYPE (template),
- DECL_NAME (template),
+ found = xref_tag_from_type (TREE_TYPE (templ),
+ DECL_NAME (templ),
/*tag_scope=*/ts_global);
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, found);
}
- context = tsubst (DECL_CONTEXT (template), arglist,
+ context = tsubst (DECL_CONTEXT (templ), arglist,
complain, in_decl);
if (!context)
context = global_namespace;
@@ -4789,7 +4790,7 @@ lookup_template_class (tree d1,
/* A local class. Make sure the decl gets registered properly. */
if (context == current_function_decl)
- pushtag (DECL_NAME (template), t, /*tag_scope=*/ts_current);
+ pushtag (DECL_NAME (templ), t, /*tag_scope=*/ts_current);
}
/* If we called start_enum or pushtag above, this information
@@ -4798,7 +4799,7 @@ lookup_template_class (tree d1,
{
TYPE_CONTEXT (t) = FROB_CONTEXT (context);
- type_decl = create_implicit_typedef (DECL_NAME (template), t);
+ type_decl = create_implicit_typedef (DECL_NAME (templ), t);
DECL_CONTEXT (type_decl) = TYPE_CONTEXT (t);
TYPE_STUB_DECL (t) = type_decl;
DECL_SOURCE_LOCATION (type_decl)
@@ -4812,7 +4813,7 @@ lookup_template_class (tree d1,
TREE_PROTECTED (type_decl)
= TREE_PROTECTED (TYPE_STUB_DECL (template_type));
DECL_IN_SYSTEM_HEADER (type_decl)
- = DECL_IN_SYSTEM_HEADER (template);
+ = DECL_IN_SYSTEM_HEADER (templ);
if (CLASSTYPE_VISIBILITY_SPECIFIED (template_type))
{
DECL_VISIBILITY_SPECIFIED (type_decl) = 1;
@@ -4823,15 +4824,15 @@ lookup_template_class (tree d1,
template is the immediate parent if this is a full
instantiation. */
if (parm_depth == 1 || is_partial_instantiation
- || !PRIMARY_TEMPLATE_P (template))
+ || !PRIMARY_TEMPLATE_P (templ))
/* This case is easy; there are no member templates involved. */
- found = template;
+ found = templ;
else
{
/* This is a full instantiation of a member template. Look
for a partial instantiation of which this is an instance. */
- for (found = DECL_TEMPLATE_INSTANTIATIONS (template);
+ for (found = DECL_TEMPLATE_INSTANTIATIONS (templ);
found; found = TREE_CHAIN (found))
{
int success;
@@ -4876,15 +4877,15 @@ lookup_template_class (tree d1,
Create the partial instantiation.
*/
TREE_VEC_LENGTH (arglist)--;
- found = tsubst (template, arglist, complain, NULL_TREE);
+ found = tsubst (templ, arglist, complain, NULL_TREE);
TREE_VEC_LENGTH (arglist)++;
}
}
SET_TYPE_TEMPLATE_INFO (t, tree_cons (found, arglist, NULL_TREE));
- DECL_TEMPLATE_INSTANTIATIONS (template)
+ DECL_TEMPLATE_INSTANTIATIONS (templ)
= tree_cons (arglist, t,
- DECL_TEMPLATE_INSTANTIATIONS (template));
+ DECL_TEMPLATE_INSTANTIATIONS (templ));
if (TREE_CODE (t) == ENUMERAL_TYPE
&& !is_partial_instantiation)
@@ -5197,7 +5198,7 @@ static int last_template_error_tick;
static int
push_tinst_level (tree d)
{
- tree new;
+ tree fresh;
if (tinst_depth >= max_tinst_depth)
{
@@ -5217,12 +5218,12 @@ push_tinst_level (tree d)
return 0;
}
- new = make_node (TINST_LEVEL);
- TINST_DECL (new) = d;
- TINST_LOCATION (new) = input_location;
- TINST_IN_SYSTEM_HEADER_P (new) = in_system_header;
- TREE_CHAIN (new) = current_tinst_level;
- current_tinst_level = new;
+ fresh = make_node (TINST_LEVEL);
+ TINST_DECL (fresh) = d;
+ TINST_LOCATION (fresh) = input_location;
+ TINST_IN_SYSTEM_HEADER_P (fresh) = in_system_header;
+ TREE_CHAIN (fresh) = current_tinst_level;
+ current_tinst_level = fresh;
++tinst_depth;
#ifdef GATHER_STATISTICS
@@ -5651,7 +5652,7 @@ can_complete_type_without_circularity (tree type)
tree
instantiate_class_template (tree type)
{
- tree template, args, pattern, t, member;
+ tree templ, args, pattern, t, member;
tree typedecl;
tree pbinfo;
tree base_list;
@@ -5665,12 +5666,12 @@ instantiate_class_template (tree type)
return type;
/* Figure out which template is being instantiated. */
- template = most_general_template (CLASSTYPE_TI_TEMPLATE (type));
- gcc_assert (TREE_CODE (template) == TEMPLATE_DECL);
+ templ = most_general_template (CLASSTYPE_TI_TEMPLATE (type));
+ gcc_assert (TREE_CODE (templ) == TEMPLATE_DECL);
/* Determine what specialization of the original template to
instantiate. */
- t = most_specialized_class (type, template);
+ t = most_specialized_class (type, templ);
if (t == error_mark_node)
{
TYPE_BEING_DEFINED (type) = 1;
@@ -5693,7 +5694,7 @@ instantiate_class_template (tree type)
}
else
{
- pattern = TREE_TYPE (template);
+ pattern = TREE_TYPE (templ);
args = CLASSTYPE_TI_ARGS (type);
}
@@ -6080,7 +6081,7 @@ instantiate_class_template (tree type)
/* Now that the class is complete, instantiate default arguments for
any member functions. We don't do this earlier because the
default arguments may reference members of the class. */
- if (!PRIMARY_TEMPLATE_P (template))
+ if (!PRIMARY_TEMPLATE_P (templ))
for (t = TYPE_METHODS (type); t; t = TREE_CHAIN (t))
if (TREE_CODE (t) == FUNCTION_DECL
/* Implicitly generated member functions will not have template
@@ -7346,7 +7347,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
quals = cp_type_quals (arg) | cp_type_quals (t);
return cp_build_qualified_type_real
- (arg, quals, complain | tf_ignore_bad_quals);
+ (arg, quals, (enum tsubst_flags_t) (complain | tf_ignore_bad_quals));
}
else if (TREE_CODE (t) == BOUND_TEMPLATE_TEMPLATE_PARM)
{
@@ -7397,8 +7398,8 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
r = tsubst (TYPE_MAIN_VARIANT (t), args, complain, in_decl);
r = cp_build_qualified_type_real
(r, cp_type_quals (t),
- complain | (TREE_CODE (t) == TEMPLATE_TYPE_PARM
- ? tf_ignore_bad_quals : 0));
+ (tsubst_flags_t) (complain | (TREE_CODE (t) == TEMPLATE_TYPE_PARM
+ ? tf_ignore_bad_quals : 0)));
}
else
{
@@ -7707,12 +7708,12 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
}
f = make_typename_type (ctx, f, typename_type,
- (complain & tf_error) | tf_keep_type_decl);
+ (tsubst_flags_t) ((complain & tf_error) | tf_keep_type_decl));
if (f == error_mark_node)
return f;
if (TREE_CODE (f) == TYPE_DECL)
{
- complain |= tf_ignore_bad_quals;
+ complain = (tsubst_flags_t) (complain | tf_ignore_bad_quals);
f = TREE_TYPE (f);
}
@@ -8783,7 +8784,7 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
tree op0, op1;
op0 = RECUR (TREE_OPERAND (t, 0));
op1 = RECUR (TREE_OPERAND (t, 1));
- finish_omp_atomic (OMP_ATOMIC_CODE (t), op0, op1);
+ finish_omp_atomic ((enum tree_code) OMP_ATOMIC_CODE (t), op0, op1);
}
break;
@@ -8885,26 +8886,26 @@ tsubst_copy_and_build (tree t,
case TEMPLATE_ID_EXPR:
{
tree object;
- tree template = RECUR (TREE_OPERAND (t, 0));
+ tree templ = RECUR (TREE_OPERAND (t, 0));
tree targs = TREE_OPERAND (t, 1);
if (targs)
targs = tsubst_template_args (targs, args, complain, in_decl);
- if (TREE_CODE (template) == COMPONENT_REF)
+ if (TREE_CODE (templ) == COMPONENT_REF)
{
- object = TREE_OPERAND (template, 0);
- template = TREE_OPERAND (template, 1);
+ object = TREE_OPERAND (templ, 0);
+ templ = TREE_OPERAND (templ, 1);
}
else
object = NULL_TREE;
- template = lookup_template_function (template, targs);
+ templ = lookup_template_function (templ, targs);
if (object)
- return build3 (COMPONENT_REF, TREE_TYPE (template),
- object, template, NULL_TREE);
+ return build3 (COMPONENT_REF, TREE_TYPE (templ),
+ object, templ, NULL_TREE);
else
- return baselink_for_fns (template);
+ return baselink_for_fns (templ);
}
case INDIRECT_REF:
@@ -10573,7 +10574,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict)
template-parameter exactly, except that a template-argument
deduced from an array bound may be of any integral type.
The non-type parameter might use already deduced type parameters. */
- tparm = tsubst (TREE_TYPE (parm), targs, 0, NULL_TREE);
+ tparm = tsubst (TREE_TYPE (parm), targs, tf_none, NULL_TREE);
if (!TREE_TYPE (arg))
/* Template-parameter dependent expression. Just accept it for now.
It will later be processed in convert_template_argument. */
@@ -11674,7 +11675,7 @@ bt_instantiate_type_proc (binding_entry entry, void *data)
if (IS_AGGR_TYPE (entry->type)
&& !uses_template_parms (CLASSTYPE_TI_ARGS (entry->type)))
- do_type_instantiation (TYPE_MAIN_DECL (entry->type), storage, 0);
+ do_type_instantiation (TYPE_MAIN_DECL (entry->type), storage, tf_none);
}
/* Called from do_type_instantiation to instantiate a member
@@ -13207,7 +13208,7 @@ resolve_typename_type (tree type, bool only_current_p)
args = TREE_OPERAND (TYPENAME_TYPE_FULLNAME (type), 1);
/* Instantiate the template. */
type = lookup_template_class (tmpl, args, NULL_TREE, NULL_TREE,
- /*entering_scope=*/0, tf_error | tf_user);
+ /*entering_scope=*/0, (tsubst_flags_t) (tf_error | tf_user));
}
else
type = error_mark_node;
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index 246e88b9875..c3c9c44968e 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -25,6 +25,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index 2bf0303302f..b66613d9238 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -30,6 +30,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "input.h"
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 0cb825dd199..1dee0a0e4ca 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -25,6 +25,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "flags.h"
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 45a5ea3d10b..88a8d130da5 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -27,6 +27,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "obstack.h"
@@ -1512,13 +1513,13 @@ adjust_result_of_qualified_name_lookup (tree decl,
or ambiguity -- in either case, the choice of a static member
function might make the usage valid. */
base = lookup_base (context_class, qualifying_scope,
- ba_unique | ba_quiet, NULL);
+ (enum base_access) (ba_unique | ba_quiet), NULL);
if (base)
{
BASELINK_ACCESS_BINFO (decl) = base;
BASELINK_BINFO (decl)
= lookup_base (base, BINFO_TYPE (BASELINK_BINFO (decl)),
- ba_unique | ba_quiet,
+ (enum base_access) (ba_unique | ba_quiet),
NULL);
}
}
@@ -1845,7 +1846,7 @@ check_final_overrider (tree overrider, tree basefn)
if (CLASS_TYPE_P (base_return) && CLASS_TYPE_P (over_return))
{
tree binfo = lookup_base (over_return, base_return,
- ba_check | ba_quiet, NULL);
+ (enum base_access) (ba_check | ba_quiet), NULL);
if (!binfo)
fail = 1;
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 91d200a588e..8cbf9ea95ba 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -29,6 +29,7 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "c-common.h"
@@ -2321,7 +2322,7 @@ finish_template_type (tree name, tree args, int entering_scope)
decl = lookup_template_class (name, args,
NULL_TREE, NULL_TREE, entering_scope,
- tf_warning_or_error | tf_user);
+ (enum tsubst_flags_t) (tf_warning_or_error | tf_user));
if (decl != error_mark_node)
decl = TYPE_STUB_DECL (decl);
@@ -3424,7 +3425,7 @@ finish_omp_clauses (tree clauses)
for (pc = &clauses, c = clauses; c ; c = *pc)
{
- enum tree_code c_kind = OMP_CLAUSE_CODE (c);
+ enum tree_code c_kind = (enum tree_code) OMP_CLAUSE_CODE (c);
bool remove = false;
bool need_complete_non_reference = false;
bool need_default_ctor = false;
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 526077a43e9..12b82d562aa 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -24,6 +24,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "flags.h"
@@ -97,12 +98,12 @@ lvalue_p_1 (tree ref,
{
/* Clear the ordinary bit. If this object was a class
rvalue we want to preserve that information. */
- op1_lvalue_kind &= ~clk_ordinary;
+ op1_lvalue_kind = (cp_lvalue_kind) (op1_lvalue_kind & ~clk_ordinary);
/* The lvalue is for a bitfield. */
- op1_lvalue_kind |= clk_bitfield;
+ op1_lvalue_kind = (cp_lvalue_kind) (op1_lvalue_kind | clk_bitfield);
}
else if (DECL_PACKED (TREE_OPERAND (ref, 1)))
- op1_lvalue_kind |= clk_packed;
+ op1_lvalue_kind = (cp_lvalue_kind) (op1_lvalue_kind | clk_packed);
return op1_lvalue_kind;
@@ -189,11 +190,11 @@ lvalue_p_1 (tree ref,
/* Otherwise, it's an lvalue, and it has all the odd properties
contributed by either operand. */
- op1_lvalue_kind = op1_lvalue_kind | op2_lvalue_kind;
+ op1_lvalue_kind = (cp_lvalue_kind) (op1_lvalue_kind | op2_lvalue_kind);
/* It's not an ordinary lvalue if it involves either a bit-field or
a class rvalue. */
if ((op1_lvalue_kind & ~clk_ordinary) != clk_none)
- op1_lvalue_kind &= ~clk_ordinary;
+ op1_lvalue_kind = (cp_lvalue_kind) (op1_lvalue_kind & ~clk_ordinary);
return op1_lvalue_kind;
}
@@ -1694,7 +1695,7 @@ maybe_dummy_object (tree type, tree* binfop)
if (current_class_type
&& (binfo = lookup_base (current_class_type, type,
- ba_unique | ba_quiet, NULL)))
+ (enum base_access) (ba_unique | ba_quiet), NULL)))
context = current_class_type;
else
{
@@ -2274,17 +2275,17 @@ stabilize_expr (tree exp, tree* initp)
return exp;
}
-/* Add NEW, an expression whose value we don't care about, after the
+/* Add FRESH, an expression whose value we don't care about, after the
similar expression ORIG. */
tree
-add_stmt_to_compound (tree orig, tree new)
+add_stmt_to_compound (tree orig, tree fresh)
{
- if (!new || !TREE_SIDE_EFFECTS (new))
+ if (!fresh || !TREE_SIDE_EFFECTS (fresh))
return orig;
if (!orig || !TREE_SIDE_EFFECTS (orig))
- return new;
- return build2 (COMPOUND_EXPR, void_type_node, orig, new);
+ return fresh;
+ return build2 (COMPOUND_EXPR, void_type_node, orig, fresh);
}
/* Like stabilize_expr, but for a call whose arguments we want to
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index b9ee1f27876..88c669fbd24 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -30,6 +30,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "expr.h"
@@ -2182,10 +2183,10 @@ finish_class_member_access_expr (tree object, tree name, bool template_p)
if (is_template_id)
{
- tree template = member;
+ tree templ = member;
- if (BASELINK_P (template))
- template = lookup_template_function (template, template_args);
+ if (BASELINK_P (templ))
+ templ = lookup_template_function (templ, template_args);
else
{
error ("%qD is not a member template function", name);
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index a3654c00047..a1dd822a25c 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -32,6 +32,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "cp-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "flags.h"
diff --git a/gcc/cppspec.c b/gcc/cppspec.c
index 98b7ffb600f..ac8a714912f 100644
--- a/gcc/cppspec.c
+++ b/gcc/cppspec.c
@@ -78,9 +78,8 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
int i, j, quote = 0;
const char **new_argv;
int new_argc;
- extern int is_cpp_driver;
- is_cpp_driver = 1;
+ is_cpp_driver = true;
/* First pass. If we see an -S or -c, barf. If we see an input file,
turn off read_stdin. If we see a second input file, it is actually
diff --git a/gcc/cse.c b/gcc/cse.c
index 0304d6f763f..f6fd89da63c 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -546,6 +546,17 @@ static int constant_pool_entries_cost;
static int constant_pool_entries_regcost;
/* This data describes a block that will be processed by cse_basic_block. */
+enum taken {PATH_TAKEN, PATH_NOT_TAKEN, PATH_AROUND};
+
+struct branch_path
+{
+ /* The branch insn. */
+ rtx branch;
+ /* Whether it should be taken or not. AROUND is the same as taken
+ except that it is used when the destination label is not preceded
+ by a BARRIER. */
+ enum taken status;
+};
struct cse_basic_block_data
{
@@ -560,15 +571,7 @@ struct cse_basic_block_data
/* Size of current branch path, if any. */
int path_size;
/* Current branch path, indicating which branches will be taken. */
- struct branch_path
- {
- /* The branch insn. */
- rtx branch;
- /* Whether it should be taken or not. AROUND is the same as taken
- except that it is used when the destination label is not preceded
- by a BARRIER. */
- enum taken {PATH_TAKEN, PATH_NOT_TAKEN, PATH_AROUND} status;
- } *path;
+ struct branch_path *path;
};
static bool fixed_base_plus_p (rtx x);
@@ -697,7 +700,7 @@ static int
approx_reg_cost_1 (rtx *xp, void *data)
{
rtx x = *xp;
- int *cost_p = data;
+ int *cost_p = (int *) data;
if (x && REG_P (x))
{
@@ -744,7 +747,7 @@ canon_for_address (rtx x)
{
enum rtx_code code;
enum machine_mode mode;
- rtx new = 0;
+ rtx fresh = 0;
int i;
const char *fmt;
@@ -761,8 +764,8 @@ canon_for_address (rtx x)
&& INTVAL (XEXP (x, 1)) < GET_MODE_BITSIZE (mode)
&& INTVAL (XEXP (x, 1)) >= 0)
{
- new = canon_for_address (XEXP (x, 0));
- new = gen_rtx_MULT (mode, new,
+ fresh = canon_for_address (XEXP (x, 0));
+ fresh = gen_rtx_MULT (mode, fresh,
gen_int_mode ((HOST_WIDE_INT) 1
<< INTVAL (XEXP (x, 1)),
mode));
@@ -772,16 +775,16 @@ canon_for_address (rtx x)
break;
}
- if (new)
- return new;
+ if (fresh)
+ return fresh;
/* Now recursively process each operand of this operation. */
fmt = GET_RTX_FORMAT (code);
for (i = 0; i < GET_RTX_LENGTH (code); i++)
if (fmt[i] == 'e')
{
- new = canon_for_address (XEXP (x, i));
- XEXP (x, i) = new;
+ fresh = canon_for_address (XEXP (x, i));
+ XEXP (x, i) = fresh;
}
return x;
}
@@ -1001,7 +1004,7 @@ make_new_qty (unsigned int reg, enum machine_mode mode)
OLD is not changing; NEW is. */
static void
-make_regs_eqv (unsigned int new, unsigned int old)
+make_regs_eqv (unsigned int fresh, unsigned int old)
{
unsigned int lastr, firstr;
int q = REG_QTY (old);
@@ -1012,7 +1015,7 @@ make_regs_eqv (unsigned int new, unsigned int old)
/* Nothing should become eqv until it has a "non-invalid" qty number. */
gcc_assert (REGNO_QTY_VALID_P (old));
- REG_QTY (new) = q;
+ REG_QTY (fresh) = q;
firstr = ent->first_reg;
lastr = ent->last_reg;
@@ -1025,20 +1028,20 @@ make_regs_eqv (unsigned int new, unsigned int old)
that not only can they not be allocated by the compiler, but
they cannot be used in substitutions or canonicalizations
either. */
- && (new >= FIRST_PSEUDO_REGISTER || REGNO_REG_CLASS (new) != NO_REGS)
- && ((new < FIRST_PSEUDO_REGISTER && FIXED_REGNO_P (new))
- || (new >= FIRST_PSEUDO_REGISTER
+ && (fresh >= FIRST_PSEUDO_REGISTER || REGNO_REG_CLASS (fresh) != NO_REGS)
+ && ((fresh < FIRST_PSEUDO_REGISTER && FIXED_REGNO_P (fresh))
+ || (fresh >= FIRST_PSEUDO_REGISTER
&& (firstr < FIRST_PSEUDO_REGISTER
- || ((uid_cuid[REGNO_LAST_UID (new)] > cse_basic_block_end
- || (uid_cuid[REGNO_FIRST_UID (new)]
+ || ((uid_cuid[REGNO_LAST_UID (fresh)] > cse_basic_block_end
+ || (uid_cuid[REGNO_FIRST_UID (fresh)]
< cse_basic_block_start))
- && (uid_cuid[REGNO_LAST_UID (new)]
+ && (uid_cuid[REGNO_LAST_UID (fresh)]
> uid_cuid[REGNO_LAST_UID (firstr)]))))))
{
- reg_eqv_table[firstr].prev = new;
- reg_eqv_table[new].next = firstr;
- reg_eqv_table[new].prev = -1;
- ent->first_reg = new;
+ reg_eqv_table[firstr].prev = fresh;
+ reg_eqv_table[fresh].next = firstr;
+ reg_eqv_table[fresh].prev = -1;
+ ent->first_reg = fresh;
}
else
{
@@ -1048,15 +1051,15 @@ make_regs_eqv (unsigned int new, unsigned int old)
equivalent for anything. */
while (lastr < FIRST_PSEUDO_REGISTER && reg_eqv_table[lastr].prev >= 0
&& (REGNO_REG_CLASS (lastr) == NO_REGS || ! FIXED_REGNO_P (lastr))
- && new >= FIRST_PSEUDO_REGISTER)
+ && fresh >= FIRST_PSEUDO_REGISTER)
lastr = reg_eqv_table[lastr].prev;
- reg_eqv_table[new].next = reg_eqv_table[lastr].next;
+ reg_eqv_table[fresh].next = reg_eqv_table[lastr].next;
if (reg_eqv_table[lastr].next >= 0)
- reg_eqv_table[reg_eqv_table[lastr].next].prev = new;
+ reg_eqv_table[reg_eqv_table[lastr].next].prev = fresh;
else
- qty_table[q].last_reg = new;
- reg_eqv_table[lastr].next = new;
- reg_eqv_table[new].prev = lastr;
+ qty_table[q].last_reg = fresh;
+ reg_eqv_table[lastr].next = fresh;
+ reg_eqv_table[fresh].prev = lastr;
}
}
@@ -1673,7 +1676,7 @@ insert (rtx x, struct table_elt *classp, unsigned int hash, enum machine_mode mo
static void
merge_equiv_classes (struct table_elt *class1, struct table_elt *class2)
{
- struct table_elt *elt, *next, *new;
+ struct table_elt *elt, *next, *fresh;
/* Ensure we start with the head of the classes. */
class1 = class1->first_same_value;
@@ -1714,8 +1717,8 @@ merge_equiv_classes (struct table_elt *class1, struct table_elt *class2)
rehash_using_reg (exp);
hash = HASH (exp, mode);
}
- new = insert (exp, class1, hash, mode);
- new->in_memory = hash_arg_in_memory;
+ fresh = insert (exp, class1, hash, mode);
+ fresh->in_memory = hash_arg_in_memory;
}
}
}
@@ -2419,13 +2422,13 @@ hash_rtx (rtx x, enum machine_mode mode, int *do_not_record_p,
goto repeat;
}
- hash += hash_rtx (XEXP (x, i), 0, do_not_record_p,
+ hash += hash_rtx (XEXP (x, i), VOIDmode, do_not_record_p,
hash_arg_in_memory_p, have_reg_qty);
break;
case 'E':
for (j = 0; j < XVECLEN (x, i); j++)
- hash += hash_rtx (XVECEXP (x, i, j), 0, do_not_record_p,
+ hash += hash_rtx (XVECEXP (x, i, j), VOIDmode, do_not_record_p,
hash_arg_in_memory_p, have_reg_qty);
break;
@@ -2737,14 +2740,14 @@ cse_rtx_varies_p (rtx x, int from_alias)
static void
validate_canon_reg (rtx *xloc, rtx insn)
{
- rtx new = canon_reg (*xloc, insn);
+ rtx tmp = canon_reg (*xloc, insn);
/* If replacing pseudo with hard reg or vice versa, ensure the
insn remains valid. Likewise if the insn has MATCH_DUPs. */
- if (insn != 0 && new != 0)
- validate_change (insn, xloc, new, 1);
+ if (insn != 0 && tmp != 0)
+ validate_change (insn, xloc, tmp, 1);
else
- *xloc = new;
+ *xloc = tmp;
}
/* Canonicalize an expression:
@@ -3014,25 +3017,25 @@ find_best_addr (rtx insn, rtx *loc, enum machine_mode mode)
&& exp_equiv_p (p->exp, p->exp, 1, false))))
{
- rtx new = simplify_gen_binary (GET_CODE (*loc), Pmode,
+ rtx fresh = simplify_gen_binary (GET_CODE (*loc), Pmode,
p->exp, op1);
int new_cost;
/* Get the canonical version of the address so we can accept
more. */
- new = canon_for_address (new);
+ fresh = canon_for_address (fresh);
- new_cost = address_cost (new, mode);
+ new_cost = address_cost (fresh, mode);
if (new_cost < best_addr_cost
|| (new_cost == best_addr_cost
- && (COST (new) + 1) >> 1 > best_rtx_cost))
+ && (COST (fresh) + 1) >> 1 > best_rtx_cost))
{
found_better = 1;
best_addr_cost = new_cost;
- best_rtx_cost = (COST (new) + 1) >> 1;
+ best_rtx_cost = (COST (fresh) + 1) >> 1;
best_elt = p;
- best_rtx = new;
+ best_rtx = fresh;
}
}
@@ -3251,12 +3254,12 @@ fold_rtx_subreg (rtx x, rtx insn)
enum machine_mode mode = GET_MODE (x);
rtx folded_arg0;
rtx const_arg0;
- rtx new;
+ rtx fresh;
/* See if we previously assigned a constant value to this SUBREG. */
- if ((new = lookup_as_function (x, CONST_INT)) != 0
- || (new = lookup_as_function (x, CONST_DOUBLE)) != 0)
- return new;
+ if ((fresh = lookup_as_function (x, CONST_INT)) != 0
+ || (fresh = lookup_as_function (x, CONST_DOUBLE)) != 0)
+ return fresh;
/* If this is a paradoxical SUBREG, we have no idea what value the
extra bits would have. However, if the operand is equivalent to
@@ -3301,10 +3304,10 @@ fold_rtx_subreg (rtx x, rtx insn)
if (folded_arg0 != SUBREG_REG (x))
{
- new = simplify_subreg (mode, folded_arg0,
+ fresh = simplify_subreg (mode, folded_arg0,
GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x));
- if (new)
- return new;
+ if (fresh)
+ return fresh;
}
if (REG_P (folded_arg0)
@@ -3356,7 +3359,7 @@ fold_rtx_subreg (rtx x, rtx insn)
op0 = equiv_constant (op0);
if (op0)
- new = simplify_unary_operation (GET_CODE (elt->exp), mode,
+ fresh = simplify_unary_operation (GET_CODE (elt->exp), mode,
op0, mode);
}
else if (ARITHMETIC_P (elt->exp)
@@ -3403,14 +3406,14 @@ fold_rtx_subreg (rtx x, rtx insn)
/* If the count fits in the inner mode's width,
but exceeds the outer mode's width, the value
will get truncated to 0 by the subreg. */
- new = CONST0_RTX (mode);
+ fresh = CONST0_RTX (mode);
else
/* If the count exceeds even the inner mode's width,
don't fold this expression. */
- new = 0;
+ fresh = 0;
}
else if (op0 && op1)
- new = simplify_binary_operation (GET_CODE (elt->exp),
+ fresh = simplify_binary_operation (GET_CODE (elt->exp),
mode, op0, op1);
}
@@ -3419,10 +3422,10 @@ fold_rtx_subreg (rtx x, rtx insn)
&& (GET_MODE_SIZE (GET_MODE (folded_arg0))
<= UNITS_PER_WORD)
&& exp_equiv_p (elt->exp, elt->exp, 1, false))
- new = copy_rtx (SUBREG_REG (elt->exp));
+ fresh = copy_rtx (SUBREG_REG (elt->exp));
- if (new)
- return new;
+ if (fresh)
+ return fresh;
}
else
/* A SUBREG resulting from a zero extension may fold to zero
@@ -3448,7 +3451,7 @@ static rtx
fold_rtx_mem_1 (rtx x, rtx insn)
{
enum machine_mode mode = GET_MODE (x);
- rtx new;
+ rtx fresh;
/* If we are not actually processing an insn, don't try to find the
best address. Not only don't we care, but we could modify the
@@ -3499,7 +3502,7 @@ fold_rtx_mem_1 (rtx x, rtx insn)
{
rtx constant = get_pool_constant (base);
enum machine_mode const_mode = get_pool_mode (base);
- rtx new;
+ rtx fresh;
if (CONSTANT_P (constant) && GET_CODE (constant) != CONST_INT)
{
@@ -3523,16 +3526,16 @@ fold_rtx_mem_1 (rtx x, rtx insn)
if (GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_SIZE (mode) == UNITS_PER_WORD
&& offset % UNITS_PER_WORD == 0
- && (new = operand_subword (constant,
+ && (fresh = operand_subword (constant,
offset / UNITS_PER_WORD,
0, const_mode)) != 0)
- return new;
+ return fresh;
if (((BYTES_BIG_ENDIAN
&& offset == GET_MODE_SIZE (GET_MODE (constant)) - 1)
|| (! BYTES_BIG_ENDIAN && offset == 0))
- && (new = gen_lowpart (mode, constant)) != 0)
- return new;
+ && (fresh = gen_lowpart (mode, constant)) != 0)
+ return fresh;
}
/* If this is a reference to a label at a known position in a jump
@@ -3585,11 +3588,11 @@ fold_rtx_mem_1 (rtx x, rtx insn)
< XVECLEN (table, 1)))
{
offset /= GET_MODE_SIZE (GET_MODE (table));
- new = gen_rtx_MINUS (Pmode, XVECEXP (table, 1, offset),
+ fresh = gen_rtx_MINUS (Pmode, XVECEXP (table, 1, offset),
XEXP (table, 0));
if (GET_MODE (table) != Pmode)
- new = gen_rtx_TRUNCATE (GET_MODE (table), new);
+ fresh = gen_rtx_TRUNCATE (GET_MODE (table), fresh);
/* Indicate this is a constant. This isn't a valid
form of CONST, but it will only be used to fold the
@@ -3599,7 +3602,7 @@ fold_rtx_mem_1 (rtx x, rtx insn)
Note this expression must be explicitly discarded,
by cse_insn, else it may end up in a REG_EQUAL note
and "escape" to cause problems elsewhere. */
- return gen_rtx_CONST (GET_MODE (new), new);
+ return gen_rtx_CONST (GET_MODE (fresh), fresh);
}
}
}
@@ -3673,7 +3676,7 @@ fold_rtx (rtx x, rtx insn)
enum machine_mode mode;
const char *fmt;
int i;
- rtx new = 0;
+ rtx fresh = 0;
int copied = 0;
int must_swap = 0;
@@ -3724,9 +3727,9 @@ fold_rtx (rtx x, rtx insn)
case NEG:
/* If we have (NOT Y), see if Y is known to be (NOT Z).
If so, (NOT Y) simplifies to Z. Similarly for NEG. */
- new = lookup_as_function (XEXP (x, 0), code);
- if (new)
- return fold_rtx (copy_rtx (XEXP (new, 0)), insn);
+ fresh = lookup_as_function (XEXP (x, 0), code);
+ if (fresh)
+ return fold_rtx (copy_rtx (XEXP (fresh, 0)), insn);
break;
case MEM:
@@ -3967,7 +3970,7 @@ fold_rtx (rtx x, rtx insn)
if (const_arg0 != 0 && GET_CODE (const_arg0) == CONST)
is_const = 1, const_arg0 = XEXP (const_arg0, 0);
- new = simplify_unary_operation (code, mode,
+ fresh = simplify_unary_operation (code, mode,
const_arg0 ? const_arg0 : folded_arg0,
mode_arg0);
/* NEG of PLUS could be converted into MINUS, but that causes
@@ -3975,12 +3978,12 @@ fold_rtx (rtx x, rtx insn)
(CONST (MINUS (CONST_INT) (SYMBOL_REF)))
which many ports mistakenly treat as LEGITIMATE_CONSTANT_P.
FIXME: those ports should be fixed. */
- if (new != 0 && is_const
- && GET_CODE (new) == PLUS
- && (GET_CODE (XEXP (new, 0)) == SYMBOL_REF
- || GET_CODE (XEXP (new, 0)) == LABEL_REF)
- && GET_CODE (XEXP (new, 1)) == CONST_INT)
- new = gen_rtx_CONST (mode, new);
+ if (fresh != 0 && is_const
+ && GET_CODE (fresh) == PLUS
+ && (GET_CODE (XEXP (fresh, 0)) == SYMBOL_REF
+ || GET_CODE (XEXP (fresh, 0)) == LABEL_REF)
+ && GET_CODE (XEXP (fresh, 1)) == CONST_INT)
+ fresh = gen_rtx_CONST (mode, fresh);
}
break;
@@ -4199,7 +4202,7 @@ fold_rtx (rtx x, rtx insn)
{
rtx op0 = const_arg0 ? const_arg0 : folded_arg0;
rtx op1 = const_arg1 ? const_arg1 : folded_arg1;
- new = simplify_relational_operation (code, mode, mode_arg0, op0, op1);
+ fresh = simplify_relational_operation (code, mode, mode_arg0, op0, op1);
}
break;
@@ -4430,7 +4433,7 @@ fold_rtx (rtx x, rtx insn)
break;
}
- new = simplify_binary_operation (code, mode,
+ fresh = simplify_binary_operation (code, mode,
const_arg0 ? const_arg0 : folded_arg0,
const_arg1 ? const_arg1 : folded_arg1);
break;
@@ -4445,7 +4448,7 @@ fold_rtx (rtx x, rtx insn)
case RTX_TERNARY:
case RTX_BITFIELD_OPS:
- new = simplify_ternary_operation (code, mode, mode_arg0,
+ fresh = simplify_ternary_operation (code, mode, mode_arg0,
const_arg0 ? const_arg0 : folded_arg0,
const_arg1 ? const_arg1 : folded_arg1,
const_arg2 ? const_arg2 : XEXP (x, 2));
@@ -4455,7 +4458,7 @@ fold_rtx (rtx x, rtx insn)
break;
}
- return new ? new : x;
+ return fresh ? fresh : x;
}
/* Return a constant value currently equivalent to X.
@@ -4866,7 +4869,7 @@ cse_insn (rtx insn, rtx libcall_insn)
if (GET_CODE (x) == SET)
{
- sets = alloca (sizeof (struct set));
+ sets = (struct set *) alloca (sizeof (struct set));
sets[0].rtl = x;
/* Ignore SETs that are unconditional jumps.
@@ -4901,7 +4904,7 @@ cse_insn (rtx insn, rtx libcall_insn)
{
int lim = XVECLEN (x, 0);
- sets = alloca (lim * sizeof (struct set));
+ sets = (struct set *) alloca (lim * sizeof (struct set));
/* Find all regs explicitly clobbered in this insn,
and ensure they are not replaced with any other regs
@@ -5018,10 +5021,10 @@ cse_insn (rtx insn, rtx libcall_insn)
{
rtx dest = SET_DEST (sets[i].rtl);
rtx src = SET_SRC (sets[i].rtl);
- rtx new = canon_reg (src, insn);
+ rtx tmp = canon_reg (src, insn);
sets[i].orig_src = src;
- validate_change (insn, &SET_SRC (sets[i].rtl), new, 1);
+ validate_change (insn, &SET_SRC (sets[i].rtl), tmp, 1);
if (GET_CODE (dest) == ZERO_EXTRACT)
{
@@ -5653,7 +5656,7 @@ cse_insn (rtx insn, rtx libcall_insn)
/* Look for a substitution that makes a valid insn. */
else if (validate_change (insn, &SET_SRC (sets[i].rtl), trial, 0))
{
- rtx new = canon_reg (SET_SRC (sets[i].rtl), insn);
+ rtx fresh = canon_reg (SET_SRC (sets[i].rtl), insn);
/* If we just made a substitution inside a libcall, then we
need to make the same substitution in any notes attached
@@ -5667,13 +5670,13 @@ cse_insn (rtx insn, rtx libcall_insn)
if (note != 0)
XEXP (note, 0) = simplify_replace_rtx (XEXP (note, 0),
sets[i].orig_src,
- copy_rtx (new));
+ copy_rtx (fresh));
}
/* The result of apply_change_group can be ignored; see
canon_reg. */
- validate_change (insn, &SET_SRC (sets[i].rtl), new, 1);
+ validate_change (insn, &SET_SRC (sets[i].rtl), fresh, 1);
apply_change_group ();
break;
}
@@ -5877,10 +5880,10 @@ cse_insn (rtx insn, rtx libcall_insn)
and hope for the best. */
if (n_sets == 1)
{
- rtx new, note;
+ rtx fresh, note;
- new = emit_jump_insn_after (gen_jump (XEXP (src, 0)), insn);
- JUMP_LABEL (new) = XEXP (src, 0);
+ fresh = emit_jump_insn_after (gen_jump (XEXP (src, 0)), insn);
+ JUMP_LABEL (fresh) = XEXP (src, 0);
LABEL_NUSES (XEXP (src, 0))++;
/* Make sure to copy over REG_NON_LOCAL_GOTO. */
@@ -5888,11 +5891,11 @@ cse_insn (rtx insn, rtx libcall_insn)
if (note)
{
XEXP (note, 1) = NULL_RTX;
- REG_NOTES (new) = note;
+ REG_NOTES (fresh) = note;
}
delete_insn (insn);
- insn = new;
+ insn = fresh;
/* Now emit a BARRIER after the unconditional jump. */
if (NEXT_INSN (insn) == 0
@@ -6598,11 +6601,11 @@ cse_process_notes (rtx x, rtx object)
case ZERO_EXTEND:
case SUBREG:
{
- rtx new = cse_process_notes (XEXP (x, 0), object);
+ rtx fresh = cse_process_notes (XEXP (x, 0), object);
/* We don't substitute VOIDmode constants into these rtx,
since they would impede folding. */
- if (GET_MODE (new) != VOIDmode)
- validate_change (object, &XEXP (x, 0), new, 0);
+ if (GET_MODE (fresh) != VOIDmode)
+ validate_change (object, &XEXP (x, 0), fresh, 0);
return x;
}
@@ -6618,9 +6621,9 @@ cse_process_notes (rtx x, rtx object)
&& (CONSTANT_P (ent->const_rtx)
|| REG_P (ent->const_rtx)))
{
- rtx new = gen_lowpart (GET_MODE (x), ent->const_rtx);
- if (new)
- return new;
+ rtx fresh = gen_lowpart (GET_MODE (x), ent->const_rtx);
+ if (fresh)
+ return fresh;
}
}
@@ -7444,7 +7447,7 @@ insn_live_p (rtx insn, int *counts)
static bool
dead_libcall_p (rtx insn, int *counts)
{
- rtx note, set, new;
+ rtx note, set, fresh;
/* See if there's a REG_EQUAL note on this insn and try to
replace the source with the REG_EQUAL expression.
@@ -7459,14 +7462,14 @@ dead_libcall_p (rtx insn, int *counts)
if (!set)
return false;
- new = simplify_rtx (XEXP (note, 0));
- if (!new)
- new = XEXP (note, 0);
+ fresh = simplify_rtx (XEXP (note, 0));
+ if (!fresh)
+ fresh = XEXP (note, 0);
/* While changing insn, we must update the counts accordingly. */
count_reg_usage (insn, counts, NULL_RTX, -1);
- if (validate_change (insn, &SET_SRC (set), new, 0))
+ if (validate_change (insn, &SET_SRC (set), fresh, 0))
{
count_reg_usage (insn, counts, NULL_RTX, 1);
remove_note (insn, find_reg_note (insn, REG_RETVAL, NULL_RTX));
@@ -7474,10 +7477,10 @@ dead_libcall_p (rtx insn, int *counts)
return true;
}
- if (CONSTANT_P (new))
+ if (CONSTANT_P (fresh))
{
- new = force_const_mem (GET_MODE (SET_DEST (set)), new);
- if (new && validate_change (insn, &SET_SRC (set), new, 0))
+ fresh = force_const_mem (GET_MODE (SET_DEST (set)), fresh);
+ if (fresh && validate_change (insn, &SET_SRC (set), fresh, 0))
{
count_reg_usage (insn, counts, NULL_RTX, 1);
remove_note (insn, find_reg_note (insn, REG_RETVAL, NULL_RTX));
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 4070da7c01f..1839cb0c54d 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -140,7 +140,7 @@ static inline struct elt_list *
new_elt_list (struct elt_list *next, cselib_val *elt)
{
struct elt_list *el;
- el = pool_alloc (elt_list_pool);
+ el = (struct elt_list *) pool_alloc (elt_list_pool);
el->next = next;
el->elt = elt;
return el;
@@ -153,7 +153,7 @@ static inline struct elt_loc_list *
new_elt_loc_list (struct elt_loc_list *next, rtx loc)
{
struct elt_loc_list *el;
- el = pool_alloc (elt_loc_list_pool);
+ el = (struct elt_loc_list *) pool_alloc (elt_loc_list_pool);
el->next = next;
el->loc = loc;
el->setting_insn = cselib_current_insn;
@@ -738,7 +738,7 @@ cselib_hash_rtx (rtx x, int create)
static inline cselib_val *
new_cselib_val (unsigned int value, enum machine_mode mode)
{
- cselib_val *e = pool_alloc (cselib_val_pool);
+ cselib_val *e = (cselib_val *) pool_alloc (cselib_val_pool);
gcc_assert (value);
@@ -748,7 +748,7 @@ new_cselib_val (unsigned int value, enum machine_mode mode)
precisely when we can have VALUE RTXen (when cselib is active)
so we don't need to put them in garbage collected memory.
??? Why should a VALUE be an RTX in the first place? */
- e->u.val_rtx = pool_alloc (value_pool);
+ e->u.val_rtx = (rtx) pool_alloc (value_pool);
memset (e->u.val_rtx, 0, RTX_HDR_SIZE);
PUT_CODE (e->u.val_rtx, VALUE);
PUT_MODE (e->u.val_rtx, mode);
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 5732427f46c..39863e627c7 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -986,7 +986,7 @@ dbxout_init (const char *input_file_name)
tree syms = lang_hooks.decls.getdecls ();
typevec_len = 100;
- typevec = ggc_calloc (typevec_len, sizeof typevec[0]);
+ typevec = (struct typeinfo *) ggc_calloc (typevec_len, sizeof typevec[0]);
/* stabstr_ob contains one string, which will be just fine with
1-byte alignment. */
@@ -1695,7 +1695,7 @@ dbxout_type (tree type, int full)
if (next_type_number == typevec_len)
{
typevec
- = ggc_realloc (typevec, (typevec_len * 2 * sizeof typevec[0]));
+ = (struct typeinfo *) ggc_realloc (typevec, (typevec_len * 2 * sizeof typevec[0]));
memset (typevec + typevec_len, 0, typevec_len * sizeof typevec[0]);
typevec_len *= 2;
}
@@ -2375,8 +2375,8 @@ dbxout_expand_expr (tree expr)
static int
output_used_types_helper (void **slot, void *data)
{
- tree type = *slot;
- VEC(tree, heap) **types_p = data;
+ tree type = (tree) *slot;
+ VEC(tree, heap) **types_p = (VEC_tree_heap**)data;
if ((TREE_CODE (type) == RECORD_TYPE
|| TREE_CODE (type) == UNION_TYPE
@@ -2776,7 +2776,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
if (!decl_rtl)
DBXOUT_DECR_NESTING_AND_RETURN (0);
- decl_rtl = eliminate_regs (decl_rtl, 0, NULL_RTX);
+ decl_rtl = eliminate_regs (decl_rtl, VOIDmode, NULL_RTX);
#ifdef LEAF_REG_REMAP
if (current_function_uses_only_leaf_regs)
leaf_renumber_regs_insn (decl_rtl);
@@ -3120,8 +3120,8 @@ dbxout_parms (tree parms)
/* Perform any necessary register eliminations on the parameter's rtl,
so that the debugging output will be accurate. */
DECL_INCOMING_RTL (parms)
- = eliminate_regs (DECL_INCOMING_RTL (parms), 0, NULL_RTX);
- SET_DECL_RTL (parms, eliminate_regs (DECL_RTL (parms), 0, NULL_RTX));
+ = eliminate_regs (DECL_INCOMING_RTL (parms), VOIDmode, NULL_RTX);
+ SET_DECL_RTL (parms, eliminate_regs (DECL_RTL (parms), VOIDmode, NULL_RTX));
#ifdef LEAF_REG_REMAP
if (current_function_uses_only_leaf_regs)
{
diff --git a/gcc/debug.h b/gcc/debug.h
index 88b7a97180c..66970605f29 100644
--- a/gcc/debug.h
+++ b/gcc/debug.h
@@ -146,7 +146,7 @@ extern void debug_nothing_rtx (rtx);
/* Hooks for various debug formats. */
extern const struct gcc_debug_hooks do_nothing_debug_hooks;
extern const struct gcc_debug_hooks dbx_debug_hooks;
-extern const struct gcc_debug_hooks sdb_debug_hooks;
+extern struct gcc_debug_hooks sdb_debug_hooks;
extern const struct gcc_debug_hooks xcoff_debug_hooks;
extern const struct gcc_debug_hooks dwarf2_debug_hooks;
extern const struct gcc_debug_hooks vmsdbg_debug_hooks;
diff --git a/gcc/df-core.c b/gcc/df-core.c
index 7f89fccdfb3..c092de0bc0c 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -875,7 +875,7 @@ df_compact_blocks (struct df *df)
basic_block bb;
void **problem_temps;
int size = last_basic_block *sizeof (void *);
- problem_temps = xmalloc (size);
+ problem_temps = (void **) xmalloc (size);
for (p = 0; p < df->num_problems_defined; p++)
{
diff --git a/gcc/df-problems.c b/gcc/df-problems.c
index cdf4141f704..496821bba0c 100644
--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -66,7 +66,7 @@ struct df_link *
df_chain_create (struct dataflow *dflow, struct df_ref *src, struct df_ref *dst)
{
struct df_link *head = DF_REF_CHAIN (src);
- struct df_link *link = pool_alloc (dflow->block_pool);;
+ struct df_link *link = (struct df_link *) pool_alloc (dflow->block_pool);;
DF_REF_CHAIN (src) = link;
link->next = head;
@@ -189,7 +189,7 @@ df_grow_bb_info (struct dataflow *dflow)
if (dflow->block_info_size < new_size)
{
new_size += new_size / 4;
- dflow->block_info = xrealloc (dflow->block_info,
+ dflow->block_info = (void **) xrealloc (dflow->block_info,
new_size *sizeof (void*));
memset (dflow->block_info + dflow->block_info_size, 0,
(new_size - dflow->block_info_size) *sizeof (void *));
@@ -401,7 +401,7 @@ df_ru_alloc (struct dataflow *dflow,
if (problem_data->use_sites_size < reg_size)
{
problem_data->use_sites
- = xrealloc (problem_data->use_sites, reg_size * sizeof (bitmap));
+ = (bitmap *) xrealloc (problem_data->use_sites, reg_size * sizeof (bitmap));
memset (problem_data->use_sites + problem_data->use_sites_size, 0,
(reg_size - problem_data->use_sites_size) * sizeof (bitmap));
problem_data->use_sites_size = reg_size;
@@ -551,10 +551,10 @@ df_ru_bb_local_compute (struct dataflow *dflow, unsigned int bb_index)
continue;
df_ru_bb_local_compute_process_use (bb_info,
- DF_INSN_UID_USES (df, uid), 0);
+ DF_INSN_UID_USES (df, uid), DF_REF_NONE);
df_ru_bb_local_compute_process_def (dflow, bb_info,
- DF_INSN_UID_DEFS (df, uid), 0);
+ DF_INSN_UID_DEFS (df, uid), DF_REF_NONE);
bitmap_ior_into (seen_in_block, seen_in_insn);
bitmap_clear (seen_in_insn);
@@ -562,10 +562,10 @@ df_ru_bb_local_compute (struct dataflow *dflow, unsigned int bb_index)
/* Process the hardware registers that are always live. */
df_ru_bb_local_compute_process_use (bb_info,
- df_get_artificial_uses (df, bb_index), 0);
+ df_get_artificial_uses (df, bb_index), DF_REF_NONE);
df_ru_bb_local_compute_process_def (dflow, bb_info,
- df_get_artificial_defs (df, bb_index), 0);
+ df_get_artificial_defs (df, bb_index), DF_REF_NONE);
}
@@ -941,7 +941,7 @@ df_rd_alloc (struct dataflow *dflow,
if (problem_data->def_sites_size < reg_size)
{
problem_data->def_sites
- = xrealloc (problem_data->def_sites, reg_size *sizeof (bitmap));
+ = (bitmap *) xrealloc (problem_data->def_sites, reg_size *sizeof (bitmap));
memset (problem_data->def_sites + problem_data->def_sites_size, 0,
(reg_size - problem_data->def_sites_size) *sizeof (bitmap));
problem_data->def_sites_size = reg_size;
@@ -1061,7 +1061,7 @@ df_rd_bb_local_compute (struct dataflow *dflow, unsigned int bb_index)
bitmap_clear (seen_in_insn);
df_rd_bb_local_compute_process_def (dflow, bb_info,
- df_get_artificial_defs (df, bb_index), 0);
+ df_get_artificial_defs (df, bb_index), DF_REF_NONE);
FOR_BB_INSNS_REVERSE (bb, insn)
{
@@ -1071,7 +1071,7 @@ df_rd_bb_local_compute (struct dataflow *dflow, unsigned int bb_index)
continue;
df_rd_bb_local_compute_process_def (dflow, bb_info,
- DF_INSN_UID_DEFS (df, uid), 0);
+ DF_INSN_UID_DEFS (df, uid), DF_REF_NONE);
/* This complex dance with the two bitmaps is required because
instructions can assign twice to the same pseudo. This
@@ -2312,10 +2312,10 @@ df_urec_check_earlyclobber (rtx insn)
char c;
bool amp_p;
int i;
- enum reg_class class;
+ enum reg_class regclass;
const char *p = recog_data.constraints[opno];
- class = NO_REGS;
+ regclass = NO_REGS;
amp_p = false;
for (;;)
{
@@ -2341,7 +2341,7 @@ df_urec_check_earlyclobber (rtx insn)
break;
case '\0':
case ',':
- if (amp_p && class != NO_REGS)
+ if (amp_p && regclass != NO_REGS)
{
int rc;
@@ -2350,28 +2350,28 @@ df_urec_check_earlyclobber (rtx insn)
VEC_iterate (int, earlyclobber_regclass, i, rc);
i++)
{
- if (rc == (int) class)
+ if ((enum reg_class) rc == regclass)
goto found_rc;
}
/* We use VEC_quick_push here because
earlyclobber_regclass holds no more than
N_REG_CLASSES elements. */
- VEC_quick_push (int, earlyclobber_regclass, (int) class);
+ VEC_quick_push (int, earlyclobber_regclass, (int) regclass);
found_rc:
;
}
amp_p = false;
- class = NO_REGS;
+ regclass = NO_REGS;
break;
case 'r':
- class = GENERAL_REGS;
+ regclass = GENERAL_REGS;
break;
default:
- class = REG_CLASS_FROM_CONSTRAINT (c, p);
+ regclass = REG_CLASS_FROM_CONSTRAINT (c, p);
break;
}
if (c == '\0')
@@ -2414,9 +2414,9 @@ df_urec_mark_reg_use_for_earlyclobber (rtx *x, void *data)
alt_class = reg_alternate_class (regno);
for (i = 0; VEC_iterate (int, earlyclobber_regclass, i, rc); i++)
{
- if (reg_classes_intersect_p (rc, pref_class)
+ if (reg_classes_intersect_p ((enum reg_class) rc, pref_class)
|| (rc != NO_REGS
- && reg_classes_intersect_p (rc, alt_class)))
+ && reg_classes_intersect_p ((enum reg_class) rc, alt_class)))
{
bitmap_set_bit (bb_info->earlyclobber, regno);
break;
@@ -2995,7 +2995,7 @@ df_chain_create_bb (struct dataflow *dflow,
in the cpy vector. */
df_chain_create_bb_process_use (dflow, cpy,
- DF_INSN_UID_USES (df, uid), 0);
+ DF_INSN_UID_USES (df, uid), DF_REF_NONE);
/* Since we are going forwards, process the defs second. This
pass only changes the bits in cpy. */
@@ -3015,7 +3015,7 @@ df_chain_create_bb (struct dataflow *dflow,
/* Create the chains for the artificial uses of the hard registers
at the end of the block. */
df_chain_create_bb_process_use (dflow, cpy,
- df_get_artificial_uses (df, bb->index), 0);
+ df_get_artificial_uses (df, bb->index), DF_REF_NONE);
}
/* Create def-use chains from reaching use bitmaps for basic blocks
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index 46dfb072cce..945b91647bf 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -366,14 +366,14 @@ df_grow_reg_info (struct dataflow *dflow, struct df_ref_info *ref_info)
if (ref_info->regs_size < new_size)
{
new_size += new_size / 4;
- ref_info->regs = xrealloc (ref_info->regs,
+ ref_info->regs = (struct df_reg_info **) xrealloc (ref_info->regs,
new_size *sizeof (struct df_reg_info*));
ref_info->regs_size = new_size;
}
for (i = ref_info->regs_inited; i < max_reg; i++)
{
- struct df_reg_info *reg_info = pool_alloc (problem_data->reg_pool);
+ struct df_reg_info *reg_info = (struct df_reg_info *) pool_alloc (problem_data->reg_pool);
memset (reg_info, 0, sizeof (struct df_reg_info));
ref_info->regs[i] = reg_info;
}
@@ -389,7 +389,7 @@ df_grow_ref_info (struct df_ref_info *ref_info, unsigned int new_size)
{
if (ref_info->refs_size < new_size)
{
- ref_info->refs = xrealloc (ref_info->refs,
+ ref_info->refs = (struct df_ref **) xrealloc (ref_info->refs,
new_size *sizeof (struct df_ref *));
memset (ref_info->refs + ref_info->refs_size, 0,
(new_size - ref_info->refs_size) *sizeof (struct df_ref *));
@@ -409,7 +409,7 @@ df_grow_insn_info (struct df *df)
if (df->insns_size < new_size)
{
new_size += new_size / 4;
- df->insns = xrealloc (df->insns,
+ df->insns = (struct df_insn_info **) xrealloc (df->insns,
new_size *sizeof (struct df_insn_info *));
memset (df->insns + df->insns_size, 0,
(new_size - df->insns_size) *sizeof (struct df_insn_info *));
@@ -763,7 +763,7 @@ df_insn_create_insn_record (struct dataflow *dflow, rtx insn)
struct df_insn_info *insn_rec = DF_INSN_GET (df, insn);
if (!insn_rec)
{
- insn_rec = pool_alloc (problem_data->insn_pool);
+ insn_rec = (struct df_insn_info *) pool_alloc (problem_data->insn_pool);
DF_INSN_SET (df, insn, insn_rec);
}
memset (insn_rec, 0, sizeof (struct df_insn_info));
@@ -939,7 +939,7 @@ df_ref_create_structure (struct dataflow *dflow, rtx reg, rtx *loc,
struct df_scan_problem_data *problem_data
= (struct df_scan_problem_data *) dflow->problem_data;
- this_ref = pool_alloc (problem_data->ref_pool);
+ this_ref = (struct df_ref *) pool_alloc (problem_data->ref_pool);
DF_REF_REG (this_ref) = reg;
DF_REF_REGNO (this_ref) = regno;
DF_REF_LOC (this_ref) = loc;
@@ -1068,7 +1068,7 @@ df_ref_record (struct dataflow *dflow, rtx reg, rtx *loc,
{
loc = &SUBREG_REG (reg);
reg = *loc;
- ref_flags |= DF_REF_STRIPPED;
+ ref_flags = (enum df_ref_flags) (ref_flags | DF_REF_STRIPPED);
}
regno = REGNO (GET_CODE (reg) == SUBREG ? SUBREG_REG (reg) : reg);
@@ -1102,9 +1102,9 @@ df_ref_record (struct dataflow *dflow, rtx reg, rtx *loc,
/* Sets to a subreg of a multiword register are partial.
Sets to a non-subreg of a multiword register are not. */
if (GET_CODE (oldreg) == SUBREG)
- ref_flags |= DF_REF_PARTIAL;
- ref_flags |= DF_REF_MW_HARDREG;
- hardreg = pool_alloc (problem_data->mw_reg_pool);
+ ref_flags = (enum df_ref_flags) (ref_flags | DF_REF_PARTIAL);
+ ref_flags = (enum df_ref_flags) (ref_flags | DF_REF_MW_HARDREG);
+ hardreg = (struct df_mw_hardreg *)pool_alloc (problem_data->mw_reg_pool);
hardreg->next = insn_info->mw_hardregs;
insn_info->mw_hardregs = hardreg;
hardreg->type = ref_type;
@@ -1139,7 +1139,7 @@ df_ref_record (struct dataflow *dflow, rtx reg, rtx *loc,
bb, insn, ref_type, ref_flags);
if (hardreg)
{
- struct df_link *link = pool_alloc (problem_data->mw_link_pool);
+ struct df_link *link = (struct df_link *) pool_alloc (problem_data->mw_link_pool);
link->next = hardreg->regs;
link->ref = ref;
@@ -1205,7 +1205,7 @@ df_def_record_1 (struct dataflow *dflow, rtx x,
|| GET_CODE (temp) == SET)
df_def_record_1 (dflow, temp, bb, insn,
GET_CODE (temp) == CLOBBER
- ? flags | DF_REF_MUST_CLOBBER : flags,
+ ? (enum df_ref_flags) (flags | DF_REF_MUST_CLOBBER) : flags,
record_live);
}
return;
@@ -1230,7 +1230,7 @@ df_def_record_1 (struct dataflow *dflow, rtx x,
if (GET_CODE (dst) == STRICT_LOW_PART)
dst_in_strict_lowpart = true;
dst = *loc;
- flags |= DF_REF_READ_WRITE;
+ flags = (enum df_ref_flags) (flags | DF_REF_READ_WRITE);
}
@@ -1239,7 +1239,7 @@ df_def_record_1 (struct dataflow *dflow, rtx x,
*/
if (GET_CODE (dst) == SUBREG && REG_P (SUBREG_REG (dst))
&& dst_in_strict_lowpart)
- flags |= DF_REF_PARTIAL;
+ flags = (enum df_ref_flags) (flags | DF_REF_PARTIAL);
if (REG_P (dst)
|| (GET_CODE (dst) == SUBREG && REG_P (SUBREG_REG (dst))))
@@ -1259,7 +1259,7 @@ df_defs_record (struct dataflow *dflow, rtx x, basic_block bb, rtx insn)
{
/* Mark the single def within the pattern. */
df_def_record_1 (dflow, x, bb, insn,
- code == CLOBBER ? DF_REF_MUST_CLOBBER : 0, true);
+ code == CLOBBER ? DF_REF_MUST_CLOBBER : DF_REF_NONE, true);
}
else if (code == COND_EXEC)
{
@@ -1315,12 +1315,12 @@ df_uses_record (struct dataflow *dflow, rtx *loc, enum df_ref_type ref_type,
case MEM:
df_uses_record (dflow, &XEXP (x, 0), DF_REF_REG_MEM_LOAD, bb, insn,
- flags & DF_REF_IN_NOTE);
+ (enum df_ref_flags) (flags & DF_REF_IN_NOTE));
return;
case SUBREG:
/* While we're here, optimize this case. */
- flags |= DF_REF_PARTIAL;
+ flags = (enum df_ref_flags) (flags | DF_REF_PARTIAL);
/* In case the SUBREG is not of a REG, do not optimize. */
if (!REG_P (SUBREG_REG (x)))
{
@@ -1347,7 +1347,7 @@ df_uses_record (struct dataflow *dflow, rtx *loc, enum df_ref_type ref_type,
{
df_uses_record (dflow, &SUBREG_REG (dst),
DF_REF_REG_USE, bb,
- insn, flags | DF_REF_READ_WRITE);
+ insn, (enum df_ref_flags) (flags | DF_REF_READ_WRITE));
break;
}
/* Fall through. */
@@ -1446,7 +1446,7 @@ df_uses_record (struct dataflow *dflow, rtx *loc, enum df_ref_type ref_type,
case PRE_MODIFY:
case POST_MODIFY:
/* Catch the def of the register being modified. */
- flags |= DF_REF_READ_WRITE;
+ flags = (enum df_ref_flags) (flags | DF_REF_READ_WRITE);
df_ref_record (dflow, XEXP (x, 0), &XEXP (x, 0), bb, insn,
DF_REF_REG_DEF, flags, true);
@@ -1552,7 +1552,7 @@ df_insn_refs_record (struct dataflow *dflow, basic_block bb, rtx insn)
if (GET_CODE (XEXP (note, 0)) == USE)
df_uses_record (dflow, &XEXP (XEXP (note, 0), 0),
DF_REF_REG_USE,
- bb, insn, 0);
+ bb, insn, DF_REF_NONE);
else if (GET_CODE (XEXP (note, 0)) == CLOBBER)
{
df_defs_record (dflow, XEXP (note, 0), bb, insn);
@@ -1576,7 +1576,7 @@ df_insn_refs_record (struct dataflow *dflow, basic_block bb, rtx insn)
/* The stack ptr is used (honorarily) by a CALL insn. */
df_uses_record (dflow, &regno_reg_rtx[STACK_POINTER_REGNUM],
DF_REF_REG_USE, bb, insn,
- 0);
+ DF_REF_NONE);
if (dflow->flags & DF_HARD_REGS)
{
@@ -1588,7 +1588,7 @@ df_insn_refs_record (struct dataflow *dflow, basic_block bb, rtx insn)
if (global_regs[i])
df_uses_record (dflow, &regno_reg_rtx[i],
DF_REF_REG_USE, bb, insn,
- 0);
+ DF_REF_NONE);
EXECUTE_IF_SET_IN_BITMAP (df_invalidated_by_call, 0, ui, bi)
df_ref_record (dflow, regno_reg_rtx[ui], &regno_reg_rtx[ui], bb,
insn, DF_REF_REG_DEF, DF_REF_MAY_CLOBBER, false);
@@ -1597,7 +1597,7 @@ df_insn_refs_record (struct dataflow *dflow, basic_block bb, rtx insn)
/* Record the register uses. */
df_uses_record (dflow, &PATTERN (insn),
- DF_REF_REG_USE, bb, insn, 0);
+ DF_REF_REG_USE, bb, insn, DF_REF_NONE);
}
}
@@ -1665,7 +1665,7 @@ df_bb_refs_record (struct dataflow *dflow, basic_block bb)
break;
df_ref_record (dflow, regno_reg_rtx[regno], &regno_reg_rtx[regno],
bb, NULL,
- DF_REF_REG_DEF, DF_REF_ARTIFICIAL | DF_REF_AT_TOP,
+ DF_REF_REG_DEF, (enum df_ref_flags) (DF_REF_ARTIFICIAL | DF_REF_AT_TOP),
false);
}
}
diff --git a/gcc/df.h b/gcc/df.h
index 689e058afb1..72eefaca4be 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -70,6 +70,7 @@ enum df_ref_type {DF_REF_REG_DEF, DF_REF_REG_USE, DF_REF_REG_MEM_LOAD,
enum df_ref_flags
{
+ DF_REF_NONE = 0,
/* Read-modify-write refs generate both a use and a def and
these are marked with this flag to show that they are not
independent. */
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index df520266a88..7f6be58ad42 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -79,7 +79,7 @@ struct diagnostic_context
the diagnostic should be changed to before reporting, or
DK_UNSPECIFIED to leave it as the reported kind, or DK_IGNORED to
not report it at all. N_OPTS is from <options.h>. */
- char classify_diagnostic[N_OPTS];
+ diagnostic_t classify_diagnostic[N_OPTS];
/* True if we should print the command line option which controls
each diagnostic, if known. */
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index cc448bcc687..0f3cd01612e 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -339,16 +339,6 @@ the very end of the command given to the linker.
Do not define this macro if it does not need to do anything.
@end defmac
-@defmac THREAD_MODEL_SPEC
-GCC @code{-v} will print the thread model GCC was configured to use.
-However, this doesn't work on platforms that are multilibbed on thread
-models, such as AIX 4.3. On such platforms, define
-@code{THREAD_MODEL_SPEC} such that it evaluates to a string without
-blanks that names one of the recognized thread models. @code{%*}, the
-default value of this macro, will expand to the value of
-@code{thread_file} set in @file{config.gcc}.
-@end defmac
-
@defmac SYSROOT_SUFFIX_SPEC
Define this macro to add a suffix to the target sysroot when GCC is
configured with a sysroot. This will cause GCC to search for usr/lib,
@@ -459,14 +449,6 @@ a @option{-B} prefix into a @option{-L} linker option if the prefix
indicates an absolute file name.
@end defmac
-@defmac MD_EXEC_PREFIX
-If defined, this macro is an additional prefix to try after
-@code{STANDARD_EXEC_PREFIX}. @code{MD_EXEC_PREFIX} is not searched
-when the @option{-b} option is used, or the compiler is built as a cross
-compiler. If you define @code{MD_EXEC_PREFIX}, then be sure to add it
-to the list of directories used to find the assembler in @file{configure.in}.
-@end defmac
-
@defmac STANDARD_STARTFILE_PREFIX
Define this macro as a C string constant if you wish to override the
standard choice of @code{libdir} as the default prefix to
@@ -491,19 +473,6 @@ default prefix when searching for startup files such as @file{crt0.o}.
is built as a cross compiler.
@end defmac
-@defmac MD_STARTFILE_PREFIX
-If defined, this macro supplies an additional prefix to try after the
-standard prefixes. @code{MD_EXEC_PREFIX} is not searched when the
-@option{-b} option is used, or when the compiler is built as a cross
-compiler.
-@end defmac
-
-@defmac MD_STARTFILE_PREFIX_1
-If defined, this macro supplies yet another prefix to try after the
-standard prefixes. It is not searched when the @option{-b} option is
-used, or when the compiler is built as a cross compiler.
-@end defmac
-
@defmac INIT_ENVIRONMENT
Define this macro as a C string constant if you wish to set environment
variables for programs called by the driver, such as the assembler and
@@ -521,31 +490,6 @@ Cross compilers do not search either @file{/usr/local/include} or its
replacement.
@end defmac
-@defmac MODIFY_TARGET_NAME
-Define this macro if you wish to define command-line switches that
-modify the default target name.
-
-For each switch, you can include a string to be appended to the first
-part of the configuration name or a string to be deleted from the
-configuration name, if present. The definition should be an initializer
-for an array of structures. Each array element should have three
-elements: the switch name (a string constant, including the initial
-dash), one of the enumeration codes @code{ADD} or @code{DELETE} to
-indicate whether the string should be inserted or deleted, and the string
-to be inserted or deleted (a string constant).
-
-For example, on a machine where @samp{64} at the end of the
-configuration name denotes a 64-bit target and you want the @option{-32}
-and @option{-64} switches to select between 32- and 64-bit targets, you would
-code
-
-@smallexample
-#define MODIFY_TARGET_NAME \
- @{ @{ "-32", DELETE, "64"@}, \
- @{"-64", ADD, "64"@}@}
-@end smallexample
-@end defmac
-
@defmac SYSTEM_INCLUDE_DIR
Define this macro as a C string constant if you wish to specify a
system-specific directory to search for header files before the standard
@@ -625,9 +569,6 @@ The macro @code{STANDARD_EXEC_PREFIX}.
@item
@file{/usr/lib/gcc/}.
-
-@item
-The macro @code{MD_EXEC_PREFIX}, if any.
@end enumerate
Here is the order of prefixes tried for startfiles:
@@ -650,12 +591,6 @@ The macro @code{STANDARD_EXEC_PREFIX}.
@file{/usr/lib/gcc/}.
@item
-The macro @code{MD_EXEC_PREFIX}, if any.
-
-@item
-The macro @code{MD_STARTFILE_PREFIX}, if any.
-
-@item
The macro @code{STANDARD_STARTFILE_PREFIX}.
@item
diff --git a/gcc/dominance.c b/gcc/dominance.c
index 819e7d45029..62f6726feea 100644
--- a/gcc/dominance.c
+++ b/gcc/dominance.c
@@ -681,12 +681,12 @@ get_immediate_dominator (enum cdi_direction dir, basic_block bb)
if (!node->father)
return NULL;
- return node->father->data;
+ return (basic_block) node->father->data;
}
/* Set the immediate dominator of the block possibly removing
existing edge. NULL can be used to remove any edge. */
-inline void
+void
set_immediate_dominator (enum cdi_direction dir, basic_block bb,
basic_block dominated_by)
{
@@ -728,9 +728,9 @@ get_dominated_by (enum cdi_direction dir, basic_block bb, basic_block **bbs)
n++;
*bbs = XNEWVEC (basic_block, n);
- (*bbs)[0] = son->data;
+ (*bbs)[0] = (basic_block) son->data;
for (ason = son->right, n = 1; ason != son; ason = ason->right)
- (*bbs)[n++] = ason->data;
+ (*bbs)[n++] = (basic_block) ason->data;
return n;
}
@@ -796,7 +796,7 @@ nearest_common_dominator (enum cdi_direction dir, basic_block bb1, basic_block b
if (!bb2)
return bb1;
- return et_nca (bb1->dom[dir], bb2->dom[dir])->data;
+ return (basic_block) et_nca (bb1->dom[dir], bb2->dom[dir])->data;
}
@@ -1079,7 +1079,7 @@ first_dom_son (enum cdi_direction dir, basic_block bb)
{
struct et_node *son = bb->dom[dir]->son;
- return son ? son->data : NULL;
+ return son ? (basic_block) son->data : NULL;
}
/* Returns the next dominance son after BB in the dominator or postdominator
@@ -1090,7 +1090,7 @@ next_dom_son (enum cdi_direction dir, basic_block bb)
{
struct et_node *next = bb->dom[dir]->right;
- return next->father->son == next ? NULL : next->data;
+ return next->father->son == next ? NULL : (basic_block) next->data;
}
/* Returns true if dominance information for direction DIR is available. */
diff --git a/gcc/double-int.c b/gcc/double-int.c
index 3be0abf4f3a..d2dd2e77656 100644
--- a/gcc/double-int.c
+++ b/gcc/double-int.c
@@ -212,7 +212,7 @@ double_int_divmod (double_int a, double_int b, bool uns, unsigned code,
{
double_int ret;
- div_and_round_double (code, uns, a.low, a.high, b.low, b.high,
+ div_and_round_double ((enum tree_code) code, uns, a.low, a.high, b.low, b.high,
&ret.low, &ret.high, &mod->low, &mod->high);
return ret;
}
diff --git a/gcc/dummy-checksum.c b/gcc/dummy-checksum.c
index 81190a6ca15..2712e320a7e 100644
--- a/gcc/dummy-checksum.c
+++ b/gcc/dummy-checksum.c
@@ -1 +1,2 @@
+extern const unsigned char executable_checksum[16];
const unsigned char executable_checksum[16] = { 0 };
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
index 59c5e29c2f9..1e2609d56b5 100644
--- a/gcc/dwarf2asm.c
+++ b/gcc/dwarf2asm.c
@@ -709,7 +709,7 @@ static GTY(()) int dw2_const_labelno;
the symbol can be shared across the entire application (or DSO). */
static rtx
-dw2_force_const_mem (rtx x, bool public)
+dw2_force_const_mem (rtx x, bool pub)
{
splay_tree_node node;
const char *str;
@@ -728,9 +728,9 @@ dw2_force_const_mem (rtx x, bool public)
{
tree id;
- if (public && USE_LINKONCE_INDIRECT)
+ if (pub && USE_LINKONCE_INDIRECT)
{
- char *ref_name = alloca (strlen (str) + sizeof "DW.ref.");
+ char *ref_name = (char *) alloca (strlen (str) + sizeof "DW.ref.");
sprintf (ref_name, "DW.ref.%s", str);
id = get_identifier (ref_name);
@@ -802,7 +802,7 @@ dw2_output_indirect_constants (void)
reference is shared across the entire application (or DSO). */
void
-dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr, bool public,
+dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr, bool pub,
const char *comment, ...)
{
int size;
@@ -843,7 +843,7 @@ dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr, bool public,
the constant pool for this function. Moreover, we'd like to
share these constants across the entire unit of translation and
even, if possible, across the entire application (or DSO). */
- addr = dw2_force_const_mem (addr, public);
+ addr = dw2_force_const_mem (addr, pub);
encoding &= ~DW_EH_PE_indirect;
goto restart;
}
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 0b655b44d51..7c217c8498f 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -575,7 +575,7 @@ dwarf_cfi_name (unsigned int cfi_opc)
static inline dw_cfi_ref
new_cfi (void)
{
- dw_cfi_ref cfi = ggc_alloc (sizeof (dw_cfi_node));
+ dw_cfi_ref cfi = (dw_cfi_ref) ggc_alloc (sizeof (dw_cfi_node));
cfi->dw_cfi_next = NULL;
cfi->dw_cfi_oprnd1.dw_cfi_reg_num = 0;
@@ -1217,7 +1217,7 @@ queue_reg_save (const char *label, rtx reg, rtx sreg, HOST_WIDE_INT offset)
if (q == NULL)
{
- q = ggc_alloc (sizeof (*q));
+ q = (struct queued_reg_save *) ggc_alloc (sizeof (*q));
q->next = queued_reg_saves;
queued_reg_saves = q;
}
@@ -2559,7 +2559,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
if (fde_table_in_use == fde_table_allocated)
{
fde_table_allocated += FDE_TABLE_INCREMENT;
- fde_table = ggc_realloc (fde_table,
+ fde_table = (dw_fde_node *) ggc_realloc (fde_table,
fde_table_allocated * sizeof (dw_fde_node));
memset (fde_table + fde_table_in_use, 0,
FDE_TABLE_INCREMENT * sizeof (dw_fde_node));
@@ -2619,7 +2619,7 @@ void
dwarf2out_frame_init (void)
{
/* Allocate the initial hunk of the fde_table. */
- fde_table = ggc_alloc_cleared (FDE_TABLE_INCREMENT * sizeof (dw_fde_node));
+ fde_table = (dw_fde_node *) ggc_alloc_cleared (FDE_TABLE_INCREMENT * sizeof (dw_fde_node));
fde_table_allocated = FDE_TABLE_INCREMENT;
fde_table_in_use = 0;
@@ -3105,7 +3105,7 @@ static inline dw_loc_descr_ref
new_loc_descr (enum dwarf_location_atom op, unsigned HOST_WIDE_INT oprnd1,
unsigned HOST_WIDE_INT oprnd2)
{
- dw_loc_descr_ref descr = ggc_alloc_cleared (sizeof (dw_loc_descr_node));
+ dw_loc_descr_ref descr = (dw_loc_descr_ref) ggc_alloc_cleared (sizeof (dw_loc_descr_node));
descr->dw_loc_opc = op;
descr->dw_loc_oprnd1.val_class = dw_val_class_unsigned_const;
@@ -3460,12 +3460,12 @@ build_cfa_loc (dw_cfa_location *cfa, HOST_WIDE_INT offset)
if (cfa->base_offset)
{
if (cfa->reg <= 31)
- head = new_loc_descr (DW_OP_breg0 + cfa->reg, cfa->base_offset, 0);
+ head = new_loc_descr ((enum dwarf_location_atom) (DW_OP_breg0 + cfa->reg), cfa->base_offset, 0);
else
head = new_loc_descr (DW_OP_bregx, cfa->reg, cfa->base_offset);
}
else if (cfa->reg <= 31)
- head = new_loc_descr (DW_OP_reg0 + cfa->reg, 0, 0);
+ head = new_loc_descr ((enum dwarf_location_atom) (DW_OP_reg0 + cfa->reg), 0, 0);
else
head = new_loc_descr (DW_OP_regx, cfa->reg, 0);
@@ -3482,11 +3482,11 @@ build_cfa_loc (dw_cfa_location *cfa, HOST_WIDE_INT offset)
{
if (offset == 0)
if (cfa->reg <= 31)
- head = new_loc_descr (DW_OP_reg0 + cfa->reg, 0, 0);
+ head = new_loc_descr ((enum dwarf_location_atom) (DW_OP_reg0 + cfa->reg), 0, 0);
else
head = new_loc_descr (DW_OP_regx, cfa->reg, 0);
else if (cfa->reg <= 31)
- head = new_loc_descr (DW_OP_breg0 + cfa->reg, offset, 0);
+ head = new_loc_descr ((enum dwarf_location_atom) (DW_OP_breg0 + cfa->reg), offset, 0);
else
head = new_loc_descr (DW_OP_bregx, cfa->reg, offset);
}
@@ -5579,7 +5579,7 @@ splice_child_die (dw_die_ref parent, dw_die_ref child)
static inline dw_die_ref
new_die (enum dwarf_tag tag_value, dw_die_ref parent_die, tree t)
{
- dw_die_ref die = ggc_alloc_cleared (sizeof (die_node));
+ dw_die_ref die = (dw_die_ref) ggc_alloc_cleared (sizeof (die_node));
die->die_tag = tag_value;
@@ -5589,7 +5589,7 @@ new_die (enum dwarf_tag tag_value, dw_die_ref parent_die, tree t)
{
limbo_die_node *limbo_node;
- limbo_node = ggc_alloc_cleared (sizeof (limbo_die_node));
+ limbo_node = (limbo_die_node *) ggc_alloc_cleared (sizeof (limbo_die_node));
limbo_node->die = die;
limbo_node->created_for = t;
limbo_node->next = limbo_die_list;
@@ -5636,7 +5636,7 @@ decl_die_table_eq (const void *x, const void *y)
static inline dw_die_ref
lookup_decl_die (tree decl)
{
- return htab_find_with_hash (decl_die_table, decl, DECL_UID (decl));
+ return (dw_die_ref) htab_find_with_hash (decl_die_table, decl, DECL_UID (decl));
}
/* Returns a hash value for X (which really is a var_loc_list). */
@@ -5661,7 +5661,7 @@ decl_loc_table_eq (const void *x, const void *y)
static inline var_loc_list *
lookup_decl_loc (tree decl)
{
- return htab_find_with_hash (decl_loc_table, decl, DECL_UID (decl));
+ return (var_loc_list *) htab_find_with_hash (decl_loc_table, decl, DECL_UID (decl));
}
/* Equate a DIE to a particular declaration. */
@@ -5689,12 +5689,12 @@ add_var_loc_to_decl (tree decl, struct var_loc_node *loc)
slot = htab_find_slot_with_hash (decl_loc_table, decl, decl_id, INSERT);
if (*slot == NULL)
{
- temp = ggc_alloc_cleared (sizeof (var_loc_list));
+ temp = (var_loc_list *) ggc_alloc_cleared (sizeof (var_loc_list));
temp->decl_id = decl_id;
*slot = temp;
}
else
- temp = *slot;
+ temp = (var_loc_list *) *slot;
if (temp->last)
{
@@ -6179,7 +6179,7 @@ compute_section_prefix (dw_die_ref unit_die)
{
const char *die_name = get_AT_string (unit_die, DW_AT_name);
const char *base = die_name ? lbasename (die_name) : "anonymous";
- char *name = alloca (strlen (base) + 64);
+ char *name = (char *) alloca (strlen (base) + 64);
char *p;
int i, mark;
unsigned char checksum[16];
@@ -6300,7 +6300,7 @@ assign_symbol_names (dw_die_ref die)
{
if (comdat_symbol_id)
{
- char *p = alloca (strlen (comdat_symbol_id) + 64);
+ char *p = (char *) alloca (strlen (comdat_symbol_id) + 64);
sprintf (p, "%s.%s.%x", DIE_LABEL_PREFIX,
comdat_symbol_id, comdat_symbol_number++);
@@ -6324,7 +6324,7 @@ struct cu_hash_table_entry
static hashval_t
htab_cu_hash (const void *of)
{
- const struct cu_hash_table_entry *entry = of;
+ const struct cu_hash_table_entry *entry = (const struct cu_hash_table_entry *) of;
return htab_hash_string (entry->cu->die_symbol);
}
@@ -6332,8 +6332,8 @@ htab_cu_hash (const void *of)
static int
htab_cu_eq (const void *of1, const void *of2)
{
- const struct cu_hash_table_entry *entry1 = of1;
- const struct die_struct *entry2 = of2;
+ const struct cu_hash_table_entry *entry1 = (const struct cu_hash_table_entry *) of1;
+ const struct die_struct *entry2 = (struct die_struct *) of2;
return !strcmp (entry1->cu->die_symbol, entry2->die_symbol);
}
@@ -6341,7 +6341,7 @@ htab_cu_eq (const void *of1, const void *of2)
static void
htab_cu_del (void *what)
{
- struct cu_hash_table_entry *next, *entry = what;
+ struct cu_hash_table_entry *next, *entry = (struct cu_hash_table_entry *) what;
while (entry)
{
@@ -6561,7 +6561,7 @@ build_abbrev_table (dw_die_ref die)
if (abbrev_die_table_in_use >= abbrev_die_table_allocated)
{
n_alloc = abbrev_die_table_allocated + ABBREV_DIE_TABLE_INCREMENT;
- abbrev_die_table = ggc_realloc (abbrev_die_table,
+ abbrev_die_table = (dw_die_ref *) ggc_realloc (abbrev_die_table,
sizeof (dw_die_ref) * n_alloc);
memset (&abbrev_die_table[abbrev_die_table_allocated], 0,
@@ -6853,7 +6853,7 @@ value_format (dw_attr_ref a)
case dw_val_class_macptr:
return DW_FORM_data;
case dw_val_class_str:
- return AT_string_form (a);
+ return (enum dwarf_form) AT_string_form (a);
case dw_val_class_file:
switch (constant_size (maybe_emit_file (a->dw_attr_val.v.val_file)))
{
@@ -6948,7 +6948,7 @@ static inline dw_loc_list_ref
new_loc_list (dw_loc_descr_ref expr, const char *begin, const char *end,
const char *section, unsigned int gensym)
{
- dw_loc_list_ref retlist = ggc_alloc_cleared (sizeof (dw_loc_list_node));
+ dw_loc_list_ref retlist = (dw_loc_list_ref) ggc_alloc_cleared (sizeof (dw_loc_list_node));
retlist->begin = begin;
retlist->end = end;
@@ -7294,7 +7294,7 @@ output_comp_unit (dw_die_ref die, int output_if_empty)
oldsym = die->die_symbol;
if (oldsym)
{
- tmp = alloca (strlen (oldsym) + 24);
+ tmp = (char *) alloca (strlen (oldsym) + 24);
sprintf (tmp, ".gnu.linkonce.wi.%s", oldsym);
secname = tmp;
@@ -7339,7 +7339,7 @@ add_pubname (tree decl, dw_die_ref die)
{
pubname_table_allocated += PUBNAME_TABLE_INCREMENT;
pubname_table
- = ggc_realloc (pubname_table,
+ = (pubname_entry *) ggc_realloc (pubname_table,
(pubname_table_allocated * sizeof (pubname_entry)));
memset (pubname_table + pubname_table_in_use, 0,
PUBNAME_TABLE_INCREMENT * sizeof (pubname_entry));
@@ -7399,7 +7399,7 @@ add_arange (tree decl, dw_die_ref die)
if (arange_table_in_use == arange_table_allocated)
{
arange_table_allocated += ARANGE_TABLE_INCREMENT;
- arange_table = ggc_realloc (arange_table,
+ arange_table = (dw_die_ref *) ggc_realloc (arange_table,
(arange_table_allocated
* sizeof (dw_die_ref)));
memset (arange_table + arange_table_in_use, 0,
@@ -7505,7 +7505,7 @@ add_ranges (tree block)
{
ranges_table_allocated += RANGES_TABLE_INCREMENT;
ranges_table
- = ggc_realloc (ranges_table, (ranges_table_allocated
+ = (struct dw_ranges_struct *) ggc_realloc (ranges_table, (ranges_table_allocated
* sizeof (struct dw_ranges_struct)));
memset (ranges_table + ranges_table_in_use, 0,
RANGES_TABLE_INCREMENT * sizeof (struct dw_ranges_struct));
@@ -7597,8 +7597,8 @@ struct dir_info
static int
file_info_cmp (const void *p1, const void *p2)
{
- const struct file_info *s1 = p1;
- const struct file_info *s2 = p2;
+ const struct file_info *s1 = (const struct file_info *) p1;
+ const struct file_info *s2 = (const struct file_info *) p2;
unsigned char *cp1;
unsigned char *cp2;
@@ -7641,8 +7641,8 @@ struct file_name_acquire_data
static int
file_name_acquire (void ** slot, void *data)
{
- struct file_name_acquire_data *fnad = data;
- struct dwarf_file_data *d = *slot;
+ struct file_name_acquire_data *fnad = (struct file_name_acquire_data *) data;
+ struct dwarf_file_data *d = (struct dwarf_file_data *)*slot;
struct file_info *fi;
const char *f;
@@ -7700,8 +7700,8 @@ output_file_names (void)
numfiles = last_emitted_file->emitted_number;
/* Allocate the various arrays we need. */
- files = alloca (numfiles * sizeof (struct file_info));
- dirs = alloca (numfiles * sizeof (struct dir_info));
+ files = (struct file_info *) alloca (numfiles * sizeof (struct file_info));
+ dirs = (struct dir_info *) alloca (numfiles * sizeof (struct dir_info));
fnad.files = files;
fnad.used_files = 0;
@@ -7759,8 +7759,8 @@ output_file_names (void)
where we would have to check out every combination of every single
possible prefix. Instead we use a heuristic which provides nearly optimal
results in most cases and never is much off. */
- saved = alloca (ndirs * sizeof (int));
- savehere = alloca (ndirs * sizeof (int));
+ saved = (int *) alloca (ndirs * sizeof (int));
+ savehere = (int *) alloca (ndirs * sizeof (int));
memset (saved, '\0', ndirs * sizeof (saved[0]));
for (i = 0; i < ndirs; i++)
@@ -7826,7 +7826,7 @@ output_file_names (void)
/* We have to emit them in the order of emitted_number since that's
used in the debug info generation. To do this efficiently we
generate a back-mapping of the indices first. */
- backmap = alloca (numfiles * sizeof (int));
+ backmap = (int *) alloca (numfiles * sizeof (int));
for (i = 0; i < numfiles; i++)
backmap[files[i].file_idx->emitted_number - 1] = i;
@@ -8211,7 +8211,7 @@ base_type_die (tree type)
if (TREE_CODE (TREE_TYPE (type)) == REAL_TYPE)
encoding = DW_ATE_complex_float;
else
- encoding = DW_ATE_lo_user;
+ encoding = (enum dwarf_type) DW_ATE_lo_user;
break;
case BOOLEAN_TYPE:
@@ -8623,7 +8623,7 @@ static dw_loc_descr_ref
one_reg_loc_descriptor (unsigned int regno)
{
if (regno <= 31)
- return new_loc_descr (DW_OP_reg0 + regno, 0, 0);
+ return new_loc_descr ((enum dwarf_location_atom) (DW_OP_reg0 + regno), 0, 0);
else
return new_loc_descr (DW_OP_regx, regno, 0);
}
@@ -8700,7 +8700,7 @@ int_loc_descriptor (HOST_WIDE_INT i)
if (i >= 0)
{
if (i <= 31)
- op = DW_OP_lit0 + i;
+ op = (enum dwarf_location_atom) (DW_OP_lit0 + i);
else if (i <= 0xff)
op = DW_OP_const1u;
else if (i <= 0xffff)
@@ -8759,7 +8759,7 @@ based_loc_descr (rtx reg, HOST_WIDE_INT offset)
regno = dbx_reg_number (reg);
if (regno <= 31)
- return new_loc_descr (DW_OP_breg0 + regno, offset, 0);
+ return new_loc_descr ((enum dwarf_location_atom) (DW_OP_breg0 + regno), offset, 0);
else
return new_loc_descr (DW_OP_bregx, regno, offset);
}
@@ -9148,7 +9148,7 @@ loc_descriptor_from_tree_1 (tree loc, int want_address)
if (! CONSTANT_P (rtl))
return 0;
- ret = new_loc_descr (INTERNAL_DW_OP_tls_addr, 0, 0);
+ ret = new_loc_descr ((enum dwarf_location_atom) INTERNAL_DW_OP_tls_addr, 0, 0);
ret->dw_loc_oprnd1.val_class = dw_val_class_addr;
ret->dw_loc_oprnd1.v.val_addr = rtl;
@@ -9874,7 +9874,7 @@ add_const_value_attribute (dw_die_ref die, rtx rtl)
if (SCALAR_FLOAT_MODE_P (mode))
{
unsigned int length = GET_MODE_SIZE (mode);
- unsigned char *array = ggc_alloc (length);
+ unsigned char *array = (unsigned char *) ggc_alloc (length);
insert_float (rtl, array);
add_AT_vec (die, DW_AT_const_value, length / 4, 4, array);
@@ -9895,7 +9895,7 @@ add_const_value_attribute (dw_die_ref die, rtx rtl)
enum machine_mode mode = GET_MODE (rtl);
unsigned int elt_size = GET_MODE_UNIT_SIZE (mode);
unsigned int length = CONST_VECTOR_NUNITS (rtl);
- unsigned char *array = ggc_alloc (length * elt_size);
+ unsigned char *array = (unsigned char *) ggc_alloc (length * elt_size);
unsigned int i;
unsigned char *p;
@@ -11105,7 +11105,7 @@ add_calling_convention_attribute (dw_die_ref subr_die, tree type)
{
enum dwarf_calling_convention value = DW_CC_normal;
- value = targetm.dwarf_calling_convention (type);
+ value = (enum dwarf_calling_convention) targetm.dwarf_calling_convention (type);
/* Only add the attribute if the backend requests it, and
is not DW_CC_normal. */
@@ -11599,7 +11599,7 @@ premark_used_types_helper (void **slot, void *data ATTRIBUTE_UNUSED)
tree type;
dw_die_ref die;
- type = *slot;
+ type = (tree) *slot;
die = lookup_type_die (type);
if (die != NULL)
die->die_perennial_p = 1;
@@ -13503,15 +13503,15 @@ dwarf2out_ignore_block (tree block)
static int
file_table_eq (const void *p1_p, const void *p2_p)
{
- const struct dwarf_file_data * p1 = p1_p;
- const char * p2 = p2_p;
+ const struct dwarf_file_data * p1 = (const struct dwarf_file_data *) p1_p;
+ const char * p2 = (const char *) p2_p;
return strcmp (p1->filename, p2) == 0;
}
static hashval_t
file_table_hash (const void *p_p)
{
- const struct dwarf_file_data * p = p_p;
+ const struct dwarf_file_data * p =(const struct dwarf_file_data *) p_p;
return htab_hash_string (p->filename);
}
@@ -13543,9 +13543,9 @@ lookup_filename (const char *file_name)
slot = htab_find_slot_with_hash (file_table, file_name,
htab_hash_string (file_name), INSERT);
if (*slot)
- return *slot;
+ return (struct dwarf_file_data *) *slot;
- created = ggc_alloc (sizeof (struct dwarf_file_data));
+ created = (struct dwarf_file_data *) ggc_alloc (sizeof (struct dwarf_file_data));
created->filename = file_name;
created->emitted_number = 0;
*slot = created;
@@ -13598,7 +13598,7 @@ dwarf2out_var_location (rtx loc_note)
return;
prev_insn = PREV_INSN (loc_note);
- newloc = ggc_alloc_cleared (sizeof (struct var_loc_node));
+ newloc = (struct var_loc_node *) ggc_alloc_cleared (sizeof (struct var_loc_node));
/* If the insn we processed last time is the previous insn
and it is also a var location note, use the label we emitted
last time. */
@@ -13684,7 +13684,7 @@ dwarf2out_source_line (unsigned int line, const char *filename)
{
separate_line_info_table_allocated += LINE_INFO_TABLE_INCREMENT;
separate_line_info_table
- = ggc_realloc (separate_line_info_table,
+ = (dw_separate_line_info_entry *) ggc_realloc (separate_line_info_table,
separate_line_info_table_allocated
* sizeof (dw_separate_line_info_entry));
memset (separate_line_info_table
@@ -13713,7 +13713,7 @@ dwarf2out_source_line (unsigned int line, const char *filename)
{
line_info_table_allocated += LINE_INFO_TABLE_INCREMENT;
line_info_table
- = ggc_realloc (line_info_table,
+ = (dw_line_info_entry *) ggc_realloc (line_info_table,
(line_info_table_allocated
* sizeof (dw_line_info_entry)));
memset (line_info_table + line_info_table_in_use, 0,
@@ -13826,14 +13826,14 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED)
decl_scope_table = VEC_alloc (tree, gc, 256);
/* Allocate the initial hunk of the abbrev_die_table. */
- abbrev_die_table = ggc_alloc_cleared (ABBREV_DIE_TABLE_INCREMENT
+ abbrev_die_table = (dw_die_ref *) ggc_alloc_cleared (ABBREV_DIE_TABLE_INCREMENT
* sizeof (dw_die_ref));
abbrev_die_table_allocated = ABBREV_DIE_TABLE_INCREMENT;
/* Zero-th entry is allocated, but unused. */
abbrev_die_table_in_use = 1;
/* Allocate the initial hunk of the line_info_table. */
- line_info_table = ggc_alloc_cleared (LINE_INFO_TABLE_INCREMENT
+ line_info_table = (dw_line_info_entry *) ggc_alloc_cleared (LINE_INFO_TABLE_INCREMENT
* sizeof (dw_line_info_entry));
line_info_table_allocated = LINE_INFO_TABLE_INCREMENT;
@@ -14186,8 +14186,8 @@ prune_unused_types (void)
static int
file_table_relative_p (void ** slot, void *param)
{
- bool *p = param;
- struct dwarf_file_data *d = *slot;
+ bool *p = (bool *) param;
+ struct dwarf_file_data *d = (struct dwarf_file_data *) *slot;
if (d->emitted_number && d->filename[0] != DIR_SEPARATOR)
{
*p = true;
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 9607bf69653..0d0776c5d45 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -308,7 +308,7 @@ get_mem_attrs (HOST_WIDE_INT alias, tree expr, rtx offset, rtx size,
memcpy (*slot, &attrs, sizeof (mem_attrs));
}
- return *slot;
+ return (mem_attrs *) *slot;
}
/* Returns a hash code for X (which is a really a reg_attrs *). */
@@ -357,7 +357,7 @@ get_reg_attrs (tree decl, int offset)
memcpy (*slot, &attrs, sizeof (reg_attrs));
}
- return *slot;
+ return (reg_attrs *) *slot;
}
/* Generate a new REG rtx. Make sure ORIGINAL_REGNO is set properly, and
@@ -728,7 +728,7 @@ gen_rtvec (int n, ...)
if (n == 0)
return NULL_RTVEC; /* Don't allocate an empty rtvec... */
- vector = alloca (n * sizeof (rtx));
+ vector = (rtx *) alloca (n * sizeof (rtx));
for (i = 0; i < n; i++)
vector[i] = va_arg (p, rtx);
@@ -793,14 +793,14 @@ gen_reg_rtx (enum machine_mode mode)
if (reg_rtx_no == f->emit->regno_pointer_align_length)
{
int old_size = f->emit->regno_pointer_align_length;
- char *new;
+ char *tmp;
rtx *new1;
- new = ggc_realloc (f->emit->regno_pointer_align, old_size * 2);
- memset (new + old_size, 0, old_size);
- f->emit->regno_pointer_align = (unsigned char *) new;
+ tmp = (char *) ggc_realloc (f->emit->regno_pointer_align, old_size * 2);
+ memset (tmp + old_size, 0, old_size);
+ f->emit->regno_pointer_align = (unsigned char *) tmp;
- new1 = ggc_realloc (f->emit->x_regno_reg_rtx,
+ new1 = (rtx *) ggc_realloc (f->emit->x_regno_reg_rtx,
old_size * 2 * sizeof (rtx));
memset (new1 + old_size, 0, old_size * sizeof (rtx));
regno_reg_rtx = new1;
@@ -819,7 +819,7 @@ gen_reg_rtx (enum machine_mode mode)
rtx
gen_rtx_REG_offset (rtx reg, enum machine_mode mode, unsigned int regno, int offset)
{
- rtx new = gen_rtx_REG (mode, regno);
+ rtx tmp = gen_rtx_REG (mode, regno);
tree decl;
HOST_WIDE_INT var_size;
@@ -903,9 +903,9 @@ gen_rtx_REG_offset (rtx reg, enum machine_mode mode, unsigned int regno, int off
}
}
- REG_ATTRS (new) = get_reg_attrs (REG_EXPR (reg),
+ REG_ATTRS (tmp) = get_reg_attrs (REG_EXPR (reg),
REG_OFFSET (reg) + offset);
- return new;
+ return tmp;
}
/* Set the decl for MEM to DECL. */
@@ -1306,18 +1306,18 @@ operand_subword (rtx op, unsigned int offset, int validate_address, enum machine
/* Form a new MEM at the requested address. */
if (MEM_P (op))
{
- rtx new = adjust_address_nv (op, word_mode, offset * UNITS_PER_WORD);
+ rtx tmp = adjust_address_nv (op, word_mode, offset * UNITS_PER_WORD);
if (! validate_address)
- return new;
+ return tmp;
else if (reload_completed)
{
- if (! strict_memory_address_p (word_mode, XEXP (new, 0)))
+ if (! strict_memory_address_p (word_mode, XEXP (tmp, 0)))
return 0;
}
else
- return replace_equiv_address (new, XEXP (new, 0));
+ return replace_equiv_address (tmp, XEXP (tmp, 0));
}
/* Rest can be handled by simplify_subreg. */
@@ -1767,7 +1767,7 @@ set_mem_size (rtx mem, rtx size)
static rtx
change_address_1 (rtx memref, enum machine_mode mode, rtx addr, int validate)
{
- rtx new;
+ rtx tmp;
gcc_assert (MEM_P (memref));
if (mode == VOIDmode)
@@ -1789,9 +1789,9 @@ change_address_1 (rtx memref, enum machine_mode mode, rtx addr, int validate)
if (rtx_equal_p (addr, XEXP (memref, 0)) && mode == GET_MODE (memref))
return memref;
- new = gen_rtx_MEM (mode, addr);
- MEM_COPY_ATTRIBUTES (new, memref);
- return new;
+ tmp = gen_rtx_MEM (mode, addr);
+ MEM_COPY_ATTRIBUTES (tmp, memref);
+ return tmp;
}
/* Like change_address_1 with VALIDATE nonzero, but we are not saying in what
@@ -1800,31 +1800,31 @@ change_address_1 (rtx memref, enum machine_mode mode, rtx addr, int validate)
rtx
change_address (rtx memref, enum machine_mode mode, rtx addr)
{
- rtx new = change_address_1 (memref, mode, addr, 1), size;
- enum machine_mode mmode = GET_MODE (new);
+ rtx tmp = change_address_1 (memref, mode, addr, 1), size;
+ enum machine_mode mmode = GET_MODE (tmp);
unsigned int align;
size = mmode == BLKmode ? 0 : GEN_INT (GET_MODE_SIZE (mmode));
align = mmode == BLKmode ? BITS_PER_UNIT : GET_MODE_ALIGNMENT (mmode);
/* If there are no changes, just return the original memory reference. */
- if (new == memref)
+ if (tmp == memref)
{
if (MEM_ATTRS (memref) == 0
|| (MEM_EXPR (memref) == NULL
&& MEM_OFFSET (memref) == NULL
&& MEM_SIZE (memref) == size
&& MEM_ALIGN (memref) == align))
- return new;
+ return tmp;
- new = gen_rtx_MEM (mmode, XEXP (memref, 0));
- MEM_COPY_ATTRIBUTES (new, memref);
+ tmp = gen_rtx_MEM (mmode, XEXP (memref, 0));
+ MEM_COPY_ATTRIBUTES (tmp, memref);
}
- MEM_ATTRS (new)
+ MEM_ATTRS (tmp)
= get_mem_attrs (MEM_ALIAS_SET (memref), 0, 0, size, align, mmode);
- return new;
+ return tmp;
}
/* Return a memory reference like MEMREF, but with its mode changed
@@ -1838,7 +1838,7 @@ adjust_address_1 (rtx memref, enum machine_mode mode, HOST_WIDE_INT offset,
int validate, int adjust)
{
rtx addr = XEXP (memref, 0);
- rtx new;
+ rtx tmp;
rtx memoffset = MEM_OFFSET (memref);
rtx size = 0;
unsigned int memalign = MEM_ALIGN (memref);
@@ -1867,7 +1867,7 @@ adjust_address_1 (rtx memref, enum machine_mode mode, HOST_WIDE_INT offset,
addr = plus_constant (addr, offset);
}
- new = change_address_1 (memref, mode, addr, validate);
+ tmp = change_address_1 (memref, mode, addr, validate);
/* Compute the new values of the memory attributes due to this adjustment.
We add the offsets and update the alignment. */
@@ -1883,17 +1883,17 @@ adjust_address_1 (rtx memref, enum machine_mode mode, HOST_WIDE_INT offset,
(unsigned HOST_WIDE_INT) (offset & -offset) * BITS_PER_UNIT);
/* We can compute the size in a number of ways. */
- if (GET_MODE (new) != BLKmode)
- size = GEN_INT (GET_MODE_SIZE (GET_MODE (new)));
+ if (GET_MODE (tmp) != BLKmode)
+ size = GEN_INT (GET_MODE_SIZE (GET_MODE (tmp)));
else if (MEM_SIZE (memref))
size = plus_constant (MEM_SIZE (memref), -offset);
- MEM_ATTRS (new) = get_mem_attrs (MEM_ALIAS_SET (memref), MEM_EXPR (memref),
- memoffset, size, memalign, GET_MODE (new));
+ MEM_ATTRS (tmp) = get_mem_attrs (MEM_ALIAS_SET (memref), MEM_EXPR (memref),
+ memoffset, size, memalign, GET_MODE (tmp));
/* At some point, we should validate that this offset is within the object,
if all the appropriate values are known. */
- return new;
+ return tmp;
}
/* Return a memory reference like MEMREF, but with its mode changed
@@ -1916,9 +1916,9 @@ adjust_automodify_address_1 (rtx memref, enum machine_mode mode, rtx addr,
rtx
offset_address (rtx memref, rtx offset, unsigned HOST_WIDE_INT pow2)
{
- rtx new, addr = XEXP (memref, 0);
+ rtx tmp, addr = XEXP (memref, 0);
- new = simplify_gen_binary (PLUS, Pmode, addr, offset);
+ tmp = simplify_gen_binary (PLUS, Pmode, addr, offset);
/* At this point we don't know _why_ the address is invalid. It
could have secondary memory references, multiplies or anything.
@@ -1927,28 +1927,28 @@ offset_address (rtx memref, rtx offset, unsigned HOST_WIDE_INT pow2)
being able to recognize the magic around pic_offset_table_rtx.
This stuff is fragile, and is yet another example of why it is
bad to expose PIC machinery too early. */
- if (! memory_address_p (GET_MODE (memref), new)
+ if (! memory_address_p (GET_MODE (memref), tmp)
&& GET_CODE (addr) == PLUS
&& XEXP (addr, 0) == pic_offset_table_rtx)
{
addr = force_reg (GET_MODE (addr), addr);
- new = simplify_gen_binary (PLUS, Pmode, addr, offset);
+ tmp = simplify_gen_binary (PLUS, Pmode, addr, offset);
}
- update_temp_slot_address (XEXP (memref, 0), new);
- new = change_address_1 (memref, VOIDmode, new, 1);
+ update_temp_slot_address (XEXP (memref, 0), tmp);
+ tmp = change_address_1 (memref, VOIDmode, tmp, 1);
/* If there are no changes, just return the original memory reference. */
- if (new == memref)
- return new;
+ if (tmp == memref)
+ return tmp;
/* Update the alignment to reflect the offset. Reset the offset, which
we don't know. */
- MEM_ATTRS (new)
+ MEM_ATTRS (tmp)
= get_mem_attrs (MEM_ALIAS_SET (memref), MEM_EXPR (memref), 0, 0,
MIN (MEM_ALIGN (memref), pow2 * BITS_PER_UNIT),
- GET_MODE (new));
- return new;
+ GET_MODE (tmp));
+ return tmp;
}
/* Return a memory reference like MEMREF, but with its address changed to
@@ -1981,14 +1981,14 @@ replace_equiv_address_nv (rtx memref, rtx addr)
rtx
widen_memory_access (rtx memref, enum machine_mode mode, HOST_WIDE_INT offset)
{
- rtx new = adjust_address_1 (memref, mode, offset, 1, 1);
- tree expr = MEM_EXPR (new);
- rtx memoffset = MEM_OFFSET (new);
+ rtx tmp = adjust_address_1 (memref, mode, offset, 1, 1);
+ tree expr = MEM_EXPR (tmp);
+ rtx memoffset = MEM_OFFSET (tmp);
unsigned int size = GET_MODE_SIZE (mode);
/* If there are no changes, just return the original memory reference. */
- if (new == memref)
- return new;
+ if (tmp == memref)
+ return tmp;
/* If we don't know what offset we were at within the expression, then
we can't know if we've overstepped the bounds. */
@@ -2050,10 +2050,10 @@ widen_memory_access (rtx memref, enum machine_mode mode, HOST_WIDE_INT offset)
/* The widened memory may alias other stuff, so zap the alias set. */
/* ??? Maybe use get_alias_set on any remaining expression. */
- MEM_ATTRS (new) = get_mem_attrs (0, expr, memoffset, GEN_INT (size),
- MEM_ALIGN (new), mode);
+ MEM_ATTRS (tmp) = get_mem_attrs (0, expr, memoffset, GEN_INT (size),
+ MEM_ALIGN (tmp), mode);
- return new;
+ return tmp;
}
/* Return a newly created CODE_LABEL rtx with a unique label number. */
@@ -4679,7 +4679,7 @@ start_sequence (void)
free_sequence_stack = tem->next;
}
else
- tem = ggc_alloc (sizeof (struct sequence_stack));
+ tem = (struct sequence_stack *) ggc_alloc (sizeof (struct sequence_stack));
tem->next = seq_stack;
tem->first = first_insn;
@@ -4966,7 +4966,7 @@ init_emit (void)
{
struct function *f = cfun;
- f->emit = ggc_alloc (sizeof (struct emit_status));
+ f->emit = (struct emit_status *) ggc_alloc (sizeof (struct emit_status));
first_insn = NULL;
last_insn = NULL;
cur_insn_uid = 1;
@@ -4980,11 +4980,11 @@ init_emit (void)
f->emit->regno_pointer_align_length = LAST_VIRTUAL_REGISTER + 101;
f->emit->regno_pointer_align
- = ggc_alloc_cleared (f->emit->regno_pointer_align_length
+ = (unsigned char *) ggc_alloc_cleared (f->emit->regno_pointer_align_length
* sizeof (unsigned char));
regno_reg_rtx
- = ggc_alloc (f->emit->regno_pointer_align_length * sizeof (rtx));
+ = (rtx *) ggc_alloc (f->emit->regno_pointer_align_length * sizeof (rtx));
/* Put copies of all the hard registers into regno_reg_rtx. */
memcpy (regno_reg_rtx,
@@ -5082,6 +5082,25 @@ gen_rtx_CONST_VECTOR (enum machine_mode mode, rtvec v)
return gen_rtx_raw_CONST_VECTOR (mode, v);
}
+#if 0
+#define gen_rtx_EXPR_LIST(MODE, ARG0, ARG1) \
+ gen_rtx_fmt_ee (EXPR_LIST, (enum machine_mode)(MODE), (ARG0), (ARG1))
+#define gen_rtx_INSN_LIST(MODE, ARG0, ARG1) \
+ gen_rtx_fmt_ue (INSN_LIST, (enum machine_mode)(MODE), (ARG0), (ARG1))
+#endif
+
+rtx
+gen_rtx_EXPR_LIST (enum reg_note note, rtx arg0, rtx arg1)
+{
+ return gen_rtx_raw_EXPR_LIST ((enum machine_mode) note, arg0, arg1);
+}
+
+rtx
+gen_rtx_INSN_LIST (enum reg_note note, rtx arg0, rtx arg1)
+{
+ return gen_rtx_raw_INSN_LIST ((enum machine_mode) note, arg0, arg1);
+}
+
/* Create some permanent unique rtl objects shared between all functions.
LINE_NUMBERS is nonzero if line numbers are to be generated. */
@@ -5301,26 +5320,26 @@ init_emit_once (int line_numbers)
rtx
emit_copy_of_insn_after (rtx insn, rtx after)
{
- rtx new;
+ rtx tmp;
rtx note1, note2, link;
switch (GET_CODE (insn))
{
case INSN:
- new = emit_insn_after (copy_insn (PATTERN (insn)), after);
+ tmp = emit_insn_after (copy_insn (PATTERN (insn)), after);
break;
case JUMP_INSN:
- new = emit_jump_insn_after (copy_insn (PATTERN (insn)), after);
+ tmp = emit_jump_insn_after (copy_insn (PATTERN (insn)), after);
break;
case CALL_INSN:
- new = emit_call_insn_after (copy_insn (PATTERN (insn)), after);
+ tmp = emit_call_insn_after (copy_insn (PATTERN (insn)), after);
if (CALL_INSN_FUNCTION_USAGE (insn))
- CALL_INSN_FUNCTION_USAGE (new)
+ CALL_INSN_FUNCTION_USAGE (tmp)
= copy_insn (CALL_INSN_FUNCTION_USAGE (insn));
- SIBLING_CALL_P (new) = SIBLING_CALL_P (insn);
- CONST_OR_PURE_CALL_P (new) = CONST_OR_PURE_CALL_P (insn);
+ SIBLING_CALL_P (tmp) = SIBLING_CALL_P (insn);
+ CONST_OR_PURE_CALL_P (tmp) = CONST_OR_PURE_CALL_P (insn);
break;
default:
@@ -5328,14 +5347,14 @@ emit_copy_of_insn_after (rtx insn, rtx after)
}
/* Update LABEL_NUSES. */
- mark_jump_label (PATTERN (new), new, 0);
+ mark_jump_label (PATTERN (tmp), tmp, 0);
- INSN_LOCATOR (new) = INSN_LOCATOR (insn);
+ INSN_LOCATOR (tmp) = INSN_LOCATOR (insn);
/* If the old insn is frame related, then so is the new one. This is
primarily needed for IA-64 unwind info which marks epilogue insns,
which may be duplicated by the basic block reordering code. */
- RTX_FRAME_RELATED_P (new) = RTX_FRAME_RELATED_P (insn);
+ RTX_FRAME_RELATED_P (tmp) = RTX_FRAME_RELATED_P (insn);
/* Copy all REG_NOTES except REG_LABEL since mark_jump_label will
make them. */
@@ -5343,28 +5362,28 @@ emit_copy_of_insn_after (rtx insn, rtx after)
if (REG_NOTE_KIND (link) != REG_LABEL)
{
if (GET_CODE (link) == EXPR_LIST)
- REG_NOTES (new)
+ REG_NOTES (tmp)
= copy_insn_1 (gen_rtx_EXPR_LIST (REG_NOTE_KIND (link),
XEXP (link, 0),
- REG_NOTES (new)));
+ REG_NOTES (tmp)));
else
- REG_NOTES (new)
+ REG_NOTES (tmp)
= copy_insn_1 (gen_rtx_INSN_LIST (REG_NOTE_KIND (link),
XEXP (link, 0),
- REG_NOTES (new)));
+ REG_NOTES (tmp)));
}
/* Fix the libcall sequences. */
- if ((note1 = find_reg_note (new, REG_RETVAL, NULL_RTX)) != NULL)
+ if ((note1 = find_reg_note (tmp, REG_RETVAL, NULL_RTX)) != NULL)
{
- rtx p = new;
+ rtx p = tmp;
while ((note2 = find_reg_note (p, REG_LIBCALL, NULL_RTX)) == NULL)
p = PREV_INSN (p);
XEXP (note1, 0) = p;
- XEXP (note2, 0) = new;
+ XEXP (note2, 0) = tmp;
}
- INSN_CODE (new) = INSN_CODE (insn);
- return new;
+ INSN_CODE (tmp) = INSN_CODE (insn);
+ return tmp;
}
static GTY((deletable)) rtx hard_reg_clobbers [NUM_MACHINE_MODES][FIRST_PSEUDO_REGISTER];
diff --git a/gcc/et-forest.c b/gcc/et-forest.c
index b8e55274109..1646a56c173 100644
--- a/gcc/et-forest.c
+++ b/gcc/et-forest.c
@@ -447,7 +447,7 @@ et_new_occ (struct et_node *node)
if (!et_occurrences)
et_occurrences = create_alloc_pool ("et_occ pool", sizeof (struct et_occ), 300);
- nw = pool_alloc (et_occurrences);
+ nw = (struct et_occ *) pool_alloc (et_occurrences);
nw->of = node;
nw->parent = NULL;
@@ -470,7 +470,7 @@ et_new_tree (void *data)
if (!et_nodes)
et_nodes = create_alloc_pool ("et_node pool", sizeof (struct et_node), 300);
- nw = pool_alloc (et_nodes);
+ nw = (struct et_node *) pool_alloc (et_nodes);
nw->data = data;
nw->father = NULL;
diff --git a/gcc/except.c b/gcc/except.c
index 30dafbb8073..49ec3cd59e2 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -115,6 +115,17 @@ static int sjlj_fc_personality_ofs;
static int sjlj_fc_lsda_ofs;
static int sjlj_fc_jbuf_ofs;
+enum eh_region_type
+{
+ ERT_UNKNOWN = 0,
+ ERT_CLEANUP,
+ ERT_TRY,
+ ERT_CATCH,
+ ERT_ALLOWED_EXCEPTIONS,
+ ERT_MUST_NOT_THROW,
+ ERT_THROW
+};
+
/* Describes one exception region. */
struct eh_region GTY(())
{
@@ -133,25 +144,16 @@ struct eh_region GTY(())
bitmap aka;
/* Each region does exactly one thing. */
- enum eh_region_type
- {
- ERT_UNKNOWN = 0,
- ERT_CLEANUP,
- ERT_TRY,
- ERT_CATCH,
- ERT_ALLOWED_EXCEPTIONS,
- ERT_MUST_NOT_THROW,
- ERT_THROW
- } type;
+ enum eh_region_type type;
/* Holds the action to perform based on the preceding type. */
union eh_region_u {
/* A list of catch blocks, a surrounding try block,
and the label for continuing after a catch. */
struct eh_region_u_try {
- struct eh_region *catch;
+ struct eh_region *ert_catch;
struct eh_region *last_catch;
- } GTY ((tag ("ERT_TRY"))) try;
+ } GTY ((tag ("ERT_TRY"))) ert_try;
/* The list through the catch handlers, the list of type objects
matched, and the list of associated filters. */
@@ -160,7 +162,7 @@ struct eh_region GTY(())
struct eh_region *prev_catch;
tree type_list;
tree filter_list;
- } GTY ((tag ("ERT_CATCH"))) catch;
+ } GTY ((tag ("ERT_CATCH"))) ert_catch;
/* A tree_list of allowed types. */
struct eh_region_u_allowed {
@@ -172,7 +174,7 @@ struct eh_region GTY(())
for a throw. */
struct eh_region_u_throw {
tree type;
- } GTY ((tag ("ERT_THROW"))) throw;
+ } GTY ((tag ("ERT_THROW"))) ert_throw;
/* Retain the cleanup expression even after expansion so that
we can match up fixup regions. */
@@ -199,7 +201,7 @@ struct eh_region GTY(())
unsigned may_contain_throw : 1;
};
-typedef struct eh_region *eh_region;
+typedef struct eh_region *eh_region_t;
struct call_site_record GTY(())
{
@@ -207,8 +209,8 @@ struct call_site_record GTY(())
int action;
};
-DEF_VEC_P(eh_region);
-DEF_VEC_ALLOC_P(eh_region, gc);
+DEF_VEC_P(eh_region_t);
+DEF_VEC_ALLOC_P(eh_region_t, gc);
/* Used to save exception status for each function. */
struct eh_status GTY(())
@@ -217,7 +219,7 @@ struct eh_status GTY(())
struct eh_region *region_tree;
/* The same information as an indexable array. */
- VEC(eh_region,gc) *region_array;
+ VEC(eh_region_t, gc) *region_array;
/* The most recently open region. */
struct eh_region *cur_region;
@@ -438,7 +440,7 @@ init_eh (void)
void
init_eh_for_function (void)
{
- cfun->eh = ggc_alloc_cleared (sizeof (struct eh_status));
+ cfun->eh = (struct eh_status *) ggc_alloc_cleared (sizeof (struct eh_status));
}
/* Routines to generate the exception tree somewhat directly.
@@ -448,30 +450,30 @@ init_eh_for_function (void)
static struct eh_region *
gen_eh_region (enum eh_region_type type, struct eh_region *outer)
{
- struct eh_region *new;
+ struct eh_region *ehr;
#ifdef ENABLE_CHECKING
gcc_assert (doing_eh (0));
#endif
/* Insert a new blank region as a leaf in the tree. */
- new = ggc_alloc_cleared (sizeof (*new));
- new->type = type;
- new->outer = outer;
+ ehr = (struct eh_region *) ggc_alloc_cleared (sizeof (*ehr));
+ ehr->type = type;
+ ehr->outer = outer;
if (outer)
{
- new->next_peer = outer->inner;
- outer->inner = new;
+ ehr->next_peer = outer->inner;
+ outer->inner = ehr;
}
else
{
- new->next_peer = cfun->eh->region_tree;
- cfun->eh->region_tree = new;
+ ehr->next_peer = cfun->eh->region_tree;
+ cfun->eh->region_tree = ehr;
}
- new->region_number = ++cfun->eh->last_region_number;
+ ehr->region_number = ++cfun->eh->last_region_number;
- return new;
+ return ehr;
}
struct eh_region *
@@ -508,14 +510,14 @@ gen_eh_region_catch (struct eh_region *t, tree type_or_list)
}
c = gen_eh_region (ERT_CATCH, t->outer);
- c->u.catch.type_list = type_list;
- l = t->u.try.last_catch;
- c->u.catch.prev_catch = l;
+ c->u.ert_catch.type_list = type_list;
+ l = t->u.ert_try.last_catch;
+ c->u.ert_catch.prev_catch = l;
if (l)
- l->u.catch.next_catch = c;
+ l->u.ert_catch.next_catch = c;
else
- t->u.try.catch = c;
- t->u.try.last_catch = c;
+ t->u.ert_try.ert_catch = c;
+ t->u.ert_try.last_catch = c;
return c;
}
@@ -566,7 +568,7 @@ void
expand_resx_expr (tree exp)
{
int region_nr = TREE_INT_CST_LOW (TREE_OPERAND (exp, 0));
- struct eh_region *reg = VEC_index (eh_region,
+ struct eh_region *reg = VEC_index (eh_region_t,
cfun->eh->region_array, region_nr);
gcc_assert (!reg->resume);
@@ -637,13 +639,13 @@ collect_eh_region_array (void)
if (! i)
return;
- VEC_safe_grow (eh_region, gc, cfun->eh->region_array,
+ VEC_safe_grow (eh_region_t, gc, cfun->eh->region_array,
cfun->eh->last_region_number + 1);
- VEC_replace (eh_region, cfun->eh->region_array, 0, 0);
+ VEC_replace (eh_region_t, cfun->eh->region_array, 0, 0);
while (1)
{
- VEC_replace (eh_region, cfun->eh->region_array, i->region_number, i);
+ VEC_replace (eh_region_t, cfun->eh->region_array, i->region_number, i);
/* If there are sub-regions, process them. */
if (i->inner)
@@ -674,12 +676,12 @@ remove_unreachable_regions (rtx insns)
struct eh_region *r;
rtx insn;
- uid_region_num = xcalloc (get_max_uid (), sizeof(int));
- reachable = xcalloc (cfun->eh->last_region_number + 1, sizeof(bool));
+ uid_region_num = XCNEWVEC (int, get_max_uid ());
+ reachable = XCNEWVEC (bool, cfun->eh->last_region_number + 1);
for (i = cfun->eh->last_region_number; i > 0; --i)
{
- r = VEC_index (eh_region, cfun->eh->region_array, i);
+ r = VEC_index (eh_region_t, cfun->eh->region_array, i);
if (!r || r->region_number != i)
continue;
@@ -700,7 +702,7 @@ remove_unreachable_regions (rtx insns)
for (i = cfun->eh->last_region_number; i > 0; --i)
{
- r = VEC_index (eh_region, cfun->eh->region_array, i);
+ r = VEC_index (eh_region_t, cfun->eh->region_array, i);
if (r && r->region_number == i && !reachable[i])
{
bool kill_it = true;
@@ -725,7 +727,7 @@ remove_unreachable_regions (rtx insns)
/* TRY regions are reachable if any of its CATCH regions
are reachable. */
struct eh_region *c;
- for (c = r->u.try.catch; c ; c = c->u.catch.next_catch)
+ for (c = r->u.ert_try.ert_catch; c ; c = c->u.ert_catch.next_catch)
if (reachable[c->region_number])
{
kill_it = false;
@@ -763,7 +765,7 @@ convert_from_eh_region_ranges (void)
{
struct eh_region *region;
- region = VEC_index (eh_region, cfun->eh->region_array, i);
+ region = VEC_index (eh_region_t, cfun->eh->region_array, i);
if (region && region->tree_label)
region->label = DECL_RTL_IF_SET (region->tree_label);
}
@@ -778,7 +780,7 @@ add_ehl_entry (rtx label, struct eh_region *region)
LABEL_PRESERVE_P (label) = 1;
- entry = ggc_alloc (sizeof (*entry));
+ entry = (struct ehl_map_entry *) ggc_alloc (sizeof (*entry));
entry->label = label;
entry->region = region;
@@ -818,7 +820,7 @@ find_exception_handler_labels (void)
struct eh_region *region;
rtx lab;
- region = VEC_index (eh_region, cfun->eh->region_array, i);
+ region = VEC_index (eh_region_t, cfun->eh->region_array, i);
if (! region || region->region_number != i)
continue;
if (cfun->eh->built_landing_pads)
@@ -847,7 +849,7 @@ current_function_has_exception_handlers (void)
{
struct eh_region *region;
- region = VEC_index (eh_region, cfun->eh->region_array, i);
+ region = VEC_index (eh_region_t, cfun->eh->region_array, i);
if (region
&& region->region_number == i
&& region->type != ERT_THROW)
@@ -861,7 +863,7 @@ current_function_has_exception_handlers (void)
for the minimum and maximum region numbers. Update *MIN and *MAX. */
static void
-duplicate_eh_regions_0 (eh_region o, int *min, int *max)
+duplicate_eh_regions_0 (eh_region_t o, int *min, int *max)
{
if (o->region_number < *min)
*min = o->region_number;
@@ -884,12 +886,12 @@ duplicate_eh_regions_0 (eh_region o, int *min, int *max)
Root it at OUTER, and apply EH_OFFSET to the region number. Don't worry
about the other internal pointers just yet, just the tree-like pointers. */
-static eh_region
-duplicate_eh_regions_1 (eh_region old, eh_region outer, int eh_offset)
+static eh_region_t
+duplicate_eh_regions_1 (eh_region_t old, eh_region_t outer, int eh_offset)
{
- eh_region ret, n;
+ eh_region_t ret, n;
- ret = n = ggc_alloc (sizeof (struct eh_region));
+ ret = n = (eh_region_t) ggc_alloc (sizeof (struct eh_region));
*n = *old;
n->outer = outer;
@@ -897,7 +899,7 @@ duplicate_eh_regions_1 (eh_region old, eh_region outer, int eh_offset)
gcc_assert (!old->aka);
n->region_number += eh_offset;
- VEC_replace (eh_region, cfun->eh->region_array, n->region_number, n);
+ VEC_replace (eh_region_t, cfun->eh->region_array, n->region_number, n);
if (old->inner)
{
@@ -921,7 +923,7 @@ int
duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
void *data, int copy_region, int outer_region)
{
- eh_region cur, prev_try, outer, *splice;
+ eh_region_t cur, prev_try, outer, *splice;
int i, min_region, max_region, eh_offset, cfun_last_region_number;
int num_regions;
@@ -937,7 +939,7 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
min_region = INT_MAX;
max_region = 0;
- cur = VEC_index (eh_region, ifun->eh->region_array, copy_region);
+ cur = VEC_index (eh_region_t, ifun->eh->region_array, copy_region);
duplicate_eh_regions_0 (cur, &min_region, &max_region);
}
else
@@ -947,22 +949,22 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
eh_offset = cfun_last_region_number + 1 - min_region;
/* If we've not yet created a region array, do so now. */
- VEC_safe_grow (eh_region, gc, cfun->eh->region_array,
+ VEC_safe_grow (eh_region_t, gc, cfun->eh->region_array,
cfun_last_region_number + 1 + num_regions);
cfun->eh->last_region_number = max_region + eh_offset;
/* We may have just allocated the array for the first time.
Make sure that element zero is null. */
- VEC_replace (eh_region, cfun->eh->region_array, 0, 0);
+ VEC_replace (eh_region_t, cfun->eh->region_array, 0, 0);
/* Zero all entries in the range allocated. */
- memset (VEC_address (eh_region, cfun->eh->region_array)
- + cfun_last_region_number + 1, 0, num_regions * sizeof (eh_region));
+ memset (VEC_address (eh_region_t, cfun->eh->region_array)
+ + cfun_last_region_number + 1, 0, num_regions * sizeof (eh_region_t));
/* Locate the spot at which to insert the new tree. */
if (outer_region > 0)
{
- outer = VEC_index (eh_region, cfun->eh->region_array, outer_region);
+ outer = VEC_index (eh_region_t, cfun->eh->region_array, outer_region);
splice = &outer->inner;
}
else
@@ -976,12 +978,12 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
/* Copy all the regions in the subtree. */
if (copy_region > 0)
{
- cur = VEC_index (eh_region, ifun->eh->region_array, copy_region);
+ cur = VEC_index (eh_region_t, ifun->eh->region_array, copy_region);
*splice = duplicate_eh_regions_1 (cur, outer, eh_offset);
}
else
{
- eh_region n;
+ eh_region_t n;
cur = ifun->eh->region_tree;
*splice = n = duplicate_eh_regions_1 (cur, outer, eh_offset);
@@ -994,7 +996,7 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
/* Remap all the labels in the new regions. */
for (i = cfun_last_region_number + 1;
- VEC_iterate (eh_region, cfun->eh->region_array, i, cur); ++i)
+ VEC_iterate (eh_region_t, cfun->eh->region_array, i, cur); ++i)
if (cur && cur->tree_label)
cur->tree_label = map (cur->tree_label, data);
@@ -1002,7 +1004,7 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
the prev_try short-cuts for ERT_CLEANUP regions. */
prev_try = NULL;
if (outer_region > 0)
- for (prev_try = VEC_index (eh_region, cfun->eh->region_array, outer_region);
+ for (prev_try = VEC_index (eh_region_t, cfun->eh->region_array, outer_region);
prev_try && prev_try->type != ERT_TRY;
prev_try = prev_try->outer)
;
@@ -1012,29 +1014,29 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
been copied too. And since we renumbered them as a block, a simple
bit of arithmetic finds us the index for the replacement region. */
for (i = cfun_last_region_number + 1;
- VEC_iterate (eh_region, cfun->eh->region_array, i, cur); ++i)
+ VEC_iterate (eh_region_t, cfun->eh->region_array, i, cur); ++i)
{
if (cur == NULL)
continue;
#define REMAP(REG) \
- (REG) = VEC_index (eh_region, cfun->eh->region_array, \
+ (REG) = VEC_index (eh_region_t, cfun->eh->region_array, \
(REG)->region_number + eh_offset)
switch (cur->type)
{
case ERT_TRY:
- if (cur->u.try.catch)
- REMAP (cur->u.try.catch);
- if (cur->u.try.last_catch)
- REMAP (cur->u.try.last_catch);
+ if (cur->u.ert_try.ert_catch)
+ REMAP (cur->u.ert_try.ert_catch);
+ if (cur->u.ert_try.last_catch)
+ REMAP (cur->u.ert_try.last_catch);
break;
case ERT_CATCH:
- if (cur->u.catch.next_catch)
- REMAP (cur->u.catch.next_catch);
- if (cur->u.catch.prev_catch)
- REMAP (cur->u.catch.prev_catch);
+ if (cur->u.ert_catch.next_catch)
+ REMAP (cur->u.ert_catch.next_catch);
+ if (cur->u.ert_catch.prev_catch)
+ REMAP (cur->u.ert_catch.prev_catch);
break;
case ERT_CLEANUP:
@@ -1064,8 +1066,8 @@ eh_region_outer_p (struct function *ifun, int region_a, int region_b)
gcc_assert (ifun->eh->last_region_number > 0);
gcc_assert (ifun->eh->region_tree);
- rp_a = VEC_index (eh_region, ifun->eh->region_array, region_a);
- rp_b = VEC_index (eh_region, ifun->eh->region_array, region_b);
+ rp_a = VEC_index (eh_region_t, ifun->eh->region_array, region_a);
+ rp_b = VEC_index (eh_region_t, ifun->eh->region_array, region_b);
gcc_assert (rp_a != NULL);
gcc_assert (rp_b != NULL);
@@ -1092,8 +1094,8 @@ eh_region_outermost (struct function *ifun, int region_a, int region_b)
gcc_assert (ifun->eh->last_region_number > 0);
gcc_assert (ifun->eh->region_tree);
- rp_a = VEC_index (eh_region, ifun->eh->region_array, region_a);
- rp_b = VEC_index (eh_region, ifun->eh->region_array, region_b);
+ rp_a = VEC_index (eh_region_t, ifun->eh->region_array, region_a);
+ rp_b = VEC_index (eh_region_t, ifun->eh->region_array, region_b);
gcc_assert (rp_a != NULL);
gcc_assert (rp_b != NULL);
@@ -1314,7 +1316,7 @@ assign_filter_values (void)
{
struct eh_region *r;
- r = VEC_index (eh_region, cfun->eh->region_array, i);
+ r = VEC_index (eh_region_t, cfun->eh->region_array, i);
/* Mind we don't process a region more than once. */
if (!r || r->region_number != i)
@@ -1325,21 +1327,21 @@ assign_filter_values (void)
case ERT_CATCH:
/* Whatever type_list is (NULL or true list), we build a list
of filters for the region. */
- r->u.catch.filter_list = NULL_TREE;
+ r->u.ert_catch.filter_list = NULL_TREE;
- if (r->u.catch.type_list != NULL)
+ if (r->u.ert_catch.type_list != NULL)
{
/* Get a filter value for each of the types caught and store
them in the region's dedicated list. */
- tree tp_node = r->u.catch.type_list;
+ tree tp_node = r->u.ert_catch.type_list;
for (;tp_node; tp_node = TREE_CHAIN (tp_node))
{
int flt = add_ttypes_entry (ttypes, TREE_VALUE (tp_node));
tree flt_node = build_int_cst (NULL_TREE, flt);
- r->u.catch.filter_list
- = tree_cons (NULL_TREE, flt_node, r->u.catch.filter_list);
+ r->u.ert_catch.filter_list
+ = tree_cons (NULL_TREE, flt_node, r->u.ert_catch.filter_list);
}
}
else
@@ -1349,8 +1351,8 @@ assign_filter_values (void)
int flt = add_ttypes_entry (ttypes, NULL);
tree flt_node = build_int_cst (NULL_TREE, flt);
- r->u.catch.filter_list
- = tree_cons (NULL_TREE, flt_node, r->u.catch.filter_list);
+ r->u.ert_catch.filter_list
+ = tree_cons (NULL_TREE, flt_node, r->u.ert_catch.filter_list);
}
break;
@@ -1410,7 +1412,7 @@ build_post_landing_pads (void)
struct eh_region *region;
rtx seq;
- region = VEC_index (eh_region, cfun->eh->region_array, i);
+ region = VEC_index (eh_region_t, cfun->eh->region_array, i);
/* Mind we don't process a region more than once. */
if (!region || region->region_number != i)
continue;
@@ -1435,17 +1437,17 @@ build_post_landing_pads (void)
Rapid prototyping sez a sequence of ifs. */
{
struct eh_region *c;
- for (c = region->u.try.catch; c ; c = c->u.catch.next_catch)
+ for (c = region->u.ert_try.ert_catch; c ; c = c->u.ert_catch.next_catch)
{
- if (c->u.catch.type_list == NULL)
+ if (c->u.ert_catch.type_list == NULL)
emit_jump (c->label);
else
{
/* Need for one cmp/jump per type caught. Each type
list entry has a matching entry in the filter list
(see assign_filter_values). */
- tree tp_node = c->u.catch.type_list;
- tree flt_node = c->u.catch.filter_list;
+ tree tp_node = c->u.ert_catch.type_list;
+ tree flt_node = c->u.ert_catch.filter_list;
for (; tp_node; )
{
@@ -1472,7 +1474,7 @@ build_post_landing_pads (void)
seq = get_insns ();
end_sequence ();
- emit_to_new_bb_before (seq, region->u.try.catch->label);
+ emit_to_new_bb_before (seq, region->u.ert_try.ert_catch->label);
break;
@@ -1532,7 +1534,7 @@ connect_post_landing_pads (void)
rtx seq;
rtx barrier;
- region = VEC_index (eh_region, cfun->eh->region_array, i);
+ region = VEC_index (eh_region_t, cfun->eh->region_array, i);
/* Mind we don't process a region more than once. */
if (!region || region->region_number != i)
continue;
@@ -1609,7 +1611,7 @@ dw2_build_landing_pads (void)
basic_block bb;
edge e;
- region = VEC_index (eh_region, cfun->eh->region_array, i);
+ region = VEC_index (eh_region_t, cfun->eh->region_array, i);
/* Mind we don't process a region more than once. */
if (!region || region->region_number != i)
continue;
@@ -1681,12 +1683,12 @@ sjlj_find_directly_reachable_regions (struct sjlj_lp_info *lp_info)
if (!note || INTVAL (XEXP (note, 0)) <= 0)
continue;
- region = VEC_index (eh_region, cfun->eh->region_array, INTVAL (XEXP (note, 0)));
+ region = VEC_index (eh_region_t, cfun->eh->region_array, INTVAL (XEXP (note, 0)));
type_thrown = NULL_TREE;
if (region->type == ERT_THROW)
{
- type_thrown = region->u.throw.type;
+ type_thrown = region->u.ert_throw.type;
region = region->outer;
}
@@ -1723,7 +1725,7 @@ sjlj_assign_call_site_values (rtx dispatch_label, struct sjlj_lp_info *lp_info)
for (i = cfun->eh->last_region_number; i > 0; --i)
if (lp_info[i].directly_reachable)
{
- struct eh_region *r = VEC_index (eh_region, cfun->eh->region_array, i);
+ struct eh_region *r = VEC_index (eh_region_t, cfun->eh->region_array, i);
r->landing_pad = dispatch_label;
lp_info[i].action_index = collect_one_action_chain (ar_hash, r);
@@ -1810,7 +1812,7 @@ sjlj_mark_call_sites (struct sjlj_lp_info *lp_info)
if (INTVAL (XEXP (note, 0)) <= 0)
continue;
- region = VEC_index (eh_region, cfun->eh->region_array, INTVAL (XEXP (note, 0)));
+ region = VEC_index (eh_region_t, cfun->eh->region_array, INTVAL (XEXP (note, 0)));
this_call_site = lp_info[region->region_number].call_site_index;
}
@@ -2023,14 +2025,14 @@ sjlj_emit_dispatch_table (rtx dispatch_label, struct sjlj_lp_info *lp_info)
emit_cmp_and_jump_insns (dispatch, GEN_INT (lp_info[i].dispatch_index),
EQ, NULL_RTX, TYPE_MODE (integer_type_node), 0,
- ((struct eh_region *)VEC_index (eh_region, cfun->eh->region_array, i))
+ ((struct eh_region *)VEC_index (eh_region_t, cfun->eh->region_array, i))
->post_landing_pad);
}
seq = get_insns ();
end_sequence ();
- before = (((struct eh_region *)VEC_index (eh_region, cfun->eh->region_array, first_reachable))
+ before = (((struct eh_region *)VEC_index (eh_region_t, cfun->eh->region_array, first_reachable))
->post_landing_pad);
bb = emit_to_new_bb_before (seq, before);
@@ -2182,7 +2184,7 @@ remove_eh_handler (struct eh_region *region)
list of alternate numbers by which we are known. */
outer = region->outer;
- VEC_replace (eh_region, cfun->eh->region_array, region->region_number, outer);
+ VEC_replace (eh_region_t, cfun->eh->region_array, region->region_number, outer);
if (region->aka)
{
unsigned i;
@@ -2190,7 +2192,7 @@ remove_eh_handler (struct eh_region *region)
EXECUTE_IF_SET_IN_BITMAP (region->aka, 0, i, bi)
{
- VEC_replace (eh_region, cfun->eh->region_array, i, outer);
+ VEC_replace (eh_region_t, cfun->eh->region_array, i, outer);
}
}
@@ -2231,28 +2233,28 @@ remove_eh_handler (struct eh_region *region)
if (region->type == ERT_CATCH)
{
- struct eh_region *try, *next, *prev;
+ struct eh_region *eh, *next, *prev;
- for (try = region->next_peer;
- try->type == ERT_CATCH;
- try = try->next_peer)
+ for (eh = region->next_peer;
+ eh->type == ERT_CATCH;
+ eh = eh->next_peer)
continue;
- gcc_assert (try->type == ERT_TRY);
+ gcc_assert (eh->type == ERT_TRY);
- next = region->u.catch.next_catch;
- prev = region->u.catch.prev_catch;
+ next = region->u.ert_catch.next_catch;
+ prev = region->u.ert_catch.prev_catch;
if (next)
- next->u.catch.prev_catch = prev;
+ next->u.ert_catch.prev_catch = prev;
else
- try->u.try.last_catch = prev;
+ eh->u.ert_try.last_catch = prev;
if (prev)
- prev->u.catch.next_catch = next;
+ prev->u.ert_catch.next_catch = next;
else
{
- try->u.try.catch = next;
+ eh->u.ert_try.ert_catch = next;
if (! next)
- remove_eh_handler (try);
+ remove_eh_handler (eh);
}
}
}
@@ -2326,7 +2328,7 @@ for_each_eh_region (void (*callback) (struct eh_region *))
{
struct eh_region *region;
- region = VEC_index (eh_region, cfun->eh->region_array, i);
+ region = VEC_index (eh_region_t, cfun->eh->region_array, i);
if (region)
(*callback) (region);
}
@@ -2415,10 +2417,10 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
struct eh_region *c;
enum reachable_code ret = RNL_NOT_CAUGHT;
- for (c = region->u.try.catch; c ; c = c->u.catch.next_catch)
+ for (c = region->u.ert_try.ert_catch; c ; c = c->u.ert_catch.next_catch)
{
/* A catch-all handler ends the search. */
- if (c->u.catch.type_list == NULL)
+ if (c->u.ert_catch.type_list == NULL)
{
add_reachable_handler (info, region, c);
return RNL_CAUGHT;
@@ -2427,7 +2429,7 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
if (type_thrown)
{
/* If we have at least one type match, end the search. */
- tree tp_node = c->u.catch.type_list;
+ tree tp_node = c->u.ert_catch.type_list;
for (; tp_node; tp_node = TREE_CHAIN (tp_node))
{
@@ -2465,7 +2467,7 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
ret = RNL_MAYBE_CAUGHT;
else
{
- tree tp_node = c->u.catch.type_list;
+ tree tp_node = c->u.ert_catch.type_list;
bool maybe_reachable = false;
/* Compute the potential reachability of this handler and
@@ -2576,7 +2578,7 @@ foreach_reachable_handler (int region_number, bool is_resx,
info.callback = callback;
info.callback_data = callback_data;
- region = VEC_index (eh_region, cfun->eh->region_array, region_number);
+ region = VEC_index (eh_region_t, cfun->eh->region_array, region_number);
type_thrown = NULL_TREE;
if (is_resx)
@@ -2589,7 +2591,7 @@ foreach_reachable_handler (int region_number, bool is_resx,
}
else if (region->type == ERT_THROW)
{
- type_thrown = region->u.throw.type;
+ type_thrown = region->u.ert_throw.type;
region = region->outer;
}
@@ -2614,7 +2616,7 @@ foreach_reachable_handler (int region_number, bool is_resx,
static void
arh_to_landing_pad (struct eh_region *region, void *data)
{
- rtx *p_handlers = data;
+ rtx *p_handlers = (rtx *) data;
if (! *p_handlers)
*p_handlers = alloc_INSN_LIST (region->landing_pad, NULL_RTX);
}
@@ -2622,7 +2624,7 @@ arh_to_landing_pad (struct eh_region *region, void *data)
static void
arh_to_label (struct eh_region *region, void *data)
{
- rtx *p_handlers = data;
+ rtx *p_handlers = (rtx *) data;
*p_handlers = alloc_INSN_LIST (region->label, *p_handlers);
}
@@ -2665,14 +2667,14 @@ can_throw_internal_1 (int region_number, bool is_resx)
struct eh_region *region;
tree type_thrown;
- region = VEC_index (eh_region, cfun->eh->region_array, region_number);
+ region = VEC_index (eh_region_t, cfun->eh->region_array, region_number);
type_thrown = NULL_TREE;
if (is_resx)
region = region->outer;
else if (region->type == ERT_THROW)
{
- type_thrown = region->u.throw.type;
+ type_thrown = region->u.ert_throw.type;
region = region->outer;
}
@@ -2725,14 +2727,14 @@ can_throw_external_1 (int region_number, bool is_resx)
struct eh_region *region;
tree type_thrown;
- region = VEC_index (eh_region, cfun->eh->region_array, region_number);
+ region = VEC_index (eh_region_t, cfun->eh->region_array, region_number);
type_thrown = NULL_TREE;
if (is_resx)
region = region->outer;
else if (region->type == ERT_THROW)
{
- type_thrown = region->u.throw.type;
+ type_thrown = region->u.ert_throw.type;
region = region->outer;
}
@@ -2897,7 +2899,7 @@ expand_builtin_eh_return_data_regno (tree arglist)
rtx
expand_builtin_extract_return_addr (tree addr_tree)
{
- rtx addr = expand_expr (addr_tree, NULL_RTX, Pmode, 0);
+ rtx addr = expand_expr (addr_tree, NULL_RTX, Pmode, EXPAND_NORMAL);
if (GET_MODE (addr) != Pmode
&& GET_MODE (addr) != VOIDmode)
@@ -2929,7 +2931,7 @@ expand_builtin_extract_return_addr (tree addr_tree)
rtx
expand_builtin_frob_return_addr (tree addr_tree)
{
- rtx addr = expand_expr (addr_tree, NULL_RTX, ptr_mode, 0);
+ rtx addr = expand_expr (addr_tree, NULL_RTX, ptr_mode, EXPAND_NORMAL);
addr = convert_memory_address (Pmode, addr);
@@ -2951,7 +2953,7 @@ expand_builtin_eh_return (tree stackadj_tree ATTRIBUTE_UNUSED,
rtx tmp;
#ifdef EH_RETURN_STACKADJ_RTX
- tmp = expand_expr (stackadj_tree, cfun->eh->ehr_stackadj, VOIDmode, 0);
+ tmp = expand_expr (stackadj_tree, cfun->eh->ehr_stackadj, VOIDmode, EXPAND_NORMAL);
tmp = convert_memory_address (Pmode, tmp);
if (!cfun->eh->ehr_stackadj)
cfun->eh->ehr_stackadj = copy_to_reg (tmp);
@@ -2959,7 +2961,7 @@ expand_builtin_eh_return (tree stackadj_tree ATTRIBUTE_UNUSED,
emit_move_insn (cfun->eh->ehr_stackadj, tmp);
#endif
- tmp = expand_expr (handler_tree, cfun->eh->ehr_handler, VOIDmode, 0);
+ tmp = expand_expr (handler_tree, cfun->eh->ehr_handler, VOIDmode, EXPAND_NORMAL);
tmp = convert_memory_address (Pmode, tmp);
if (!cfun->eh->ehr_handler)
cfun->eh->ehr_handler = copy_to_reg (tmp);
@@ -3017,7 +3019,7 @@ expand_eh_return (void)
rtx
expand_builtin_extend_pointer (tree addr_tree)
{
- rtx addr = expand_expr (addr_tree, NULL_RTX, ptr_mode, 0);
+ rtx addr = expand_expr (addr_tree, NULL_RTX, ptr_mode, EXPAND_NORMAL);
int extend;
#ifdef POINTERS_EXTEND_UNSIGNED
@@ -3067,19 +3069,19 @@ action_record_hash (const void *pentry)
static int
add_action_record (htab_t ar_hash, int filter, int next)
{
- struct action_record **slot, *new, tmp;
+ struct action_record **slot, *ar, tmp;
tmp.filter = filter;
tmp.next = next;
slot = (struct action_record **) htab_find_slot (ar_hash, &tmp, INSERT);
- if ((new = *slot) == NULL)
+ if ((ar = *slot) == NULL)
{
- new = xmalloc (sizeof (*new));
- new->offset = VARRAY_ACTIVE_SIZE (cfun->eh->action_record_data) + 1;
- new->filter = filter;
- new->next = next;
- *slot = new;
+ ar = XNEW (struct action_record);
+ ar->offset = VARRAY_ACTIVE_SIZE (cfun->eh->action_record_data) + 1;
+ ar->filter = filter;
+ ar->next = next;
+ *slot = ar;
/* The filter value goes in untouched. The link to the next
record is a "self-relative" byte offset, or zero to indicate
@@ -3092,7 +3094,7 @@ add_action_record (htab_t ar_hash, int filter, int next)
push_sleb128 (&cfun->eh->action_record_data, next);
}
- return new->offset;
+ return ar->offset;
}
static int
@@ -3129,14 +3131,14 @@ collect_one_action_chain (htab_t ar_hash, struct eh_region *region)
search outer regions. Use a magic -3 value to record
that we haven't done the outer search. */
next = -3;
- for (c = region->u.try.last_catch; c ; c = c->u.catch.prev_catch)
+ for (c = region->u.ert_try.last_catch; c ; c = c->u.ert_catch.prev_catch)
{
- if (c->u.catch.type_list == NULL)
+ if (c->u.ert_catch.type_list == NULL)
{
/* Retrieve the filter from the head of the filter list
where we have stored it (see assign_filter_values). */
int filter
- = TREE_INT_CST_LOW (TREE_VALUE (c->u.catch.filter_list));
+ = TREE_INT_CST_LOW (TREE_VALUE (c->u.ert_catch.filter_list));
next = add_action_record (ar_hash, filter, 0);
}
@@ -3161,7 +3163,7 @@ collect_one_action_chain (htab_t ar_hash, struct eh_region *region)
next = add_action_record (ar_hash, 0, 0);
}
- flt_node = c->u.catch.filter_list;
+ flt_node = c->u.ert_catch.filter_list;
for (; flt_node; flt_node = TREE_CHAIN (flt_node))
{
int filter = TREE_INT_CST_LOW (TREE_VALUE (flt_node));
@@ -3216,7 +3218,7 @@ add_call_site (rtx landing_pad, int action)
if (used >= size)
{
size = (size ? size * 2 : 64);
- data = ggc_realloc (data, sizeof (*data) * size);
+ data = (struct call_site_record *) ggc_realloc (data, sizeof (*data) * size);
cfun->eh->call_site_data = data;
cfun->eh->call_site_data_size = size;
}
@@ -3277,7 +3279,7 @@ convert_to_eh_region_ranges (void)
{
if (INTVAL (XEXP (note, 0)) <= 0)
continue;
- region = VEC_index (eh_region, cfun->eh->region_array, INTVAL (XEXP (note, 0)));
+ region = VEC_index (eh_region_t, cfun->eh->region_array, INTVAL (XEXP (note, 0)));
this_action = collect_one_action_chain (ar_hash, region);
}
@@ -3557,7 +3559,7 @@ static void
output_ttype (tree type, int tt_format, int tt_format_size)
{
rtx value;
- bool public = true;
+ bool pub = true;
if (type == NULL_TREE)
value = const0_rtx;
@@ -3580,7 +3582,7 @@ output_ttype (tree type, int tt_format, int tt_format_size)
node = cgraph_varpool_node (type);
if (node)
cgraph_varpool_mark_needed_node (node);
- public = TREE_PUBLIC (type);
+ pub = TREE_PUBLIC (type);
}
}
else
@@ -3595,7 +3597,7 @@ output_ttype (tree type, int tt_format, int tt_format_size)
assemble_integer (value, tt_format_size,
tt_format_size * BITS_PER_UNIT, 1);
else
- dw2_asm_output_encoded_addr_rtx (tt_format, value, public, NULL);
+ dw2_asm_output_encoded_addr_rtx (tt_format, value, pub, NULL);
}
void
@@ -3860,7 +3862,7 @@ verify_eh_tree (struct function *fun)
if (! i)
return;
for (j = fun->eh->last_region_number; j > 0; --j)
- if ((i = VEC_index (eh_region, cfun->eh->region_array, j)))
+ if ((i = VEC_index (eh_region_t, cfun->eh->region_array, j)))
{
count++;
if (i->region_number != j)
@@ -3872,7 +3874,7 @@ verify_eh_tree (struct function *fun)
while (1)
{
- if (VEC_index (eh_region, cfun->eh->region_array, i->region_number) != i)
+ if (VEC_index (eh_region_t, cfun->eh->region_array, i->region_number) != i)
{
error ("region_array is corrupted for region %i", i->region_number);
err = true;
diff --git a/gcc/explow.c b/gcc/explow.c
index e21e9c112ec..c316564719b 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -247,7 +247,7 @@ expr_size (tree exp)
else
size = SUBSTITUTE_PLACEHOLDER_IN_EXPR (lang_hooks.expr_size (exp), exp);
- return expand_expr (size, NULL_RTX, TYPE_MODE (sizetype), 0);
+ return expand_expr (size, NULL_RTX, TYPE_MODE (sizetype), EXPAND_NORMAL);
}
/* Return a wide integer for the size in bytes of the value of EXP, or -1
@@ -887,10 +887,10 @@ round_push (rtx size)
if (GET_CODE (size) == CONST_INT)
{
- HOST_WIDE_INT new = (INTVAL (size) + align - 1) / align * align;
+ HOST_WIDE_INT tmp = (INTVAL (size) + align - 1) / align * align;
- if (INTVAL (size) != new)
- size = GEN_INT (new);
+ if (INTVAL (size) != tmp)
+ size = GEN_INT (tmp);
}
else
{
@@ -1152,10 +1152,10 @@ allocate_dynamic_stack_space (rtx size, rtx target, int known_align)
if (GET_CODE (size) == CONST_INT)
{
- HOST_WIDE_INT new = INTVAL (size) / align * align;
+ HOST_WIDE_INT tmp = INTVAL (size) / align * align;
- if (INTVAL (size) != new)
- size = GEN_INT (new);
+ if (INTVAL (size) != tmp)
+ size = GEN_INT (tmp);
}
else
{
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 0f3a14df509..4cb81052018 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -137,7 +137,7 @@ init_expmed (void)
int m, n;
enum machine_mode mode, wider_mode;
- zero_cost = rtx_cost (const0_rtx, 0);
+ zero_cost = rtx_cost (const0_rtx, UNKNOWN);
for (m = 1; m < MAX_BITS_PER_WORD; m++)
{
@@ -646,9 +646,9 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
rtx last = get_last_insn ();
rtx pat;
enum machine_mode maxmode = mode_for_extraction (EP_insv, 3);
- int save_volatile_ok = volatile_ok;
+ bool save_volatile_ok = volatile_ok;
- volatile_ok = 1;
+ volatile_ok = true;
/* If this machine's insv can only insert into a register, copy OP0
into a register and save it back later. */
@@ -1405,8 +1405,8 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
if (MEM_P (xop0))
{
- int save_volatile_ok = volatile_ok;
- volatile_ok = 1;
+ bool save_volatile_ok = volatile_ok;
+ volatile_ok = true;
/* Is the memory operand acceptable? */
if (! ((*insn_data[(int) CODE_FOR_extzv].operand[1].predicate)
@@ -2188,7 +2188,7 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
rtx op1, temp = 0;
int left = (code == LSHIFT_EXPR || code == LROTATE_EXPR);
int rotate = (code == LROTATE_EXPR || code == RROTATE_EXPR);
- int try;
+ int check;
/* Previously detected shift-counts computed by NEGATE_EXPR
and shifted in the other direction; but that does not work
@@ -2231,13 +2231,13 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
return shifted;
}
- for (try = 0; temp == 0 && try < 3; try++)
+ for (check = 0; temp == 0 && check < 3; check++)
{
enum optab_methods methods;
- if (try == 0)
+ if (check == 0)
methods = OPTAB_DIRECT;
- else if (try == 1)
+ else if (check == 1)
methods = OPTAB_WIDEN;
else
methods = OPTAB_LIB_WIDEN;
@@ -2507,8 +2507,8 @@ synth_mult (struct algorithm *alg_out, unsigned HOST_WIDE_INT t,
/* We'll be needing a couple extra algorithm structures now. */
- alg_in = alloca (sizeof (struct algorithm));
- best_alg = alloca (sizeof (struct algorithm));
+ alg_in = (struct algorithm *) alloca (sizeof (struct algorithm));
+ best_alg = (struct algorithm *) alloca (sizeof (struct algorithm));
best_cost = *cost_limit;
/* Compute the hash index. */
diff --git a/gcc/expr.c b/gcc/expr.c
index 50564b65072..dd0803a834c 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -261,7 +261,7 @@ init_expr_once (void)
reg = gen_rtx_REG (VOIDmode, -1);
insn = rtx_alloc (INSN);
- pat = gen_rtx_SET (0, NULL_RTX, NULL_RTX);
+ pat = gen_rtx_SET (VOIDmode, NULL_RTX, NULL_RTX);
PATTERN (insn) = pat;
for (mode = VOIDmode; (int) mode < NUM_MACHINE_MODES;
@@ -337,7 +337,7 @@ init_expr_once (void)
void
init_expr (void)
{
- cfun->expr = ggc_alloc_cleared (sizeof (struct expr_status));
+ cfun->expr = (struct expr_status *) ggc_alloc_cleared (sizeof (struct expr_status));
}
/* Copy data from FROM to TO, where the machine modes are not the same.
@@ -1271,11 +1271,11 @@ static bool
emit_block_move_via_movmem (rtx x, rtx y, rtx size, unsigned int align)
{
rtx opalign = GEN_INT (align / BITS_PER_UNIT);
- int save_volatile_ok = volatile_ok;
+ bool save_volatile_ok = volatile_ok;
enum machine_mode mode;
/* Since this is a move insn, we don't care about volatility. */
- volatile_ok = 1;
+ volatile_ok = true;
/* Try the most limited insn first, because there's no point
including more than one in the machine description unless
@@ -1577,7 +1577,7 @@ gen_group_rtx (rtx orig)
gcc_assert (GET_CODE (orig) == PARALLEL);
length = XVECLEN (orig, 0);
- tmps = alloca (sizeof (rtx) * length);
+ tmps = (rtx *) alloca (sizeof (rtx) * length);
/* Skip a NULL entry in first slot. */
i = XEXP (XVECEXP (orig, 0, 0), 0) ? 0 : 1;
@@ -1590,7 +1590,7 @@ gen_group_rtx (rtx orig)
enum machine_mode mode = GET_MODE (XEXP (XVECEXP (orig, 0, i), 0));
rtx offset = XEXP (XVECEXP (orig, 0, i), 1);
- tmps[i] = gen_rtx_EXPR_LIST (VOIDmode, gen_reg_rtx (mode), offset);
+ tmps[i] = gen_rtx_EXPR_LIST (REG_DEP_TRUE, gen_reg_rtx (mode), offset);
}
return gen_rtx_PARALLEL (GET_MODE (orig), gen_rtvec_v (length, tmps));
@@ -1765,7 +1765,7 @@ emit_group_load (rtx dst, rtx src, tree type, int ssize)
rtx *tmps;
int i;
- tmps = alloca (sizeof (rtx) * XVECLEN (dst, 0));
+ tmps = (rtx *) alloca (sizeof (rtx) * XVECLEN (dst, 0));
emit_group_load_1 (tmps, dst, src, type, ssize);
/* Copy the extracted pieces into the proper (probable) hard regs. */
@@ -1885,7 +1885,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize)
start = 1;
finish = XVECLEN (src, 0);
- tmps = alloca (sizeof (rtx) * finish);
+ tmps = (rtx *) alloca (sizeof (rtx) * finish);
/* Copy the (probable) hard regs into pseudos. */
for (i = start; i < finish; i++)
@@ -2137,7 +2137,7 @@ use_reg (rtx *call_fusage, rtx reg)
gcc_assert (REG_P (reg) && REGNO (reg) < FIRST_PSEUDO_REGISTER);
*call_fusage
- = gen_rtx_EXPR_LIST (VOIDmode,
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE,
gen_rtx_USE (VOIDmode, reg), *call_fusage);
}
@@ -3946,7 +3946,7 @@ optimize_bitfield_assignment_op (unsigned HOST_WIDE_INT bitsize,
&& (bitsize != 1 || TREE_CODE (op1) != INTEGER_CST))
break;
- value = expand_expr (op1, NULL_RTX, str_mode, 0);
+ value = expand_expr (op1, NULL_RTX, str_mode, EXPAND_NORMAL);
value = convert_modes (str_mode,
TYPE_MODE (TREE_TYPE (op1)), value,
TYPE_UNSIGNED (TREE_TYPE (op1)));
@@ -3979,7 +3979,7 @@ optimize_bitfield_assignment_op (unsigned HOST_WIDE_INT bitsize,
case BIT_XOR_EXPR:
if (TREE_CODE (op1) != INTEGER_CST)
break;
- value = expand_expr (op1, NULL_RTX, GET_MODE (str_rtx), 0);
+ value = expand_expr (op1, NULL_RTX, GET_MODE (str_rtx), EXPAND_NORMAL);
value = convert_modes (GET_MODE (str_rtx),
TYPE_MODE (TREE_TYPE (op1)), value,
TYPE_UNSIGNED (TREE_TYPE (op1)));
@@ -4203,7 +4203,7 @@ expand_assignment (tree to, tree from)
rtx temp;
push_temp_slots ();
- temp = expand_expr (from, 0, GET_MODE (to_rtx), 0);
+ temp = expand_expr (from, 0, GET_MODE (to_rtx), EXPAND_NORMAL);
if (GET_CODE (to_rtx) == PARALLEL)
emit_group_load (to_rtx, temp, TREE_TYPE (from),
@@ -4279,7 +4279,7 @@ store_expr (tree exp, rtx target, int call_param_p)
branch and an rvalue in the other. Here, we resolve attempts to
store the throw expression's nonexistent result. */
gcc_assert (!call_param_p);
- expand_expr (exp, const0_rtx, VOIDmode, 0);
+ expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
return NULL_RTX;
}
if (TREE_CODE (exp) == COMPOUND_EXPR)
@@ -5465,7 +5465,7 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
/* If we have nothing to store, do nothing unless the expression has
side-effects. */
if (bitsize == 0)
- return expand_expr (exp, const0_rtx, VOIDmode, 0);
+ return expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
else if (bitsize >= 0 && bitsize < HOST_BITS_PER_WIDE_INT)
width_mask = ((HOST_WIDE_INT) 1 << bitsize) - 1;
@@ -7001,8 +7001,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
itarg = XEXP (original_target, 1);
/* Move the real and imaginary parts separately. */
- op0 = expand_expr (TREE_REALPART (exp), rtarg, mode, 0);
- op1 = expand_expr (TREE_IMAGPART (exp), itarg, mode, 0);
+ op0 = expand_expr (TREE_REALPART (exp), rtarg, mode, EXPAND_NORMAL);
+ op1 = expand_expr (TREE_IMAGPART (exp), itarg, mode, EXPAND_NORMAL);
if (op0 != rtarg)
emit_move_insn (rtarg, op0);
@@ -7072,7 +7072,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
tree value;
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (exp), idx, value)
- expand_expr (value, const0_rtx, VOIDmode, 0);
+ expand_expr (value, const0_rtx, VOIDmode, EXPAND_NORMAL);
return const0_rtx;
}
@@ -7605,12 +7605,12 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
necessarily be constant. */
if (mode == BLKmode)
{
- rtx new
+ rtx tmp
= assign_stack_temp_for_type
(ext_mode, GET_MODE_BITSIZE (ext_mode), 0, type);
- emit_move_insn (new, op0);
- op0 = copy_rtx (new);
+ emit_move_insn (tmp, op0);
+ op0 = copy_rtx (tmp);
PUT_MODE (op0, BLKmode);
set_mem_attributes (op0, exp, 1);
}
@@ -7836,9 +7836,9 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
HOST_WIDE_INT temp_size
= MAX (int_size_in_bytes (inner_type),
(HOST_WIDE_INT) GET_MODE_SIZE (TYPE_MODE (type)));
- rtx new = assign_stack_temp_for_type (TYPE_MODE (type),
+ rtx tmp = assign_stack_temp_for_type (TYPE_MODE (type),
temp_size, 0, type);
- rtx new_with_op0_mode = adjust_address (new, GET_MODE (op0), 0);
+ rtx new_with_op0_mode = adjust_address (tmp, GET_MODE (op0), 0);
gcc_assert (!TREE_ADDRESSABLE (exp));
@@ -7850,7 +7850,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
else
emit_move_insn (new_with_op0_mode, op0);
- op0 = new;
+ op0 = tmp;
}
op0 = adjust_address (op0, TYPE_MODE (type), 0);
@@ -7960,7 +7960,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|| mode != ptr_mode)
{
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
if (op0 == const0_rtx)
return op1;
if (op1 == const0_rtx)
@@ -8077,11 +8077,11 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
if (TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (subexp0, 0))))
expand_operands (TREE_OPERAND (subexp0, 0),
TREE_OPERAND (subexp1, 0),
- NULL_RTX, &op0, &op1, 0);
+ NULL_RTX, &op0, &op1, EXPAND_NORMAL);
else
expand_operands (TREE_OPERAND (subexp0, 0),
TREE_OPERAND (subexp1, 0),
- NULL_RTX, &op1, &op0, 0);
+ NULL_RTX, &op1, &op0, EXPAND_NORMAL);
goto binop3;
}
@@ -8158,7 +8158,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
}
}
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
return REDUCE_BIT_FIELD (expand_mult (mode, op0, op1, target, unsignedp));
case TRUNC_DIV_EXPR:
@@ -8172,7 +8172,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
then if the divisor is constant can optimize the case
where some terms of the dividend have coeffs divisible by it. */
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
return expand_divmod (0, code, mode, op0, op1, target, unsignedp);
case RDIV_EXPR:
@@ -8185,7 +8185,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
if (modifier == EXPAND_STACK_PARM)
target = 0;
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
return expand_divmod (1, code, mode, op0, op1, target, unsignedp);
case FIX_ROUND_EXPR:
@@ -8214,7 +8214,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
return target;
case NEGATE_EXPR:
- op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
+ op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, EXPAND_NORMAL);
if (modifier == EXPAND_STACK_PARM)
target = 0;
temp = expand_unop (mode,
@@ -8224,7 +8224,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
return REDUCE_BIT_FIELD (temp);
case ABS_EXPR:
- op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
+ op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, EXPAND_NORMAL);
if (modifier == EXPAND_STACK_PARM)
target = 0;
@@ -8251,7 +8251,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
&& REGNO (target) < FIRST_PSEUDO_REGISTER))
target = gen_reg_rtx (mode);
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- target, &op0, &op1, 0);
+ target, &op0, &op1, EXPAND_NORMAL);
/* First try to do it with a special MIN or MAX instruction.
If that does not win, use a conditional jump to select the proper
@@ -8356,7 +8356,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
return target;
case BIT_NOT_EXPR:
- op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
+ op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, EXPAND_NORMAL);
if (modifier == EXPAND_STACK_PARM)
target = 0;
temp = expand_unop (mode, one_cmpl_optab, op0, target, 1);
@@ -8399,7 +8399,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
subtarget = 0;
if (modifier == EXPAND_STACK_PARM)
target = 0;
- op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
+ op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, EXPAND_NORMAL);
return expand_shift (code, mode, op0, TREE_OPERAND (exp, 1), target,
unsignedp);
@@ -8433,7 +8433,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
== TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)))))
{
temp = expand_expr (TREE_OPERAND (exp, 0), original_target,
- VOIDmode, 0);
+ VOIDmode, EXPAND_NORMAL);
/* If temp is constant, we can just compute the result. */
if (GET_CODE (temp) == CONST_INT)
@@ -8492,7 +8492,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
case TRUTH_NOT_EXPR:
if (modifier == EXPAND_STACK_PARM)
target = 0;
- op0 = expand_expr (TREE_OPERAND (exp, 0), target, VOIDmode, 0);
+ op0 = expand_expr (TREE_OPERAND (exp, 0), target, VOIDmode, EXPAND_NORMAL);
/* The parser is careful to generate TRUTH_NOT_EXPR
only with operands that are always zero or one. */
temp = expand_binop (mode, xor_optab, op0, const1_rtx,
@@ -8733,7 +8733,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
tree oprnd0 = TREE_OPERAND (exp, 0);
tree oprnd1 = TREE_OPERAND (exp, 1);
- expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, 0);
+ expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, EXPAND_NORMAL);
target = expand_widen_pattern_expr (exp, op0, NULL_RTX, op1,
target, unsignedp);
return target;
@@ -8765,7 +8765,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
/* Here to do an ordinary binary operator. */
binop:
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
binop2:
this_optab = optab_for_tree_code (code, type);
binop3:
@@ -9152,7 +9152,7 @@ do_store_flag (tree exp, rtx target, enum machine_mode mode, int only_cheap)
|| GET_MODE (subtarget) != operand_mode)
subtarget = 0;
- expand_operands (arg0, arg1, subtarget, &op0, &op1, 0);
+ expand_operands (arg0, arg1, subtarget, &op0, &op1, EXPAND_NORMAL);
if (target == 0)
target = gen_reg_rtx (mode);
@@ -9402,12 +9402,11 @@ try_tablejump (tree index_type, tree index_expr, tree minval, tree range,
int
vector_mode_valid_p (enum machine_mode mode)
{
- enum mode_class class = GET_MODE_CLASS (mode);
+ enum mode_class mcls = GET_MODE_CLASS (mode);
enum machine_mode innermode;
/* Doh! What's going on? */
- if (class != MODE_VECTOR_INT
- && class != MODE_VECTOR_FLOAT)
+ if (mcls != MODE_VECTOR_INT && mcls != MODE_VECTOR_FLOAT)
return 0;
/* Hardware support. Woo hoo! */
diff --git a/gcc/final.c b/gcc/final.c
index d64f0c3e228..2e4403d844c 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -830,7 +830,7 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
n_labels = max_labelno - min_labelno + 1;
n_old_labels = old - min_labelno + 1;
- label_align = xrealloc (label_align,
+ label_align = (struct label_alignment *) xrealloc (label_align,
n_labels * sizeof (struct label_alignment));
/* Range of labels grows monotonically in the function. Failing here
@@ -1350,16 +1350,16 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
static int
asm_insn_count (rtx body)
{
- const char *template;
+ const char *templ;
int count = 1;
if (GET_CODE (body) == ASM_INPUT)
- template = XSTR (body, 0);
+ templ = XSTR (body, 0);
else
- template = decode_asm_operands (body, NULL, NULL, NULL, NULL);
+ templ = decode_asm_operands (body, NULL, NULL, NULL, NULL);
- for (; *template; template++)
- if (IS_ASM_LOGICAL_LINE_SEPARATOR (*template) || *template == '\n')
+ for (; *templ; templ++)
+ if (IS_ASM_LOGICAL_LINE_SEPARATOR (*templ) || *templ == '\n')
count++;
return count;
@@ -1950,7 +1950,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
{
rtx body = PATTERN (insn);
int insn_code_number;
- const char *template;
+ const char *templ;
#ifdef HAVE_conditional_execution
/* Reset this early so it is correct for ASM statements. */
@@ -2084,7 +2084,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
if (asm_noperands (body) >= 0)
{
unsigned int noperands = asm_noperands (body);
- rtx *ops = alloca (noperands * sizeof (rtx));
+ rtx *ops = (rtx *) alloca (noperands * sizeof (rtx));
const char *string;
/* There's no telling what that did to the condition codes. */
@@ -2412,12 +2412,12 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
#endif
/* Find the proper template for this insn. */
- template = get_insn_template (insn_code_number, insn);
+ templ = get_insn_template (insn_code_number, insn);
/* If the C code returns 0, it means that it is a jump insn
which follows a deleted test insn, and that test insn
needs to be reinserted. */
- if (template == 0)
+ if (templ == 0)
{
rtx prev;
@@ -2440,12 +2440,12 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
/* If the template is the string "#", it means that this insn must
be split. */
- if (template[0] == '#' && template[1] == '\0')
+ if (templ[0] == '#' && templ[1] == '\0')
{
- rtx new = try_split (body, insn, 0);
+ rtx tmp = try_split (body, insn, 0);
/* If we didn't split the insn, go away. */
- if (new == insn && PATTERN (new) == body)
+ if (tmp == insn && PATTERN (tmp) == body)
fatal_insn ("could not split insn", insn);
#ifdef HAVE_ATTR_length
@@ -2455,7 +2455,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
gcc_unreachable ();
#endif
- return new;
+ return tmp;
}
#ifdef TARGET_UNWIND_INFO
@@ -2466,7 +2466,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
#endif
/* Output assembler code from the template. */
- output_asm_insn (template, recog_data.operand);
+ output_asm_insn (templ, recog_data.operand);
/* If necessary, report the effect that the instruction has on
the unwind info. We've already done this for delay slots
@@ -2575,11 +2575,11 @@ alter_subreg (rtx *xp)
}
else
{
- rtx new = simplify_subreg (GET_MODE (x), y, GET_MODE (y),
+ rtx tmp = simplify_subreg (GET_MODE (x), y, GET_MODE (y),
SUBREG_BYTE (x));
- if (new != 0)
- *xp = new;
+ if (tmp != 0)
+ *xp = tmp;
else if (REG_P (y))
{
/* Simplify_subreg can't handle some REG cases, but we have to. */
@@ -2925,7 +2925,7 @@ output_asm_operand_names (rtx *operands, int *oporder, int nops)
of the operand, with no other punctuation. */
void
-output_asm_insn (const char *template, rtx *operands)
+output_asm_insn (const char *templ, rtx *operands)
{
const char *p;
int c;
@@ -2938,11 +2938,11 @@ output_asm_insn (const char *template, rtx *operands)
/* An insn may return a null string template
in a case where no assembler code is needed. */
- if (*template == 0)
+ if (*templ == '\0')
return;
memset (opoutput, 0, sizeof opoutput);
- p = template;
+ p = templ;
putc ('\t', asm_out_file);
#ifdef ASM_OUTPUT_OPCODE
@@ -3877,7 +3877,7 @@ debug_queue_symbol (tree decl)
if (symbol_queue_index >= symbol_queue_size)
{
symbol_queue_size += 10;
- symbol_queue = xrealloc (symbol_queue,
+ symbol_queue = (tree *) xrealloc (symbol_queue,
symbol_queue_size * sizeof (tree));
}
@@ -4023,10 +4023,10 @@ rest_of_clean_state (void)
sdbout_types (NULL_TREE);
#endif
- reload_completed = 0;
- epilogue_completed = 0;
- flow2_completed = 0;
- no_new_pseudos = 0;
+ reload_completed = false;
+ epilogue_completed = false;
+ flow2_completed = false;
+ no_new_pseudos = false;
#ifdef STACK_REGS
regstack_completed = 0;
#endif
diff --git a/gcc/fix-header.c b/gcc/fix-header.c
index 82244d05890..4089cb667fb 100644
--- a/gcc/fix-header.c
+++ b/gcc/fix-header.c
@@ -562,7 +562,7 @@ recognized_function (const cpp_token *fname, unsigned int line, int kind,
/* We only have a partial function declaration,
so remember that we have to add a complete prototype. */
partial_count++;
- partial = obstack_alloc (&scan_file_obstack, sizeof (struct partial_proto));
+ partial = (struct partial_proto *)obstack_alloc (&scan_file_obstack, sizeof (struct partial_proto));
partial->line_seen = line;
partial->fn = fn;
fn->partial = partial;
diff --git a/gcc/flags.h b/gcc/flags.h
index f5fdd6b2bf6..7e7c9766a94 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -117,12 +117,12 @@ extern int warn_strict_aliasing;
/* Temporarily suppress certain warnings.
This is set while reading code from a system header file. */
-extern int in_system_header;
+extern bool in_system_header;
/* Nonzero for -dp: annotate the assembly with a comment describing the
pattern and alternative used. */
-extern int flag_print_asm_name;
+extern bool flag_print_asm_name;
/* Now the symbols that are set with `-f' switches. */
@@ -152,7 +152,7 @@ extern int flag_really_no_inline;
/* Nonzero if we are only using compiler to check syntax errors. */
-extern int rtl_dump_and_exit;
+extern bool rtl_dump_and_exit;
/* Nonzero means we should save auxiliary info into a .X file. */
@@ -238,7 +238,7 @@ extern enum graph_dump_types graph_dump_format;
/* Nonzero means to collect statistics which might be expensive
and to print them when we are done. */
-extern int flag_detailed_statistics;
+extern bool flag_detailed_statistics;
/* Nonzero means that we defer emitting functions until they are actually
used. */
diff --git a/gcc/flow.c b/gcc/flow.c
index 2b5d3032bf7..e5e266412c2 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -174,7 +174,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#define MAX_LIVENESS_ROUNDS 20
/* Nonzero if the second flow pass has completed. */
-int flow2_completed;
+bool flow2_completed;
/* Maximum register number used in this function, plus one. */
@@ -2578,7 +2578,7 @@ add_to_mem_set_list (struct propagate_block_info *pbi, rtx mem)
if (pbi->flags & PROP_AUTOINC)
mem = shallow_copy_rtx (mem);
#endif
- pbi->mem_set_list = alloc_EXPR_LIST (0, mem, pbi->mem_set_list);
+ pbi->mem_set_list = alloc_EXPR_LIST (REG_DEP_TRUE, mem, pbi->mem_set_list);
pbi->mem_set_list_len++;
}
}
@@ -2591,7 +2591,7 @@ static int
invalidate_mems_from_autoinc (rtx *px, void *data)
{
rtx x = *px;
- struct propagate_block_info *pbi = data;
+ struct propagate_block_info *pbi = (struct propagate_block_info *) data;
if (GET_RTX_CLASS (GET_CODE (x)) == RTX_AUTOINC)
{
@@ -3246,7 +3246,7 @@ ior_reg_cond (rtx old, rtx x, int add)
return old;
if (! add)
return NULL;
- return gen_rtx_IOR (0, old, x);
+ return gen_rtx_IOR (VOIDmode, old, x);
}
switch (GET_CODE (old))
@@ -3257,26 +3257,26 @@ ior_reg_cond (rtx old, rtx x, int add)
if (op0 != NULL || op1 != NULL)
{
if (op0 == const0_rtx)
- return op1 ? op1 : gen_rtx_IOR (0, XEXP (old, 1), x);
+ return op1 ? op1 : gen_rtx_IOR (VOIDmode, XEXP (old, 1), x);
if (op1 == const0_rtx)
- return op0 ? op0 : gen_rtx_IOR (0, XEXP (old, 0), x);
+ return op0 ? op0 : gen_rtx_IOR (VOIDmode, XEXP (old, 0), x);
if (op0 == const1_rtx || op1 == const1_rtx)
return const1_rtx;
if (op0 == NULL)
- op0 = gen_rtx_IOR (0, XEXP (old, 0), x);
+ op0 = gen_rtx_IOR (VOIDmode, XEXP (old, 0), x);
else if (rtx_equal_p (x, op0))
/* (x | A) | x ~ (x | A). */
return old;
if (op1 == NULL)
- op1 = gen_rtx_IOR (0, XEXP (old, 1), x);
+ op1 = gen_rtx_IOR (VOIDmode, XEXP (old, 1), x);
else if (rtx_equal_p (x, op1))
/* (A | x) | x ~ (A | x). */
return old;
- return gen_rtx_IOR (0, op0, op1);
+ return gen_rtx_IOR (VOIDmode, op0, op1);
}
if (! add)
return NULL;
- return gen_rtx_IOR (0, old, x);
+ return gen_rtx_IOR (VOIDmode, old, x);
case AND:
op0 = ior_reg_cond (XEXP (old, 0), x, 0);
@@ -3284,26 +3284,26 @@ ior_reg_cond (rtx old, rtx x, int add)
if (op0 != NULL || op1 != NULL)
{
if (op0 == const1_rtx)
- return op1 ? op1 : gen_rtx_IOR (0, XEXP (old, 1), x);
+ return op1 ? op1 : gen_rtx_IOR (VOIDmode, XEXP (old, 1), x);
if (op1 == const1_rtx)
- return op0 ? op0 : gen_rtx_IOR (0, XEXP (old, 0), x);
+ return op0 ? op0 : gen_rtx_IOR (VOIDmode, XEXP (old, 0), x);
if (op0 == const0_rtx || op1 == const0_rtx)
return const0_rtx;
if (op0 == NULL)
- op0 = gen_rtx_IOR (0, XEXP (old, 0), x);
+ op0 = gen_rtx_IOR (VOIDmode, XEXP (old, 0), x);
else if (rtx_equal_p (x, op0))
/* (x & A) | x ~ x. */
return op0;
if (op1 == NULL)
- op1 = gen_rtx_IOR (0, XEXP (old, 1), x);
+ op1 = gen_rtx_IOR (VOIDmode, XEXP (old, 1), x);
else if (rtx_equal_p (x, op1))
/* (A & x) | x ~ x. */
return op1;
- return gen_rtx_AND (0, op0, op1);
+ return gen_rtx_AND (VOIDmode, op0, op1);
}
if (! add)
return NULL;
- return gen_rtx_IOR (0, old, x);
+ return gen_rtx_IOR (VOIDmode, old, x);
case NOT:
op0 = and_reg_cond (XEXP (old, 0), not_reg_cond (x), 0);
@@ -3311,7 +3311,7 @@ ior_reg_cond (rtx old, rtx x, int add)
return not_reg_cond (op0);
if (! add)
return NULL;
- return gen_rtx_IOR (0, old, x);
+ return gen_rtx_IOR (VOIDmode, old, x);
default:
gcc_unreachable ();
@@ -3335,7 +3335,7 @@ not_reg_cond (rtx x)
return gen_rtx_fmt_ee (reversed_comparison_code (x, NULL),
VOIDmode, XEXP (x, 0), const0_rtx);
}
- return gen_rtx_NOT (0, x);
+ return gen_rtx_NOT (VOIDmode, x);
}
static rtx
@@ -3354,7 +3354,7 @@ and_reg_cond (rtx old, rtx x, int add)
return old;
if (! add)
return NULL;
- return gen_rtx_AND (0, old, x);
+ return gen_rtx_AND (VOIDmode, old, x);
}
switch (GET_CODE (old))
@@ -3365,26 +3365,26 @@ and_reg_cond (rtx old, rtx x, int add)
if (op0 != NULL || op1 != NULL)
{
if (op0 == const0_rtx)
- return op1 ? op1 : gen_rtx_AND (0, XEXP (old, 1), x);
+ return op1 ? op1 : gen_rtx_AND (VOIDmode, XEXP (old, 1), x);
if (op1 == const0_rtx)
- return op0 ? op0 : gen_rtx_AND (0, XEXP (old, 0), x);
+ return op0 ? op0 : gen_rtx_AND (VOIDmode, XEXP (old, 0), x);
if (op0 == const1_rtx || op1 == const1_rtx)
return const1_rtx;
if (op0 == NULL)
- op0 = gen_rtx_AND (0, XEXP (old, 0), x);
+ op0 = gen_rtx_AND (VOIDmode, XEXP (old, 0), x);
else if (rtx_equal_p (x, op0))
/* (x | A) & x ~ x. */
return op0;
if (op1 == NULL)
- op1 = gen_rtx_AND (0, XEXP (old, 1), x);
+ op1 = gen_rtx_AND (VOIDmode, XEXP (old, 1), x);
else if (rtx_equal_p (x, op1))
/* (A | x) & x ~ x. */
return op1;
- return gen_rtx_IOR (0, op0, op1);
+ return gen_rtx_IOR (VOIDmode, op0, op1);
}
if (! add)
return NULL;
- return gen_rtx_AND (0, old, x);
+ return gen_rtx_AND (VOIDmode, old, x);
case AND:
op0 = and_reg_cond (XEXP (old, 0), x, 0);
@@ -3392,26 +3392,26 @@ and_reg_cond (rtx old, rtx x, int add)
if (op0 != NULL || op1 != NULL)
{
if (op0 == const1_rtx)
- return op1 ? op1 : gen_rtx_AND (0, XEXP (old, 1), x);
+ return op1 ? op1 : gen_rtx_AND (VOIDmode, XEXP (old, 1), x);
if (op1 == const1_rtx)
- return op0 ? op0 : gen_rtx_AND (0, XEXP (old, 0), x);
+ return op0 ? op0 : gen_rtx_AND (VOIDmode, XEXP (old, 0), x);
if (op0 == const0_rtx || op1 == const0_rtx)
return const0_rtx;
if (op0 == NULL)
- op0 = gen_rtx_AND (0, XEXP (old, 0), x);
+ op0 = gen_rtx_AND (VOIDmode, XEXP (old, 0), x);
else if (rtx_equal_p (x, op0))
/* (x & A) & x ~ (x & A). */
return old;
if (op1 == NULL)
- op1 = gen_rtx_AND (0, XEXP (old, 1), x);
+ op1 = gen_rtx_AND (VOIDmode, XEXP (old, 1), x);
else if (rtx_equal_p (x, op1))
/* (A & x) & x ~ (A & x). */
return old;
- return gen_rtx_AND (0, op0, op1);
+ return gen_rtx_AND (VOIDmode, op0, op1);
}
if (! add)
return NULL;
- return gen_rtx_AND (0, old, x);
+ return gen_rtx_AND (VOIDmode, old, x);
case NOT:
op0 = ior_reg_cond (XEXP (old, 0), not_reg_cond (x), 0);
@@ -3419,7 +3419,7 @@ and_reg_cond (rtx old, rtx x, int add)
return not_reg_cond (op0);
if (! add)
return NULL;
- return gen_rtx_AND (0, old, x);
+ return gen_rtx_AND (VOIDmode, old, x);
default:
gcc_unreachable ();
@@ -3456,7 +3456,7 @@ elim_reg_cond (rtx x, unsigned int regno)
return op0;
if (op0 == XEXP (x, 0) && op1 == XEXP (x, 1))
return x;
- return gen_rtx_AND (0, op0, op1);
+ return gen_rtx_AND (VOIDmode, op0, op1);
case IOR:
op0 = elim_reg_cond (XEXP (x, 0), regno);
@@ -3469,7 +3469,7 @@ elim_reg_cond (rtx x, unsigned int regno)
return op0;
if (op0 == XEXP (x, 0) && op1 == XEXP (x, 1))
return x;
- return gen_rtx_IOR (0, op0, op1);
+ return gen_rtx_IOR (VOIDmode, op0, op1);
case NOT:
op0 = elim_reg_cond (XEXP (x, 0), regno);
@@ -4714,7 +4714,7 @@ rest_of_handle_life (void)
}
}
- no_new_pseudos = 1;
+ no_new_pseudos = true;
return 0;
}
@@ -4756,8 +4756,8 @@ rest_of_handle_flow2 (void)
it and the rest of the code and also allows delayed branch
scheduling to operate in the epilogue. */
thread_prologue_and_epilogue_insns (get_insns ());
- epilogue_completed = 1;
- flow2_completed = 1;
+ epilogue_completed = true;
+ flow2_completed = true;
return 0;
}
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index b04022e1086..49822086ca7 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -2379,11 +2379,11 @@ combine_comparisons (enum tree_code code, enum tree_code lcode,
switch (code)
{
case TRUTH_AND_EXPR: case TRUTH_ANDIF_EXPR:
- compcode = lcompcode & rcompcode;
+ compcode = (enum comparison_code) (lcompcode & rcompcode);
break;
case TRUTH_OR_EXPR: case TRUTH_ORIF_EXPR:
- compcode = lcompcode | rcompcode;
+ compcode = (enum comparison_code) (lcompcode | rcompcode);
break;
default:
@@ -2394,7 +2394,7 @@ combine_comparisons (enum tree_code code, enum tree_code lcode,
{
/* Eliminate unordered comparisons, as well as LTGT and ORD
which are not used unless the mode has NaNs. */
- compcode &= ~COMPCODE_UNORD;
+ compcode = (enum comparison_code) (compcode & ~COMPCODE_UNORD);
if (compcode == COMPCODE_LTGT)
compcode = COMPCODE_NE;
else if (compcode == COMPCODE_ORD)
@@ -2829,17 +2829,17 @@ static int
twoval_comparison_p (tree arg, tree *cval1, tree *cval2, int *save_p)
{
enum tree_code code = TREE_CODE (arg);
- enum tree_code_class class = TREE_CODE_CLASS (code);
+ enum tree_code_class kind = TREE_CODE_CLASS (code);
/* We can handle some of the tcc_expression cases here. */
- if (class == tcc_expression && code == TRUTH_NOT_EXPR)
- class = tcc_unary;
- else if (class == tcc_expression
+ if (kind == tcc_expression && code == TRUTH_NOT_EXPR)
+ kind = tcc_unary;
+ else if (kind == tcc_expression
&& (code == TRUTH_ANDIF_EXPR || code == TRUTH_ORIF_EXPR
|| code == COMPOUND_EXPR))
- class = tcc_binary;
+ kind = tcc_binary;
- else if (class == tcc_expression && code == SAVE_EXPR
+ else if (kind == tcc_expression && code == SAVE_EXPR
&& ! TREE_SIDE_EFFECTS (TREE_OPERAND (arg, 0)))
{
/* If we've already found a CVAL1 or CVAL2, this expression is
@@ -2847,11 +2847,11 @@ twoval_comparison_p (tree arg, tree *cval1, tree *cval2, int *save_p)
if (*cval1 || *cval2)
return 0;
- class = tcc_unary;
+ kind = tcc_unary;
*save_p = 1;
}
- switch (class)
+ switch (kind)
{
case tcc_unary:
return twoval_comparison_p (TREE_OPERAND (arg, 0), cval1, cval2, save_p);
@@ -2922,16 +2922,16 @@ eval_subst (tree arg, tree old0, tree new0, tree old1, tree new1)
{
tree type = TREE_TYPE (arg);
enum tree_code code = TREE_CODE (arg);
- enum tree_code_class class = TREE_CODE_CLASS (code);
+ enum tree_code_class kind = TREE_CODE_CLASS (code);
/* We can handle some of the tcc_expression cases here. */
- if (class == tcc_expression && code == TRUTH_NOT_EXPR)
- class = tcc_unary;
- else if (class == tcc_expression
+ if (kind == tcc_expression && code == TRUTH_NOT_EXPR)
+ kind = tcc_unary;
+ else if (kind == tcc_expression
&& (code == TRUTH_ANDIF_EXPR || code == TRUTH_ORIF_EXPR))
- class = tcc_binary;
+ kind = tcc_binary;
- switch (class)
+ switch (kind)
{
case tcc_unary:
return fold_build1 (code, type,
@@ -7463,13 +7463,13 @@ fold_unary (enum tree_code code, tree type, tree op0)
&& TREE_CODE (op0) == BIT_AND_EXPR
&& TREE_CODE (TREE_OPERAND (op0, 1)) == INTEGER_CST)
{
- tree and = op0;
- tree and0 = TREE_OPERAND (and, 0), and1 = TREE_OPERAND (and, 1);
+ tree and_ = op0;
+ tree and0 = TREE_OPERAND (and_, 0), and1 = TREE_OPERAND (and_, 1);
int change = 0;
- if (TYPE_UNSIGNED (TREE_TYPE (and))
+ if (TYPE_UNSIGNED (TREE_TYPE (and_))
|| (TYPE_PRECISION (type)
- <= TYPE_PRECISION (TREE_TYPE (and))))
+ <= TYPE_PRECISION (TREE_TYPE (and_))))
change = 1;
else if (TYPE_PRECISION (TREE_TYPE (and1))
<= HOST_BITS_PER_WIDE_INT
diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in
index cc38e69b140..288476618e6 100644
--- a/gcc/fortran/Make-lang.in
+++ b/gcc/fortran/Make-lang.in
@@ -74,7 +74,7 @@ F95_OBJS = $(F95_PARSER_OBJS) \
fortran/trans.o fortran/trans-array.o fortran/trans-common.o \
fortran/trans-const.o fortran/trans-decl.o fortran/trans-expr.o \
fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o \
- fortran/trans-stmt.o fortran/trans-types.o
+ fortran/trans-stmt.o fortran/trans-types.o tree-mudflap.o
#
# Define the names for selecting gfortran in LANGUAGES.
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c
index d4c527fb356..598fad25a9d 100644
--- a/gcc/fortran/arith.c
+++ b/gcc/fortran/arith.c
@@ -1098,7 +1098,7 @@ gfc_arith_concat (gfc_expr * op1, gfc_expr * op2, gfc_expr ** resultp)
len = op1->value.character.length + op2->value.character.length;
- result->value.character.string = gfc_getmem (len + 1);
+ result->value.character.string = (char *) gfc_getmem (len + 1);
result->value.character.length = len;
memcpy (result->value.character.string, op1->value.character.string,
@@ -1508,7 +1508,7 @@ eval_f;
operands are array constructors. */
static gfc_expr *
-eval_intrinsic (gfc_intrinsic_op operator,
+eval_intrinsic (gfc_intrinsic_op foperator,
eval_f eval, gfc_expr * op1, gfc_expr * op2)
{
gfc_expr temp, *result;
@@ -1517,7 +1517,7 @@ eval_intrinsic (gfc_intrinsic_op operator,
gfc_clear_ts (&temp.ts);
- switch (operator)
+ switch (foperator)
{
/* Logical unary */
case INTRINSIC_NOT:
@@ -1599,16 +1599,16 @@ eval_intrinsic (gfc_intrinsic_op operator,
temp.expr_type = EXPR_OP;
gfc_clear_ts (&temp.ts);
- temp.value.op.operator = operator;
+ temp.value.op.foperator = foperator;
temp.value.op.op1 = op1;
temp.value.op.op2 = op2;
gfc_type_convert_binary (&temp);
- if (operator == INTRINSIC_EQ || operator == INTRINSIC_NE
- || operator == INTRINSIC_GE || operator == INTRINSIC_GT
- || operator == INTRINSIC_LE || operator == INTRINSIC_LT)
+ if (foperator == INTRINSIC_EQ || foperator == INTRINSIC_NE
+ || foperator == INTRINSIC_GE || foperator == INTRINSIC_GT
+ || foperator == INTRINSIC_LE || foperator == INTRINSIC_LT)
{
temp.ts.type = BT_LOGICAL;
temp.ts.kind = gfc_default_logical_kind;
@@ -1636,7 +1636,7 @@ eval_intrinsic (gfc_intrinsic_op operator,
}
/* Try to combine the operators. */
- if (operator == INTRINSIC_POWER && op2->ts.type != BT_INTEGER)
+ if (foperator == INTRINSIC_POWER && op2->ts.type != BT_INTEGER)
goto runtime;
if (op1->from_H
@@ -1675,7 +1675,7 @@ runtime:
result->ts = temp.ts;
result->expr_type = EXPR_OP;
- result->value.op.operator = operator;
+ result->value.op.foperator = foperator;
result->value.op.op1 = op1;
result->value.op.op2 = op2;
@@ -1689,12 +1689,12 @@ runtime:
/* Modify type of expression for zero size array. */
static gfc_expr *
-eval_type_intrinsic0 (gfc_intrinsic_op operator, gfc_expr * op)
+eval_type_intrinsic0 (gfc_intrinsic_op foperator, gfc_expr * op)
{
if (op == NULL)
gfc_internal_error ("eval_type_intrinsic0(): op NULL");
- switch (operator)
+ switch (foperator)
{
case INTRINSIC_GE:
case INTRINSIC_LT:
@@ -1750,7 +1750,7 @@ reduce_binary0 (gfc_expr * op1, gfc_expr * op2)
static gfc_expr *
-eval_intrinsic_f2 (gfc_intrinsic_op operator,
+eval_intrinsic_f2 (gfc_intrinsic_op foperator,
arith (*eval) (gfc_expr *, gfc_expr **),
gfc_expr * op1, gfc_expr * op2)
{
@@ -1760,22 +1760,22 @@ eval_intrinsic_f2 (gfc_intrinsic_op operator,
if (op2 == NULL)
{
if (gfc_zero_size_array (op1))
- return eval_type_intrinsic0 (operator, op1);
+ return eval_type_intrinsic0 (foperator, op1);
}
else
{
result = reduce_binary0 (op1, op2);
if (result != NULL)
- return eval_type_intrinsic0 (operator, result);
+ return eval_type_intrinsic0 (foperator, result);
}
f.f2 = eval;
- return eval_intrinsic (operator, f, op1, op2);
+ return eval_intrinsic (foperator, f, op1, op2);
}
static gfc_expr *
-eval_intrinsic_f3 (gfc_intrinsic_op operator,
+eval_intrinsic_f3 (gfc_intrinsic_op foperator,
arith (*eval) (gfc_expr *, gfc_expr *, gfc_expr **),
gfc_expr * op1, gfc_expr * op2)
{
@@ -1784,10 +1784,10 @@ eval_intrinsic_f3 (gfc_intrinsic_op operator,
result = reduce_binary0 (op1, op2);
if (result != NULL)
- return eval_type_intrinsic0(operator, result);
+ return eval_type_intrinsic0(foperator, result);
f.f3 = eval;
- return eval_intrinsic (operator, f, op1, op2);
+ return eval_intrinsic (foperator, f, op1, op2);
}
@@ -2353,7 +2353,7 @@ gfc_hollerith2int (gfc_expr * src, int kind)
gfc_warning ("The Hollerith constant at %L is too long to convert to %s",
&src->where, gfc_typename(&result->ts));
}
- result->value.character.string = gfc_getmem (kind + 1);
+ result->value.character.string = (char *) gfc_getmem (kind + 1);
memcpy (result->value.character.string, src->value.character.string,
MIN (kind, len));
@@ -2389,7 +2389,7 @@ gfc_hollerith2real (gfc_expr * src, int kind)
gfc_warning ("The Hollerith constant at %L is too long to convert to %s",
&src->where, gfc_typename(&result->ts));
}
- result->value.character.string = gfc_getmem (kind + 1);
+ result->value.character.string = (char *) gfc_getmem (kind + 1);
memcpy (result->value.character.string, src->value.character.string,
MIN (kind, len));
@@ -2427,7 +2427,7 @@ gfc_hollerith2complex (gfc_expr * src, int kind)
gfc_warning ("The Hollerith constant at %L is too long to convert to %s",
&src->where, gfc_typename(&result->ts));
}
- result->value.character.string = gfc_getmem (kind + 1);
+ result->value.character.string = (char *) gfc_getmem (kind + 1);
memcpy (result->value.character.string, src->value.character.string,
MIN (kind, len));
@@ -2479,7 +2479,7 @@ gfc_hollerith2logical (gfc_expr * src, int kind)
gfc_warning ("The Hollerith constant at %L is too long to convert to %s",
&src->where, gfc_typename(&result->ts));
}
- result->value.character.string = gfc_getmem (kind + 1);
+ result->value.character.string = (char *) gfc_getmem (kind + 1);
memcpy (result->value.character.string, src->value.character.string,
MIN (kind, len));
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c
index fa38ab9c956..9ae7c1878ed 100644
--- a/gcc/fortran/array.c
+++ b/gcc/fortran/array.c
@@ -208,7 +208,7 @@ gfc_free_array_spec (gfc_array_spec * as)
/* Take an array bound, resolves the expression, that make up the
shape and check associated constraints. */
-static try
+static check
resolve_array_bound (gfc_expr * e, int check_constant)
{
@@ -233,7 +233,7 @@ resolve_array_bound (gfc_expr * e, int check_constant)
/* Takes an array specification, resolves the expressions that make up
the shape and make sure everything is integral. */
-try
+check
gfc_resolve_array_spec (gfc_array_spec * as, int check_constant)
{
gfc_expr *e;
@@ -450,7 +450,7 @@ cleanup:
have that array specification. The error locus is needed in case
something goes wrong. On failure, the caller must free the spec. */
-try
+check
gfc_set_array_spec (gfc_symbol * sym, gfc_array_spec * as, locus * error_loc)
{
@@ -572,7 +572,7 @@ gfc_start_constructor (bt type, int kind, locus * where)
node onto the constructor. */
void
-gfc_append_constructor (gfc_expr * base, gfc_expr * new)
+gfc_append_constructor (gfc_expr * base, gfc_expr * expr)
{
gfc_constructor *c;
@@ -588,9 +588,9 @@ gfc_append_constructor (gfc_expr * base, gfc_expr * new)
c = c->next;
}
- c->expr = new;
+ c->expr = expr;
- if (new->ts.type != base->ts.type || new->ts.kind != base->ts.kind)
+ if (expr->ts.type != base->ts.type || expr->ts.kind != base->ts.kind)
gfc_internal_error ("gfc_append_constructor(): New node has wrong kind");
}
@@ -658,7 +658,7 @@ gfc_get_constructor (void)
{
gfc_constructor *c;
- c = gfc_getmem (sizeof(gfc_constructor));
+ c = (gfc_constructor *)gfc_getmem (sizeof(gfc_constructor));
c->expr = NULL;
c->iterator = NULL;
c->next = NULL;
@@ -736,7 +736,7 @@ static match match_array_cons_element (gfc_constructor **);
static match
match_array_list (gfc_constructor ** result)
{
- gfc_constructor *p, *head, *tail, *new;
+ gfc_constructor *p, *head, *tail, *tmp;
gfc_iterator iter;
locus old_loc;
gfc_expr *e;
@@ -771,7 +771,7 @@ match_array_list (gfc_constructor ** result)
if (m == MATCH_ERROR)
goto cleanup;
- m = match_array_cons_element (&new);
+ m = match_array_cons_element (&tmp);
if (m == MATCH_ERROR)
goto cleanup;
if (m == MATCH_NO)
@@ -782,8 +782,8 @@ match_array_list (gfc_constructor ** result)
goto cleanup; /* Could be a complex constant */
}
- tail->next = new;
- tail = new;
+ tail->next = tmp;
+ tail = tmp;
if (gfc_match_char (',') != MATCH_YES)
{
@@ -862,7 +862,7 @@ match_array_cons_element (gfc_constructor ** result)
match
gfc_match_array_constructor (gfc_expr ** result)
{
- gfc_constructor *head, *tail, *new;
+ gfc_constructor *head, *tail, *tmp;
gfc_expr *expr;
locus where;
match m;
@@ -894,18 +894,18 @@ gfc_match_array_constructor (gfc_expr ** result)
for (;;)
{
- m = match_array_cons_element (&new);
+ m = match_array_cons_element (&tmp);
if (m == MATCH_ERROR)
goto cleanup;
if (m == MATCH_NO)
goto syntax;
if (head == NULL)
- head = new;
+ head = tmp;
else
- tail->next = new;
+ tail->next = tmp;
- tail = new;
+ tail = tmp;
if (gfc_match_char (',') == MATCH_NO)
break;
@@ -984,7 +984,7 @@ check_element_type (gfc_expr * expr)
/* Recursive work function for gfc_check_constructor_type(). */
-static try
+static check
check_constructor_type (gfc_constructor * c)
{
gfc_expr *e;
@@ -1012,10 +1012,10 @@ check_constructor_type (gfc_constructor * c)
/* Check that all elements of an array constructor are the same type.
On FAILURE, an error has been generated. */
-try
+check
gfc_check_constructor_type (gfc_expr * e)
{
- try t;
+ check t;
cons_state = CONS_START;
gfc_clear_ts (&constructor_ts);
@@ -1038,12 +1038,12 @@ cons_stack;
static cons_stack *base;
-static try check_constructor (gfc_constructor *, try (*)(gfc_expr *));
+static check check_constructor (gfc_constructor *, check (*)(gfc_expr *));
/* Check an EXPR_VARIABLE expression in a constructor to make sure
that that variable is an iteration variables. */
-try
+check
gfc_check_iter_variable (gfc_expr * expr)
{
@@ -1064,12 +1064,12 @@ gfc_check_iter_variable (gfc_expr * expr)
to calling the check function for each expression in the
constructor, giving variables with the names of iterators a pass. */
-static try
-check_constructor (gfc_constructor * c, try (*check_function) (gfc_expr *))
+static check
+check_constructor (gfc_constructor * c, check (*check_function) (gfc_expr *))
{
cons_stack element;
gfc_expr *e;
- try t;
+ check t;
for (; c; c = c->next)
{
@@ -1102,11 +1102,11 @@ check_constructor (gfc_constructor * c, try (*check_function) (gfc_expr *))
expression -- specification, restricted, or initialization as
determined by the check_function. */
-try
-gfc_check_constructor (gfc_expr * expr, try (*check_function) (gfc_expr *))
+check
+gfc_check_constructor (gfc_expr * expr, check (*check_function) (gfc_expr *))
{
cons_stack *base_save;
- try t;
+ check t;
base_save = base;
base = NULL;
@@ -1134,19 +1134,19 @@ typedef struct
gfc_component *component;
mpz_t *repeat;
- try (*expand_work_function) (gfc_expr *);
+ check (*expand_work_function) (gfc_expr *);
}
expand_info;
static expand_info current_expand;
-static try expand_constructor (gfc_constructor *);
+static check expand_constructor (gfc_constructor *);
/* Work function that counts the number of elements present in a
constructor. */
-static try
+static check
count_elements (gfc_expr * e)
{
mpz_t result;
@@ -1173,7 +1173,7 @@ count_elements (gfc_expr * e)
/* Work function that extracts a particular element from an array
constructor, freeing the rest. */
-static try
+static check
extract_element (gfc_expr * e)
{
@@ -1196,7 +1196,7 @@ extract_element (gfc_expr * e)
/* Work function that constructs a new constructor out of the old one,
stringing new elements together. */
-static try
+static check
expand (gfc_expr * e)
{
@@ -1245,7 +1245,7 @@ gfc_simplify_iterator_var (gfc_expr * e)
/* Expand an expression with that is inside of a constructor,
recursing into other constructors if present. */
-static try
+static check
expand_expr (gfc_expr * e)
{
@@ -1264,13 +1264,13 @@ expand_expr (gfc_expr * e)
}
-static try
+static check
expand_iterator (gfc_constructor * c)
{
gfc_expr *start, *end, *step;
iterator_stack frame;
mpz_t trip;
- try t;
+ check t;
end = step = NULL;
@@ -1347,7 +1347,7 @@ cleanup:
expressions. The work function needs to either save or free the
passed expression. */
-static try
+static check
expand_constructor (gfc_constructor * c)
{
gfc_expr *e;
@@ -1390,12 +1390,12 @@ expand_constructor (gfc_constructor * c)
/* Top level subroutine for expanding constructors. We only expand
constructor if they are small enough. */
-try
+check
gfc_expand_constructor (gfc_expr * e)
{
expand_info expand_save;
gfc_expr *f;
- try rc;
+ check rc;
f = gfc_get_array_element (e, GFC_MAX_AC_EXPAND);
if (f != NULL)
@@ -1434,7 +1434,7 @@ done:
constant, after removal of any iteration variables. We return
FAILURE if not so. */
-static try
+static check
constant_element (gfc_expr * e)
{
int rv;
@@ -1456,7 +1456,7 @@ int
gfc_constant_ac (gfc_expr * e)
{
expand_info expand_save;
- try rc;
+ check rc;
iter_stack = NULL;
expand_save = current_expand;
@@ -1494,10 +1494,10 @@ gfc_expanded_ac (gfc_expr * e)
/* Recursive array list resolution function. All of the elements must
be of the same type. */
-static try
+static check
resolve_array_list (gfc_constructor * p)
{
- try t;
+ check t;
t = SUCCESS;
@@ -1593,10 +1593,10 @@ got_charlen:
/* Resolve all of the expressions in an array list. */
-try
+check
gfc_resolve_array_constructor (gfc_expr * expr)
{
- try t;
+ check t;
t = resolve_array_list (expr->value.constructor);
if (t == SUCCESS)
@@ -1675,7 +1675,7 @@ gfc_get_array_element (gfc_expr * array, int element)
{
expand_info expand_save;
gfc_expr *e;
- try rc;
+ check rc;
expand_save = current_expand;
current_expand.extract_n = element;
@@ -1706,7 +1706,7 @@ gfc_get_array_element (gfc_expr * array, int element)
/* Get the size of single dimension of an array specification. The
array is guaranteed to be one dimensional. */
-static try
+static check
spec_dimen_size (gfc_array_spec * as, int dimen, mpz_t * result)
{
@@ -1732,7 +1732,7 @@ spec_dimen_size (gfc_array_spec * as, int dimen, mpz_t * result)
}
-try
+check
spec_size (gfc_array_spec * as, mpz_t * result)
{
mpz_t size;
@@ -1758,11 +1758,11 @@ spec_size (gfc_array_spec * as, mpz_t * result)
/* Get the number of elements in an array section. */
-static try
+static check
ref_dimen_size (gfc_array_ref * ar, int dimen, mpz_t * result)
{
mpz_t upper, lower, stride;
- try t;
+ check t;
if (dimen < 0 || ar == NULL || dimen > ar->dimen - 1)
gfc_internal_error ("ref_dimen_size(): Bad dimension");
@@ -1846,7 +1846,7 @@ ref_dimen_size (gfc_array_ref * ar, int dimen, mpz_t * result)
}
-static try
+static check
ref_size (gfc_array_ref * ar, mpz_t * result)
{
mpz_t size;
@@ -1875,7 +1875,7 @@ ref_size (gfc_array_ref * ar, mpz_t * result)
able to return a result in the 'result' variable, FAILURE
otherwise. */
-try
+check
gfc_array_dimen_size (gfc_expr * array, int dimen, mpz_t * result)
{
gfc_ref *ref;
@@ -1943,13 +1943,13 @@ gfc_array_dimen_size (gfc_expr * array, int dimen, mpz_t * result)
array. Returns SUCCESS if this is possible, and sets the 'result'
variable. Otherwise returns FAILURE. */
-try
+check
gfc_array_size (gfc_expr * array, mpz_t * result)
{
expand_info expand_save;
gfc_ref *ref;
int i, flag;
- try t;
+ check t;
switch (array->expr_type)
{
@@ -2008,7 +2008,7 @@ gfc_array_size (gfc_expr * array, mpz_t * result)
/* Given an array reference, return the shape of the reference in an
array of mpz_t integers. */
-try
+check
gfc_array_ref_shape (gfc_array_ref * ar, mpz_t * shape)
{
int d;
diff --git a/gcc/fortran/bbt.c b/gcc/fortran/bbt.c
index ce1f24eca24..f6859a8604a 100644
--- a/gcc/fortran/bbt.c
+++ b/gcc/fortran/bbt.c
@@ -93,25 +93,25 @@ rotate_right (gfc_bbt * t)
aborts if we find a duplicate key. */
static gfc_bbt *
-insert (gfc_bbt * new, gfc_bbt * t, compare_fn compare)
+insert (gfc_bbt * bbt, gfc_bbt * t, compare_fn compare)
{
int c;
if (t == NULL)
- return new;
+ return bbt;
- c = (*compare) (new, t);
+ c = (*compare) (bbt, t);
if (c < 0)
{
- t->left = insert (new, t->left, compare);
+ t->left = insert (bbt, t->left, compare);
if (t->priority < t->left->priority)
t = rotate_right (t);
}
else if (c > 0)
{
- t->right = insert (new, t->right, compare);
+ t->right = insert (bbt, t->right, compare);
if (t->priority < t->right->priority)
t = rotate_left (t);
}
@@ -128,12 +128,12 @@ insert (gfc_bbt * new, gfc_bbt * t, compare_fn compare)
already exists. */
void
-gfc_insert_bbt (void *root, void *new, compare_fn compare)
+gfc_insert_bbt (void *root, void *bbt, compare_fn compare)
{
gfc_bbt **r, *n;
r = (gfc_bbt **) root;
- n = (gfc_bbt *) new;
+ n = (gfc_bbt *) bbt;
n->priority = pseudo_random ();
*r = insert (n, *r, compare);
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index fdbd0038835..fe880ce2ae6 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -35,7 +35,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
/* Check the type of an expression. */
-static try
+static check
type_check (gfc_expr * e, int n, bt type)
{
if (e->ts.type == type)
@@ -51,7 +51,7 @@ type_check (gfc_expr * e, int n, bt type)
/* Check that the expression is a numeric type. */
-static try
+static check
numeric_check (gfc_expr * e, int n)
{
if (gfc_numeric_ts (&e->ts))
@@ -66,7 +66,7 @@ numeric_check (gfc_expr * e, int n)
/* Check that an expression is integer or real. */
-static try
+static check
int_or_real_check (gfc_expr * e, int n)
{
if (e->ts.type != BT_INTEGER && e->ts.type != BT_REAL)
@@ -83,7 +83,7 @@ int_or_real_check (gfc_expr * e, int n)
/* Check that an expression is real or complex. */
-static try
+static check
real_or_complex_check (gfc_expr * e, int n)
{
if (e->ts.type != BT_REAL && e->ts.type != BT_COMPLEX)
@@ -101,7 +101,7 @@ real_or_complex_check (gfc_expr * e, int n)
/* Check that the expression is an optional constant integer
and that it specifies a valid kind for that type. */
-static try
+static check
kind_check (gfc_expr * k, int n, bt type)
{
int kind;
@@ -134,7 +134,7 @@ kind_check (gfc_expr * k, int n, bt type)
/* Make sure the expression is a double precision real. */
-static try
+static check
double_check (gfc_expr * d, int n)
{
if (type_check (d, n, BT_REAL) == FAILURE)
@@ -154,7 +154,7 @@ double_check (gfc_expr * d, int n)
/* Make sure the expression is a logical array. */
-static try
+static check
logical_array_check (gfc_expr * array, int n)
{
if (array->ts.type != BT_LOGICAL || array->rank == 0)
@@ -171,7 +171,7 @@ logical_array_check (gfc_expr * array, int n)
/* Make sure an expression is an array. */
-static try
+static check
array_check (gfc_expr * e, int n)
{
if (e->rank != 0)
@@ -186,7 +186,7 @@ array_check (gfc_expr * e, int n)
/* Make sure an expression is a scalar. */
-static try
+static check
scalar_check (gfc_expr * e, int n)
{
if (e->rank == 0)
@@ -201,7 +201,7 @@ scalar_check (gfc_expr * e, int n)
/* Make sure two expression have the same type. */
-static try
+static check
same_type_check (gfc_expr * e, int n, gfc_expr * f, int m)
{
if (gfc_compare_types (&e->ts, &f->ts))
@@ -216,7 +216,7 @@ same_type_check (gfc_expr * e, int n, gfc_expr * f, int m)
/* Make sure that an expression has a certain (nonzero) rank. */
-static try
+static check
rank_check (gfc_expr * e, int n, int rank)
{
if (e->rank == rank)
@@ -231,7 +231,7 @@ rank_check (gfc_expr * e, int n, int rank)
/* Make sure a variable expression is not an optional dummy argument. */
-static try
+static check
nonoptional_check (gfc_expr * e, int n)
{
if (e->expr_type == EXPR_VARIABLE && e->symtree->n.sym->attr.optional)
@@ -250,7 +250,7 @@ nonoptional_check (gfc_expr * e, int n)
/* Check that an expression has a particular kind. */
-static try
+static check
kind_value_check (gfc_expr * e, int n, int k)
{
if (e->ts.kind == k)
@@ -265,7 +265,7 @@ kind_value_check (gfc_expr * e, int n, int k)
/* Make sure an expression is a variable. */
-static try
+static check
variable_check (gfc_expr * e, int n)
{
if ((e->expr_type == EXPR_VARIABLE
@@ -292,7 +292,7 @@ variable_check (gfc_expr * e, int n)
/* Check the common DIM parameter for correctness. */
-static try
+static check
dim_check (gfc_expr * dim, int n, int optional)
{
if (optional && dim == NULL)
@@ -323,7 +323,7 @@ dim_check (gfc_expr * dim, int n, int optional)
allow_assumed is zero then dim must be less than the rank of the array
for assumed size arrays. */
-static try
+static check
dim_rank_check (gfc_expr * dim, gfc_expr * array, int allow_assumed)
{
gfc_array_ref *ar;
@@ -395,7 +395,7 @@ non_init_transformational (void)
/* Check subroutine suitable for intrinsics taking a real argument and
a kind argument for the result. */
-static try
+static check
check_a_kind (gfc_expr * a, gfc_expr * kind, bt type)
{
if (type_check (a, 0, BT_REAL) == FAILURE)
@@ -408,7 +408,7 @@ check_a_kind (gfc_expr * a, gfc_expr * kind, bt type)
/* Check subroutine suitable for ceiling, floor and nint. */
-try
+check
gfc_check_a_ikind (gfc_expr * a, gfc_expr * kind)
{
return check_a_kind (a, kind, BT_INTEGER);
@@ -416,13 +416,13 @@ gfc_check_a_ikind (gfc_expr * a, gfc_expr * kind)
/* Check subroutine suitable for aint, anint. */
-try
+check
gfc_check_a_xkind (gfc_expr * a, gfc_expr * kind)
{
return check_a_kind (a, kind, BT_REAL);
}
-try
+check
gfc_check_abs (gfc_expr * a)
{
if (numeric_check (a, 0) == FAILURE)
@@ -431,7 +431,7 @@ gfc_check_abs (gfc_expr * a)
return SUCCESS;
}
-try
+check
gfc_check_achar (gfc_expr * a)
{
@@ -442,7 +442,7 @@ gfc_check_achar (gfc_expr * a)
}
-try
+check
gfc_check_access_func (gfc_expr * name, gfc_expr * mode)
{
if (type_check (name, 0, BT_CHARACTER) == FAILURE
@@ -474,7 +474,7 @@ gfc_check_all_any (gfc_expr * mask, gfc_expr * dim)
}
-try
+check
gfc_check_allocated (gfc_expr * array)
{
symbol_attribute attr;
@@ -501,7 +501,7 @@ gfc_check_allocated (gfc_expr * array)
/* Common check function where the first argument must be real or
integer and the second argument must be the same as the first. */
-try
+check
gfc_check_a_p (gfc_expr * a, gfc_expr * p)
{
if (int_or_real_check (a, 0) == FAILURE)
@@ -527,12 +527,12 @@ gfc_check_a_p (gfc_expr * a, gfc_expr * p)
}
-try
+check
gfc_check_associated (gfc_expr * pointer, gfc_expr * target)
{
symbol_attribute attr;
int i;
- try t;
+ check t;
locus *where;
where = &pointer->where;
@@ -610,7 +610,7 @@ null_arg:
}
-try
+check
gfc_check_atan2 (gfc_expr * y, gfc_expr * x)
{
if (type_check (y, 0, BT_REAL) == FAILURE)
@@ -624,7 +624,7 @@ gfc_check_atan2 (gfc_expr * y, gfc_expr * x)
/* BESJN and BESYN functions. */
-try
+check
gfc_check_besn (gfc_expr * n, gfc_expr * x)
{
if (scalar_check (n, 0) == FAILURE)
@@ -643,7 +643,7 @@ gfc_check_besn (gfc_expr * n, gfc_expr * x)
}
-try
+check
gfc_check_btest (gfc_expr * i, gfc_expr * pos)
{
if (type_check (i, 0, BT_INTEGER) == FAILURE)
@@ -655,7 +655,7 @@ gfc_check_btest (gfc_expr * i, gfc_expr * pos)
}
-try
+check
gfc_check_char (gfc_expr * i, gfc_expr * kind)
{
if (type_check (i, 0, BT_INTEGER) == FAILURE)
@@ -667,7 +667,7 @@ gfc_check_char (gfc_expr * i, gfc_expr * kind)
}
-try
+check
gfc_check_chdir (gfc_expr * dir)
{
if (type_check (dir, 0, BT_CHARACTER) == FAILURE)
@@ -677,7 +677,7 @@ gfc_check_chdir (gfc_expr * dir)
}
-try
+check
gfc_check_chdir_sub (gfc_expr * dir, gfc_expr * status)
{
if (type_check (dir, 0, BT_CHARACTER) == FAILURE)
@@ -696,7 +696,7 @@ gfc_check_chdir_sub (gfc_expr * dir, gfc_expr * status)
}
-try
+check
gfc_check_chmod (gfc_expr * name, gfc_expr * mode)
{
if (type_check (name, 0, BT_CHARACTER) == FAILURE)
@@ -758,7 +758,7 @@ gfc_check_cmplx (gfc_expr * x, gfc_expr * y, gfc_expr * kind)
}
-try
+check
gfc_check_complex (gfc_expr * x, gfc_expr * y)
{
if (x->ts.type != BT_INTEGER && x->ts.type != BT_REAL)
@@ -785,7 +785,7 @@ gfc_check_complex (gfc_expr * x, gfc_expr * y)
}
-try
+check
gfc_check_count (gfc_expr * mask, gfc_expr * dim)
{
if (logical_array_check (mask, 0) == FAILURE)
@@ -800,7 +800,7 @@ gfc_check_count (gfc_expr * mask, gfc_expr * dim)
}
-try
+check
gfc_check_cshift (gfc_expr * array, gfc_expr * shift, gfc_expr * dim)
{
if (array_check (array, 0) == FAILURE)
@@ -826,7 +826,7 @@ gfc_check_cshift (gfc_expr * array, gfc_expr * shift, gfc_expr * dim)
}
-try
+check
gfc_check_ctime (gfc_expr * time)
{
if (scalar_check (time, 0) == FAILURE)
@@ -839,7 +839,7 @@ gfc_check_ctime (gfc_expr * time)
}
-try
+check
gfc_check_dcmplx (gfc_expr * x, gfc_expr * y)
{
if (numeric_check (x, 0) == FAILURE)
@@ -863,7 +863,7 @@ gfc_check_dcmplx (gfc_expr * x, gfc_expr * y)
}
-try
+check
gfc_check_dble (gfc_expr * x)
{
if (numeric_check (x, 0) == FAILURE)
@@ -873,7 +873,7 @@ gfc_check_dble (gfc_expr * x)
}
-try
+check
gfc_check_digits (gfc_expr * x)
{
if (int_or_real_check (x, 0) == FAILURE)
@@ -883,7 +883,7 @@ gfc_check_digits (gfc_expr * x)
}
-try
+check
gfc_check_dot_product (gfc_expr * vector_a, gfc_expr * vector_b)
{
switch (vector_a->ts.type)
@@ -930,7 +930,7 @@ gfc_check_dot_product (gfc_expr * vector_a, gfc_expr * vector_b)
}
-try
+check
gfc_check_eoshift (gfc_expr * array, gfc_expr * shift, gfc_expr * boundary,
gfc_expr * dim)
{
@@ -970,7 +970,7 @@ gfc_check_eoshift (gfc_expr * array, gfc_expr * shift, gfc_expr * boundary,
/* A single complex argument. */
-try
+check
gfc_check_fn_c (gfc_expr * a)
{
if (type_check (a, 0, BT_COMPLEX) == FAILURE)
@@ -982,7 +982,7 @@ gfc_check_fn_c (gfc_expr * a)
/* A single real argument. */
-try
+check
gfc_check_fn_r (gfc_expr * a)
{
if (type_check (a, 0, BT_REAL) == FAILURE)
@@ -994,7 +994,7 @@ gfc_check_fn_r (gfc_expr * a)
/* A single real or complex argument. */
-try
+check
gfc_check_fn_rc (gfc_expr * a)
{
if (real_or_complex_check (a, 0) == FAILURE)
@@ -1004,7 +1004,7 @@ gfc_check_fn_rc (gfc_expr * a)
}
-try
+check
gfc_check_fnum (gfc_expr * unit)
{
if (type_check (unit, 0, BT_INTEGER) == FAILURE)
@@ -1020,7 +1020,7 @@ gfc_check_fnum (gfc_expr * unit)
/* This is used for the g77 one-argument Bessel functions, and the
error function. */
-try
+check
gfc_check_g77_math1 (gfc_expr * x)
{
if (scalar_check (x, 0) == FAILURE)
@@ -1033,7 +1033,7 @@ gfc_check_g77_math1 (gfc_expr * x)
}
-try
+check
gfc_check_huge (gfc_expr * x)
{
if (int_or_real_check (x, 0) == FAILURE)
@@ -1045,7 +1045,7 @@ gfc_check_huge (gfc_expr * x)
/* Check that the single argument is an integer. */
-try
+check
gfc_check_i (gfc_expr * i)
{
if (type_check (i, 0, BT_INTEGER) == FAILURE)
@@ -1055,7 +1055,7 @@ gfc_check_i (gfc_expr * i)
}
-try
+check
gfc_check_iand (gfc_expr * i, gfc_expr * j)
{
if (type_check (i, 0, BT_INTEGER) == FAILURE)
@@ -1075,7 +1075,7 @@ gfc_check_iand (gfc_expr * i, gfc_expr * j)
}
-try
+check
gfc_check_ibclr (gfc_expr * i, gfc_expr * pos)
{
if (type_check (i, 0, BT_INTEGER) == FAILURE)
@@ -1088,7 +1088,7 @@ gfc_check_ibclr (gfc_expr * i, gfc_expr * pos)
}
-try
+check
gfc_check_ibits (gfc_expr * i, gfc_expr * pos, gfc_expr * len)
{
if (type_check (i, 0, BT_INTEGER) == FAILURE)
@@ -1104,7 +1104,7 @@ gfc_check_ibits (gfc_expr * i, gfc_expr * pos, gfc_expr * len)
}
-try
+check
gfc_check_ibset (gfc_expr * i, gfc_expr * pos)
{
if (type_check (i, 0, BT_INTEGER) == FAILURE)
@@ -1117,7 +1117,7 @@ gfc_check_ibset (gfc_expr * i, gfc_expr * pos)
}
-try
+check
gfc_check_ichar_iachar (gfc_expr * c)
{
int i;
@@ -1180,7 +1180,7 @@ gfc_check_ichar_iachar (gfc_expr * c)
}
-try
+check
gfc_check_idnint (gfc_expr * a)
{
if (double_check (a, 0) == FAILURE)
@@ -1190,7 +1190,7 @@ gfc_check_idnint (gfc_expr * a)
}
-try
+check
gfc_check_ieor (gfc_expr * i, gfc_expr * j)
{
if (type_check (i, 0, BT_INTEGER) == FAILURE)
@@ -1210,7 +1210,7 @@ gfc_check_ieor (gfc_expr * i, gfc_expr * j)
}
-try
+check
gfc_check_index (gfc_expr * string, gfc_expr * substring, gfc_expr * back)
{
if (type_check (string, 0, BT_CHARACTER) == FAILURE
@@ -1234,7 +1234,7 @@ gfc_check_index (gfc_expr * string, gfc_expr * substring, gfc_expr * back)
}
-try
+check
gfc_check_int (gfc_expr * x, gfc_expr * kind)
{
if (numeric_check (x, 0) == FAILURE)
@@ -1253,7 +1253,7 @@ gfc_check_int (gfc_expr * x, gfc_expr * kind)
}
-try
+check
gfc_check_intconv (gfc_expr * x)
{
if (numeric_check (x, 0) == FAILURE)
@@ -1283,7 +1283,7 @@ gfc_check_ior (gfc_expr * i, gfc_expr * j)
}
-try
+check
gfc_check_ishft (gfc_expr * i, gfc_expr * shift)
{
if (type_check (i, 0, BT_INTEGER) == FAILURE
@@ -1294,7 +1294,7 @@ gfc_check_ishft (gfc_expr * i, gfc_expr * shift)
}
-try
+check
gfc_check_ishftc (gfc_expr * i, gfc_expr * shift, gfc_expr * size)
{
if (type_check (i, 0, BT_INTEGER) == FAILURE
@@ -1308,7 +1308,7 @@ gfc_check_ishftc (gfc_expr * i, gfc_expr * shift, gfc_expr * size)
}
-try
+check
gfc_check_kill (gfc_expr * pid, gfc_expr * sig)
{
if (type_check (pid, 0, BT_INTEGER) == FAILURE)
@@ -1321,7 +1321,7 @@ gfc_check_kill (gfc_expr * pid, gfc_expr * sig)
}
-try
+check
gfc_check_kill_sub (gfc_expr * pid, gfc_expr * sig, gfc_expr * status)
{
if (type_check (pid, 0, BT_INTEGER) == FAILURE)
@@ -1343,7 +1343,7 @@ gfc_check_kill_sub (gfc_expr * pid, gfc_expr * sig, gfc_expr * status)
}
-try
+check
gfc_check_kind (gfc_expr * x)
{
if (x->ts.type == BT_DERIVED)
@@ -1358,7 +1358,7 @@ gfc_check_kind (gfc_expr * x)
}
-try
+check
gfc_check_lbound (gfc_expr * array, gfc_expr * dim)
{
if (array_check (array, 0) == FAILURE)
@@ -1376,7 +1376,7 @@ gfc_check_lbound (gfc_expr * array, gfc_expr * dim)
}
-try
+check
gfc_check_link (gfc_expr * path1, gfc_expr * path2)
{
if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
@@ -1389,7 +1389,7 @@ gfc_check_link (gfc_expr * path1, gfc_expr * path2)
}
-try
+check
gfc_check_link_sub (gfc_expr * path1, gfc_expr * path2, gfc_expr * status)
{
if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
@@ -1410,14 +1410,14 @@ gfc_check_link_sub (gfc_expr * path1, gfc_expr * path2, gfc_expr * status)
return SUCCESS;
}
-try
+check
gfc_check_loc (gfc_expr *expr)
{
return variable_check (expr, 0);
}
-try
+check
gfc_check_symlnk (gfc_expr * path1, gfc_expr * path2)
{
if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
@@ -1430,7 +1430,7 @@ gfc_check_symlnk (gfc_expr * path1, gfc_expr * path2)
}
-try
+check
gfc_check_symlnk_sub (gfc_expr * path1, gfc_expr * path2, gfc_expr * status)
{
if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
@@ -1452,7 +1452,7 @@ gfc_check_symlnk_sub (gfc_expr * path1, gfc_expr * path2, gfc_expr * status)
}
-try
+check
gfc_check_logical (gfc_expr * a, gfc_expr * kind)
{
if (type_check (a, 0, BT_LOGICAL) == FAILURE)
@@ -1466,7 +1466,7 @@ gfc_check_logical (gfc_expr * a, gfc_expr * kind)
/* Min/max family. */
-static try
+static check
min_max_args (gfc_actual_arglist * arg)
{
if (arg == NULL || arg->next == NULL)
@@ -1480,7 +1480,7 @@ min_max_args (gfc_actual_arglist * arg)
}
-static try
+static check
check_rest (bt type, int kind, gfc_actual_arglist * arg)
{
gfc_expr *x;
@@ -1517,7 +1517,7 @@ check_rest (bt type, int kind, gfc_actual_arglist * arg)
}
-try
+check
gfc_check_min_max (gfc_actual_arglist * arg)
{
gfc_expr *x;
@@ -1539,21 +1539,21 @@ gfc_check_min_max (gfc_actual_arglist * arg)
}
-try
+check
gfc_check_min_max_integer (gfc_actual_arglist * arg)
{
return check_rest (BT_INTEGER, gfc_default_integer_kind, arg);
}
-try
+check
gfc_check_min_max_real (gfc_actual_arglist * arg)
{
return check_rest (BT_REAL, gfc_default_real_kind, arg);
}
-try
+check
gfc_check_min_max_double (gfc_actual_arglist * arg)
{
return check_rest (BT_REAL, gfc_default_double_kind, arg);
@@ -1561,7 +1561,7 @@ gfc_check_min_max_double (gfc_actual_arglist * arg)
/* End of min/max family. */
-try
+check
gfc_check_malloc (gfc_expr * size)
{
if (type_check (size, 0, BT_INTEGER) == FAILURE)
@@ -1574,7 +1574,7 @@ gfc_check_malloc (gfc_expr * size)
}
-try
+check
gfc_check_matmul (gfc_expr * matrix_a, gfc_expr * matrix_b)
{
if ((matrix_a->ts.type != BT_LOGICAL) && !gfc_numeric_ts (&matrix_b->ts))
@@ -1657,7 +1657,7 @@ gfc_check_matmul (gfc_expr * matrix_a, gfc_expr * matrix_b)
I.e. in the case of minloc(array,mask), mask will be in the second
position of the argument list and we'll have to fix that up. */
-try
+check
gfc_check_minloc_maxloc (gfc_actual_arglist * ap)
{
gfc_expr *a, *m, *d;
@@ -1721,7 +1721,7 @@ gfc_check_minloc_maxloc (gfc_actual_arglist * ap)
I.e. in the case of minval(array,mask), mask will be in the second
position of the argument list and we'll have to fix that up. */
-static try
+static check
check_reduction (gfc_actual_arglist * ap)
{
gfc_expr *a, *m, *d;
@@ -1763,7 +1763,7 @@ check_reduction (gfc_actual_arglist * ap)
}
-try
+check
gfc_check_minval_maxval (gfc_actual_arglist * ap)
{
if (int_or_real_check (ap->expr, 0) == FAILURE
@@ -1777,7 +1777,7 @@ gfc_check_minval_maxval (gfc_actual_arglist * ap)
}
-try
+check
gfc_check_product_sum (gfc_actual_arglist * ap)
{
if (numeric_check (ap->expr, 0) == FAILURE
@@ -1791,7 +1791,7 @@ gfc_check_product_sum (gfc_actual_arglist * ap)
}
-try
+check
gfc_check_merge (gfc_expr * tsource, gfc_expr * fsource, gfc_expr * mask)
{
char buffer[80];
@@ -1817,7 +1817,7 @@ gfc_check_merge (gfc_expr * tsource, gfc_expr * fsource, gfc_expr * mask)
return SUCCESS;
}
-try
+check
gfc_check_move_alloc (gfc_expr * from, gfc_expr * to)
{
symbol_attribute attr;
@@ -1876,7 +1876,7 @@ gfc_check_move_alloc (gfc_expr * from, gfc_expr * to)
return SUCCESS;
}
-try
+check
gfc_check_nearest (gfc_expr * x, gfc_expr * s)
{
if (type_check (x, 0, BT_REAL) == FAILURE)
@@ -1888,7 +1888,7 @@ gfc_check_nearest (gfc_expr * x, gfc_expr * s)
return SUCCESS;
}
-try
+check
gfc_check_new_line (gfc_expr * a)
{
if (type_check (a, 0, BT_CHARACTER) == FAILURE)
@@ -1897,7 +1897,7 @@ gfc_check_new_line (gfc_expr * a)
return SUCCESS;
}
-try
+check
gfc_check_null (gfc_expr * mold)
{
symbol_attribute attr;
@@ -1922,7 +1922,7 @@ gfc_check_null (gfc_expr * mold)
}
-try
+check
gfc_check_pack (gfc_expr * array, gfc_expr * mask, gfc_expr * vector)
{
char buffer[80];
@@ -1957,7 +1957,7 @@ gfc_check_pack (gfc_expr * array, gfc_expr * mask, gfc_expr * vector)
}
-try
+check
gfc_check_precision (gfc_expr * x)
{
if (x->ts.type != BT_REAL && x->ts.type != BT_COMPLEX)
@@ -1972,7 +1972,7 @@ gfc_check_precision (gfc_expr * x)
}
-try
+check
gfc_check_present (gfc_expr * a)
{
gfc_symbol *sym;
@@ -2017,7 +2017,7 @@ gfc_check_present (gfc_expr * a)
}
-try
+check
gfc_check_radix (gfc_expr * x)
{
if (int_or_real_check (x, 0) == FAILURE)
@@ -2027,7 +2027,7 @@ gfc_check_radix (gfc_expr * x)
}
-try
+check
gfc_check_range (gfc_expr * x)
{
if (numeric_check (x, 0) == FAILURE)
@@ -2038,7 +2038,7 @@ gfc_check_range (gfc_expr * x)
/* real, float, sngl. */
-try
+check
gfc_check_real (gfc_expr * a, gfc_expr * kind)
{
if (numeric_check (a, 0) == FAILURE)
@@ -2051,7 +2051,7 @@ gfc_check_real (gfc_expr * a, gfc_expr * kind)
}
-try
+check
gfc_check_rename (gfc_expr * path1, gfc_expr * path2)
{
if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
@@ -2064,7 +2064,7 @@ gfc_check_rename (gfc_expr * path1, gfc_expr * path2)
}
-try
+check
gfc_check_rename_sub (gfc_expr * path1, gfc_expr * path2, gfc_expr * status)
{
if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
@@ -2086,7 +2086,7 @@ gfc_check_rename_sub (gfc_expr * path1, gfc_expr * path2, gfc_expr * status)
}
-try
+check
gfc_check_repeat (gfc_expr * x, gfc_expr * y)
{
if (type_check (x, 0, BT_CHARACTER) == FAILURE)
@@ -2105,7 +2105,7 @@ gfc_check_repeat (gfc_expr * x, gfc_expr * y)
}
-try
+check
gfc_check_reshape (gfc_expr * source, gfc_expr * shape,
gfc_expr * pad, gfc_expr * order)
{
@@ -2153,7 +2153,7 @@ gfc_check_reshape (gfc_expr * source, gfc_expr * shape,
}
-try
+check
gfc_check_scale (gfc_expr * x, gfc_expr * i)
{
if (type_check (x, 0, BT_REAL) == FAILURE)
@@ -2166,7 +2166,7 @@ gfc_check_scale (gfc_expr * x, gfc_expr * i)
}
-try
+check
gfc_check_scan (gfc_expr * x, gfc_expr * y, gfc_expr * z)
{
if (type_check (x, 0, BT_CHARACTER) == FAILURE)
@@ -2185,7 +2185,7 @@ gfc_check_scan (gfc_expr * x, gfc_expr * y, gfc_expr * z)
}
-try
+check
gfc_check_secnds (gfc_expr * r)
{
@@ -2202,7 +2202,7 @@ gfc_check_secnds (gfc_expr * r)
}
-try
+check
gfc_check_selected_int_kind (gfc_expr * r)
{
@@ -2216,7 +2216,7 @@ gfc_check_selected_int_kind (gfc_expr * r)
}
-try
+check
gfc_check_selected_real_kind (gfc_expr * p, gfc_expr * r)
{
if (p == NULL && r == NULL)
@@ -2237,7 +2237,7 @@ gfc_check_selected_real_kind (gfc_expr * p, gfc_expr * r)
}
-try
+check
gfc_check_set_exponent (gfc_expr * x, gfc_expr * i)
{
if (type_check (x, 0, BT_REAL) == FAILURE)
@@ -2250,7 +2250,7 @@ gfc_check_set_exponent (gfc_expr * x, gfc_expr * i)
}
-try
+check
gfc_check_shape (gfc_expr * source)
{
gfc_array_ref *ar;
@@ -2271,7 +2271,7 @@ gfc_check_shape (gfc_expr * source)
}
-try
+check
gfc_check_sign (gfc_expr * a, gfc_expr * b)
{
if (int_or_real_check (a, 0) == FAILURE)
@@ -2284,7 +2284,7 @@ gfc_check_sign (gfc_expr * a, gfc_expr * b)
}
-try
+check
gfc_check_size (gfc_expr * array, gfc_expr * dim)
{
if (array_check (array, 0) == FAILURE)
@@ -2306,7 +2306,7 @@ gfc_check_size (gfc_expr * array, gfc_expr * dim)
}
-try
+check
gfc_check_sleep_sub (gfc_expr * seconds)
{
if (type_check (seconds, 0, BT_INTEGER) == FAILURE)
@@ -2319,7 +2319,7 @@ gfc_check_sleep_sub (gfc_expr * seconds)
}
-try
+check
gfc_check_spread (gfc_expr * source, gfc_expr * dim, gfc_expr * ncopies)
{
if (source->rank >= GFC_MAX_DIMENSIONS)
@@ -2349,7 +2349,7 @@ gfc_check_spread (gfc_expr * source, gfc_expr * dim, gfc_expr * ncopies)
/* Functions for checking FGETC, FPUTC, FGET and FPUT (subroutines and
functions). */
-try
+check
gfc_check_fgetputc_sub (gfc_expr * unit, gfc_expr * c, gfc_expr * status)
{
if (type_check (unit, 0, BT_INTEGER) == FAILURE)
@@ -2373,14 +2373,14 @@ gfc_check_fgetputc_sub (gfc_expr * unit, gfc_expr * c, gfc_expr * status)
}
-try
+check
gfc_check_fgetputc (gfc_expr * unit, gfc_expr * c)
{
return gfc_check_fgetputc_sub (unit, c, NULL);
}
-try
+check
gfc_check_fgetput_sub (gfc_expr * c, gfc_expr * status)
{
if (type_check (c, 0, BT_CHARACTER) == FAILURE)
@@ -2398,14 +2398,14 @@ gfc_check_fgetput_sub (gfc_expr * c, gfc_expr * status)
}
-try
+check
gfc_check_fgetput (gfc_expr * c)
{
return gfc_check_fgetput_sub (c, NULL);
}
-try
+check
gfc_check_fstat (gfc_expr * unit, gfc_expr * array)
{
if (type_check (unit, 0, BT_INTEGER) == FAILURE)
@@ -2425,7 +2425,7 @@ gfc_check_fstat (gfc_expr * unit, gfc_expr * array)
}
-try
+check
gfc_check_fstat_sub (gfc_expr * unit, gfc_expr * array, gfc_expr * status)
{
if (type_check (unit, 0, BT_INTEGER) == FAILURE)
@@ -2455,7 +2455,7 @@ gfc_check_fstat_sub (gfc_expr * unit, gfc_expr * array, gfc_expr * status)
}
-try
+check
gfc_check_ftell (gfc_expr * unit)
{
if (type_check (unit, 0, BT_INTEGER) == FAILURE)
@@ -2468,7 +2468,7 @@ gfc_check_ftell (gfc_expr * unit)
}
-try
+check
gfc_check_ftell_sub (gfc_expr * unit, gfc_expr * offset)
{
if (type_check (unit, 0, BT_INTEGER) == FAILURE)
@@ -2487,7 +2487,7 @@ gfc_check_ftell_sub (gfc_expr * unit, gfc_expr * offset)
}
-try
+check
gfc_check_stat (gfc_expr * name, gfc_expr * array)
{
if (type_check (name, 0, BT_CHARACTER) == FAILURE)
@@ -2504,7 +2504,7 @@ gfc_check_stat (gfc_expr * name, gfc_expr * array)
}
-try
+check
gfc_check_stat_sub (gfc_expr * name, gfc_expr * array, gfc_expr * status)
{
if (type_check (name, 0, BT_CHARACTER) == FAILURE)
@@ -2531,7 +2531,7 @@ gfc_check_stat_sub (gfc_expr * name, gfc_expr * array, gfc_expr * status)
}
-try
+check
gfc_check_transfer (gfc_expr * source ATTRIBUTE_UNUSED,
gfc_expr * mold ATTRIBUTE_UNUSED,
gfc_expr * size)
@@ -2552,7 +2552,7 @@ gfc_check_transfer (gfc_expr * source ATTRIBUTE_UNUSED,
}
-try
+check
gfc_check_transpose (gfc_expr * matrix)
{
if (rank_check (matrix, 0, 2) == FAILURE)
@@ -2565,7 +2565,7 @@ gfc_check_transpose (gfc_expr * matrix)
}
-try
+check
gfc_check_ubound (gfc_expr * array, gfc_expr * dim)
{
if (array_check (array, 0) == FAILURE)
@@ -2584,7 +2584,7 @@ gfc_check_ubound (gfc_expr * array, gfc_expr * dim)
}
-try
+check
gfc_check_unpack (gfc_expr * vector, gfc_expr * mask, gfc_expr * field)
{
if (rank_check (vector, 0, 1) == FAILURE)
@@ -2606,7 +2606,7 @@ gfc_check_unpack (gfc_expr * vector, gfc_expr * mask, gfc_expr * field)
}
-try
+check
gfc_check_verify (gfc_expr * x, gfc_expr * y, gfc_expr * z)
{
if (type_check (x, 0, BT_CHARACTER) == FAILURE)
@@ -2622,7 +2622,7 @@ gfc_check_verify (gfc_expr * x, gfc_expr * y, gfc_expr * z)
}
-try
+check
gfc_check_trim (gfc_expr * x)
{
if (type_check (x, 0, BT_CHARACTER) == FAILURE)
@@ -2635,7 +2635,7 @@ gfc_check_trim (gfc_expr * x)
}
-try
+check
gfc_check_ttynam (gfc_expr * unit)
{
if (scalar_check (unit, 0) == FAILURE)
@@ -2651,7 +2651,7 @@ gfc_check_ttynam (gfc_expr * unit)
/* Common check function for the half a dozen intrinsics that have a
single real argument. */
-try
+check
gfc_check_x (gfc_expr * x)
{
if (type_check (x, 0, BT_REAL) == FAILURE)
@@ -2663,7 +2663,7 @@ gfc_check_x (gfc_expr * x)
/************* Check functions for intrinsic subroutines *************/
-try
+check
gfc_check_cpu_time (gfc_expr * time)
{
if (scalar_check (time, 0) == FAILURE)
@@ -2679,7 +2679,7 @@ gfc_check_cpu_time (gfc_expr * time)
}
-try
+check
gfc_check_date_and_time (gfc_expr * date, gfc_expr * time,
gfc_expr * zone, gfc_expr * values)
{
@@ -2729,7 +2729,7 @@ gfc_check_date_and_time (gfc_expr * date, gfc_expr * time,
}
-try
+check
gfc_check_mvbits (gfc_expr * from, gfc_expr * frompos, gfc_expr * len,
gfc_expr * to, gfc_expr * topos)
{
@@ -2755,7 +2755,7 @@ gfc_check_mvbits (gfc_expr * from, gfc_expr * frompos, gfc_expr * len,
}
-try
+check
gfc_check_random_number (gfc_expr * harvest)
{
if (type_check (harvest, 0, BT_REAL) == FAILURE)
@@ -2768,7 +2768,7 @@ gfc_check_random_number (gfc_expr * harvest)
}
-try
+check
gfc_check_random_seed (gfc_expr * size, gfc_expr * put, gfc_expr * get)
{
if (size != NULL)
@@ -2832,7 +2832,7 @@ gfc_check_random_seed (gfc_expr * size, gfc_expr * put, gfc_expr * get)
return SUCCESS;
}
-try
+check
gfc_check_second_sub (gfc_expr * time)
{
if (scalar_check (time, 0) == FAILURE)
@@ -2851,7 +2851,7 @@ gfc_check_second_sub (gfc_expr * time)
/* The arguments of SYSTEM_CLOCK are scalar, integer variables. Note,
count, count_rate, and count_max are all optional arguments */
-try
+check
gfc_check_system_clock (gfc_expr * count, gfc_expr * count_rate,
gfc_expr * count_max)
{
@@ -2907,7 +2907,7 @@ gfc_check_system_clock (gfc_expr * count, gfc_expr * count_rate,
return SUCCESS;
}
-try
+check
gfc_check_irand (gfc_expr * x)
{
if (x == NULL)
@@ -2926,7 +2926,7 @@ gfc_check_irand (gfc_expr * x)
}
-try
+check
gfc_check_alarm_sub (gfc_expr * seconds, gfc_expr * handler, gfc_expr * status)
{
if (scalar_check (seconds, 0) == FAILURE)
@@ -2959,7 +2959,7 @@ gfc_check_alarm_sub (gfc_expr * seconds, gfc_expr * handler, gfc_expr * status)
}
-try
+check
gfc_check_rand (gfc_expr * x)
{
if (x == NULL)
@@ -2977,7 +2977,7 @@ gfc_check_rand (gfc_expr * x)
return SUCCESS;
}
-try
+check
gfc_check_srand (gfc_expr * x)
{
if (scalar_check (x, 0) == FAILURE)
@@ -2992,7 +2992,7 @@ gfc_check_srand (gfc_expr * x)
return SUCCESS;
}
-try
+check
gfc_check_ctime_sub (gfc_expr * time, gfc_expr * result)
{
if (scalar_check (time, 0) == FAILURE)
@@ -3007,7 +3007,7 @@ gfc_check_ctime_sub (gfc_expr * time, gfc_expr * result)
return SUCCESS;
}
-try
+check
gfc_check_etime (gfc_expr * x)
{
if (array_check (x, 0) == FAILURE)
@@ -3028,7 +3028,7 @@ gfc_check_etime (gfc_expr * x)
return SUCCESS;
}
-try
+check
gfc_check_etime_sub (gfc_expr * values, gfc_expr * time)
{
if (array_check (values, 0) == FAILURE)
@@ -3059,7 +3059,7 @@ gfc_check_etime_sub (gfc_expr * values, gfc_expr * time)
}
-try
+check
gfc_check_fdate_sub (gfc_expr * date)
{
if (type_check (date, 0, BT_CHARACTER) == FAILURE)
@@ -3069,7 +3069,7 @@ gfc_check_fdate_sub (gfc_expr * date)
}
-try
+check
gfc_check_gerror (gfc_expr * msg)
{
if (type_check (msg, 0, BT_CHARACTER) == FAILURE)
@@ -3079,7 +3079,7 @@ gfc_check_gerror (gfc_expr * msg)
}
-try
+check
gfc_check_getcwd_sub (gfc_expr * cwd, gfc_expr * status)
{
if (type_check (cwd, 0, BT_CHARACTER) == FAILURE)
@@ -3098,7 +3098,7 @@ gfc_check_getcwd_sub (gfc_expr * cwd, gfc_expr * status)
}
-try
+check
gfc_check_getlog (gfc_expr * msg)
{
if (type_check (msg, 0, BT_CHARACTER) == FAILURE)
@@ -3108,7 +3108,7 @@ gfc_check_getlog (gfc_expr * msg)
}
-try
+check
gfc_check_exit (gfc_expr * status)
{
if (status == NULL)
@@ -3124,7 +3124,7 @@ gfc_check_exit (gfc_expr * status)
}
-try
+check
gfc_check_flush (gfc_expr * unit)
{
if (unit == NULL)
@@ -3140,7 +3140,7 @@ gfc_check_flush (gfc_expr * unit)
}
-try
+check
gfc_check_free (gfc_expr * i)
{
if (type_check (i, 0, BT_INTEGER) == FAILURE)
@@ -3153,7 +3153,7 @@ gfc_check_free (gfc_expr * i)
}
-try
+check
gfc_check_hostnm (gfc_expr * name)
{
if (type_check (name, 0, BT_CHARACTER) == FAILURE)
@@ -3163,7 +3163,7 @@ gfc_check_hostnm (gfc_expr * name)
}
-try
+check
gfc_check_hostnm_sub (gfc_expr * name, gfc_expr * status)
{
if (type_check (name, 0, BT_CHARACTER) == FAILURE)
@@ -3182,7 +3182,7 @@ gfc_check_hostnm_sub (gfc_expr * name, gfc_expr * status)
}
-try
+check
gfc_check_itime_idate (gfc_expr * values)
{
if (array_check (values, 0) == FAILURE)
@@ -3251,7 +3251,7 @@ gfc_check_ttynam_sub (gfc_expr * unit, gfc_expr * name)
}
-try
+check
gfc_check_isatty (gfc_expr * unit)
{
if (unit == NULL)
@@ -3267,7 +3267,7 @@ gfc_check_isatty (gfc_expr * unit)
}
-try
+check
gfc_check_perror (gfc_expr * string)
{
if (type_check (string, 0, BT_CHARACTER) == FAILURE)
@@ -3277,7 +3277,7 @@ gfc_check_perror (gfc_expr * string)
}
-try
+check
gfc_check_umask (gfc_expr * mask)
{
if (type_check (mask, 0, BT_INTEGER) == FAILURE)
@@ -3290,7 +3290,7 @@ gfc_check_umask (gfc_expr * mask)
}
-try
+check
gfc_check_umask_sub (gfc_expr * mask, gfc_expr * old)
{
if (type_check (mask, 0, BT_INTEGER) == FAILURE)
@@ -3312,7 +3312,7 @@ gfc_check_umask_sub (gfc_expr * mask, gfc_expr * old)
}
-try
+check
gfc_check_unlink (gfc_expr * name)
{
if (type_check (name, 0, BT_CHARACTER) == FAILURE)
@@ -3322,7 +3322,7 @@ gfc_check_unlink (gfc_expr * name)
}
-try
+check
gfc_check_unlink_sub (gfc_expr * name, gfc_expr * status)
{
if (type_check (name, 0, BT_CHARACTER) == FAILURE)
@@ -3341,7 +3341,7 @@ gfc_check_unlink_sub (gfc_expr * name, gfc_expr * status)
}
-try
+check
gfc_check_signal (gfc_expr * number, gfc_expr * handler)
{
if (scalar_check (number, 0) == FAILURE)
@@ -3365,7 +3365,7 @@ gfc_check_signal (gfc_expr * number, gfc_expr * handler)
}
-try
+check
gfc_check_signal_sub (gfc_expr * number, gfc_expr * handler, gfc_expr * status)
{
if (scalar_check (number, 0) == FAILURE)
@@ -3398,7 +3398,7 @@ gfc_check_signal_sub (gfc_expr * number, gfc_expr * handler, gfc_expr * status)
}
-try
+check
gfc_check_system_sub (gfc_expr * cmd, gfc_expr * status)
{
if (type_check (cmd, 0, BT_CHARACTER) == FAILURE)
@@ -3418,7 +3418,7 @@ gfc_check_system_sub (gfc_expr * cmd, gfc_expr * status)
/* This is used for the GNU intrinsics AND, OR and XOR. */
-try
+check
gfc_check_and (gfc_expr * i, gfc_expr * j)
{
if (i->ts.type != BT_INTEGER && i->ts.type != BT_LOGICAL)
diff --git a/gcc/fortran/data.c b/gcc/fortran/data.c
index 2ab6f507bbe..0feefc0e283 100644
--- a/gcc/fortran/data.c
+++ b/gcc/fortran/data.c
@@ -45,7 +45,7 @@ get_array_index (gfc_array_ref * ar, mpz_t * offset)
{
gfc_expr *e;
int i;
- try re;
+ check re;
mpz_t delta;
mpz_t tmp;
@@ -155,7 +155,7 @@ create_character_intializer (gfc_expr * init, gfc_typespec * ts,
init->expr_type = EXPR_CONSTANT;
init->ts = *ts;
- dest = gfc_getmem (len);
+ dest = (char *) gfc_getmem (len);
init->value.character.length = len;
init->value.character.string = dest;
/* Blank the string if we're only setting a substring. */
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 02dc38cc8bb..df91b2895f6 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -187,21 +187,21 @@ syntax:
variable-iterator list. */
static match
-var_element (gfc_data_variable * new)
+var_element (gfc_data_variable * var)
{
match m;
gfc_symbol *sym;
- memset (new, 0, sizeof (gfc_data_variable));
+ memset (var, 0, sizeof (gfc_data_variable));
if (gfc_match_char ('(') == MATCH_YES)
- return var_list (new);
+ return var_list (var);
- m = gfc_match_variable (&new->expr, 0);
+ m = gfc_match_variable (&var->expr, 0);
if (m != MATCH_YES)
return m;
- sym = new->expr->symtree->n.sym;
+ sym = var->expr->symtree->n.sym;
if (!sym->attr.function && gfc_current_ns->parent && gfc_current_ns->parent == sym->ns)
{
@@ -217,7 +217,7 @@ var_element (gfc_data_variable * new)
sym->name) == FAILURE)
return MATCH_ERROR;
- if (gfc_add_data (&sym->attr, sym->name, &new->expr->where) == FAILURE)
+ if (gfc_add_data (&sym->attr, sym->name, &var->expr->where) == FAILURE)
return MATCH_ERROR;
return MATCH_YES;
@@ -229,7 +229,7 @@ var_element (gfc_data_variable * new)
static match
top_var_list (gfc_data * d)
{
- gfc_data_variable var, *tail, *new;
+ gfc_data_variable var, *tail, *tmp;
match m;
tail = NULL;
@@ -242,15 +242,15 @@ top_var_list (gfc_data * d)
if (m == MATCH_ERROR)
return MATCH_ERROR;
- new = gfc_get_data_variable ();
- *new = var;
+ tmp = gfc_get_data_variable ();
+ *tmp = var;
if (tail == NULL)
- d->var = new;
+ d->var = tmp;
else
- tail->next = new;
+ tail->next = tmp;
- tail = new;
+ tail = tmp;
if (gfc_match_char ('/') == MATCH_YES)
break;
@@ -316,7 +316,7 @@ match_data_constant (gfc_expr ** result)
static match
top_val_list (gfc_data * data)
{
- gfc_data_value *new, *tail;
+ gfc_data_value *tmp, *tail;
gfc_expr *expr;
const char *msg;
match m;
@@ -331,14 +331,14 @@ top_val_list (gfc_data * data)
if (m == MATCH_ERROR)
return MATCH_ERROR;
- new = gfc_get_data_value ();
+ tmp = gfc_get_data_value ();
if (tail == NULL)
- data->value = new;
+ data->value = tmp;
else
- tail->next = new;
+ tail->next = tmp;
- tail = new;
+ tail = tmp;
if (expr->ts.type != BT_INTEGER || gfc_match_char ('*') != MATCH_YES)
{
@@ -435,24 +435,24 @@ match_old_style_init (const char *name)
match
gfc_match_data (void)
{
- gfc_data *new;
+ gfc_data *tmp;
match m;
for (;;)
{
- new = gfc_get_data ();
- new->where = gfc_current_locus;
+ tmp = gfc_get_data ();
+ tmp->where = gfc_current_locus;
- m = top_var_list (new);
+ m = top_var_list (tmp);
if (m != MATCH_YES)
goto cleanup;
- m = top_val_list (new);
+ m = top_val_list (tmp);
if (m != MATCH_YES)
goto cleanup;
- new->next = gfc_current_ns->data;
- gfc_current_ns->data = new;
+ tmp->next = gfc_current_ns->data;
+ gfc_current_ns->data = tmp;
if (gfc_match_eos () == MATCH_YES)
break;
@@ -469,7 +469,7 @@ gfc_match_data (void)
return MATCH_YES;
cleanup:
- gfc_free_data (new);
+ gfc_free_data (tmp);
return MATCH_ERROR;
}
@@ -626,7 +626,7 @@ get_proc_name (const char *name, gfc_symbol ** result,
sym = *result;
- if (sym && !sym->new && gfc_current_state () != COMP_INTERFACE)
+ if (sym && !sym->fresh && gfc_current_state () != COMP_INTERFACE)
{
/* Trap another encompassed procedure with the same name. All
these conditions are necessary to avoid picking up an entry
@@ -683,7 +683,7 @@ get_proc_name (const char *name, gfc_symbol ** result,
/* Function called by variable_decl() that adds a name to the symbol
table. */
-static try
+static check
build_sym (const char *name, gfc_charlen * cl,
gfc_array_spec ** as, locus * var_locus)
{
@@ -736,7 +736,7 @@ gfc_set_constant_character_len (int len, gfc_expr * expr)
slen = expr->value.character.length;
if (len != slen)
{
- s = gfc_getmem (len);
+ s = (char *)gfc_getmem (len);
memcpy (s, expr->value.character.string, MIN (len, slen));
if (len > slen)
memset (&s[slen], ' ', len - slen);
@@ -761,7 +761,7 @@ create_enum_history(gfc_symbol *sym, gfc_expr *init)
enumerator_history *new_enum_history;
gcc_assert (sym != NULL && init != NULL);
- new_enum_history = gfc_getmem (sizeof (enumerator_history));
+ new_enum_history = (enumerator_history *)gfc_getmem (sizeof (enumerator_history));
new_enum_history->sym = sym;
new_enum_history->initializer = init;
@@ -806,7 +806,7 @@ gfc_free_enum_history(void)
/* Function called by variable_decl() that adds an initialization
expression to a symbol. */
-static try
+static check
add_init_expr_to_sym (const char *name, gfc_expr ** initp,
locus * var_locus)
{
@@ -920,7 +920,7 @@ add_init_expr_to_sym (const char *name, gfc_expr ** initp,
/* Function called by variable_decl() that adds a name to a structure
being built. */
-static try
+static check
build_struct (const char *name, gfc_charlen * cl, gfc_expr ** init,
gfc_array_spec ** as)
{
@@ -1061,7 +1061,7 @@ variable_decl (int elem)
gfc_charlen *cl;
locus var_locus;
match m;
- try t;
+ check t;
gfc_symbol *sym;
locus old_locus;
@@ -1162,7 +1162,7 @@ variable_decl (int elem)
gfc_internal_error ("Couldn't set pointee array spec.");
/* Fix the array spec. */
- m = gfc_mod_pointee_as (sym->as);
+ m = (match) gfc_mod_pointee_as (sym->as);
if (m == MATCH_ERROR)
goto cleanup;
}
@@ -2035,10 +2035,10 @@ match_attr_spec (void)
locus start, seen_at[NUM_DECL];
int seen[NUM_DECL];
- decl_types d;
+ int d;
const char *attr;
match m;
- try t;
+ check t;
gfc_clear_attr (&current_attr);
start = gfc_current_locus;
@@ -2429,7 +2429,7 @@ loop:
/* Copy attributes matched by match_prefix() to attributes on a symbol. */
-static try
+static check
copy_prefix (symbol_attribute * dest, locus * where)
{
@@ -3289,7 +3289,7 @@ attr_decl1 (void)
if (sym->attr.cray_pointee && sym->as != NULL)
{
/* Fix the array spec. */
- m = gfc_mod_pointee_as (sym->as);
+ m = (match) gfc_mod_pointee_as (sym->as);
if (m == MATCH_ERROR)
goto cleanup;
}
@@ -3465,7 +3465,7 @@ cray_pointer_decl (void)
{
gfc_error ("Duplicate array spec for Cray pointee at %C.");
gfc_free_array_spec (as);
- return MATCH_ERROR;
+ return (match) MATCH_ERROR;
}
as = NULL;
@@ -3473,7 +3473,7 @@ cray_pointer_decl (void)
if (cpte->as != NULL)
{
/* Fix array spec. */
- m = gfc_mod_pointee_as (cpte->as);
+ m = (match) gfc_mod_pointee_as (cpte->as);
if (m == MATCH_ERROR)
return m;
}
@@ -3619,7 +3619,7 @@ access_attr_decl (gfc_statement st)
interface_type type;
gfc_user_op *uop;
gfc_symbol *sym;
- gfc_intrinsic_op operator;
+ gfc_intrinsic_op op;
match m;
if (gfc_match (" ::") == MATCH_NO && gfc_match_space () == MATCH_NO)
@@ -3627,7 +3627,7 @@ access_attr_decl (gfc_statement st)
for (;;)
{
- m = gfc_match_generic_spec (&type, name, &operator);
+ m = gfc_match_generic_spec (&type, name, &op);
if (m == MATCH_NO)
goto syntax;
if (m == MATCH_ERROR)
@@ -3651,15 +3651,15 @@ access_attr_decl (gfc_statement st)
break;
case INTERFACE_INTRINSIC_OP:
- if (gfc_current_ns->operator_access[operator] == ACCESS_UNKNOWN)
+ if (gfc_current_ns->operator_access[op] == ACCESS_UNKNOWN)
{
- gfc_current_ns->operator_access[operator] =
+ gfc_current_ns->operator_access[op] =
(st == ST_PUBLIC) ? ACCESS_PUBLIC : ACCESS_PRIVATE;
}
else
{
gfc_error ("Access specification of the %s operator at %C has "
- "already been specified", gfc_op2string (operator));
+ "already been specified", gfc_op2string (op));
goto done;
}
@@ -4089,7 +4089,7 @@ loop:
is the case. Since there is no bounds-checking for Cray Pointees,
this will be okay. */
-try
+check
gfc_mod_pointee_as (gfc_array_spec *as)
{
as->cray_pointee = true; /* This will be useful to know later. */
@@ -4102,9 +4102,9 @@ gfc_mod_pointee_as (gfc_array_spec *as)
else if (as->type == AS_ASSUMED_SHAPE)
{
gfc_error ("Cray Pointee at %C cannot be assumed shape array");
- return MATCH_ERROR;
+ return (check) MATCH_ERROR;
}
- return MATCH_YES;
+ return (check) MATCH_YES;
}
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index 8a7eab5262a..5a44d54456d 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -424,7 +424,7 @@ gfc_show_expr (gfc_expr * p)
case EXPR_OP:
gfc_status ("(");
- switch (p->value.op.operator)
+ switch (p->value.op.foperator)
{
case INTRINSIC_UPLUS:
gfc_status ("U+ ");
@@ -707,7 +707,7 @@ show_uop (gfc_user_op * uop)
show_indent ();
gfc_status ("%s:", uop->name);
- for (intr = uop->operator; intr; intr = intr->next)
+ for (intr = uop->foperator; intr; intr = intr->next)
gfc_status (" %s", intr->sym->name);
}
@@ -1707,7 +1707,7 @@ gfc_show_namespace (gfc_namespace * ns)
{
gfc_interface *intr;
gfc_namespace *save;
- gfc_intrinsic_op op;
+ int op;
gfc_equiv *eq;
int i;
@@ -1751,7 +1751,7 @@ gfc_show_namespace (gfc_namespace * ns)
for (op = GFC_INTRINSIC_BEGIN; op != GFC_INTRINSIC_END; op++)
{
/* User operator interfaces */
- intr = ns->operator[op];
+ intr = ns->foperator[op];
if (intr == NULL)
continue;
diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c
index f63e41634a9..e358cb5948c 100644
--- a/gcc/fortran/error.c
+++ b/gcc/fortran/error.c
@@ -73,7 +73,7 @@ error_char (char c)
cur_error_buffer->allocated
? cur_error_buffer->allocated * 2 : 1000;
cur_error_buffer->message
- = xrealloc (cur_error_buffer->message,
+ = (char *)xrealloc (cur_error_buffer->message,
cur_error_buffer->allocated);
}
cur_error_buffer->message[cur_error_buffer->index++] = c;
@@ -90,7 +90,7 @@ error_char (char c)
if (index + 1 >= allocated)
{
allocated = allocated ? allocated * 2 : 1000;
- line = xrealloc (line, allocated);
+ line = (char *)xrealloc (line, allocated);
}
line[index++] = c;
if (c == '\n')
@@ -504,7 +504,7 @@ gfc_notification_std (int std)
standard does not contain the requested bits. Return FAILURE if
an error is generated. */
-try
+check
gfc_notify_std (int std, const char *nocmsgid, ...)
{
va_list argp;
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 2bf980cfa25..41d6d7d14f5 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -33,7 +33,7 @@ gfc_get_expr (void)
{
gfc_expr *e;
- e = gfc_getmem (sizeof (gfc_expr));
+ e = (gfc_expr *)gfc_getmem (sizeof (gfc_expr));
gfc_clear_ts (&e->ts);
e->shape = NULL;
@@ -66,24 +66,24 @@ gfc_free_actual_arglist (gfc_actual_arglist * a1)
gfc_actual_arglist *
gfc_copy_actual_arglist (gfc_actual_arglist * p)
{
- gfc_actual_arglist *head, *tail, *new;
+ gfc_actual_arglist *head, *tail, *tmp;
head = tail = NULL;
for (; p; p = p->next)
{
- new = gfc_get_actual_arglist ();
- *new = *p;
+ tmp = (gfc_actual_arglist *)gfc_get_actual_arglist ();
+ *tmp = *p;
- new->expr = gfc_copy_expr (p->expr);
- new->next = NULL;
+ tmp->expr = gfc_copy_expr (p->expr);
+ tmp->next = NULL;
if (head == NULL)
- head = new;
+ head = tmp;
else
- tail->next = new;
+ tail->next = tmp;
- tail = new;
+ tail = tmp;
}
return head;
@@ -410,7 +410,7 @@ gfc_copy_expr (gfc_expr * p)
switch (q->expr_type)
{
case EXPR_SUBSTRING:
- s = gfc_getmem (p->value.character.length + 1);
+ s = (char *)gfc_getmem (p->value.character.length + 1);
q->value.character.string = s;
memcpy (s, p->value.character.string, p->value.character.length + 1);
@@ -419,7 +419,7 @@ gfc_copy_expr (gfc_expr * p)
case EXPR_CONSTANT:
if (p->from_H)
{
- s = gfc_getmem (p->value.character.length + 1);
+ s = (char *)gfc_getmem (p->value.character.length + 1);
q->value.character.string = s;
memcpy (s, p->value.character.string,
@@ -448,7 +448,7 @@ gfc_copy_expr (gfc_expr * p)
case BT_CHARACTER:
case BT_HOLLERITH:
- s = gfc_getmem (p->value.character.length + 1);
+ s = (char *)gfc_getmem (p->value.character.length + 1);
q->value.character.string = s;
memcpy (s, p->value.character.string,
@@ -468,7 +468,7 @@ gfc_copy_expr (gfc_expr * p)
break;
case EXPR_OP:
- switch (q->value.op.operator)
+ switch (q->value.op.foperator)
{
case INTRINSIC_NOT:
case INTRINSIC_UPLUS:
@@ -594,7 +594,7 @@ gfc_build_conversion (gfc_expr * e)
p->symtree = NULL;
p->value.function.actual = NULL;
- p->value.function.actual = gfc_get_actual_arglist ();
+ p->value.function.actual = (gfc_actual_arglist *)gfc_get_actual_arglist ();
p->value.function.actual->expr = e;
return p;
@@ -650,7 +650,7 @@ gfc_type_convert_binary (gfc_expr * e)
e->ts = op1->ts;
/* Special case for ** operator. */
- if (e->value.op.operator == INTRINSIC_POWER)
+ if (e->value.op.foperator == INTRINSIC_POWER)
goto done;
gfc_convert_type (e->value.op.op2, &e->ts, 2);
@@ -755,12 +755,12 @@ gfc_is_constant_expr (gfc_expr * e)
/* Try to collapse intrinsic expressions. */
-static try
+static check
simplify_intrinsic_op (gfc_expr * p, int type)
{
gfc_expr *op1, *op2, *result;
- if (p->value.op.operator == INTRINSIC_USER)
+ if (p->value.op.foperator == INTRINSIC_USER)
return SUCCESS;
op1 = p->value.op.op1;
@@ -779,7 +779,7 @@ simplify_intrinsic_op (gfc_expr * p, int type)
p->value.op.op1 = NULL;
p->value.op.op2 = NULL;
- switch (p->value.op.operator)
+ switch (p->value.op.foperator)
{
case INTRINSIC_UPLUS:
case INTRINSIC_PARENTHESES:
@@ -880,7 +880,7 @@ simplify_intrinsic_op (gfc_expr * p, int type)
/* Subroutine to simplify constructor expressions. Mutually recursive
with gfc_simplify_expr(). */
-static try
+static check
simplify_constructor (gfc_constructor * c, int type)
{
@@ -1237,7 +1237,7 @@ find_substring_ref (gfc_expr *p, gfc_expr **newp)
/* Simplify a subobject reference of a constructor. This occurs when
parameter variable values are substituted. */
-static try
+static check
simplify_const_ref (gfc_expr * p)
{
gfc_constructor *cons;
@@ -1312,7 +1312,7 @@ simplify_const_ref (gfc_expr * p)
/* Simplify a chain of references. */
-static try
+static check
simplify_ref_chain (gfc_ref * ref, int type)
{
int n;
@@ -1353,11 +1353,11 @@ simplify_ref_chain (gfc_ref * ref, int type)
/* Try to substitute the value of a parameter variable. */
-static try
+static check
simplify_parameter_variable (gfc_expr * p, int type)
{
gfc_expr *e;
- try t;
+ check t;
e = gfc_copy_expr (p->symtree->n.sym->value);
if (e == NULL)
@@ -1397,7 +1397,7 @@ simplify_parameter_variable (gfc_expr * p, int type)
Returns FAILURE on error, SUCCESS otherwise.
NOTE: Will return SUCCESS even if the expression can not be simplified. */
-try
+check
gfc_simplify_expr (gfc_expr * p, int type)
{
gfc_actual_arglist *ap;
@@ -1434,7 +1434,7 @@ gfc_simplify_expr (gfc_expr * p, int type)
gfc_extract_int (p->ref->u.ss.start, &start);
start--; /* Convert from one-based to zero-based. */
gfc_extract_int (p->ref->u.ss.end, &end);
- s = gfc_getmem (end - start + 1);
+ s = (char *)gfc_getmem (end - start + 1);
memcpy (s, p->value.character.string + start, end - start);
s[end] = '\0'; /* TODO: C-style string for debugging. */
gfc_free (p->value.character.string);
@@ -1519,10 +1519,10 @@ et0 (gfc_expr * e)
/* Check an intrinsic arithmetic operation to see if it is consistent
with some type of expression. */
-static try check_init_expr (gfc_expr *);
+static check check_init_expr (gfc_expr *);
-static try
-check_intrinsic_op (gfc_expr * e, try (*check_function) (gfc_expr *))
+static check
+check_intrinsic_op (gfc_expr * e, check (*check_function) (gfc_expr *))
{
gfc_expr *op1 = e->value.op.op1;
gfc_expr *op2 = e->value.op.op2;
@@ -1530,7 +1530,7 @@ check_intrinsic_op (gfc_expr * e, try (*check_function) (gfc_expr *))
if ((*check_function) (op1) == FAILURE)
return FAILURE;
- switch (e->value.op.operator)
+ switch (e->value.op.foperator)
{
case INTRINSIC_UPLUS:
case INTRINSIC_UMINUS:
@@ -1567,7 +1567,7 @@ check_intrinsic_op (gfc_expr * e, try (*check_function) (gfc_expr *))
if (!numeric_type (et0 (op1)) || !numeric_type (et0 (op2)))
goto not_numeric;
- if (e->value.op.operator == INTRINSIC_POWER
+ if (e->value.op.foperator == INTRINSIC_POWER
&& check_function == check_init_expr && et0 (op2) != BT_INTEGER)
{
gfc_error ("Exponent at %L must be INTEGER for an initialization "
@@ -1647,7 +1647,7 @@ not_numeric:
initialization function have initialization arguments. We head off
this problem here. */
-static try
+static check
check_inquiry (gfc_expr * e, int not_restricted)
{
const char *name;
@@ -1714,12 +1714,12 @@ check_inquiry (gfc_expr * e, int not_restricted)
intrinsics in the context of initialization expressions. If
FAILURE is returned an error message has been generated. */
-static try
+static check
check_init_expr (gfc_expr * e)
{
gfc_actual_arglist *ap;
match m;
- try t;
+ check t;
if (e == NULL)
return SUCCESS;
@@ -1828,7 +1828,7 @@ gfc_match_init_expr (gfc_expr ** result)
{
gfc_expr *expr;
match m;
- try t;
+ check t;
m = gfc_match_expr (&expr);
if (m != MATCH_YES)
@@ -1870,13 +1870,13 @@ gfc_match_init_expr (gfc_expr ** result)
-static try check_restricted (gfc_expr *);
+static check check_restricted (gfc_expr *);
/* Given an actual argument list, test to see that each argument is a
restricted expression and optionally if the expression type is
integer or character. */
-static try
+static check
restricted_args (gfc_actual_arglist * a)
{
for (; a; a = a->next)
@@ -1894,7 +1894,7 @@ restricted_args (gfc_actual_arglist * a)
/* Make sure a non-intrinsic function is a specification function. */
-static try
+static check
external_spec_function (gfc_expr * e)
{
gfc_symbol *f;
@@ -1936,7 +1936,7 @@ external_spec_function (gfc_expr * e)
/* Check to see that a function reference to an intrinsic is a
restricted expression. */
-static try
+static check
restricted_intrinsic (gfc_expr * e)
{
/* TODO: Check constraints on inquiry functions. 7.1.6.2 (7). */
@@ -1951,11 +1951,11 @@ restricted_intrinsic (gfc_expr * e)
cousin check_init_expr(), an error message is generated if we
return FAILURE. */
-static try
+static check
check_restricted (gfc_expr * e)
{
gfc_symbol *sym;
- try t;
+ check t;
if (e == NULL)
return SUCCESS;
@@ -2048,7 +2048,7 @@ check_restricted (gfc_expr * e)
/* Check to see that an expression is a specification expression. If
we return FAILURE, an error has been generated. */
-try
+check
gfc_specification_expr (gfc_expr * e)
{
if (e == NULL)
@@ -2077,13 +2077,13 @@ gfc_specification_expr (gfc_expr * e)
/* Given two expressions, make sure that the arrays are conformable. */
-try
+check
gfc_check_conformance (const char *optype_msgid,
gfc_expr * op1, gfc_expr * op2)
{
int op1_flag, op2_flag, d;
mpz_t op1_size, op2_size;
- try t;
+ check t;
if (op1->rank == 0 || op2->rank == 0)
return SUCCESS;
@@ -2128,7 +2128,7 @@ gfc_check_conformance (const char *optype_msgid,
/* Given an assignable expression and an arbitrary expression, make
sure that the assignment can take place. */
-try
+check
gfc_check_assign (gfc_expr * lvalue, gfc_expr * rvalue, int conform)
{
gfc_symbol *sym;
@@ -2258,7 +2258,7 @@ gfc_check_assign (gfc_expr * lvalue, gfc_expr * rvalue, int conform)
we only check rvalue if it's not an assignment to NULL() or a
NULLIFY statement. */
-try
+check
gfc_check_pointer_assign (gfc_expr * lvalue, gfc_expr * rvalue)
{
symbol_attribute attr;
@@ -2365,11 +2365,11 @@ gfc_check_pointer_assign (gfc_expr * lvalue, gfc_expr * rvalue)
/* Relative of gfc_check_assign() except that the lvalue is a single
symbol. Used for initialization assignments. */
-try
+check
gfc_check_assign_symbol (gfc_symbol * sym, gfc_expr * rvalue)
{
gfc_expr lvalue;
- try r;
+ check r;
memset (&lvalue, '\0', sizeof (gfc_expr));
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index fb626f70446..31a7cffc9e9 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -735,8 +735,8 @@ int ggc_p = 1;
tree
builtin_function (const char *name,
tree type,
- int function_code,
- enum built_in_class class,
+ enum built_in_function function_code,
+ enum built_in_class bi,
const char *library_name,
tree attrs)
{
@@ -747,7 +747,7 @@ builtin_function (const char *name,
SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name));
make_decl_rtl (decl);
pushdecl (decl);
- DECL_BUILT_IN_CLASS (decl) = class;
+ DECL_BUILT_IN_CLASS (decl) = bi;
DECL_FUNCTION_CODE (decl) = function_code;
/* Possibly apply some default attributes to this built-in function. */
@@ -773,7 +773,7 @@ gfc_define_builtin (const char * name,
{
tree decl;
- decl = builtin_function (name, type, code, BUILT_IN_NORMAL,
+ decl = builtin_function (name, type, (enum built_in_function) code, BUILT_IN_NORMAL,
library_name, NULL_TREE);
if (const_p)
TREE_READONLY (decl) = 1;
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index c89c136f6c0..2496f36da32 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -127,7 +127,7 @@ options_convert;
typedef enum
{ SUCCESS = 1, FAILURE }
-try;
+check;
/* This is returned by gfc_notification_std to know if, given the flags
that were given (-std=, -pedantic) we should issue an error, a warning
@@ -615,7 +615,7 @@ typedef struct gfc_charlen
}
gfc_charlen;
-#define gfc_get_charlen() gfc_getmem(sizeof(gfc_charlen))
+#define gfc_get_charlen() ((gfc_charlen *)gfc_getmem(sizeof(gfc_charlen)))
/* Type specification structure. FIXME: derived and cl could be union??? */
typedef struct
@@ -643,7 +643,7 @@ typedef struct
}
gfc_array_spec;
-#define gfc_get_array_spec() gfc_getmem(sizeof(gfc_array_spec))
+#define gfc_get_array_spec() ((gfc_array_spec *)gfc_getmem(sizeof(gfc_array_spec)))
/* Components of derived types. */
@@ -662,7 +662,7 @@ typedef struct gfc_component
}
gfc_component;
-#define gfc_get_component() gfc_getmem(sizeof(gfc_component))
+#define gfc_get_component() ((gfc_component *)gfc_getmem(sizeof(gfc_component)))
/* Formal argument lists are lists of symbols. */
typedef struct gfc_formal_arglist
@@ -674,7 +674,7 @@ typedef struct gfc_formal_arglist
}
gfc_formal_arglist;
-#define gfc_get_formal_arglist() gfc_getmem(sizeof(gfc_formal_arglist))
+#define gfc_get_formal_arglist() ((gfc_formal_arglist *)gfc_getmem(sizeof(gfc_formal_arglist)))
/* The gfc_actual_arglist structure is for actual arguments. */
@@ -694,7 +694,7 @@ typedef struct gfc_actual_arglist
}
gfc_actual_arglist;
-#define gfc_get_actual_arglist() gfc_getmem(sizeof(gfc_actual_arglist))
+#define gfc_get_actual_arglist() ((gfc_actual_arglist *)gfc_getmem(sizeof(gfc_actual_arglist)))
/* Because a symbol can belong to multiple namelists, they must be
@@ -706,7 +706,7 @@ typedef struct gfc_namelist
}
gfc_namelist;
-#define gfc_get_namelist() gfc_getmem(sizeof(gfc_namelist))
+#define gfc_get_namelist() ((gfc_namelist*)gfc_getmem(sizeof(gfc_namelist)))
enum
{
@@ -733,6 +733,23 @@ enum
OMP_LIST_NUM
};
+enum omp_sched_kind
+{
+ OMP_SCHED_NONE,
+ OMP_SCHED_STATIC,
+ OMP_SCHED_DYNAMIC,
+ OMP_SCHED_GUIDED,
+ OMP_SCHED_RUNTIME
+};
+
+enum omp_default_sharing
+{
+ OMP_DEFAULT_UNKNOWN,
+ OMP_DEFAULT_NONE,
+ OMP_DEFAULT_PRIVATE,
+ OMP_DEFAULT_SHARED
+};
+
/* Because a symbol can belong to multiple namelists, they must be
linked externally to the symbol itself. */
typedef struct gfc_omp_clauses
@@ -740,22 +757,9 @@ typedef struct gfc_omp_clauses
struct gfc_expr *if_expr;
struct gfc_expr *num_threads;
gfc_namelist *lists[OMP_LIST_NUM];
- enum
- {
- OMP_SCHED_NONE,
- OMP_SCHED_STATIC,
- OMP_SCHED_DYNAMIC,
- OMP_SCHED_GUIDED,
- OMP_SCHED_RUNTIME
- } sched_kind;
+ enum omp_sched_kind sched_kind;
struct gfc_expr *chunk_size;
- enum
- {
- OMP_DEFAULT_UNKNOWN,
- OMP_DEFAULT_NONE,
- OMP_DEFAULT_PRIVATE,
- OMP_DEFAULT_SHARED
- } default_sharing;
+ enum omp_default_sharing default_sharing;
bool nowait, ordered;
}
gfc_omp_clauses;
@@ -793,7 +797,7 @@ typedef struct gfc_interface
}
gfc_interface;
-#define gfc_get_interface() gfc_getmem(sizeof(gfc_interface))
+#define gfc_get_interface() ((gfc_interface *)gfc_getmem(sizeof(gfc_interface)))
/* User operator nodes. These are like stripped down symbols. */
@@ -801,7 +805,7 @@ typedef struct
{
const char *name;
- gfc_interface *operator;
+ gfc_interface *foperator;
struct gfc_namespace *ns;
gfc_access access;
}
@@ -863,7 +867,7 @@ typedef struct gfc_symbol
the old symbol. */
struct gfc_symbol *old_symbol, *tlink;
- unsigned mark:1, new:1;
+ unsigned mark:1, fresh:1;
/* Nonzero if all equivalences associated with this symbol have been
processed. */
unsigned equiv_built:1;
@@ -888,7 +892,7 @@ typedef struct gfc_common_head
}
gfc_common_head;
-#define gfc_get_common_head() gfc_getmem(sizeof(gfc_common_head))
+#define gfc_get_common_head() ((gfc_common_head *)gfc_getmem(sizeof(gfc_common_head)))
/* A list of all the alternate entry points for a procedure. */
@@ -907,7 +911,7 @@ typedef struct gfc_entry_list
gfc_entry_list;
#define gfc_get_entry_list() \
- (gfc_entry_list *) gfc_getmem(sizeof(gfc_entry_list))
+ ((gfc_entry_list *) gfc_getmem(sizeof(gfc_entry_list)))
/* Within a namespace, symbols are pointed to by symtree nodes that
are linked together in a balanced binary tree. There can be
@@ -938,7 +942,7 @@ typedef struct gfc_dt_list
}
gfc_dt_list;
-#define gfc_get_dt_list() gfc_getmem(sizeof(gfc_dt_list))
+#define gfc_get_dt_list() ((gfc_dt_list *)gfc_getmem(sizeof(gfc_dt_list)))
/* A namespace describes the contents of procedure, module or
@@ -971,7 +975,7 @@ typedef struct gfc_namespace
/* Points to the equivalence groups produced by trans_common. */
struct gfc_equiv_list *equiv_lists;
- gfc_interface *operator[GFC_INTRINSIC_OPS];
+ gfc_interface *foperator[GFC_INTRINSIC_OPS];
/* Points to the parent namespace, i.e. the namespace of a module or
procedure in which the procedure belonging to this namespace is
@@ -1017,13 +1021,22 @@ extern gfc_namespace *gfc_current_ns;
this to detect collisions already when parsing.
TODO: Extend to verify procedure calls. */
+enum fortran_gsym {
+ GSYM_UNKNOWN=1,
+ GSYM_PROGRAM,
+ GSYM_FUNCTION,
+ GSYM_SUBROUTINE,
+ GSYM_MODULE,
+ GSYM_COMMON,
+ GSYM_BLOCK_DATA
+};
+
typedef struct gfc_gsymbol
{
BBT_HEADER(gfc_gsymbol);
const char *name;
- enum { GSYM_UNKNOWN=1, GSYM_PROGRAM, GSYM_FUNCTION, GSYM_SUBROUTINE,
- GSYM_MODULE, GSYM_COMMON, GSYM_BLOCK_DATA } type;
+ enum fortran_gsym type;
int defined, used;
locus where;
@@ -1047,6 +1060,13 @@ extern gfc_interface_info current_interface;
/* Array reference. */
+enum fortran_dimen_type {
+ DIMEN_ELEMENT = 1,
+ DIMEN_RANGE,
+ DIMEN_VECTOR,
+ DIMEN_UNKNOWN
+};
+
typedef struct gfc_array_ref
{
ar_type type;
@@ -1058,15 +1078,13 @@ typedef struct gfc_array_ref
struct gfc_expr *start[GFC_MAX_DIMENSIONS], *end[GFC_MAX_DIMENSIONS],
*stride[GFC_MAX_DIMENSIONS];
- enum
- { DIMEN_ELEMENT = 1, DIMEN_RANGE, DIMEN_VECTOR, DIMEN_UNKNOWN }
- dimen_type[GFC_MAX_DIMENSIONS];
+ enum fortran_dimen_type dimen_type[GFC_MAX_DIMENSIONS];
struct gfc_expr *offset;
}
gfc_array_ref;
-#define gfc_get_array_ref() gfc_getmem(sizeof(gfc_array_ref))
+#define gfc_get_array_ref() ((gfc_array_ref *)gfc_getmem(sizeof(gfc_array_ref)))
/* Component reference nodes. A variable is stored as an expression
@@ -1108,7 +1126,7 @@ typedef struct gfc_ref
}
gfc_ref;
-#define gfc_get_ref() gfc_getmem(sizeof(gfc_ref))
+#define gfc_get_ref() ((gfc_ref *)gfc_getmem(sizeof(gfc_ref)))
/* Structures representing intrinsic symbols and their arguments lists. */
@@ -1135,16 +1153,16 @@ gfc_intrinsic_arg;
typedef union
{
- try (*f0)(void);
- try (*f1)(struct gfc_expr *);
- try (*f1m)(gfc_actual_arglist *);
- try (*f2)(struct gfc_expr *, struct gfc_expr *);
- try (*f3)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *);
- try (*f3ml)(gfc_actual_arglist *);
- try (*f3red)(gfc_actual_arglist *);
- try (*f4)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
+ check (*f0)(void);
+ check (*f1)(struct gfc_expr *);
+ check (*f1m)(gfc_actual_arglist *);
+ check (*f2)(struct gfc_expr *, struct gfc_expr *);
+ check (*f3)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *);
+ check (*f3ml)(gfc_actual_arglist *);
+ check (*f3red)(gfc_actual_arglist *);
+ check (*f4)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
struct gfc_expr *);
- try (*f5)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
+ check (*f5)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
struct gfc_expr *, struct gfc_expr *);
}
gfc_check_f;
@@ -1266,7 +1284,7 @@ typedef struct gfc_expr
struct
{
- gfc_intrinsic_op operator;
+ gfc_intrinsic_op foperator;
gfc_user_op *uop;
struct gfc_expr *op1, *op2;
}
@@ -1366,7 +1384,7 @@ typedef struct gfc_equiv
}
gfc_equiv;
-#define gfc_get_equiv() gfc_getmem(sizeof(gfc_equiv))
+#define gfc_get_equiv() ((gfc_equiv *)gfc_getmem(sizeof(gfc_equiv)))
/* Holds a single equivalence member after processing. */
typedef struct gfc_equiv_info
@@ -1418,7 +1436,7 @@ typedef struct gfc_case
}
gfc_case;
-#define gfc_get_case() gfc_getmem(sizeof(gfc_case))
+#define gfc_get_case() ((gfc_case *)gfc_getmem(sizeof(gfc_case)))
typedef struct
@@ -1427,7 +1445,7 @@ typedef struct
}
gfc_iterator;
-#define gfc_get_iterator() gfc_getmem(sizeof(gfc_iterator))
+#define gfc_get_iterator() ((gfc_iterator *)gfc_getmem(sizeof(gfc_iterator)))
/* Allocation structure for ALLOCATE, DEALLOCATE and NULLIFY statements. */
@@ -1439,7 +1457,7 @@ typedef struct gfc_alloc
}
gfc_alloc;
-#define gfc_get_alloc() gfc_getmem(sizeof(gfc_alloc))
+#define gfc_get_alloc() ((gfc_alloc *)gfc_getmem(sizeof(gfc_alloc)))
typedef struct
@@ -1596,9 +1614,9 @@ typedef struct gfc_data
}
gfc_data;
-#define gfc_get_data_variable() gfc_getmem(sizeof(gfc_data_variable))
-#define gfc_get_data_value() gfc_getmem(sizeof(gfc_data_value))
-#define gfc_get_data() gfc_getmem(sizeof(gfc_data))
+#define gfc_get_data_variable() ((gfc_data_variable *)gfc_getmem(sizeof(gfc_data_variable)))
+#define gfc_get_data_value() ((gfc_data_value *)gfc_getmem(sizeof(gfc_data_value)))
+#define gfc_get_data() ((gfc_data *)gfc_getmem(sizeof(gfc_data)))
/* Structure for holding compile options */
@@ -1731,7 +1749,7 @@ int gfc_next_char (void);
int gfc_peek_char (void);
void gfc_error_recovery (void);
void gfc_gobble_whitespace (void);
-try gfc_new_file (void);
+check gfc_new_file (void);
const char * gfc_read_orig_filename (const char *, const char **);
extern gfc_source_form gfc_current_form;
@@ -1792,7 +1810,7 @@ void gfc_clear_error (void);
int gfc_error_check (void);
notification gfc_notification_std (int);
-try gfc_notify_std (int, const char *, ...) ATTRIBUTE_GCC_GFC(2,3);
+check gfc_notify_std (int, const char *, ...) ATTRIBUTE_GCC_GFC(2,3);
/* A general purpose syntax error. */
#define gfc_syntax_error(ST) \
@@ -1828,62 +1846,62 @@ extern int gfc_intio_kind;
/* symbol.c */
void gfc_clear_new_implicit (void);
-try gfc_add_new_implicit_range (int, int);
-try gfc_merge_new_implicit (gfc_typespec *);
+check gfc_add_new_implicit_range (int, int);
+check gfc_merge_new_implicit (gfc_typespec *);
void gfc_set_implicit_none (void);
gfc_typespec *gfc_get_default_type (gfc_symbol *, gfc_namespace *);
-try gfc_set_default_type (gfc_symbol *, int, gfc_namespace *);
+check gfc_set_default_type (gfc_symbol *, int, gfc_namespace *);
void gfc_set_component_attr (gfc_component *, symbol_attribute *);
void gfc_get_component_attr (symbol_attribute *, gfc_component *);
void gfc_set_sym_referenced (gfc_symbol * sym);
-try gfc_add_attribute (symbol_attribute *, locus *, unsigned int);
-try gfc_add_allocatable (symbol_attribute *, locus *);
-try gfc_add_dimension (symbol_attribute *, const char *, locus *);
-try gfc_add_external (symbol_attribute *, locus *);
-try gfc_add_intrinsic (symbol_attribute *, locus *);
-try gfc_add_optional (symbol_attribute *, locus *);
-try gfc_add_pointer (symbol_attribute *, locus *);
-try gfc_add_cray_pointer (symbol_attribute *, locus *);
-try gfc_add_cray_pointee (symbol_attribute *, locus *);
-try gfc_mod_pointee_as (gfc_array_spec *as);
-try gfc_add_result (symbol_attribute *, const char *, locus *);
-try gfc_add_save (symbol_attribute *, const char *, locus *);
-try gfc_add_threadprivate (symbol_attribute *, const char *, locus *);
-try gfc_add_saved_common (symbol_attribute *, locus *);
-try gfc_add_target (symbol_attribute *, locus *);
-try gfc_add_dummy (symbol_attribute *, const char *, locus *);
-try gfc_add_generic (symbol_attribute *, const char *, locus *);
-try gfc_add_common (symbol_attribute *, locus *);
-try gfc_add_in_common (symbol_attribute *, const char *, locus *);
-try gfc_add_in_equivalence (symbol_attribute *, const char *, locus *);
-try gfc_add_data (symbol_attribute *, const char *, locus *);
-try gfc_add_in_namelist (symbol_attribute *, const char *, locus *);
-try gfc_add_sequence (symbol_attribute *, const char *, locus *);
-try gfc_add_elemental (symbol_attribute *, locus *);
-try gfc_add_pure (symbol_attribute *, locus *);
-try gfc_add_recursive (symbol_attribute *, locus *);
-try gfc_add_function (symbol_attribute *, const char *, locus *);
-try gfc_add_subroutine (symbol_attribute *, const char *, locus *);
-
-try gfc_add_access (symbol_attribute *, gfc_access, const char *, locus *);
-try gfc_add_flavor (symbol_attribute *, sym_flavor, const char *, locus *);
-try gfc_add_entry (symbol_attribute *, const char *, locus *);
-try gfc_add_procedure (symbol_attribute *, procedure_type,
+check gfc_add_attribute (symbol_attribute *, locus *, unsigned int);
+check gfc_add_allocatable (symbol_attribute *, locus *);
+check gfc_add_dimension (symbol_attribute *, const char *, locus *);
+check gfc_add_external (symbol_attribute *, locus *);
+check gfc_add_intrinsic (symbol_attribute *, locus *);
+check gfc_add_optional (symbol_attribute *, locus *);
+check gfc_add_pointer (symbol_attribute *, locus *);
+check gfc_add_cray_pointer (symbol_attribute *, locus *);
+check gfc_add_cray_pointee (symbol_attribute *, locus *);
+check gfc_mod_pointee_as (gfc_array_spec *as);
+check gfc_add_result (symbol_attribute *, const char *, locus *);
+check gfc_add_save (symbol_attribute *, const char *, locus *);
+check gfc_add_threadprivate (symbol_attribute *, const char *, locus *);
+check gfc_add_saved_common (symbol_attribute *, locus *);
+check gfc_add_target (symbol_attribute *, locus *);
+check gfc_add_dummy (symbol_attribute *, const char *, locus *);
+check gfc_add_generic (symbol_attribute *, const char *, locus *);
+check gfc_add_common (symbol_attribute *, locus *);
+check gfc_add_in_common (symbol_attribute *, const char *, locus *);
+check gfc_add_in_equivalence (symbol_attribute *, const char *, locus *);
+check gfc_add_data (symbol_attribute *, const char *, locus *);
+check gfc_add_in_namelist (symbol_attribute *, const char *, locus *);
+check gfc_add_sequence (symbol_attribute *, const char *, locus *);
+check gfc_add_elemental (symbol_attribute *, locus *);
+check gfc_add_pure (symbol_attribute *, locus *);
+check gfc_add_recursive (symbol_attribute *, locus *);
+check gfc_add_function (symbol_attribute *, const char *, locus *);
+check gfc_add_subroutine (symbol_attribute *, const char *, locus *);
+
+check gfc_add_access (symbol_attribute *, gfc_access, const char *, locus *);
+check gfc_add_flavor (symbol_attribute *, sym_flavor, const char *, locus *);
+check gfc_add_entry (symbol_attribute *, const char *, locus *);
+check gfc_add_procedure (symbol_attribute *, procedure_type,
const char *, locus *);
-try gfc_add_intent (symbol_attribute *, sym_intent, locus *);
-try gfc_add_explicit_interface (gfc_symbol *, ifsrc,
+check gfc_add_intent (symbol_attribute *, sym_intent, locus *);
+check gfc_add_explicit_interface (gfc_symbol *, ifsrc,
gfc_formal_arglist *, locus *);
-try gfc_add_type (gfc_symbol *, gfc_typespec *, locus *);
+check gfc_add_type (gfc_symbol *, gfc_typespec *, locus *);
void gfc_clear_attr (symbol_attribute *);
-try gfc_missing_attr (symbol_attribute *, locus *);
-try gfc_copy_attr (symbol_attribute *, symbol_attribute *, locus *);
+check gfc_missing_attr (symbol_attribute *, locus *);
+check gfc_copy_attr (symbol_attribute *, symbol_attribute *, locus *);
-try gfc_add_component (gfc_symbol *, const char *, gfc_component **);
+check gfc_add_component (gfc_symbol *, const char *, gfc_component **);
gfc_symbol *gfc_use_derived (gfc_symbol *);
gfc_symtree *gfc_use_derived_tree (gfc_symtree *);
gfc_component *gfc_find_component (gfc_symbol *, const char *);
@@ -1891,7 +1909,7 @@ gfc_component *gfc_find_component (gfc_symbol *, const char *);
gfc_st_label *gfc_get_st_label (int);
void gfc_free_st_label (gfc_st_label *);
void gfc_define_st_label (gfc_st_label *, gfc_sl_type, locus *);
-try gfc_reference_st_label (gfc_st_label *, gfc_sl_type);
+check gfc_reference_st_label (gfc_st_label *, gfc_sl_type);
gfc_namespace *gfc_get_namespace (gfc_namespace *, int);
gfc_symtree *gfc_new_symtree (gfc_symtree **, const char *);
@@ -1941,8 +1959,8 @@ void gfc_intrinsic_done_1 (void);
char gfc_type_letter (bt);
gfc_symbol * gfc_get_intrinsic_sub_symbol (const char *);
-try gfc_convert_type (gfc_expr *, gfc_typespec *, int);
-try gfc_convert_type_warn (gfc_expr *, gfc_typespec *, int, int);
+check gfc_convert_type (gfc_expr *, gfc_typespec *, int);
+check gfc_convert_type_warn (gfc_expr *, gfc_typespec *, int, int);
int gfc_generic_intrinsic (const char *);
int gfc_specific_intrinsic (const char *);
int gfc_intrinsic_name (const char *, int);
@@ -1984,7 +2002,7 @@ gfc_expr *gfc_build_conversion (gfc_expr *);
void gfc_free_ref_list (gfc_ref *);
void gfc_type_convert_binary (gfc_expr *);
int gfc_is_constant_expr (gfc_expr *);
-try gfc_simplify_expr (gfc_expr *, int);
+check gfc_simplify_expr (gfc_expr *, int);
int gfc_has_vector_index (gfc_expr *);
gfc_expr *gfc_get_expr (void);
@@ -1996,15 +2014,15 @@ mpz_t *gfc_copy_shape (mpz_t *, int);
mpz_t *gfc_copy_shape_excluding (mpz_t *, int, gfc_expr *);
gfc_expr *gfc_copy_expr (gfc_expr *);
-try gfc_specification_expr (gfc_expr *);
+check gfc_specification_expr (gfc_expr *);
int gfc_numeric_ts (gfc_typespec *);
int gfc_kind_max (gfc_expr *, gfc_expr *);
-try gfc_check_conformance (const char *, gfc_expr *, gfc_expr *);
-try gfc_check_assign (gfc_expr *, gfc_expr *, int);
-try gfc_check_pointer_assign (gfc_expr *, gfc_expr *);
-try gfc_check_assign_symbol (gfc_symbol *, gfc_expr *);
+check gfc_check_conformance (const char *, gfc_expr *, gfc_expr *);
+check gfc_check_assign (gfc_expr *, gfc_expr *, int);
+check gfc_check_pointer_assign (gfc_expr *, gfc_expr *);
+check gfc_check_assign_symbol (gfc_symbol *, gfc_expr *);
gfc_expr *gfc_default_initializer (gfc_typespec *);
gfc_expr *gfc_get_variable_expr (gfc_symtree *);
@@ -2021,24 +2039,24 @@ void gfc_free_statement (gfc_code *);
void gfc_free_statements (gfc_code *);
/* resolve.c */
-try gfc_resolve_expr (gfc_expr *);
+check gfc_resolve_expr (gfc_expr *);
void gfc_resolve (gfc_namespace *);
void gfc_resolve_blocks (gfc_code *, gfc_namespace *);
int gfc_impure_variable (gfc_symbol *);
int gfc_pure (gfc_symbol *);
int gfc_elemental (gfc_symbol *);
-try gfc_resolve_iterator (gfc_iterator *, bool);
-try gfc_resolve_index (gfc_expr *, int);
-try gfc_resolve_dim_arg (gfc_expr *);
+check gfc_resolve_iterator (gfc_iterator *, bool);
+check gfc_resolve_index (gfc_expr *, int);
+check gfc_resolve_dim_arg (gfc_expr *);
int gfc_is_formal_arg (void);
/* array.c */
void gfc_free_array_spec (gfc_array_spec *);
gfc_array_ref *gfc_copy_array_ref (gfc_array_ref *);
-try gfc_set_array_spec (gfc_symbol *, gfc_array_spec *, locus *);
+check gfc_set_array_spec (gfc_symbol *, gfc_array_spec *, locus *);
gfc_array_spec *gfc_copy_array_spec (gfc_array_spec *);
-try gfc_resolve_array_spec (gfc_array_spec *, int);
+check gfc_resolve_array_spec (gfc_array_spec *, int);
int gfc_compare_array_spec (gfc_array_spec *, gfc_array_spec *);
@@ -2046,24 +2064,24 @@ gfc_expr *gfc_start_constructor (bt, int, locus *);
void gfc_append_constructor (gfc_expr *, gfc_expr *);
void gfc_free_constructor (gfc_constructor *);
void gfc_simplify_iterator_var (gfc_expr *);
-try gfc_expand_constructor (gfc_expr *);
+check gfc_expand_constructor (gfc_expr *);
int gfc_constant_ac (gfc_expr *);
int gfc_expanded_ac (gfc_expr *);
void gfc_resolve_character_array_constructor (gfc_expr *);
-try gfc_resolve_array_constructor (gfc_expr *);
-try gfc_check_constructor_type (gfc_expr *);
-try gfc_check_iter_variable (gfc_expr *);
-try gfc_check_constructor (gfc_expr *, try (*)(gfc_expr *));
+check gfc_resolve_array_constructor (gfc_expr *);
+check gfc_check_constructor_type (gfc_expr *);
+check gfc_check_iter_variable (gfc_expr *);
+check gfc_check_constructor (gfc_expr *, try (*)(gfc_expr *));
gfc_constructor *gfc_copy_constructor (gfc_constructor * src);
gfc_expr *gfc_get_array_element (gfc_expr *, int);
-try gfc_array_size (gfc_expr *, mpz_t *);
-try gfc_array_dimen_size (gfc_expr *, int, mpz_t *);
-try gfc_array_ref_shape (gfc_array_ref *, mpz_t *);
+check gfc_array_size (gfc_expr *, mpz_t *);
+check gfc_array_dimen_size (gfc_expr *, int, mpz_t *);
+check gfc_array_ref_shape (gfc_array_ref *, mpz_t *);
gfc_array_ref *gfc_find_array_ref (gfc_expr *);
void gfc_insert_constructor (gfc_expr *, gfc_constructor *);
gfc_constructor *gfc_get_constructor (void);
tree gfc_conv_array_initializer (tree type, gfc_expr * expr);
-try spec_size (gfc_array_spec *, mpz_t *);
+check spec_size (gfc_array_spec *, mpz_t *);
int gfc_is_compile_time_shape (gfc_array_spec *);
/* interface.c -- FIXME: some of these should be in symbol.c */
@@ -2074,24 +2092,24 @@ void gfc_check_interfaces (gfc_namespace *);
void gfc_procedure_use (gfc_symbol *, gfc_actual_arglist **, locus *);
gfc_symbol *gfc_search_interface (gfc_interface *, int,
gfc_actual_arglist **);
-try gfc_extend_expr (gfc_expr *);
+check gfc_extend_expr (gfc_expr *);
void gfc_free_formal_arglist (gfc_formal_arglist *);
-try gfc_extend_assign (gfc_code *, gfc_namespace *);
-try gfc_add_interface (gfc_symbol * sym);
+check gfc_extend_assign (gfc_code *, gfc_namespace *);
+check gfc_add_interface (gfc_symbol * sym);
/* io.c */
extern gfc_st_label format_asterisk;
void gfc_free_open (gfc_open *);
-try gfc_resolve_open (gfc_open *);
+check gfc_resolve_open (gfc_open *);
void gfc_free_close (gfc_close *);
-try gfc_resolve_close (gfc_close *);
+check gfc_resolve_close (gfc_close *);
void gfc_free_filepos (gfc_filepos *);
-try gfc_resolve_filepos (gfc_filepos *);
+check gfc_resolve_filepos (gfc_filepos *);
void gfc_free_inquire (gfc_inquire *);
-try gfc_resolve_inquire (gfc_inquire *);
+check gfc_resolve_inquire (gfc_inquire *);
void gfc_free_dt (gfc_dt *);
-try gfc_resolve_dt (gfc_dt *);
+check gfc_resolve_dt (gfc_dt *);
/* module.c */
void gfc_module_init_2 (void);
@@ -2129,7 +2147,7 @@ void gfc_show_symbol (gfc_symbol *);
void gfc_show_typespec (gfc_typespec *);
/* parse.c */
-try gfc_parse_file (void);
+check gfc_parse_file (void);
void global_used (gfc_gsymbol *, locus *);
/* dependency.c */
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index a3c80f2293a..b758a21dbce 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -96,22 +96,22 @@ gfc_free_interface (gfc_interface * intr)
minus respectively, leaving the rest unchanged. */
static gfc_intrinsic_op
-fold_unary (gfc_intrinsic_op operator)
+fold_unary (gfc_intrinsic_op foperator)
{
- switch (operator)
+ switch (foperator)
{
case INTRINSIC_UPLUS:
- operator = INTRINSIC_PLUS;
+ foperator = INTRINSIC_PLUS;
break;
case INTRINSIC_UMINUS:
- operator = INTRINSIC_MINUS;
+ foperator = INTRINSIC_MINUS;
break;
default:
break;
}
- return operator;
+ return foperator;
}
@@ -122,7 +122,7 @@ fold_unary (gfc_intrinsic_op operator)
match
gfc_match_generic_spec (interface_type * type,
char *name,
- gfc_intrinsic_op *operator)
+ gfc_intrinsic_op *foperator)
{
char buffer[GFC_MAX_SYMBOL_LEN + 1];
match m;
@@ -131,14 +131,14 @@ gfc_match_generic_spec (interface_type * type,
if (gfc_match (" assignment ( = )") == MATCH_YES)
{
*type = INTERFACE_INTRINSIC_OP;
- *operator = INTRINSIC_ASSIGN;
+ *foperator = INTRINSIC_ASSIGN;
return MATCH_YES;
}
if (gfc_match (" operator ( %o )", &i) == MATCH_YES)
{ /* Operator i/f */
*type = INTERFACE_INTRINSIC_OP;
- *operator = fold_unary (i);
+ *foperator = fold_unary (i);
return MATCH_YES;
}
@@ -185,12 +185,12 @@ gfc_match_interface (void)
char name[GFC_MAX_SYMBOL_LEN + 1];
interface_type type;
gfc_symbol *sym;
- gfc_intrinsic_op operator;
+ gfc_intrinsic_op foperator;
match m;
m = gfc_match_space ();
- if (gfc_match_generic_spec (&type, name, &operator) == MATCH_ERROR)
+ if (gfc_match_generic_spec (&type, name, &foperator) == MATCH_ERROR)
return MATCH_ERROR;
@@ -232,7 +232,7 @@ gfc_match_interface (void)
break;
case INTERFACE_INTRINSIC_OP:
- current_interface.op = operator;
+ current_interface.op = foperator;
break;
case INTERFACE_NAMELESS:
@@ -251,12 +251,12 @@ gfc_match_end_interface (void)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
interface_type type;
- gfc_intrinsic_op operator;
+ gfc_intrinsic_op foperator;
match m;
m = gfc_match_space ();
- if (gfc_match_generic_spec (&type, name, &operator) == MATCH_ERROR)
+ if (gfc_match_generic_spec (&type, name, &foperator) == MATCH_ERROR)
return MATCH_ERROR;
/* If we're not looking at the end of the statement now, or if this
@@ -284,7 +284,7 @@ gfc_match_end_interface (void)
break;
case INTERFACE_INTRINSIC_OP:
- if (type != current_interface.type || operator != current_interface.op)
+ if (type != current_interface.type || foperator != current_interface.op)
{
if (current_interface.op == INTRINSIC_ASSIGN)
@@ -488,7 +488,7 @@ find_keyword_arg (const char *name, gfc_formal_arglist * f)
interfaces for that operator are legal. */
static void
-check_operator_interface (gfc_interface * intr, gfc_intrinsic_op operator)
+check_operator_interface (gfc_interface * intr, gfc_intrinsic_op foperator)
{
gfc_formal_arglist *formal;
sym_intent i1, i2;
@@ -530,7 +530,7 @@ check_operator_interface (gfc_interface * intr, gfc_intrinsic_op operator)
sym = intr->sym;
- if (operator == INTRINSIC_ASSIGN)
+ if (foperator == INTRINSIC_ASSIGN)
{
if (!sym->attr.subroutine)
{
@@ -568,7 +568,7 @@ check_operator_interface (gfc_interface * intr, gfc_intrinsic_op operator)
}
}
- switch (operator)
+ switch (foperator)
{
case INTRINSIC_PLUS: /* Numeric unary or binary */
case INTRINSIC_MINUS:
@@ -646,7 +646,7 @@ check_operator_interface (gfc_interface * intr, gfc_intrinsic_op operator)
}
/* Check intents on operator interfaces. */
- if (operator == INTRINSIC_ASSIGN)
+ if (foperator == INTRINSIC_ASSIGN)
{
if (i1 != INTENT_OUT && i1 != INTENT_INOUT)
gfc_error ("First argument of defined assignment at %L must be "
@@ -712,7 +712,7 @@ count_types_test (gfc_formal_arglist * f1, gfc_formal_arglist * f2)
/* Build an array of integers that gives the same integer to
arguments of the same type/rank. */
- arg = gfc_getmem (n1 * sizeof (arginfo));
+ arg = (arginfo *)gfc_getmem (n1 * sizeof (arginfo));
f = f1;
for (i = 0; i < n1; i++, f = f->next)
@@ -1030,7 +1030,7 @@ check_uop_interfaces (gfc_user_op * uop)
gfc_namespace *ns;
sprintf (interface_name, "operator interface '%s'", uop->name);
- if (check_interface0 (uop->operator, interface_name))
+ if (check_interface0 (uop->foperator, interface_name))
return;
for (ns = gfc_current_ns; ns; ns = ns->parent)
@@ -1039,7 +1039,7 @@ check_uop_interfaces (gfc_user_op * uop)
if (uop2 == NULL)
continue;
- check_interface1 (uop->operator, uop2->operator, 0, interface_name);
+ check_interface1 (uop->foperator, uop2->foperator, 0, interface_name);
}
}
@@ -1054,7 +1054,7 @@ gfc_check_interfaces (gfc_namespace * ns)
{
gfc_namespace *old_ns, *ns2;
char interface_name[100];
- gfc_intrinsic_op i;
+ int i;
old_ns = gfc_current_ns;
gfc_current_ns = ns;
@@ -1074,13 +1074,13 @@ gfc_check_interfaces (gfc_namespace * ns)
sprintf (interface_name, "intrinsic '%s' operator",
gfc_op2string (i));
- if (check_interface0 (ns->operator[i], interface_name))
+ if (check_interface0 (ns->foperator[i], interface_name))
continue;
- check_operator_interface (ns->operator[i], i);
+ check_operator_interface (ns->foperator[i], (gfc_intrinsic_op)i);
for (ns2 = ns->parent; ns2; ns2 = ns2->parent)
- if (check_interface1 (ns->operator[i], ns2->operator[i], 0,
+ if (check_interface1 (ns->foperator[i], ns2->foperator[i], 0,
interface_name))
break;
}
@@ -1209,7 +1209,7 @@ compare_actual_formal (gfc_actual_arglist ** ap,
gfc_formal_arglist * formal,
int ranks_must_agree, int is_elemental, locus * where)
{
- gfc_actual_arglist **new, *a, *actual, temp;
+ gfc_actual_arglist **fresh, *a, *actual, temp;
gfc_formal_arglist *f;
gfc_gsymbol *gsym;
int i, n, na;
@@ -1224,10 +1224,10 @@ compare_actual_formal (gfc_actual_arglist ** ap,
for (f = formal; f; f = f->next)
n++;
- new = (gfc_actual_arglist **) alloca (n * sizeof (gfc_actual_arglist *));
+ fresh = (gfc_actual_arglist **) alloca (n * sizeof (gfc_actual_arglist *));
for (i = 0; i < n; i++)
- new[i] = NULL;
+ fresh[i] = NULL;
na = 0;
f = formal;
@@ -1255,7 +1255,7 @@ compare_actual_formal (gfc_actual_arglist ** ap,
return 0;
}
- if (new[i] != NULL)
+ if (fresh[i] != NULL)
{
if (where)
gfc_error
@@ -1387,14 +1387,14 @@ compare_actual_formal (gfc_actual_arglist ** ap,
if (a == actual)
na = i;
- new[i++] = a;
+ fresh[i++] = a;
}
/* Make sure missing actual arguments are optional. */
i = 0;
for (f = formal; f; f = f->next, i++)
{
- if (new[i] != NULL)
+ if (fresh[i] != NULL)
continue;
if (!f->sym->attr.optional)
{
@@ -1409,27 +1409,27 @@ compare_actual_formal (gfc_actual_arglist ** ap,
argument list with null arguments in the right places. The head
of the list remains the head. */
for (i = 0; i < n; i++)
- if (new[i] == NULL)
- new[i] = gfc_get_actual_arglist ();
+ if (fresh[i] == NULL)
+ fresh[i] = gfc_get_actual_arglist ();
if (na != 0)
{
- temp = *new[0];
- *new[0] = *actual;
+ temp = *fresh[0];
+ *fresh[0] = *actual;
*actual = temp;
- a = new[0];
- new[0] = new[na];
- new[na] = a;
+ a = fresh[0];
+ fresh[0] = fresh[na];
+ fresh[na] = a;
}
for (i = 0; i < n - 1; i++)
- new[i]->next = new[i + 1];
+ fresh[i]->next = fresh[i + 1];
- new[i]->next = NULL;
+ fresh[i]->next = NULL;
if (*ap == NULL && n > 0)
- *ap = new[0];
+ *ap = fresh[0];
/* Note the types of omitted optional arguments. */
for (a = actual, f = formal; a; a = a->next, f = f->next)
@@ -1485,7 +1485,7 @@ pair_cmp (const void *p1, const void *p2)
refer to the same expression. The analysis is conservative.
Returning FAILURE will produce no warning. */
-static try
+static check
compare_actual_expr (gfc_expr * e1, gfc_expr * e2)
{
const gfc_ref *r1, *r2;
@@ -1533,7 +1533,7 @@ compare_actual_expr (gfc_expr * e1, gfc_expr * e2)
another, check that identical actual arguments aren't not
associated with some incompatible INTENTs. */
-static try
+static check
check_some_aliasing (gfc_formal_arglist * f, gfc_actual_arglist * a)
{
sym_intent f1_intent, f2_intent;
@@ -1541,7 +1541,7 @@ check_some_aliasing (gfc_formal_arglist * f, gfc_actual_arglist * a)
gfc_actual_arglist *a1;
size_t n, i, j;
argpair *p;
- try t = SUCCESS;
+ check t = SUCCESS;
n = 0;
for (f1 = f, a1 = a;; f1 = f1->next, a1 = a1->next)
@@ -1602,7 +1602,7 @@ check_some_aliasing (gfc_formal_arglist * f, gfc_actual_arglist * a)
another, check that they are compatible in the sense that intents
are not mismatched. */
-static try
+static check
check_intents (gfc_formal_arglist * f, gfc_actual_arglist * a)
{
sym_intent a_intent, f_intent;
@@ -1768,7 +1768,7 @@ find_sym_in_symtree (gfc_symbol * sym)
interface. If one is found, the expression node is replaced with
the appropriate function call. */
-try
+check
gfc_extend_expr (gfc_expr * e)
{
gfc_actual_arglist *actual;
@@ -1788,7 +1788,7 @@ gfc_extend_expr (gfc_expr * e)
actual->next->expr = e->value.op.op2;
}
- i = fold_unary (e->value.op.operator);
+ i = fold_unary (e->value.op.foperator);
if (i == INTRINSIC_USER)
{
@@ -1798,7 +1798,7 @@ gfc_extend_expr (gfc_expr * e)
if (uop == NULL)
continue;
- sym = gfc_search_interface (uop->operator, 0, &actual);
+ sym = gfc_search_interface (uop->foperator, 0, &actual);
if (sym != NULL)
break;
}
@@ -1807,7 +1807,7 @@ gfc_extend_expr (gfc_expr * e)
{
for (ns = gfc_current_ns; ns; ns = ns->parent)
{
- sym = gfc_search_interface (ns->operator[i], 0, &actual);
+ sym = gfc_search_interface (ns->foperator[i], 0, &actual);
if (sym != NULL)
break;
}
@@ -1851,7 +1851,7 @@ gfc_extend_expr (gfc_expr * e)
SUCCESS if the node was replaced. On FAILURE, no error is
generated. */
-try
+check
gfc_extend_assign (gfc_code * c, gfc_namespace * ns)
{
gfc_actual_arglist *actual;
@@ -1878,7 +1878,7 @@ gfc_extend_assign (gfc_code * c, gfc_namespace * ns)
for (; ns; ns = ns->parent)
{
- sym = gfc_search_interface (ns->operator[INTRINSIC_ASSIGN], 1, &actual);
+ sym = gfc_search_interface (ns->foperator[INTRINSIC_ASSIGN], 1, &actual);
if (sym != NULL)
break;
}
@@ -1905,17 +1905,17 @@ gfc_extend_assign (gfc_code * c, gfc_namespace * ns)
the given interface list. Ambiguity isn't checked yet since module
procedures can be present without interfaces. */
-static try
-check_new_interface (gfc_interface * base, gfc_symbol * new)
+static check
+check_new_interface (gfc_interface * base, gfc_symbol * fresh)
{
gfc_interface *ip;
for (ip = base; ip; ip = ip->next)
{
- if (ip->sym == new)
+ if (ip->sym == fresh)
{
gfc_error ("Entity '%s' at %C is already present in the interface",
- new->name);
+ fresh->name);
return FAILURE;
}
}
@@ -1926,8 +1926,8 @@ check_new_interface (gfc_interface * base, gfc_symbol * new)
/* Add a symbol to the current interface. */
-try
-gfc_add_interface (gfc_symbol * new)
+check
+gfc_add_interface (gfc_symbol * fresh)
{
gfc_interface **head, *intr;
gfc_namespace *ns;
@@ -1940,11 +1940,11 @@ gfc_add_interface (gfc_symbol * new)
case INTERFACE_INTRINSIC_OP:
for (ns = current_interface.ns; ns; ns = ns->parent)
- if (check_new_interface (ns->operator[current_interface.op], new)
+ if (check_new_interface (ns->foperator[current_interface.op], fresh)
== FAILURE)
return FAILURE;
- head = &current_interface.ns->operator[current_interface.op];
+ head = &current_interface.ns->foperator[current_interface.op];
break;
case INTERFACE_GENERIC:
@@ -1954,7 +1954,7 @@ gfc_add_interface (gfc_symbol * new)
if (sym == NULL)
continue;
- if (check_new_interface (sym->generic, new) == FAILURE)
+ if (check_new_interface (sym->generic, fresh) == FAILURE)
return FAILURE;
}
@@ -1962,11 +1962,11 @@ gfc_add_interface (gfc_symbol * new)
break;
case INTERFACE_USER_OP:
- if (check_new_interface (current_interface.uop->operator, new) ==
+ if (check_new_interface (current_interface.uop->foperator, fresh) ==
FAILURE)
return FAILURE;
- head = &current_interface.uop->operator;
+ head = &current_interface.uop->foperator;
break;
default:
@@ -1974,7 +1974,7 @@ gfc_add_interface (gfc_symbol * new)
}
intr = gfc_get_interface ();
- intr->sym = new;
+ intr->sym = fresh;
intr->where = gfc_current_locus;
intr->next = *head;
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index c2c37e829a0..0bc0035c954 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -156,7 +156,7 @@ find_conv (gfc_typespec * from, gfc_typespec * to)
and call the proper check function rather than forcing each
function to manipulate the argument list. */
-static try
+static check
do_check (gfc_intrinsic_sym * specific, gfc_actual_arglist * arg)
{
gfc_expr *a1, *a2, *a3, *a4, *a5;
@@ -320,7 +320,7 @@ add_sym (const char *name, int elemental, int actual_ok, bt type, int kind,
static void
add_sym_0 (const char *name, int elemental, int actual_ok, bt type,
int kind, int standard,
- try (*check)(void),
+ check (*check)(void),
gfc_expr *(*simplify)(void),
void (*resolve)(gfc_expr *))
{
@@ -363,7 +363,7 @@ add_sym_0s (const char * name, int standard,
static void
add_sym_1 (const char *name, int elemental, int actual_ok, bt type,
int kind, int standard,
- try (*check)(gfc_expr *),
+ check (*check)(gfc_expr *),
gfc_expr *(*simplify)(gfc_expr *),
void (*resolve)(gfc_expr *,gfc_expr *),
const char* a1, bt type1, int kind1, int optional1)
@@ -388,7 +388,7 @@ add_sym_1 (const char *name, int elemental, int actual_ok, bt type,
static void
add_sym_1s (const char *name, int elemental, bt type,
int kind, int standard,
- try (*check)(gfc_expr *),
+ check (*check)(gfc_expr *),
gfc_expr *(*simplify)(gfc_expr *),
void (*resolve)(gfc_code *),
const char* a1, bt type1, int kind1, int optional1)
@@ -413,7 +413,7 @@ add_sym_1s (const char *name, int elemental, bt type,
static void
add_sym_1m (const char *name, int elemental, int actual_ok, bt type,
int kind, int standard,
- try (*check)(gfc_actual_arglist *),
+ check (*check)(gfc_actual_arglist *),
gfc_expr *(*simplify)(gfc_expr *),
void (*resolve)(gfc_expr *,gfc_actual_arglist *),
const char* a1, bt type1, int kind1, int optional1,
@@ -440,7 +440,7 @@ add_sym_1m (const char *name, int elemental, int actual_ok, bt type,
static void
add_sym_2 (const char *name, int elemental, int actual_ok, bt type,
int kind, int standard,
- try (*check)(gfc_expr *,gfc_expr *),
+ check (*check)(gfc_expr *,gfc_expr *),
gfc_expr *(*simplify)(gfc_expr *,gfc_expr *),
void (*resolve)(gfc_expr *,gfc_expr *,gfc_expr *),
const char* a1, bt type1, int kind1, int optional1,
@@ -467,7 +467,7 @@ add_sym_2 (const char *name, int elemental, int actual_ok, bt type,
static void
add_sym_2s (const char *name, int elemental, bt type,
int kind, int standard,
- try (*check)(gfc_expr *,gfc_expr *),
+ check (*check)(gfc_expr *,gfc_expr *),
gfc_expr *(*simplify)(gfc_expr *,gfc_expr *),
void (*resolve)(gfc_code *),
const char* a1, bt type1, int kind1, int optional1,
@@ -494,7 +494,7 @@ add_sym_2s (const char *name, int elemental, bt type,
static void
add_sym_3 (const char *name, int elemental, int actual_ok, bt type,
int kind, int standard,
- try (*check)(gfc_expr *,gfc_expr *,gfc_expr *),
+ check (*check)(gfc_expr *,gfc_expr *,gfc_expr *),
gfc_expr *(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *),
void (*resolve)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
const char* a1, bt type1, int kind1, int optional1,
@@ -523,7 +523,7 @@ add_sym_3 (const char *name, int elemental, int actual_ok, bt type,
static void
add_sym_3ml (const char *name, int elemental,
int actual_ok, bt type, int kind, int standard,
- try (*check)(gfc_actual_arglist *),
+ check (*check)(gfc_actual_arglist *),
gfc_expr*(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *),
void (*resolve)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
const char* a1, bt type1, int kind1, int optional1,
@@ -552,7 +552,7 @@ add_sym_3ml (const char *name, int elemental,
static void
add_sym_3red (const char *name, int elemental,
int actual_ok, bt type, int kind, int standard,
- try (*check)(gfc_actual_arglist *),
+ check (*check)(gfc_actual_arglist *),
gfc_expr*(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *),
void (*resolve)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
const char* a1, bt type1, int kind1, int optional1,
@@ -581,7 +581,7 @@ add_sym_3red (const char *name, int elemental,
static void
add_sym_3s (const char *name, int elemental, bt type,
int kind, int standard,
- try (*check)(gfc_expr *,gfc_expr *,gfc_expr *),
+ check (*check)(gfc_expr *,gfc_expr *,gfc_expr *),
gfc_expr *(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *),
void (*resolve)(gfc_code *),
const char* a1, bt type1, int kind1, int optional1,
@@ -610,7 +610,7 @@ add_sym_3s (const char *name, int elemental, bt type,
static void
add_sym_4 (const char *name, int elemental, int actual_ok, bt type,
int kind, int standard,
- try (*check)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
+ check (*check)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
gfc_expr *(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
void (*resolve)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
const char* a1, bt type1, int kind1, int optional1,
@@ -641,7 +641,7 @@ add_sym_4 (const char *name, int elemental, int actual_ok, bt type,
static void
add_sym_4s (const char *name, int elemental,
bt type, int kind, int standard,
- try (*check)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
+ check (*check)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
gfc_expr *(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
void (*resolve)(gfc_code *),
const char* a1, bt type1, int kind1, int optional1,
@@ -672,7 +672,7 @@ add_sym_4s (const char *name, int elemental,
static void
add_sym_5s (const char *name, int elemental,
bt type, int kind, int standard,
- try (*check)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
+ check (*check)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
gfc_expr *(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *),
void (*resolve)(gfc_code *),
const char* a1, bt type1, int kind1, int optional1,
@@ -2732,13 +2732,13 @@ gfc_intrinsic_init_1 (void)
sizing = SZ_CONVS;
add_conversions ();
- functions = gfc_getmem (sizeof (gfc_intrinsic_sym) * (nfunc + nsub)
+ functions = (gfc_intrinsic_sym*)gfc_getmem (sizeof (gfc_intrinsic_sym) * (nfunc + nsub)
+ sizeof (gfc_intrinsic_arg) * nargs);
next_sym = functions;
subroutines = functions + nfunc;
- conversion = gfc_getmem (sizeof (gfc_intrinsic_sym) * nconv);
+ conversion = (gfc_intrinsic_sym *)gfc_getmem (sizeof (gfc_intrinsic_sym) * nconv);
next_arg = ((gfc_intrinsic_arg *) (subroutines + nsub)) - 1;
@@ -2814,7 +2814,7 @@ remove_nullargs (gfc_actual_arglist ** ap)
wrong (say, a missing required argument) we abort sorting and
return FAILURE. */
-static try
+static check
sort_actual (const char *name, gfc_actual_arglist ** ap,
gfc_intrinsic_arg * formal, locus * where)
{
@@ -2926,7 +2926,7 @@ do_sort:
list. The lists are checked for agreement of type. We don't check
for arrayness here. */
-static try
+static check
check_arglist (gfc_actual_arglist ** ap, gfc_intrinsic_sym * sym,
int error_flag)
{
@@ -3050,7 +3050,7 @@ resolve_intrinsic (gfc_intrinsic_sym * specific, gfc_expr * e)
of the simplification, SUCCESS if the simplification worked, even
if nothing has changed in the expression itself. */
-static try
+static check
do_simplify (gfc_intrinsic_sym * specific, gfc_expr * e)
{
gfc_expr *result, *a1, *a2, *a3, *a4, *a5;
@@ -3188,12 +3188,12 @@ init_arglist (gfc_intrinsic_sym * isym)
intrinsic's formal argument list. Return SUCCESS if the expression
and intrinsic match, FAILURE otherwise. */
-static try
+static check
check_specific (gfc_intrinsic_sym * specific, gfc_expr * expr, int error_flag)
{
gfc_actual_arglist *arg, **ap;
int r;
- try t;
+ check t;
ap = &expr->value.function.actual;
@@ -3478,7 +3478,7 @@ fail:
/* Call gfc_convert_type() with warning enabled. */
-try
+check
gfc_convert_type (gfc_expr * expr, gfc_typespec * ts, int eflag)
{
return gfc_convert_type_warn (expr, ts, eflag, 1);
@@ -3495,14 +3495,14 @@ gfc_convert_type (gfc_expr * expr, gfc_typespec * ts, int eflag)
'wflag' controls the warning related to conversion. */
-try
+check
gfc_convert_type_warn (gfc_expr * expr, gfc_typespec * ts, int eflag,
int wflag)
{
gfc_intrinsic_sym *sym;
gfc_typespec from_ts;
locus old_where;
- gfc_expr *new;
+ gfc_expr *fresh;
int rank;
mpz_t *shape;
@@ -3546,17 +3546,17 @@ gfc_convert_type_warn (gfc_expr * expr, gfc_typespec * ts, int eflag,
rank = expr->rank;
shape = expr->shape;
- new = gfc_get_expr ();
- *new = *expr;
+ fresh = gfc_get_expr ();
+ *fresh = *expr;
- new = gfc_build_conversion (new);
- new->value.function.name = sym->lib_name;
- new->value.function.isym = sym;
- new->where = old_where;
- new->rank = rank;
- new->shape = gfc_copy_shape (shape, rank);
+ fresh = gfc_build_conversion (fresh);
+ fresh->value.function.name = sym->lib_name;
+ fresh->value.function.isym = sym;
+ fresh->where = old_where;
+ fresh->rank = rank;
+ fresh->shape = gfc_copy_shape (shape, rank);
- gfc_get_ha_sym_tree (sym->name, &new->symtree);
+ gfc_get_ha_sym_tree (sym->name, &fresh->symtree);
new->symtree->n.sym->ts = *ts;
new->symtree->n.sym->attr.flavor = FL_PROCEDURE;
new->symtree->n.sym->attr.function = 1;
@@ -3564,12 +3564,12 @@ gfc_convert_type_warn (gfc_expr * expr, gfc_typespec * ts, int eflag,
new->symtree->n.sym->attr.elemental = 1;
new->symtree->n.sym->attr.pure = 1;
new->symtree->n.sym->attr.referenced = 1;
- gfc_intrinsic_symbol(new->symtree->n.sym);
- gfc_commit_symbol (new->symtree->n.sym);
+ gfc_intrinsic_symbol(fresh->symtree->n.sym);
+ gfc_commit_symbol (fresh->symtree->n.sym);
- *expr = *new;
+ *expr = *fresh;
- gfc_free (new);
+ gfc_free (fresh);
expr->ts = *ts;
if (gfc_is_constant_expr (expr->value.function.actual->expr)
diff --git a/gcc/fortran/intrinsic.h b/gcc/fortran/intrinsic.h
index 15af9120133..4fdd93ec170 100644
--- a/gcc/fortran/intrinsic.h
+++ b/gcc/fortran/intrinsic.h
@@ -27,158 +27,158 @@ extern gfc_expr gfc_bad_expr;
/* Check functions. */
-try gfc_check_a_ikind (gfc_expr *, gfc_expr *);
-try gfc_check_a_xkind (gfc_expr *, gfc_expr *);
-try gfc_check_a_p (gfc_expr *, gfc_expr *);
+check gfc_check_a_ikind (gfc_expr *, gfc_expr *);
+check gfc_check_a_xkind (gfc_expr *, gfc_expr *);
+check gfc_check_a_p (gfc_expr *, gfc_expr *);
-try gfc_check_abs (gfc_expr *);
-try gfc_check_access_func (gfc_expr *, gfc_expr *);
-try gfc_check_achar (gfc_expr *);
-try gfc_check_all_any (gfc_expr *, gfc_expr *);
-try gfc_check_allocated (gfc_expr *);
-try gfc_check_associated (gfc_expr *, gfc_expr *);
-try gfc_check_atan2 (gfc_expr *, gfc_expr *);
-try gfc_check_besn (gfc_expr *, gfc_expr *);
-try gfc_check_btest (gfc_expr *, gfc_expr *);
-try gfc_check_char (gfc_expr *, gfc_expr *);
-try gfc_check_chdir (gfc_expr *);
-try gfc_check_chmod (gfc_expr *, gfc_expr *);
-try gfc_check_cmplx (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_complex (gfc_expr *, gfc_expr *);
-try gfc_check_count (gfc_expr *, gfc_expr *);
-try gfc_check_cshift (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_ctime (gfc_expr *);
-try gfc_check_dcmplx (gfc_expr *, gfc_expr *);
-try gfc_check_dble (gfc_expr *);
-try gfc_check_digits (gfc_expr *);
-try gfc_check_dot_product (gfc_expr *, gfc_expr *);
-try gfc_check_eoshift (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_etime (gfc_expr *);
-try gfc_check_fgetputc (gfc_expr *, gfc_expr *);
-try gfc_check_fgetput (gfc_expr *);
-try gfc_check_fstat (gfc_expr *, gfc_expr *);
-try gfc_check_ftell (gfc_expr *);
-try gfc_check_fn_c (gfc_expr *);
-try gfc_check_fn_r (gfc_expr *);
-try gfc_check_fn_rc (gfc_expr *);
-try gfc_check_fnum (gfc_expr *);
-try gfc_check_g77_math1 (gfc_expr *);
-try gfc_check_hostnm (gfc_expr *);
-try gfc_check_huge (gfc_expr *);
-try gfc_check_i (gfc_expr *);
-try gfc_check_iand (gfc_expr *, gfc_expr *);
-try gfc_check_and (gfc_expr *, gfc_expr *);
-try gfc_check_ibclr (gfc_expr *, gfc_expr *);
-try gfc_check_ibits (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_ibset (gfc_expr *, gfc_expr *);
-try gfc_check_ichar_iachar (gfc_expr *);
-try gfc_check_idnint (gfc_expr *);
-try gfc_check_ieor (gfc_expr *, gfc_expr *);
-try gfc_check_index (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_int (gfc_expr *, gfc_expr *);
-try gfc_check_intconv (gfc_expr *);
-try gfc_check_ior (gfc_expr *, gfc_expr *);
-try gfc_check_irand (gfc_expr *);
-try gfc_check_isatty (gfc_expr *);
-try gfc_check_ishft (gfc_expr *, gfc_expr *);
-try gfc_check_ishftc (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_kill (gfc_expr *, gfc_expr *);
-try gfc_check_kind (gfc_expr *);
-try gfc_check_lbound (gfc_expr *, gfc_expr *);
-try gfc_check_link (gfc_expr *, gfc_expr *);
-try gfc_check_loc (gfc_expr *);
-try gfc_check_logical (gfc_expr *, gfc_expr *);
-try gfc_check_min_max (gfc_actual_arglist *);
-try gfc_check_min_max_integer (gfc_actual_arglist *);
-try gfc_check_min_max_real (gfc_actual_arglist *);
-try gfc_check_min_max_double (gfc_actual_arglist *);
-try gfc_check_malloc (gfc_expr *);
-try gfc_check_matmul (gfc_expr *, gfc_expr *);
-try gfc_check_merge (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_minloc_maxloc (gfc_actual_arglist *);
-try gfc_check_minval_maxval (gfc_actual_arglist *);
-try gfc_check_nearest (gfc_expr *, gfc_expr *);
-try gfc_check_new_line (gfc_expr *);
-try gfc_check_null (gfc_expr *);
-try gfc_check_pack (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_precision (gfc_expr *);
-try gfc_check_present (gfc_expr *);
-try gfc_check_product_sum (gfc_actual_arglist *);
-try gfc_check_radix (gfc_expr *);
-try gfc_check_rand (gfc_expr *);
-try gfc_check_range (gfc_expr *);
-try gfc_check_real (gfc_expr *, gfc_expr *);
-try gfc_check_rename (gfc_expr *, gfc_expr *);
-try gfc_check_repeat (gfc_expr *, gfc_expr *);
-try gfc_check_reshape (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_scale (gfc_expr *, gfc_expr *);
-try gfc_check_scan (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_second_sub (gfc_expr *);
-try gfc_check_secnds (gfc_expr *);
-try gfc_check_selected_int_kind (gfc_expr *);
-try gfc_check_selected_real_kind (gfc_expr *, gfc_expr *);
-try gfc_check_set_exponent (gfc_expr *, gfc_expr *);
-try gfc_check_shape (gfc_expr *);
-try gfc_check_size (gfc_expr *, gfc_expr *);
-try gfc_check_sign (gfc_expr *, gfc_expr *);
-try gfc_check_signal (gfc_expr *, gfc_expr *);
-try gfc_check_spread (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_srand (gfc_expr *);
-try gfc_check_stat (gfc_expr *, gfc_expr *);
-try gfc_check_sum (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_symlnk (gfc_expr *, gfc_expr *);
-try gfc_check_transfer (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_transpose (gfc_expr *);
-try gfc_check_trim (gfc_expr *);
-try gfc_check_ttynam (gfc_expr *);
-try gfc_check_ubound (gfc_expr *, gfc_expr *);
-try gfc_check_umask (gfc_expr *);
-try gfc_check_unlink (gfc_expr *);
-try gfc_check_unpack (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_verify (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_x (gfc_expr *);
+check gfc_check_abs (gfc_expr *);
+check gfc_check_access_func (gfc_expr *, gfc_expr *);
+check gfc_check_achar (gfc_expr *);
+check gfc_check_all_any (gfc_expr *, gfc_expr *);
+check gfc_check_allocated (gfc_expr *);
+check gfc_check_associated (gfc_expr *, gfc_expr *);
+check gfc_check_atan2 (gfc_expr *, gfc_expr *);
+check gfc_check_besn (gfc_expr *, gfc_expr *);
+check gfc_check_btest (gfc_expr *, gfc_expr *);
+check gfc_check_char (gfc_expr *, gfc_expr *);
+check gfc_check_chdir (gfc_expr *);
+check gfc_check_chmod (gfc_expr *, gfc_expr *);
+check gfc_check_cmplx (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_complex (gfc_expr *, gfc_expr *);
+check gfc_check_count (gfc_expr *, gfc_expr *);
+check gfc_check_cshift (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_ctime (gfc_expr *);
+check gfc_check_dcmplx (gfc_expr *, gfc_expr *);
+check gfc_check_dble (gfc_expr *);
+check gfc_check_digits (gfc_expr *);
+check gfc_check_dot_product (gfc_expr *, gfc_expr *);
+check gfc_check_eoshift (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_etime (gfc_expr *);
+check gfc_check_fgetputc (gfc_expr *, gfc_expr *);
+check gfc_check_fgetput (gfc_expr *);
+check gfc_check_fstat (gfc_expr *, gfc_expr *);
+check gfc_check_ftell (gfc_expr *);
+check gfc_check_fn_c (gfc_expr *);
+check gfc_check_fn_r (gfc_expr *);
+check gfc_check_fn_rc (gfc_expr *);
+check gfc_check_fnum (gfc_expr *);
+check gfc_check_g77_math1 (gfc_expr *);
+check gfc_check_hostnm (gfc_expr *);
+check gfc_check_huge (gfc_expr *);
+check gfc_check_i (gfc_expr *);
+check gfc_check_iand (gfc_expr *, gfc_expr *);
+check gfc_check_and (gfc_expr *, gfc_expr *);
+check gfc_check_ibclr (gfc_expr *, gfc_expr *);
+check gfc_check_ibits (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_ibset (gfc_expr *, gfc_expr *);
+check gfc_check_ichar_iachar (gfc_expr *);
+check gfc_check_idnint (gfc_expr *);
+check gfc_check_ieor (gfc_expr *, gfc_expr *);
+check gfc_check_index (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_int (gfc_expr *, gfc_expr *);
+check gfc_check_intconv (gfc_expr *);
+check gfc_check_ior (gfc_expr *, gfc_expr *);
+check gfc_check_irand (gfc_expr *);
+check gfc_check_isatty (gfc_expr *);
+check gfc_check_ishft (gfc_expr *, gfc_expr *);
+check gfc_check_ishftc (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_kill (gfc_expr *, gfc_expr *);
+check gfc_check_kind (gfc_expr *);
+check gfc_check_lbound (gfc_expr *, gfc_expr *);
+check gfc_check_link (gfc_expr *, gfc_expr *);
+check gfc_check_loc (gfc_expr *);
+check gfc_check_logical (gfc_expr *, gfc_expr *);
+check gfc_check_min_max (gfc_actual_arglist *);
+check gfc_check_min_max_integer (gfc_actual_arglist *);
+check gfc_check_min_max_real (gfc_actual_arglist *);
+check gfc_check_min_max_double (gfc_actual_arglist *);
+check gfc_check_malloc (gfc_expr *);
+check gfc_check_matmul (gfc_expr *, gfc_expr *);
+check gfc_check_merge (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_minloc_maxloc (gfc_actual_arglist *);
+check gfc_check_minval_maxval (gfc_actual_arglist *);
+check gfc_check_nearest (gfc_expr *, gfc_expr *);
+check gfc_check_new_line (gfc_expr *);
+check gfc_check_null (gfc_expr *);
+check gfc_check_pack (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_precision (gfc_expr *);
+check gfc_check_present (gfc_expr *);
+check gfc_check_product_sum (gfc_actual_arglist *);
+check gfc_check_radix (gfc_expr *);
+check gfc_check_rand (gfc_expr *);
+check gfc_check_range (gfc_expr *);
+check gfc_check_real (gfc_expr *, gfc_expr *);
+check gfc_check_rename (gfc_expr *, gfc_expr *);
+check gfc_check_repeat (gfc_expr *, gfc_expr *);
+check gfc_check_reshape (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_scale (gfc_expr *, gfc_expr *);
+check gfc_check_scan (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_second_sub (gfc_expr *);
+check gfc_check_secnds (gfc_expr *);
+check gfc_check_selected_int_kind (gfc_expr *);
+check gfc_check_selected_real_kind (gfc_expr *, gfc_expr *);
+check gfc_check_set_exponent (gfc_expr *, gfc_expr *);
+check gfc_check_shape (gfc_expr *);
+check gfc_check_size (gfc_expr *, gfc_expr *);
+check gfc_check_sign (gfc_expr *, gfc_expr *);
+check gfc_check_signal (gfc_expr *, gfc_expr *);
+check gfc_check_spread (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_srand (gfc_expr *);
+check gfc_check_stat (gfc_expr *, gfc_expr *);
+check gfc_check_sum (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_symlnk (gfc_expr *, gfc_expr *);
+check gfc_check_transfer (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_transpose (gfc_expr *);
+check gfc_check_trim (gfc_expr *);
+check gfc_check_ttynam (gfc_expr *);
+check gfc_check_ubound (gfc_expr *, gfc_expr *);
+check gfc_check_umask (gfc_expr *);
+check gfc_check_unlink (gfc_expr *);
+check gfc_check_unpack (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_verify (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_x (gfc_expr *);
/* Intrinsic subroutines. */
-try gfc_check_alarm_sub (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_chdir_sub (gfc_expr *, gfc_expr *);
-try gfc_check_chmod_sub (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_cpu_time (gfc_expr *);
-try gfc_check_ctime_sub (gfc_expr *, gfc_expr *);
-try gfc_check_system_clock (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_date_and_time (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_exit (gfc_expr *);
-try gfc_check_fdate_sub (gfc_expr *);
-try gfc_check_flush (gfc_expr *);
-try gfc_check_free (gfc_expr *);
-try gfc_check_fstat_sub (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_gerror (gfc_expr *);
-try gfc_check_getlog (gfc_expr *);
-try gfc_check_move_alloc (gfc_expr *, gfc_expr *);
-try gfc_check_mvbits (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
+check gfc_check_alarm_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_chdir_sub (gfc_expr *, gfc_expr *);
+check gfc_check_chmod_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_cpu_time (gfc_expr *);
+check gfc_check_ctime_sub (gfc_expr *, gfc_expr *);
+check gfc_check_system_clock (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_date_and_time (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_exit (gfc_expr *);
+check gfc_check_fdate_sub (gfc_expr *);
+check gfc_check_flush (gfc_expr *);
+check gfc_check_free (gfc_expr *);
+check gfc_check_fstat_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_gerror (gfc_expr *);
+check gfc_check_getlog (gfc_expr *);
+check gfc_check_move_alloc (gfc_expr *, gfc_expr *);
+check gfc_check_mvbits (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
gfc_expr *);
-try gfc_check_random_number (gfc_expr *);
-try gfc_check_random_seed (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_etime_sub (gfc_expr *, gfc_expr *);
-try gfc_check_fgetputc_sub (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_fgetput_sub (gfc_expr *, gfc_expr *);
-try gfc_check_ftell_sub (gfc_expr *, gfc_expr *);
-try gfc_check_getcwd_sub (gfc_expr *, gfc_expr *);
-try gfc_check_hostnm_sub (gfc_expr *, gfc_expr *);
-try gfc_check_itime_idate (gfc_expr *);
-try gfc_check_kill_sub (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_ltime_gmtime (gfc_expr *, gfc_expr *);
-try gfc_check_perror (gfc_expr *);
-try gfc_check_rename_sub (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_link_sub (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_symlnk_sub (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_signal_sub (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_sleep_sub (gfc_expr *);
-try gfc_check_stat_sub (gfc_expr *, gfc_expr *, gfc_expr *);
-try gfc_check_system_sub (gfc_expr *, gfc_expr *);
-try gfc_check_ttynam_sub (gfc_expr *, gfc_expr *);
-try gfc_check_umask_sub (gfc_expr *, gfc_expr *);
-try gfc_check_unlink_sub (gfc_expr *, gfc_expr *);
+check gfc_check_random_number (gfc_expr *);
+check gfc_check_random_seed (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_etime_sub (gfc_expr *, gfc_expr *);
+check gfc_check_fgetputc_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_fgetput_sub (gfc_expr *, gfc_expr *);
+check gfc_check_ftell_sub (gfc_expr *, gfc_expr *);
+check gfc_check_getcwd_sub (gfc_expr *, gfc_expr *);
+check gfc_check_hostnm_sub (gfc_expr *, gfc_expr *);
+check gfc_check_itime_idate (gfc_expr *);
+check gfc_check_kill_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_ltime_gmtime (gfc_expr *, gfc_expr *);
+check gfc_check_perror (gfc_expr *);
+check gfc_check_rename_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_link_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_symlnk_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_signal_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_sleep_sub (gfc_expr *);
+check gfc_check_stat_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+check gfc_check_system_sub (gfc_expr *, gfc_expr *);
+check gfc_check_ttynam_sub (gfc_expr *, gfc_expr *);
+check gfc_check_umask_sub (gfc_expr *, gfc_expr *);
+check gfc_check_unlink_sub (gfc_expr *, gfc_expr *);
/* Simplification functions. */
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index d4897694bbd..e692c4055bc 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -411,7 +411,7 @@ format_lex (void)
by itself, and we are checking it for validity. The dual origin
means that the warning message is a little less than great. */
-static try
+static check
check_format (void)
{
const char *posint_required = _("Positive width required");
@@ -423,7 +423,7 @@ check_format (void)
format_token t, u;
int level;
int repeat;
- try rv;
+ check rv;
use_last_char = 0;
saved_token = FMT_NONE;
@@ -896,7 +896,7 @@ gfc_match_format (void)
e->ts.type = BT_CHARACTER;
e->ts.kind = gfc_default_character_kind;
e->where = start;
- e->value.character.string = format_string = gfc_getmem(format_length+1);
+ e->value.character.string = format_string = (char *)gfc_getmem(format_length+1);
e->value.character.length = format_length;
gfc_statement_label->format = e;
@@ -1011,7 +1011,7 @@ match_ltag (const io_tag * tag, gfc_st_label ** label)
/* Do expression resolution and type-checking on an expression tag. */
-static try
+static check
resolve_tag (const io_tag * tag, gfc_expr * e)
{
@@ -1226,7 +1226,7 @@ gfc_free_open (gfc_open * open)
/* Resolve everything in a gfc_open structure. */
-try
+check
gfc_resolve_open (gfc_open * open)
{
@@ -1359,7 +1359,7 @@ gfc_match_open (void)
if (m == MATCH_NO)
return m;
- open = gfc_getmem (sizeof (gfc_open));
+ open = (gfc_open *)gfc_getmem (sizeof (gfc_open));
m = match_open_element (open);
@@ -1702,7 +1702,7 @@ gfc_match_close (void)
if (m == MATCH_NO)
return m;
- close = gfc_getmem (sizeof (gfc_close));
+ close = (gfc_close *)gfc_getmem (sizeof (gfc_close));
m = match_close_element (close);
@@ -1768,7 +1768,7 @@ cleanup:
/* Resolve everything in a gfc_close structure. */
-try
+check
gfc_resolve_close (gfc_close * close)
{
@@ -1830,7 +1830,7 @@ match_filepos (gfc_statement st, gfc_exec_op op)
gfc_filepos *fp;
match m;
- fp = gfc_getmem (sizeof (gfc_filepos));
+ fp = (gfc_filepos *)gfc_getmem (sizeof (gfc_filepos));
if (gfc_match_char ('(') == MATCH_NO)
{
@@ -1894,7 +1894,7 @@ cleanup:
}
-try
+check
gfc_resolve_filepos (gfc_filepos * fp)
{
@@ -2195,7 +2195,7 @@ gfc_free_dt (gfc_dt * dt)
/* Resolve everything in a gfc_dt structure. */
-try
+check
gfc_resolve_dt (gfc_dt * dt)
{
gfc_expr *e;
@@ -2325,7 +2325,7 @@ static match match_io_element (io_kind k, gfc_code **);
static match
match_io_iterator (io_kind k, gfc_code ** result)
{
- gfc_code *head, *tail, *new;
+ gfc_code *head, *tail, *fresh;
gfc_iterator *iter;
locus old_loc;
match m;
@@ -2361,7 +2361,7 @@ match_io_iterator (io_kind k, gfc_code ** result)
break;
}
- m = match_io_element (k, &new);
+ m = match_io_element (k, &fresh);
if (m == MATCH_ERROR)
goto cleanup;
if (m == MATCH_NO)
@@ -2371,7 +2371,7 @@ match_io_iterator (io_kind k, gfc_code ** result)
goto cleanup;
}
- tail = gfc_append_code (tail, new);
+ tail = gfc_append_code (tail, fresh);
if (gfc_match_char (',') != MATCH_YES)
{
@@ -2385,15 +2385,15 @@ match_io_iterator (io_kind k, gfc_code ** result)
if (gfc_match_char (')') != MATCH_YES)
goto syntax;
- new = gfc_get_code ();
- new->op = EXEC_DO;
- new->ext.iterator = iter;
+ fresh = gfc_get_code ();
+ fresh->op = EXEC_DO;
+ fresh->ext.iterator = iter;
- new->block = gfc_get_code ();
- new->block->op = EXEC_DO;
- new->block->next = head;
+ fresh->block = gfc_get_code ();
+ fresh->block->op = EXEC_DO;
+ fresh->block->next = head;
- *result = new;
+ *result = fresh;
return MATCH_YES;
syntax:
@@ -2502,7 +2502,7 @@ match_io_element (io_kind k, gfc_code ** cpp)
static match
match_io_list (io_kind k, gfc_code ** head_p)
{
- gfc_code *head, *tail, *new;
+ gfc_code *head, *tail, *fresh;
match m;
*head_p = head = tail = NULL;
@@ -2511,15 +2511,15 @@ match_io_list (io_kind k, gfc_code ** head_p)
for (;;)
{
- m = match_io_element (k, &new);
+ m = match_io_element (k, &fresh);
if (m == MATCH_ERROR)
goto cleanup;
if (m == MATCH_NO)
goto syntax;
- tail = gfc_append_code (tail, new);
+ tail = gfc_append_code (tail, fresh);
if (head == NULL)
- head = new;
+ head = fresh;
if (gfc_match_eos () == MATCH_YES)
break;
@@ -2743,7 +2743,7 @@ match_io (io_kind k)
where = gfc_current_locus;
comma_flag = 0;
- current_dt = dt = gfc_getmem (sizeof (gfc_dt));
+ current_dt = dt = (gfc_dt *)gfc_getmem (sizeof (gfc_dt));
m = gfc_match_char ('(');
if (m == MATCH_NO)
{
@@ -3070,7 +3070,7 @@ gfc_match_inquire (void)
if (m == MATCH_NO)
return m;
- inquire = gfc_getmem (sizeof (gfc_inquire));
+ inquire = (gfc_inquire *)gfc_getmem (sizeof (gfc_inquire));
loc = gfc_current_locus;
@@ -3175,7 +3175,7 @@ cleanup:
/* Resolve everything in a gfc_inquire structure. */
-try
+check
gfc_resolve_inquire (gfc_inquire * inquire)
{
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c
index c702294fc82..3eb2369afb9 100644
--- a/gcc/fortran/iresolve.c
+++ b/gcc/fortran/iresolve.c
@@ -587,7 +587,7 @@ gfc_resolve_dot_product (gfc_expr * f, gfc_expr * a, gfc_expr * b)
temp.expr_type = EXPR_OP;
gfc_clear_ts (&temp.ts);
- temp.value.op.operator = INTRINSIC_NONE;
+ temp.value.op.foperator = INTRINSIC_NONE;
temp.value.op.op1 = a;
temp.value.op.op2 = b;
gfc_type_convert_binary (&temp);
@@ -1142,7 +1142,7 @@ gfc_resolve_matmul (gfc_expr * f, gfc_expr * a, gfc_expr * b)
{
temp.expr_type = EXPR_OP;
gfc_clear_ts (&temp.ts);
- temp.value.op.operator = INTRINSIC_NONE;
+ temp.value.op.foperator = INTRINSIC_NONE;
temp.value.op.op1 = a;
temp.value.op.op2 = b;
gfc_type_convert_binary (&temp);
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 3f393856798..64965c45240 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -788,7 +788,7 @@ not_yes:
case 'e':
case 'v':
vp = va_arg (argp, void **);
- gfc_free_expr (*vp);
+ gfc_free_expr ((gfc_expr *)*vp);
*vp = NULL;
break;
}
@@ -3371,7 +3371,7 @@ match_forall_iterator (gfc_forall_iterator ** result)
match m;
where = gfc_current_locus;
- iter = gfc_getmem (sizeof (gfc_forall_iterator));
+ iter = (gfc_forall_iterator *)gfc_getmem (sizeof (gfc_forall_iterator));
m = gfc_match_variable (&iter->var, 0);
if (m != MATCH_YES)
@@ -3436,7 +3436,7 @@ cleanup:
static match
match_forall_header (gfc_forall_iterator ** phead, gfc_expr ** mask)
{
- gfc_forall_iterator *head, *tail, *new;
+ gfc_forall_iterator *head, *tail, *tmp;
gfc_expr *msk;
match m;
@@ -3448,27 +3448,27 @@ match_forall_header (gfc_forall_iterator ** phead, gfc_expr ** mask)
if (gfc_match_char ('(') != MATCH_YES)
return MATCH_NO;
- m = match_forall_iterator (&new);
+ m = match_forall_iterator (&tmp);
if (m == MATCH_ERROR)
goto cleanup;
if (m == MATCH_NO)
goto syntax;
- head = tail = new;
+ head = tail = tmp;
for (;;)
{
if (gfc_match_char (',') != MATCH_YES)
break;
- m = match_forall_iterator (&new);
+ m = match_forall_iterator (&tmp);
if (m == MATCH_ERROR)
goto cleanup;
if (m == MATCH_YES)
{
- tail->next = new;
- tail = new;
+ tail->next = tmp;
+ tail = tmp;
continue;
}
diff --git a/gcc/fortran/matchexp.c b/gcc/fortran/matchexp.c
index b319c24e985..d5a698651e5 100644
--- a/gcc/fortran/matchexp.c
+++ b/gcc/fortran/matchexp.c
@@ -206,20 +206,20 @@ syntax:
/* Build an operator expression node. */
static gfc_expr *
-build_node (gfc_intrinsic_op operator, locus * where,
+build_node (gfc_intrinsic_op op, locus * where,
gfc_expr * op1, gfc_expr * op2)
{
- gfc_expr *new;
+ gfc_expr *tmp;
- new = gfc_get_expr ();
- new->expr_type = EXPR_OP;
- new->value.op.operator = operator;
- new->where = *where;
+ tmp = gfc_get_expr ();
+ tmp->expr_type = EXPR_OP;
+ tmp->value.op.foperator = op;
+ tmp->where = *where;
- new->value.op.op1 = op1;
- new->value.op.op2 = op2;
+ tmp->value.op.op1 = op1;
+ tmp->value.op.op2 = op2;
- return new;
+ return tmp;
}
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index f525ab64495..ddd55fe2f7e 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -104,6 +104,8 @@ fixup_t;
/* Structure for holding extra info needed for pointers being read. */
+enum symbol_state { UNUSED, NEEDED, USED };
+enum reference_state { UNREFERENCED = 0, NEEDS_WRITE, WRITTEN };
typedef struct pointer_info
{
@@ -124,9 +126,7 @@ typedef struct pointer_info
{
gfc_symbol *sym;
char true_name[GFC_MAX_SYMBOL_LEN + 1], module[GFC_MAX_SYMBOL_LEN + 1];
- enum
- { UNUSED, NEEDED, USED }
- state;
+ enum symbol_state state;
int ns, referenced;
module_locus where;
fixup_t *stfixup;
@@ -137,9 +137,7 @@ typedef struct pointer_info
struct
{
gfc_symbol *sym;
- enum
- { UNREFERENCED = 0, NEEDS_WRITE, WRITTEN }
- state;
+ enum reference_state state;
}
wsym;
}
@@ -158,7 +156,7 @@ typedef struct gfc_use_rename
char local_name[GFC_MAX_SYMBOL_LEN + 1], use_name[GFC_MAX_SYMBOL_LEN + 1];
struct gfc_use_rename *next;
int found;
- gfc_intrinsic_op operator;
+ gfc_intrinsic_op foperator;
locus where;
}
gfc_use_rename;
@@ -263,7 +261,7 @@ init_pi_tree (void)
compare = (iomode == IO_INPUT) ? compare_integers : compare_pointers;
/* Pointer 0 is the NULL pointer. */
- p = gfc_get_pointer_info ();
+ p = (pointer_info *)gfc_get_pointer_info ();
p->u.pointer = NULL;
p->integer = 0;
p->type = P_OTHER;
@@ -271,7 +269,7 @@ init_pi_tree (void)
gfc_insert_bbt (&pi_root, p, compare);
/* Pointer 1 is the current namespace. */
- p = gfc_get_pointer_info ();
+ p = (pointer_info *)gfc_get_pointer_info ();
p->u.pointer = gfc_current_ns;
p->integer = 1;
p->type = P_NAMESPACE;
@@ -315,7 +313,7 @@ get_pointer (void *gp)
return p;
/* Pointer doesn't have an integer. Give it one. */
- p = gfc_get_pointer_info ();
+ p = (pointer_info *)gfc_get_pointer_info ();
p->u.pointer = gp;
p->integer = symbol_number++;
@@ -350,7 +348,7 @@ get_integer (int integer)
if (p != NULL)
return p;
- p = gfc_get_pointer_info ();
+ p = (pointer_info *)gfc_get_pointer_info ();
p->integer = integer;
p->u.pointer = NULL;
@@ -442,17 +440,17 @@ add_fixup (int integer, void *gp)
if (p->integer == 0 || p->u.pointer != NULL)
{
- cp = gp;
- *cp = p->u.pointer;
+ cp = (char **)gp;
+ *cp = (char *)p->u.pointer;
}
else
{
- f = gfc_getmem (sizeof (fixup_t));
+ f = (fixup_t *)gfc_getmem (sizeof (fixup_t));
f->next = p->fixup;
p->fixup = f;
- f->pointer = gp;
+ f->pointer = (void **)gp;
}
return p;
@@ -484,9 +482,9 @@ match
gfc_match_use (void)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
- gfc_use_rename *tail = NULL, *new;
+ gfc_use_rename *tail = NULL, *tmp;
interface_type type;
- gfc_intrinsic_op operator;
+ gfc_intrinsic_op op;
match m;
m = gfc_match_name (module_name);
@@ -510,20 +508,20 @@ gfc_match_use (void)
for (;;)
{
/* Get a new rename struct and add it to the rename list. */
- new = gfc_get_use_rename ();
- new->where = gfc_current_locus;
- new->found = 0;
+ tmp = (gfc_use_rename *)gfc_get_use_rename ();
+ tmp->where = gfc_current_locus;
+ tmp->found = 0;
if (gfc_rename_list == NULL)
- gfc_rename_list = new;
+ gfc_rename_list = tmp;
else
- tail->next = new;
- tail = new;
+ tail->next = tmp;
+ tail = tmp;
/* See what kind of interface we're dealing with. Assume it is
not an operator. */
- new->operator = INTRINSIC_NONE;
- if (gfc_match_generic_spec (&type, name, &operator) == MATCH_ERROR)
+ tmp->foperator = INTRINSIC_NONE;
+ if (gfc_match_generic_spec (&type, name, &op) == MATCH_ERROR)
goto cleanup;
switch (type)
@@ -538,12 +536,12 @@ gfc_match_use (void)
if (only_flag)
{
if (m != MATCH_YES)
- strcpy (new->use_name, name);
+ strcpy (tmp->use_name, name);
else
{
- strcpy (new->local_name, name);
+ strcpy (tmp->local_name, name);
- m = gfc_match_name (new->use_name);
+ m = gfc_match_name (tmp->use_name);
if (m == MATCH_NO)
goto syntax;
if (m == MATCH_ERROR)
@@ -554,9 +552,9 @@ gfc_match_use (void)
{
if (m != MATCH_YES)
goto syntax;
- strcpy (new->local_name, name);
+ strcpy (tmp->local_name, name);
- m = gfc_match_name (new->use_name);
+ m = gfc_match_name (tmp->use_name);
if (m == MATCH_NO)
goto syntax;
if (m == MATCH_ERROR)
@@ -566,11 +564,11 @@ gfc_match_use (void)
break;
case INTERFACE_USER_OP:
- strcpy (new->use_name, name);
+ strcpy (tmp->use_name, name);
/* Fall through */
case INTERFACE_INTRINSIC_OP:
- new->operator = operator;
+ tmp->foperator = op;
break;
}
@@ -651,12 +649,12 @@ number_use_names (const char *name)
/* Try to find the operator in the current list. */
static gfc_use_rename *
-find_use_operator (gfc_intrinsic_op operator)
+find_use_operator (gfc_intrinsic_op op)
{
gfc_use_rename *u;
for (u = gfc_rename_list; u; u = u->next)
- if (u->operator == operator)
+ if (u->foperator == op)
return u;
return NULL;
@@ -745,7 +743,7 @@ add_true_name (gfc_symbol * sym)
{
true_name *t;
- t = gfc_getmem (sizeof (true_name));
+ t = (true_name *)gfc_getmem (sizeof (true_name));
t->sym = sym;
gfc_insert_bbt (&true_name_root, t, compare_true_names);
@@ -939,7 +937,7 @@ parse_string (void)
set_module_locus (&start);
- atom_string = p = gfc_getmem (len + 1);
+ atom_string = p = (char *)gfc_getmem (len + 1);
for (; len > 0; len--)
{
@@ -1233,7 +1231,7 @@ write_atom (atom_type atom, const void *v)
{
case ATOM_STRING:
case ATOM_NAME:
- p = v;
+ p = (char *)v;
break;
case ATOM_LPAREN:
@@ -2162,7 +2160,7 @@ mio_symtree_ref (gfc_symtree ** stp)
}
else
{
- f = gfc_getmem (sizeof (fixup_t));
+ f = (fixup_t *)gfc_getmem (sizeof (fixup_t));
f->next = p->u.rsym.stfixup;
p->u.rsym.stfixup = f;
@@ -2377,7 +2375,7 @@ mio_gmp_real (mpfr_t * real)
else
{
p = mpfr_get_str (NULL, &exponent, 16, 0, *real, GFC_RND_MODE);
- atom_string = gfc_getmem (strlen (p) + 20);
+ atom_string = (char *)gfc_getmem (strlen (p) + 20);
sprintf (atom_string, "0.%s@%ld", p, exponent);
@@ -2527,10 +2525,10 @@ mio_expr (gfc_expr ** ep)
switch (e->expr_type)
{
case EXPR_OP:
- e->value.op.operator
- = MIO_NAME(gfc_intrinsic_op) (e->value.op.operator, intrinsics);
+ e->value.op.foperator
+ = MIO_NAME(gfc_intrinsic_op) (e->value.op.foperator, intrinsics);
- switch (e->value.op.operator)
+ switch (e->value.op.foperator)
{
case INTRINSIC_UPLUS:
case INTRINSIC_UMINUS:
@@ -2939,7 +2937,7 @@ load_operator_interfaces (void)
else
{
uop = gfc_get_uop (p);
- mio_interface_rest (&uop->operator);
+ mio_interface_rest (&uop->foperator);
}
}
@@ -3193,7 +3191,7 @@ read_module (void)
module_locus operator_interfaces, user_operators;
const char *p;
char name[GFC_MAX_SYMBOL_LEN + 1];
- gfc_intrinsic_op i;
+ int i;
int ambiguous, j, nuse, symbol;
pointer_info *info;
gfc_use_rename *u;
@@ -3335,7 +3333,7 @@ read_module (void)
if (only_flag)
{
- u = find_use_operator (i);
+ u = find_use_operator ((gfc_intrinsic_op) i);
if (u == NULL)
{
@@ -3346,7 +3344,7 @@ read_module (void)
u->found = 1;
}
- mio_interface (&gfc_current_ns->operator[i]);
+ mio_interface (&gfc_current_ns->foperator[i]);
}
mio_rparen ();
@@ -3377,14 +3375,14 @@ read_module (void)
if (u->found)
continue;
- if (u->operator == INTRINSIC_NONE)
+ if (u->foperator == INTRINSIC_NONE)
{
gfc_error ("Symbol '%s' referenced at %L not found in module '%s'",
u->use_name, &u->where, module_name);
continue;
}
- if (u->operator == INTRINSIC_USER)
+ if (u->foperator == INTRINSIC_USER)
{
gfc_error
("User operator '%s' referenced at %L not found in module '%s'",
@@ -3394,7 +3392,7 @@ read_module (void)
gfc_error
("Intrinsic operator '%s' referenced at %L not found in module "
- "'%s'", gfc_op2string (u->operator), &u->where, module_name);
+ "'%s'", gfc_op2string (u->foperator), &u->where, module_name);
}
gfc_check_interfaces (gfc_current_ns);
@@ -3604,11 +3602,11 @@ write_operator (gfc_user_op * uop)
static char nullstring[] = "";
const char *p = nullstring;
- if (uop->operator == NULL
+ if (uop->foperator == NULL
|| !gfc_check_access (uop->access, uop->ns->default_access))
return;
- mio_symbol_interface (&uop->name, &p, &uop->operator);
+ mio_symbol_interface (&uop->name, &p, &uop->foperator);
}
@@ -3654,7 +3652,7 @@ write_symtree (gfc_symtree * st)
static void
write_module (void)
{
- gfc_intrinsic_op i;
+ int i;
/* Write the operator interfaces. */
mio_lparen ();
@@ -3666,7 +3664,7 @@ write_module (void)
mio_interface (gfc_check_access (gfc_current_ns->operator_access[i],
gfc_current_ns->default_access)
- ? &gfc_current_ns->operator[i] : NULL);
+ ? &gfc_current_ns->foperator[i] : NULL);
}
mio_rparen ();
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 09ec255974c..ffb5bf5b47a 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -190,7 +190,7 @@ cleanup:
static match
gfc_match_omp_clauses (gfc_omp_clauses **cp, int mask)
{
- gfc_omp_clauses *c = gfc_get_omp_clauses ();
+ gfc_omp_clauses *c = (gfc_omp_clauses *) gfc_get_omp_clauses ();
locus old_loc;
bool needs_space = true, first = true;
@@ -589,7 +589,7 @@ gfc_match_omp_workshare (void)
if (gfc_match_omp_eos () != MATCH_YES)
return MATCH_ERROR;
new_st.op = EXEC_OMP_WORKSHARE;
- new_st.ext.omp_clauses = gfc_get_omp_clauses ();
+ new_st.ext.omp_clauses = (gfc_omp_clauses *) gfc_get_omp_clauses ();
return MATCH_YES;
}
@@ -981,7 +981,7 @@ resolve_omp_atomic (gfc_code *code)
if (expr2->expr_type == EXPR_OP)
{
gfc_expr *v = NULL, *e, *c;
- gfc_intrinsic_op op = expr2->value.op.operator;
+ gfc_intrinsic_op op = expr2->value.op.foperator;
gfc_intrinsic_op alt_op = INTRINSIC_NONE;
switch (op)
@@ -1044,8 +1044,8 @@ resolve_omp_atomic (gfc_code *code)
else if ((c = is_conversion (e, true)) != NULL)
q = &e->value.function.actual->expr;
else if (e->expr_type != EXPR_OP
- || (e->value.op.operator != op
- && e->value.op.operator != alt_op)
+ || (e->value.op.foperator != op
+ && e->value.op.foperator != alt_op)
|| e->rank != 0)
break;
else
@@ -1064,7 +1064,7 @@ resolve_omp_atomic (gfc_code *code)
if (p != NULL)
{
e = *p;
- switch (e->value.op.operator)
+ switch (e->value.op.foperator)
{
case INTRINSIC_MINUS:
case INTRINSIC_DIVIDE:
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 96347042bf3..f35968d7654 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -215,7 +215,7 @@ gfc_post_options (const char **pfilename)
i--;
if (i != 0)
{
- source_path = alloca (i + 1);
+ source_path = (char *)alloca (i + 1);
memcpy (source_path, canon_source_file, i);
source_path[i] = 0;
gfc_add_include_path (source_path);
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index 8861e161d6d..4f8201c4733 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -747,7 +747,7 @@ pop_state (void)
/* Try to find the given state in the state stack. */
-try
+check
gfc_find_state (gfc_compile_state state)
{
gfc_state_data *p;
@@ -1369,19 +1369,20 @@ unexpected_statement (gfc_statement st)
*/
+enum order_state
+{ ORDER_START, ORDER_USE, ORDER_IMPLICIT_NONE, ORDER_IMPLICIT,
+ ORDER_SPEC, ORDER_EXEC
+};
+
typedef struct
{
- enum
- { ORDER_START, ORDER_USE, ORDER_IMPLICIT_NONE, ORDER_IMPLICIT,
- ORDER_SPEC, ORDER_EXEC
- }
- state;
+ enum order_state state;
gfc_statement last_statement;
locus where;
}
st_state;
-static try
+static check
verify_st_order (st_state * p, gfc_statement st)
{
@@ -3115,7 +3116,7 @@ add_global_program (void)
/* Top level parser. */
-try
+check
gfc_parse_file (void)
{
int seen_program, errors_before, errors;
diff --git a/gcc/fortran/parse.h b/gcc/fortran/parse.h
index f3b12e17b0a..3cbc2df2112 100644
--- a/gcc/fortran/parse.h
+++ b/gcc/fortran/parse.h
@@ -61,7 +61,7 @@ extern gfc_state_data *gfc_state_stack;
#define gfc_current_state() (gfc_state_stack->state)
int gfc_check_do_variable (gfc_symtree *);
-try gfc_find_state (gfc_compile_state);
+check gfc_find_state (gfc_compile_state);
gfc_state_data *gfc_enclosing_unit (gfc_compile_state *);
const char *gfc_ascii_statement (gfc_statement);
match gfc_match_enum (void);
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index 1dd8626d5cf..13449e213e8 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -194,7 +194,7 @@ match_integer_constant (gfc_expr ** result, int signflag)
if (length == -1)
return MATCH_NO;
- buffer = alloca (length + 1);
+ buffer = (char *)alloca (length + 1);
memset (buffer, '\0', length + 1);
gfc_gobble_whitespace ();
@@ -279,7 +279,7 @@ match_hollerith_constant (gfc_expr ** result)
gfc_free_expr (e);
e = gfc_constant_result (BT_HOLLERITH,
gfc_default_character_kind, &gfc_current_locus);
- e->value.character.string = gfc_getmem (num+1);
+ e->value.character.string = (char *)gfc_getmem (num+1);
memcpy (e->value.character.string, buffer, num);
e->value.character.length = num;
*result = e;
@@ -396,7 +396,7 @@ match_boz_constant (gfc_expr ** result)
gfc_current_locus = old_loc;
- buffer = alloca (length + 1);
+ buffer = (char *)alloca (length + 1);
memset (buffer, '\0', length + 1);
match_digits (0, radix, buffer);
@@ -538,7 +538,7 @@ done:
gfc_current_locus = old_loc;
gfc_gobble_whitespace ();
- buffer = alloca (count + 1);
+ buffer = (char *)alloca (count + 1);
memset (buffer, '\0', count + 1);
p = buffer;
@@ -981,7 +981,7 @@ got_delim:
e->ts.kind = kind;
e->where = start_locus;
- e->value.character.string = p = gfc_getmem (length + 1);
+ e->value.character.string = p = (char *)gfc_getmem (length + 1);
e->value.character.length = length;
gfc_current_locus = start_locus;
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index d3722e61f75..4bf71b8f4da 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -274,7 +274,7 @@ resolve_formal_arglists (gfc_namespace * ns)
static void
resolve_contained_fntype (gfc_symbol * sym, gfc_namespace * ns)
{
- try t;
+ check t;
/* If this namespace is not a function, ignore it. */
if (! sym
@@ -587,12 +587,12 @@ resolve_contained_functions (gfc_namespace * ns)
/* Resolve all of the elements of a structure constructor and make sure that
the types are correct. */
-static try
+static check
resolve_structure_cons (gfc_expr * expr)
{
gfc_constructor *cons;
gfc_component *comp;
- try t;
+ check t;
symbol_attribute a;
t = SUCCESS;
@@ -819,7 +819,7 @@ resolve_assumed_size_actual (gfc_expr *e)
that look like procedure arguments are really simple variable
references. */
-static try
+static check
resolve_actual_arglist (gfc_actual_arglist * arg)
{
gfc_symbol *sym;
@@ -1147,7 +1147,7 @@ resolve_global_procedure (gfc_symbol *sym, locus *where, int sub)
if (gsym->type == GSYM_UNKNOWN)
{
- gsym->type = type;
+ gsym->type = (enum fortran_gsym) type;
gsym->where = *where;
}
@@ -1196,7 +1196,7 @@ resolve_generic_f0 (gfc_expr * expr, gfc_symbol * sym)
}
-static try
+static check
resolve_generic_f (gfc_expr * expr)
{
gfc_symbol *sym;
@@ -1296,7 +1296,7 @@ found:
}
-static try
+static check
resolve_specific_f (gfc_expr * expr)
{
gfc_symbol *sym;
@@ -1330,7 +1330,7 @@ resolve_specific_f (gfc_expr * expr)
/* Resolve a procedure call not known to be generic nor specific. */
-static try
+static check
resolve_unknown_f (gfc_expr * expr)
{
gfc_symbol *sym;
@@ -1425,13 +1425,13 @@ pure_function (gfc_expr * e, const char **name)
/* TODO: Check procedure arguments so that an INTENT(IN) isn't passed
to INTENT(OUT) or INTENT(INOUT). */
-static try
+static check
resolve_function (gfc_expr * expr)
{
gfc_actual_arglist *arg;
gfc_symbol * sym;
const char *name;
- try t;
+ check t;
int temp;
sym = NULL;
@@ -1653,7 +1653,7 @@ resolve_generic_s0 (gfc_code * c, gfc_symbol * sym)
}
-static try
+static check
resolve_generic_s (gfc_code * c)
{
gfc_symbol *sym;
@@ -1747,7 +1747,7 @@ found:
}
-static try
+static check
resolve_specific_s (gfc_code * c)
{
gfc_symbol *sym;
@@ -1782,7 +1782,7 @@ resolve_specific_s (gfc_code * c)
/* Resolve a subroutine call not known to be generic nor specific. */
-static try
+static check
resolve_unknown_s (gfc_code * c)
{
gfc_symbol *sym;
@@ -1821,10 +1821,10 @@ found:
for functions, subroutines and functions are stored differently and this
makes things awkward. */
-static try
+static check
resolve_call (gfc_code * c)
{
- try t;
+ check t;
if (c->symtree && c->symtree->n.sym
&& c->symtree->n.sym->ts.type != BT_UNKNOWN)
@@ -1913,10 +1913,10 @@ resolve_call (gfc_code * c)
if their shapes do not match. If either op1->shape or op2->shape is
NULL, return SUCCESS. */
-static try
+static check
compare_shapes (gfc_expr * op1, gfc_expr * op2)
{
- try t;
+ check t;
int i;
t = SUCCESS;
@@ -1941,16 +1941,16 @@ compare_shapes (gfc_expr * op1, gfc_expr * op2)
/* Resolve an operator expression node. This can involve replacing the
operation with a user defined function call. */
-static try
+static check
resolve_operator (gfc_expr * e)
{
gfc_expr *op1, *op2;
char msg[200];
- try t;
+ check t;
/* Resolve all subnodes-- give them types. */
- switch (e->value.op.operator)
+ switch (e->value.op.foperator)
{
default:
if (gfc_resolve_expr (e->value.op.op2) == FAILURE)
@@ -1972,7 +1972,7 @@ resolve_operator (gfc_expr * e)
op1 = e->value.op.op1;
op2 = e->value.op.op2;
- switch (e->value.op.operator)
+ switch (e->value.op.foperator)
{
case INTRINSIC_UPLUS:
case INTRINSIC_UMINUS:
@@ -1985,7 +1985,7 @@ resolve_operator (gfc_expr * e)
}
sprintf (msg, _("Operand of unary numeric operator '%s' at %%L is %s"),
- gfc_op2string (e->value.op.operator), gfc_typename (&e->ts));
+ gfc_op2string (e->value.op.foperator), gfc_typename (&e->ts));
goto bad_op;
case INTRINSIC_PLUS:
@@ -2001,7 +2001,7 @@ resolve_operator (gfc_expr * e)
sprintf (msg,
_("Operands of binary numeric operator '%s' at %%L are %s/%s"),
- gfc_op2string (e->value.op.operator), gfc_typename (&op1->ts),
+ gfc_op2string (e->value.op.foperator), gfc_typename (&op1->ts),
gfc_typename (&op2->ts));
goto bad_op;
@@ -2034,7 +2034,7 @@ resolve_operator (gfc_expr * e)
}
sprintf (msg, _("Operands of logical operator '%s' at %%L are %s/%s"),
- gfc_op2string (e->value.op.operator), gfc_typename (&op1->ts),
+ gfc_op2string (e->value.op.foperator), gfc_typename (&op1->ts),
gfc_typename (&op2->ts));
goto bad_op;
@@ -2084,12 +2084,12 @@ resolve_operator (gfc_expr * e)
if (op1->ts.type == BT_LOGICAL && op2->ts.type == BT_LOGICAL)
sprintf (msg,
_("Logicals at %%L must be compared with %s instead of %s"),
- e->value.op.operator == INTRINSIC_EQ ? ".EQV." : ".NEQV.",
- gfc_op2string (e->value.op.operator));
+ e->value.op.foperator == INTRINSIC_EQ ? ".EQV." : ".NEQV.",
+ gfc_op2string (e->value.op.foperator));
else
sprintf (msg,
_("Operands of comparison operator '%s' at %%L are %s/%s"),
- gfc_op2string (e->value.op.operator), gfc_typename (&op1->ts),
+ gfc_op2string (e->value.op.foperator), gfc_typename (&op1->ts),
gfc_typename (&op2->ts));
goto bad_op;
@@ -2116,7 +2116,7 @@ resolve_operator (gfc_expr * e)
t = SUCCESS;
- switch (e->value.op.operator)
+ switch (e->value.op.foperator)
{
case INTRINSIC_PLUS:
case INTRINSIC_MINUS:
@@ -2343,7 +2343,7 @@ compute_last_value_for_triplet (gfc_expr * start, gfc_expr * end,
/* Compare a single dimension of an array reference to the array
specification. */
-static try
+static check
check_dimension (int i, gfc_array_ref * ar, gfc_array_spec * as)
{
mpz_t last_value;
@@ -2423,7 +2423,7 @@ bound:
/* Compare an array reference with an array specification. */
-static try
+static check
compare_spec_to_ref (gfc_array_ref * ar)
{
gfc_array_spec *as;
@@ -2462,7 +2462,7 @@ compare_spec_to_ref (gfc_array_ref * ar)
/* Resolve one part of an array index. */
-try
+check
gfc_resolve_index (gfc_expr * index, int check_scalar)
{
gfc_typespec ts;
@@ -2506,7 +2506,7 @@ gfc_resolve_index (gfc_expr * index, int check_scalar)
/* Resolve a dim argument to an intrinsic function. */
-try
+check
gfc_resolve_dim_arg (gfc_expr *dim)
{
if (dim == NULL)
@@ -2609,7 +2609,7 @@ find_array_spec (gfc_expr * e)
/* Resolve an array reference. */
-static try
+static check
resolve_array_ref (gfc_array_ref * ar)
{
int i, check_scalar;
@@ -2670,7 +2670,7 @@ resolve_array_ref (gfc_array_ref * ar)
}
-static try
+static check
resolve_substring (gfc_ref * ref)
{
@@ -2739,7 +2739,7 @@ resolve_substring (gfc_ref * ref)
/* Resolve subtype references. */
-static try
+static check
resolve_ref (gfc_expr * expr)
{
int current_part_dimension, n_components, seen_part_dimension;
@@ -2930,7 +2930,7 @@ done:
/* Resolve a variable expression. */
-static try
+static check
resolve_variable (gfc_expr * e)
{
gfc_symbol *sym;
@@ -3038,10 +3038,10 @@ resolve_variable (gfc_expr * e)
with their operators, intrinsic operators are converted to function calls
for overloaded types and unresolved function references are resolved. */
-try
+check
gfc_resolve_expr (gfc_expr * e)
{
- try t;
+ check t;
if (e == NULL)
return SUCCESS;
@@ -3114,7 +3114,7 @@ gfc_resolve_expr (gfc_expr * e)
/* Resolve an expression from an iterator. They must be scalar and have
INTEGER or (optionally) REAL type. */
-static try
+static check
gfc_resolve_iterator_expr (gfc_expr * expr, bool real_ok,
const char * name_msgid)
{
@@ -3144,7 +3144,7 @@ gfc_resolve_iterator_expr (gfc_expr * expr, bool real_ok,
/* Resolve the expressions in an iterator structure. If REAL_OK is
false allow only INTEGER type iterators, otherwise allow REAL types. */
-try
+check
gfc_resolve_iterator (gfc_iterator * iter, bool real_ok)
{
@@ -3302,7 +3302,7 @@ derived_inaccessible (gfc_symbol *sym)
/* Resolve the argument of a deallocate expression. The expression must be
a pointer or a full array. */
-static try
+static check
resolve_deallocate_expr (gfc_expr * e)
{
symbol_attribute attr;
@@ -3466,7 +3466,7 @@ expr_to_initialize (gfc_expr * e)
checks to see whether the expression is OK or not. The expression must
have a trailing array reference that gives the size of the array. */
-static try
+static check
resolve_allocate_expr (gfc_expr * e, gfc_code * code)
{
int i, pointer, allocatable, dimension;
@@ -3821,7 +3821,7 @@ check_case_overlap (gfc_case * list)
Makes sure that all case expressions are scalar constants of the same
type. Return FAILURE if anything is wrong. */
-static try
+static check
validate_case_label_expr (gfc_expr * e, gfc_expr * case_expr)
{
if (e == NULL) return SUCCESS;
@@ -3890,7 +3890,7 @@ resolve_select (gfc_code * code)
int seen_logical;
int ncases;
bt type;
- try t;
+ check t;
if (code->expr == NULL)
{
@@ -4308,12 +4308,12 @@ resolve_branch (gfc_st_label * label, gfc_code * code)
/* Check whether EXPR1 has the same shape as EXPR2. */
-static try
+static check
resolve_where_shape (gfc_expr *expr1, gfc_expr *expr2)
{
mpz_t shape[GFC_MAX_DIMENSIONS];
mpz_t shape2[GFC_MAX_DIMENSIONS];
- try result = FAILURE;
+ check result = FAILURE;
int i;
/* Compare the rank. */
@@ -4414,7 +4414,7 @@ resolve_where (gfc_code *code, gfc_expr *mask)
/* Check whether the FORALL index appears in the expression or not. */
-static try
+static check
gfc_find_forall_index (gfc_expr *expr, gfc_symbol *symbol)
{
gfc_array_ref ar;
@@ -4735,7 +4735,7 @@ static void resolve_code (gfc_code *, gfc_namespace *);
void
gfc_resolve_blocks (gfc_code * b, gfc_namespace * ns)
{
- try t;
+ check t;
for (; b; b = b->block)
{
@@ -4809,7 +4809,7 @@ resolve_code (gfc_code * code, gfc_namespace * ns)
int forall_save;
code_stack frame;
gfc_alloc *a;
- try t;
+ check t;
frame.prev = cs_base;
frame.head = code;
@@ -5157,7 +5157,7 @@ resolve_values (gfc_symbol * sym)
/* Resolve an index expression. */
-static try
+static check
resolve_index_expr (gfc_expr * e)
{
if (gfc_resolve_expr (e) == FAILURE)
@@ -5174,7 +5174,7 @@ resolve_index_expr (gfc_expr * e)
/* Resolve a charlen structure. */
-static try
+static check
resolve_charlen (gfc_charlen *cl)
{
if (cl->resolved)
@@ -5296,7 +5296,7 @@ apply_default_init (gfc_symbol *sym)
/* Resolution of common features of flavors variable and procedure. */
-static try
+static check
resolve_fl_var_and_proc (gfc_symbol *sym, int mp_flag)
{
/* Constraints on deferred shape variable. */
@@ -5336,7 +5336,7 @@ resolve_fl_var_and_proc (gfc_symbol *sym, int mp_flag)
/* Resolve symbols with flavor variable. */
-static try
+static check
resolve_fl_variable (gfc_symbol *sym, int mp_flag)
{
int flag;
@@ -5507,7 +5507,7 @@ resolve_fl_variable (gfc_symbol *sym, int mp_flag)
/* Resolve a procedure. */
-static try
+static check
resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
{
gfc_formal_arglist *arg;
@@ -5621,7 +5621,7 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
/* Resolve the components of a derived type. */
-static try
+static check
resolve_fl_derived (gfc_symbol *sym)
{
gfc_component *c;
@@ -5714,7 +5714,7 @@ resolve_fl_derived (gfc_symbol *sym)
}
-static try
+static check
resolve_fl_namelist (gfc_symbol *sym)
{
gfc_namelist *nl;
@@ -6064,7 +6064,7 @@ values;
/* Advance the values structure to point to the next value in the data list. */
-static try
+static check
next_data_value (void)
{
while (values.left == 0)
@@ -6080,13 +6080,13 @@ next_data_value (void)
}
-static try
+static check
check_data_variable (gfc_data_variable * var, locus * where)
{
gfc_expr *e;
mpz_t size;
mpz_t offset;
- try t;
+ check t;
ar_type mark = AR_UNKNOWN;
int i;
mpz_t section_index[GFC_MAX_DIMENSIONS];
@@ -6234,11 +6234,11 @@ check_data_variable (gfc_data_variable * var, locus * where)
}
-static try traverse_data_var (gfc_data_variable *, locus *);
+static check traverse_data_var (gfc_data_variable *, locus *);
/* Iterate over a list of elements in a DATA statement. */
-static try
+static check
traverse_data_list (gfc_data_variable * var, locus * where)
{
mpz_t trip;
@@ -6289,10 +6289,10 @@ traverse_data_list (gfc_data_variable * var, locus * where)
/* Type resolve variables in the variable list of a DATA statement. */
-static try
+static check
traverse_data_var (gfc_data_variable * var, locus * where)
{
- try t;
+ check t;
for (; var; var = var->next)
{
@@ -6313,7 +6313,7 @@ traverse_data_var (gfc_data_variable * var, locus * where)
This is separate from the assignment checking because data lists should
only be resolved once. */
-static try
+static check
resolve_data_variables (gfc_data_variable * d)
{
for (; d; d = d->next)
@@ -6515,7 +6515,7 @@ sequence_type (gfc_typespec ts)
/* Resolve derived type EQUIVALENCE object. */
-static try
+static check
resolve_equivalence_derived (gfc_symbol *derived, gfc_symbol *sym, gfc_expr *e)
{
gfc_symbol *d;
diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c
index 9d0ba2a492b..63146d42dcd 100644
--- a/gcc/fortran/scanner.c
+++ b/gcc/fortran/scanner.c
@@ -132,19 +132,19 @@ gfc_add_include_path (const char *path)
dir = include_dirs;
if (!dir)
{
- dir = include_dirs = gfc_getmem (sizeof (gfc_directorylist));
+ dir = include_dirs = (gfc_directorylist *)gfc_getmem (sizeof (gfc_directorylist));
}
else
{
while (dir->next)
dir = dir->next;
- dir->next = gfc_getmem (sizeof (gfc_directorylist));
+ dir->next = (gfc_directorylist *)gfc_getmem (sizeof (gfc_directorylist));
dir = dir->next;
}
dir->next = NULL;
- dir->path = gfc_getmem (strlen (p) + 2);
+ dir->path = (char *)gfc_getmem (strlen (p) + 2);
strcpy (dir->path, p);
strcat (dir->path, "/"); /* make '/' last character */
}
@@ -983,7 +983,7 @@ load_line (FILE * input, char **pbuf, int *pbuflen)
else
buflen = GFC_MAX_LINE;
- *pbuf = gfc_getmem (buflen + 1);
+ *pbuf = (char *)gfc_getmem (buflen + 1);
}
i = 0;
@@ -1084,7 +1084,7 @@ load_line (FILE * input, char **pbuf, int *pbuflen)
/* Reallocate line buffer to double size to hold the
overlong line. */
buflen = buflen * 2;
- *pbuf = xrealloc (*pbuf, buflen + 1);
+ *pbuf = (char *)xrealloc (*pbuf, buflen + 1);
buffer = (*pbuf)+i;
}
}
@@ -1130,9 +1130,9 @@ get_file (const char *name, enum lc_reason reason ATTRIBUTE_UNUSED)
{
gfc_file *f;
- f = gfc_getmem (sizeof (gfc_file));
+ f = (gfc_file *)gfc_getmem (sizeof (gfc_file));
- f->filename = gfc_getmem (strlen (name) + 1);
+ f->filename = (char *)gfc_getmem (strlen (name) + 1);
strcpy (f->filename, name);
f->next = file_head;
@@ -1214,7 +1214,7 @@ preprocessor_line (char *c)
if (unescape)
{
char *s = filename;
- char *d = gfc_getmem (c - filename - unescape);
+ char *d = (char *)gfc_getmem (c - filename - unescape);
filename = d;
while (*s)
@@ -1275,7 +1275,7 @@ preprocessor_line (char *c)
if (strcmp (current_file->filename, filename) != 0)
{
gfc_free (current_file->filename);
- current_file->filename = gfc_getmem (strlen (filename) + 1);
+ current_file->filename = (char *)gfc_getmem (strlen (filename) + 1);
strcpy (current_file->filename, filename);
}
@@ -1292,7 +1292,7 @@ preprocessor_line (char *c)
}
-static try load_file (const char *, bool);
+static check load_file (const char *, bool);
/* include_line()-- Checks a line buffer to see if it is an include
line. If so, we call load_file() recursively to load the included
@@ -1367,7 +1367,7 @@ include_line (char *line)
/* Load a file into memory by calling load_line until the file ends. */
-static try
+static check
load_file (const char *filename, bool initial)
{
char *line;
@@ -1455,7 +1455,7 @@ load_file (const char *filename, bool initial)
/* Add line. */
- b = gfc_getmem (gfc_linebuf_header_size + len + 1);
+ b = (gfc_linebuf *)gfc_getmem (gfc_linebuf_header_size + len + 1);
#ifdef USE_MAPPED_LOCATION
b->location
@@ -1493,10 +1493,10 @@ load_file (const char *filename, bool initial)
it tries to determine the source form from the filename, defaulting
to free form. */
-try
+check
gfc_new_file (void)
{
- try result;
+ check result;
result = load_file (gfc_source_file, true);
@@ -1545,7 +1545,7 @@ unescape_filename (const char *ptr)
/* Undo effects of cpp_quote_string. */
s = ptr;
- d = gfc_getmem (p + 1 - ptr - unescape);
+ d = (char *)gfc_getmem (p + 1 - ptr - unescape);
ret = d;
while (s != p)
@@ -1616,7 +1616,7 @@ gfc_read_orig_filename (const char *filename, const char **canon_source_file)
if (! IS_ABSOLUTE_PATH (filename))
{
- char *p = gfc_getmem (len + strlen (filename));
+ char *p = (char *)gfc_getmem (len + strlen (filename));
memcpy (p, dirname, len - 2);
p[len - 2] = '/';
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index 1b04e6e4a91..8a945de6354 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -251,7 +251,7 @@ gfc_simplify_achar (gfc_expr * e)
result = gfc_constant_result (BT_CHARACTER, gfc_default_character_kind,
&e->where);
- result->value.character.string = gfc_getmem (2);
+ result->value.character.string = (char *)gfc_getmem (2);
result->value.character.length = 1;
result->value.character.string[0] = ascii_table[index];
@@ -319,7 +319,7 @@ gfc_simplify_adjustl (gfc_expr * e)
result = gfc_constant_result (BT_CHARACTER, e->ts.kind, &e->where);
result->value.character.length = len;
- result->value.character.string = gfc_getmem (len + 1);
+ result->value.character.string = (char *)gfc_getmem (len + 1);
for (count = 0, i = 0; i < len; ++i)
{
@@ -361,7 +361,7 @@ gfc_simplify_adjustr (gfc_expr * e)
result = gfc_constant_result (BT_CHARACTER, e->ts.kind, &e->where);
result->value.character.length = len;
- result->value.character.string = gfc_getmem (len + 1);
+ result->value.character.string = (char *)gfc_getmem (len + 1);
for (count = 0, i = len - 1; i >= 0; --i)
{
@@ -694,7 +694,7 @@ gfc_simplify_char (gfc_expr * e, gfc_expr * k)
result = gfc_constant_result (BT_CHARACTER, kind, &e->where);
result->value.character.length = 1;
- result->value.character.string = gfc_getmem (2);
+ result->value.character.string = (char *)gfc_getmem (2);
result->value.character.string[0] = c;
result->value.character.string[1] = '\0'; /* For debugger */
@@ -1324,7 +1324,7 @@ gfc_simplify_ibits (gfc_expr * x, gfc_expr * y, gfc_expr * z)
result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where);
- bits = gfc_getmem (bitsize * sizeof (int));
+ bits = (int *)gfc_getmem (bitsize * sizeof (int));
for (i = 0; i < bitsize; i++)
bits[i] = 0;
@@ -1781,7 +1781,7 @@ gfc_simplify_ishft (gfc_expr * e, gfc_expr * s)
return range_check (result, "ISHFT");
}
- bits = gfc_getmem (isize * sizeof (int));
+ bits = (int *)gfc_getmem (isize * sizeof (int));
for (i = 0; i < isize; i++)
bits[i] = mpz_tstbit (e->value.integer, i);
@@ -1870,7 +1870,7 @@ gfc_simplify_ishftc (gfc_expr * e, gfc_expr * s, gfc_expr * sz)
return result;
}
- bits = gfc_getmem (isize * sizeof (int));
+ bits = (int *)gfc_getmem (isize * sizeof (int));
for (i = 0; i < isize; i++)
bits[i] = mpz_tstbit (e->value.integer, i);
@@ -2855,14 +2855,14 @@ gfc_simplify_repeat (gfc_expr * e, gfc_expr * n)
if (ncopies == 0)
{
- result->value.character.string = gfc_getmem (1);
+ result->value.character.string = (char *)gfc_getmem (1);
result->value.character.length = 0;
result->value.character.string[0] = '\0';
return result;
}
result->value.character.length = nlen;
- result->value.character.string = gfc_getmem (nlen + 1);
+ result->value.character.string = (char *)gfc_getmem (nlen + 1);
for (i = 0; i < ncopies; i++)
for (j = 0; j < len; j++)
@@ -3453,7 +3453,7 @@ gfc_simplify_shape (gfc_expr * source)
gfc_expr *result, *e, *f;
gfc_array_ref *ar;
int n;
- try t;
+ check t;
if (source->rank == 0 || source->expr_type != EXPR_VARIABLE)
return NULL;
@@ -3934,7 +3934,7 @@ gfc_simplify_trim (gfc_expr * e)
lentrim = len - count;
result->value.character.length = lentrim;
- result->value.character.string = gfc_getmem (lentrim + 1);
+ result->value.character.string = (char *)gfc_getmem (lentrim + 1);
for (i = 0; i < lentrim; i++)
result->value.character.string[i] = e->value.character.string[i];
diff --git a/gcc/fortran/st.c b/gcc/fortran/st.c
index 24c69da8f3f..c93ab81c595 100644
--- a/gcc/fortran/st.c
+++ b/gcc/fortran/st.c
@@ -50,7 +50,7 @@ gfc_get_code (void)
{
gfc_code *c;
- c = gfc_getmem (sizeof (gfc_code));
+ c = (gfc_code *)gfc_getmem (sizeof (gfc_code));
c->loc = gfc_current_locus;
return c;
}
@@ -60,7 +60,7 @@ gfc_get_code (void)
its tail, returning a pointer to the new tail. */
gfc_code *
-gfc_append_code (gfc_code * tail, gfc_code * new)
+gfc_append_code (gfc_code * tail, gfc_code * fresh)
{
if (tail != NULL)
@@ -68,13 +68,13 @@ gfc_append_code (gfc_code * tail, gfc_code * new)
while (tail->next != NULL)
tail = tail->next;
- tail->next = new;
+ tail->next = fresh;
}
- while (new->next != NULL)
- new = new->next;
+ while (fresh->next != NULL)
+ fresh = fresh->next;
- return new;
+ return fresh;
}
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index cd38ef8dae4..67b74033ec3 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -137,7 +137,7 @@ gfc_clear_new_implicit (void)
/* Prepare for a new implicit range. Sets flags in new_flag[]. */
-try
+check
gfc_add_new_implicit_range (int c1, int c2)
{
int i;
@@ -164,7 +164,7 @@ gfc_add_new_implicit_range (int c1, int c2)
/* Add a matched implicit range for gfc_set_implicit(). Check if merging
the new implicit types back into the existing types will work. */
-try
+check
gfc_merge_new_implicit (gfc_typespec * ts)
{
int i;
@@ -216,7 +216,7 @@ gfc_get_default_type (gfc_symbol * sym, gfc_namespace * ns)
letter of its name. Fails if the letter in question has no default
type. */
-try
+check
gfc_set_default_type (gfc_symbol * sym, int error_flag, gfc_namespace * ns)
{
gfc_typespec *ts;
@@ -260,15 +260,15 @@ gfc_set_default_type (gfc_symbol * sym, int error_flag, gfc_namespace * ns)
goto conflict_std;\
}
-static try
+static check
check_conflict (symbol_attribute * attr, const char * name, locus * where)
{
static const char *dummy = "DUMMY", *save = "SAVE", *pointer = "POINTER",
*target = "TARGET", *external = "EXTERNAL", *intent = "INTENT",
*intrinsic = "INTRINSIC", *allocatable = "ALLOCATABLE",
- *elemental = "ELEMENTAL", *private = "PRIVATE", *recursive = "RECURSIVE",
+ *elemental = "ELEMENTAL", *priv = "PRIVATE", *recursive = "RECURSIVE",
*in_common = "COMMON", *result = "RESULT", *in_namelist = "NAMELIST",
- *public = "PUBLIC", *optional = "OPTIONAL", *entry = "ENTRY",
+ *pub = "PUBLIC", *optional = "OPTIONAL", *entry = "ENTRY",
*function = "FUNCTION", *subroutine = "SUBROUTINE",
*dimension = "DIMENSION", *in_equivalence = "EQUIVALENCE",
*use_assoc = "USE ASSOCIATED", *cray_pointer = "CRAY POINTER",
@@ -302,9 +302,9 @@ check_conflict (symbol_attribute * attr, const char * name, locus * where)
if (attr->optional)
a1 = optional;
if (attr->access == ACCESS_PRIVATE)
- a1 = private;
+ a1 = priv;
if (attr->access == ACCESS_PUBLIC)
- a1 = public;
+ a1 = pub;
if (attr->intent != INTENT_UNKNOWN)
a1 = intent;
@@ -625,7 +625,7 @@ duplicate_attr (const char *attr, locus * where)
/* Called from decl.c (attr_decl1) to check attributes, when declared separately. */
-try
+check
gfc_add_attribute (symbol_attribute * attr, locus * where,
unsigned int attr_intent)
{
@@ -637,7 +637,7 @@ gfc_add_attribute (symbol_attribute * attr, locus * where,
return check_conflict (attr, NULL, where);
}
-try
+check
gfc_add_allocatable (symbol_attribute * attr, locus * where)
{
@@ -655,7 +655,7 @@ gfc_add_allocatable (symbol_attribute * attr, locus * where)
}
-try
+check
gfc_add_dimension (symbol_attribute * attr, const char *name, locus * where)
{
@@ -673,7 +673,7 @@ gfc_add_dimension (symbol_attribute * attr, const char *name, locus * where)
}
-try
+check
gfc_add_external (symbol_attribute * attr, locus * where)
{
@@ -692,7 +692,7 @@ gfc_add_external (symbol_attribute * attr, locus * where)
}
-try
+check
gfc_add_intrinsic (symbol_attribute * attr, locus * where)
{
@@ -711,7 +711,7 @@ gfc_add_intrinsic (symbol_attribute * attr, locus * where)
}
-try
+check
gfc_add_optional (symbol_attribute * attr, locus * where)
{
@@ -729,7 +729,7 @@ gfc_add_optional (symbol_attribute * attr, locus * where)
}
-try
+check
gfc_add_pointer (symbol_attribute * attr, locus * where)
{
@@ -741,7 +741,7 @@ gfc_add_pointer (symbol_attribute * attr, locus * where)
}
-try
+check
gfc_add_cray_pointer (symbol_attribute * attr, locus * where)
{
@@ -753,7 +753,7 @@ gfc_add_cray_pointer (symbol_attribute * attr, locus * where)
}
-try
+check
gfc_add_cray_pointee (symbol_attribute * attr, locus * where)
{
@@ -772,7 +772,7 @@ gfc_add_cray_pointee (symbol_attribute * attr, locus * where)
}
-try
+check
gfc_add_result (symbol_attribute * attr, const char *name, locus * where)
{
@@ -784,7 +784,7 @@ gfc_add_result (symbol_attribute * attr, const char *name, locus * where)
}
-try
+check
gfc_add_save (symbol_attribute * attr, const char *name, locus * where)
{
@@ -813,7 +813,7 @@ gfc_add_save (symbol_attribute * attr, const char *name, locus * where)
}
-try
+check
gfc_add_threadprivate (symbol_attribute * attr, const char *name, locus * where)
{
if (check_used (attr, name, where))
@@ -830,7 +830,7 @@ gfc_add_threadprivate (symbol_attribute * attr, const char *name, locus * where)
}
-try
+check
gfc_add_target (symbol_attribute * attr, locus * where)
{
@@ -848,7 +848,7 @@ gfc_add_target (symbol_attribute * attr, locus * where)
}
-try
+check
gfc_add_dummy (symbol_attribute * attr, const char *name, locus * where)
{
@@ -861,7 +861,7 @@ gfc_add_dummy (symbol_attribute * attr, const char *name, locus * where)
}
-try
+check
gfc_add_in_common (symbol_attribute * attr, const char *name, locus * where)
{
@@ -879,7 +879,7 @@ gfc_add_in_common (symbol_attribute * attr, const char *name, locus * where)
return gfc_add_flavor (attr, FL_VARIABLE, name, where);
}
-try
+check
gfc_add_in_equivalence (symbol_attribute * attr, const char *name, locus * where)
{
@@ -895,7 +895,7 @@ gfc_add_in_equivalence (symbol_attribute * attr, const char *name, locus * where
}
-try
+check
gfc_add_data (symbol_attribute *attr, const char *name, locus *where)
{
@@ -907,7 +907,7 @@ gfc_add_data (symbol_attribute *attr, const char *name, locus *where)
}
-try
+check
gfc_add_in_namelist (symbol_attribute * attr, const char *name,
locus * where)
{
@@ -917,7 +917,7 @@ gfc_add_in_namelist (symbol_attribute * attr, const char *name,
}
-try
+check
gfc_add_sequence (symbol_attribute * attr, const char *name, locus * where)
{
@@ -929,7 +929,7 @@ gfc_add_sequence (symbol_attribute * attr, const char *name, locus * where)
}
-try
+check
gfc_add_elemental (symbol_attribute * attr, locus * where)
{
@@ -941,7 +941,7 @@ gfc_add_elemental (symbol_attribute * attr, locus * where)
}
-try
+check
gfc_add_pure (symbol_attribute * attr, locus * where)
{
@@ -953,7 +953,7 @@ gfc_add_pure (symbol_attribute * attr, locus * where)
}
-try
+check
gfc_add_recursive (symbol_attribute * attr, locus * where)
{
@@ -965,7 +965,7 @@ gfc_add_recursive (symbol_attribute * attr, locus * where)
}
-try
+check
gfc_add_entry (symbol_attribute * attr, const char *name, locus * where)
{
@@ -983,7 +983,7 @@ gfc_add_entry (symbol_attribute * attr, const char *name, locus * where)
}
-try
+check
gfc_add_function (symbol_attribute * attr, const char *name, locus * where)
{
@@ -996,7 +996,7 @@ gfc_add_function (symbol_attribute * attr, const char *name, locus * where)
}
-try
+check
gfc_add_subroutine (symbol_attribute * attr, const char *name, locus * where)
{
@@ -1009,7 +1009,7 @@ gfc_add_subroutine (symbol_attribute * attr, const char *name, locus * where)
}
-try
+check
gfc_add_generic (symbol_attribute * attr, const char *name, locus * where)
{
@@ -1025,7 +1025,7 @@ gfc_add_generic (symbol_attribute * attr, const char *name, locus * where)
/* Flavors are special because some flavors are not what Fortran
considers attributes and can be reaffirmed multiple times. */
-try
+check
gfc_add_flavor (symbol_attribute * attr, sym_flavor f, const char *name,
locus * where)
{
@@ -1056,7 +1056,7 @@ gfc_add_flavor (symbol_attribute * attr, sym_flavor f, const char *name,
}
-try
+check
gfc_add_procedure (symbol_attribute * attr, procedure_type t,
const char *name, locus * where)
{
@@ -1092,7 +1092,7 @@ gfc_add_procedure (symbol_attribute * attr, procedure_type t,
}
-try
+check
gfc_add_intent (symbol_attribute * attr, sym_intent intent, locus * where)
{
@@ -1118,7 +1118,7 @@ gfc_add_intent (symbol_attribute * attr, sym_intent intent, locus * where)
/* No checks for use-association in public and private statements. */
-try
+check
gfc_add_access (symbol_attribute * attr, gfc_access access,
const char *name, locus * where)
{
@@ -1137,7 +1137,7 @@ gfc_add_access (symbol_attribute * attr, gfc_access access,
}
-try
+check
gfc_add_explicit_interface (gfc_symbol * sym, ifsrc source,
gfc_formal_arglist * formal, locus * where)
{
@@ -1165,7 +1165,7 @@ gfc_add_explicit_interface (gfc_symbol * sym, ifsrc source,
/* Add a type to a symbol. */
-try
+check
gfc_add_type (gfc_symbol * sym, gfc_typespec * ts, locus * where)
{
sym_flavor flavor;
@@ -1221,7 +1221,7 @@ gfc_clear_attr (symbol_attribute * attr)
/* Check for missing attributes in the new symbol. Currently does
nothing, but it's not clear that it is unnecessary yet. */
-try
+check
gfc_missing_attr (symbol_attribute * attr ATTRIBUTE_UNUSED,
locus * where ATTRIBUTE_UNUSED)
{
@@ -1234,7 +1234,7 @@ gfc_missing_attr (symbol_attribute * attr ATTRIBUTE_UNUSED,
attributes have a lot of side-effects but cannot be present given
where we are called from, so we ignore some bits. */
-try
+check
gfc_copy_attr (symbol_attribute * dest, symbol_attribute * src, locus * where)
{
@@ -1329,7 +1329,7 @@ fail:
already present. On success, the component pointer is modified to
point to the additional component structure. */
-try
+check
gfc_add_component (gfc_symbol * sym, const char *name, gfc_component ** component)
{
gfc_component *p, *tail;
@@ -1612,7 +1612,7 @@ gfc_get_st_label (int labelno)
lp = lp->right;
}
- lp = gfc_getmem (sizeof (gfc_st_label));
+ lp = (gfc_st_label *)gfc_getmem (sizeof (gfc_st_label));
lp->value = labelno;
lp->defined = ST_LABEL_UNKNOWN;
@@ -1676,12 +1676,12 @@ gfc_define_st_label (gfc_st_label * lp, gfc_sl_type type, locus * label_locus)
updating the unknown state. Returns FAILURE if something goes
wrong. */
-try
+check
gfc_reference_st_label (gfc_st_label * lp, gfc_sl_type type)
{
gfc_sl_type label_type;
int labelno;
- try rc;
+ check rc;
if (lp == NULL)
return SUCCESS;
@@ -1746,10 +1746,10 @@ gfc_get_namespace (gfc_namespace * parent, int parent_types)
{
gfc_namespace *ns;
gfc_typespec *ts;
- gfc_intrinsic_op in;
+ int in;
int i;
- ns = gfc_getmem (sizeof (gfc_namespace));
+ ns = (gfc_namespace *)gfc_getmem (sizeof (gfc_namespace));
ns->sym_root = NULL;
ns->uop_root = NULL;
ns->default_access = ACCESS_UNKNOWN;
@@ -1816,7 +1816,7 @@ gfc_new_symtree (gfc_symtree ** root, const char *name)
{
gfc_symtree *st;
- st = gfc_getmem (sizeof (gfc_symtree));
+ st = (gfc_symtree *)gfc_getmem (sizeof (gfc_symtree));
st->name = gfc_get_string (name);
gfc_insert_bbt (root, st, compare_symtree);
@@ -1877,7 +1877,7 @@ gfc_get_uop (const char *name)
st = gfc_new_symtree (&gfc_current_ns->uop_root, name);
- uop = st->n.uop = gfc_getmem (sizeof (gfc_user_op));
+ uop = st->n.uop = (gfc_user_op *)gfc_getmem (sizeof (gfc_user_op));
uop->name = gfc_get_string (name);
uop->access = ACCESS_UNKNOWN;
uop->ns = gfc_current_ns;
@@ -1936,7 +1936,7 @@ gfc_new_symbol (const char *name, gfc_namespace * ns)
{
gfc_symbol *p;
- p = gfc_getmem (sizeof (gfc_symbol));
+ p = (gfc_symbol *)gfc_getmem (sizeof (gfc_symbol));
gfc_clear_ts (&p->ts);
gfc_clear_attr (&p->attr);
@@ -2033,10 +2033,10 @@ static void
save_symbol_data (gfc_symbol * sym)
{
- if (sym->new || sym->old_symbol != NULL)
+ if (sym->fresh || sym->old_symbol != NULL)
return;
- sym->old_symbol = gfc_getmem (sizeof (gfc_symbol));
+ sym->old_symbol = (gfc_symbol *)gfc_getmem (sizeof (gfc_symbol));
*(sym->old_symbol) = *sym;
sym->tlink = changed_syms;
@@ -2077,7 +2077,7 @@ gfc_get_sym_tree (const char *name, gfc_namespace * ns, gfc_symtree ** result)
p->old_symbol = NULL;
p->tlink = changed_syms;
p->mark = 1;
- p->new = 1;
+ p->fresh = 1;
changed_syms = p;
st = gfc_new_symtree (&ns->sym_root, name);
@@ -2222,7 +2222,7 @@ gfc_undo_symbols (void)
{
q = p->tlink;
- if (p->new)
+ if (p->fresh)
{
/* Symbol was new. */
delete_symtree (&p->ns->sym_root, p->name);
@@ -2331,7 +2331,7 @@ gfc_commit_symbols (void)
q = p->tlink;
p->tlink = NULL;
p->mark = 0;
- p->new = 0;
+ p->fresh = 0;
free_old_symbol (p);
}
@@ -2361,7 +2361,7 @@ gfc_commit_symbol (gfc_symbol * sym)
sym->tlink = NULL;
sym->mark = 0;
- sym->new = 0;
+ sym->fresh = 0;
free_old_symbol (sym);
}
@@ -2396,7 +2396,7 @@ free_uop_tree (gfc_symtree * uop_tree)
free_uop_tree (uop_tree->left);
free_uop_tree (uop_tree->right);
- gfc_free_interface (uop_tree->n.uop->operator);
+ gfc_free_interface (uop_tree->n.uop->foperator);
gfc_free (uop_tree->n.uop);
gfc_free (uop_tree);
@@ -2491,7 +2491,7 @@ gfc_free_namespace (gfc_namespace * ns)
{
gfc_charlen *cl, *cl2;
gfc_namespace *p, *q;
- gfc_intrinsic_op i;
+ int i;
if (ns == NULL)
return;
@@ -2522,7 +2522,7 @@ gfc_free_namespace (gfc_namespace * ns)
gfc_free_dt_list (ns->derived_types);
for (i = GFC_INTRINSIC_BEGIN; i != GFC_INTRINSIC_END; i++)
- gfc_free_interface (ns->operator[i]);
+ gfc_free_interface (ns->foperator[i]);
gfc_free_data (ns->data);
p = ns->contained;
@@ -2724,7 +2724,7 @@ gfc_get_gsymbol (const char *name)
if (s != NULL)
return s;
- s = gfc_getmem (sizeof (gfc_gsymbol));
+ s = (gfc_gsymbol *)gfc_getmem (sizeof (gfc_gsymbol));
s->type = GSYM_UNKNOWN;
s->name = gfc_get_string (name);
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c
index c1c96619715..6d670dc44b4 100644
--- a/gcc/fortran/trans-const.c
+++ b/gcc/fortran/trans-const.c
@@ -111,7 +111,7 @@ gfc_conv_string_init (tree length, gfc_expr * expr)
if (len > slen)
{
- s = gfc_getmem (len);
+ s = (char *)gfc_getmem (len);
memcpy (s, expr->value.character.string, slen);
memset (&s[slen], ' ', len - slen);
str = gfc_build_string_const (len, s);
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 3e7844ed445..dc7dd0e9b06 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -968,7 +968,7 @@ gfc_conv_expr_op (gfc_se * se, gfc_expr * expr)
checkstring = 0;
lop = 0;
- switch (expr->value.op.operator)
+ switch (expr->value.op.foperator)
{
case INTRINSIC_UPLUS:
case INTRINSIC_PARENTHESES:
@@ -1227,8 +1227,8 @@ gfc_free_interface_mapping (gfc_interface_mapping * mapping)
for (sym = mapping->syms; sym; sym = nextsym)
{
nextsym = sym->next;
- gfc_free_symbol (sym->new->n.sym);
- gfc_free (sym->new);
+ gfc_free_symbol (sym->fresh->n.sym);
+ gfc_free (sym->fresh);
gfc_free (sym);
}
for (cl = mapping->charlens; cl; cl = nextcl)
@@ -1247,14 +1247,14 @@ static gfc_charlen *
gfc_get_interface_mapping_charlen (gfc_interface_mapping * mapping,
gfc_charlen * cl)
{
- gfc_charlen *new;
+ gfc_charlen *fresh;
- new = gfc_get_charlen ();
- new->next = mapping->charlens;
- new->length = gfc_copy_expr (cl->length);
+ fresh = gfc_get_charlen ();
+ fresh->next = mapping->charlens;
+ fresh->length = gfc_copy_expr (cl->length);
- mapping->charlens = new;
- return new;
+ mapping->charlens = fresh;
+ return fresh;
}
@@ -1351,10 +1351,10 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping,
gcc_assert (new_symtree == root);
/* Create a dummy->actual mapping. */
- sm = gfc_getmem (sizeof (*sm));
+ sm = (gfc_interface_sym_mapping *)gfc_getmem (sizeof (*sm));
sm->next = mapping->syms;
sm->old = sym;
- sm->new = new_symtree;
+ sm->fresh = new_symtree;
mapping->syms = sm;
/* Stabilize the argument's value. */
@@ -1438,10 +1438,10 @@ gfc_finish_interface_mapping (gfc_interface_mapping * mapping,
gfc_se se;
for (sym = mapping->syms; sym; sym = sym->next)
- if (sym->new->n.sym->ts.type == BT_CHARACTER
- && !sym->new->n.sym->ts.cl->backend_decl)
+ if (sym->fresh->n.sym->ts.type == BT_CHARACTER
+ && !sym->fresh->n.sym->ts.cl->backend_decl)
{
- expr = sym->new->n.sym->ts.cl->length;
+ expr = sym->fresh->n.sym->ts.cl->length;
gfc_apply_interface_mapping_to_expr (mapping, expr);
gfc_init_se (&se, NULL);
gfc_conv_expr (&se, expr);
@@ -1450,7 +1450,7 @@ gfc_finish_interface_mapping (gfc_interface_mapping * mapping,
gfc_add_block_to_block (pre, &se.pre);
gfc_add_block_to_block (post, &se.post);
- sym->new->n.sym->ts.cl->backend_decl = se.expr;
+ sym->fresh->n.sym->ts.cl->backend_decl = se.expr;
}
}
@@ -1537,7 +1537,7 @@ gfc_apply_interface_mapping_to_expr (gfc_interface_mapping * mapping,
if (expr->symtree)
for (sym = mapping->syms; sym; sym = sym->next)
if (sym->old == expr->symtree->n.sym)
- expr->symtree = sym->new;
+ expr->symtree = sym->fresh;
/* ...and to subexpressions in expr->value. */
switch (expr->expr_type)
@@ -1556,7 +1556,7 @@ gfc_apply_interface_mapping_to_expr (gfc_interface_mapping * mapping,
case EXPR_FUNCTION:
for (sym = mapping->syms; sym; sym = sym->next)
if (sym->old == expr->value.function.esym)
- expr->value.function.esym = sym->new->n.sym;
+ expr->value.function.esym = sym->fresh->n.sym;
for (actual = expr->value.function.actual; actual; actual = actual->next)
gfc_apply_interface_mapping_to_expr (mapping, actual->expr);
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 53c61c696d9..beb408182ef 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -92,7 +92,7 @@ gfc_intrinsic_map_t;
except for atan2. */
#define DEFINE_MATH_BUILTIN(ID, NAME, ARGTYPE) \
{ GFC_ISYM_ ## ID, BUILT_IN_ ## ID ## F, BUILT_IN_ ## ID, \
- BUILT_IN_ ## ID ## L, BUILT_IN_ ## ID ## L, 0, 0, 0, 0, true, \
+ BUILT_IN_ ## ID ## L, BUILT_IN_ ## ID ## L, BUILT_IN_NONE, BUILT_IN_NONE, BUILT_IN_NONE, BUILT_IN_NONE, true, \
false, true, NAME, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, \
NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE},
@@ -437,7 +437,7 @@ gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum tree_code op)
/* Convert to an integer using the specified rounding mode. */
static void
-gfc_conv_intrinsic_int (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_int (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree type;
tree arg;
@@ -1297,7 +1297,7 @@ gfc_conv_intrinsic_ttynam (gfc_se * se, gfc_expr * expr)
/* TODO: Mismatching types can occur when specific names are used.
These should be handled during resolution. */
static void
-gfc_conv_intrinsic_minmax (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_minmax (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree limit;
tree tmp;
@@ -1411,7 +1411,7 @@ gfc_conv_intrinsic_funcall (gfc_se * se, gfc_expr * expr)
}
*/
static void
-gfc_conv_intrinsic_anyall (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_anyall (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree resvar;
stmtblock_t block;
@@ -1566,7 +1566,7 @@ gfc_conv_intrinsic_count (gfc_se * se, gfc_expr * expr)
/* Inline implementation of the sum and product intrinsics. */
static void
-gfc_conv_intrinsic_arith (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_arith (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree resvar;
tree type;
@@ -1976,7 +1976,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, int op)
}
static void
-gfc_conv_intrinsic_minmaxval (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_minmaxval (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree limit;
tree type;
@@ -2143,7 +2143,7 @@ gfc_conv_intrinsic_btest (gfc_se * se, gfc_expr * expr)
/* Generate code to perform the specified operation. */
static void
-gfc_conv_intrinsic_bitop (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_bitop (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree arg;
tree arg2;
@@ -2177,7 +2177,7 @@ gfc_conv_intrinsic_singlebitop (gfc_se * se, gfc_expr * expr, int set)
tree arg2;
tree type;
tree tmp;
- int op;
+ enum tree_code op;
arg = gfc_conv_intrinsic_function_args (se, expr);
arg2 = TREE_VALUE (TREE_CHAIN (arg));
@@ -2574,8 +2574,8 @@ gfc_conv_intrinsic_size (gfc_se * se, gfc_expr * expr)
/* Intrinsic string comparison functions. */
- static void
-gfc_conv_intrinsic_strcmp (gfc_se * se, gfc_expr * expr, int op)
+static void
+gfc_conv_intrinsic_strcmp (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree type;
tree args;
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index 4fb19836603..5d9e2371c56 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -39,6 +39,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
enum ioparam_type
{
+ IOPARM_ptype_none,
IOPARM_ptype_common,
IOPARM_ptype_open,
IOPARM_ptype_close,
@@ -50,6 +51,7 @@ enum ioparam_type
enum iofield_type
{
+ IOPARM_type_none,
IOPARM_type_int4,
IOPARM_type_intio,
IOPARM_type_pint4,
@@ -105,7 +107,7 @@ static GTY(()) gfc_st_parameter_field st_parameter_field[] =
{ #name, mask, IOPARM_ptype_##param_type, IOPARM_type_##type, NULL, NULL },
#include "ioparm.def"
#undef IOPARM
- { NULL, 0, 0, 0, NULL, NULL }
+ { NULL, 0, IOPARM_ptype_none, IOPARM_type_none, NULL, NULL }
};
/* Library I/O subroutines */
@@ -151,7 +153,7 @@ static stmtblock_t *dt_post_end_block;
static void
gfc_build_st_parameter (enum ioparam_type ptype, tree *types)
{
- enum iofield type;
+ int type;
gfc_st_parameter_field *p;
char name[64];
size_t len;
@@ -203,6 +205,7 @@ gfc_build_st_parameter (enum ioparam_type ptype, tree *types)
get_identifier (p->name),
st_parameter[IOPARM_ptype_common].type);
break;
+ case IOPARM_type_none:
case IOPARM_type_num:
gcc_unreachable ();
}
@@ -221,7 +224,7 @@ gfc_build_io_library_fndecls (void)
tree parm_type, dt_parm_type;
tree gfc_c_int_type_node;
HOST_WIDE_INT pad_size;
- enum ioparam_type ptype;
+ int ptype;
types[IOPARM_type_int4] = gfc_int4_type_node = gfc_get_int_type (4);
types[IOPARM_type_intio] = gfc_intio_type_node
@@ -246,7 +249,7 @@ gfc_build_io_library_fndecls (void)
gfc_c_int_type_node = gfc_get_int_type (gfc_c_int_kind);
for (ptype = IOPARM_ptype_common; ptype < IOPARM_ptype_num; ptype++)
- gfc_build_st_parameter (ptype, types);
+ gfc_build_st_parameter ((enum ioparam_type) ptype, types);
/* Define the transfer functions. */
@@ -1130,7 +1133,7 @@ gfc_new_nml_name_expr (const char * name)
nml_name->ts.kind = gfc_default_character_kind;
nml_name->ts.type = BT_CHARACTER;
nml_name->value.character.length = strlen(name);
- nml_name->value.character.string = gfc_getmem (strlen (name) + 1);
+ nml_name->value.character.string = (char *)gfc_getmem (strlen (name) + 1);
strcpy (nml_name->value.character.string, name);
return nml_name;
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 32020cc433a..66abf3f6711 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -288,7 +288,7 @@ gfc_trans_omp_array_reduction (tree c, gfc_symbol *sym, locus where)
tree decl, backend_decl, stmt;
locus old_loc = gfc_current_locus;
const char *iname;
- try t;
+ check t;
decl = OMP_CLAUSE_DECL (c);
gfc_current_locus = where;
@@ -737,7 +737,7 @@ gfc_trans_omp_atomic (gfc_code *code)
if (expr2->expr_type == EXPR_OP)
{
gfc_expr *e;
- switch (expr2->value.op.operator)
+ switch (expr2->value.op.foperator)
{
case INTRINSIC_PLUS:
op = PLUS_EXPR;
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 08ba113cc07..702ccc91fe7 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -1353,7 +1353,7 @@ gfc_trans_character_select (gfc_code *code)
d->n = n++;
if (n != 0)
- labels = gfc_getmem (n * sizeof (tree));
+ labels = (tree *)gfc_getmem (n * sizeof (tree));
else
labels = NULL;
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index bff025cbb7e..cbc8766996a 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -103,7 +103,7 @@ int gfc_intio_kind;
void
gfc_init_kinds (void)
{
- enum machine_mode mode;
+ int mode;
int i_index, r_index;
bool saw_i4 = false, saw_i8 = false;
bool saw_r4 = false, saw_r8 = false, saw_r16 = false;
@@ -112,7 +112,7 @@ gfc_init_kinds (void)
{
int kind, bitsize;
- if (!targetm.scalar_mode_supported_p (mode))
+ if (!targetm.scalar_mode_supported_p ((enum machine_mode)mode))
continue;
/* The middle end doesn't support constants larger than 2*HWI.
@@ -165,7 +165,7 @@ gfc_init_kinds (void)
if (fmt == NULL)
continue;
- if (!targetm.scalar_mode_supported_p (mode))
+ if (!targetm.scalar_mode_supported_p ((enum machine_mode)mode))
continue;
/* Only let float/double/long double go through because the fortran
@@ -1194,7 +1194,7 @@ gfc_get_array_type_bounds (tree etype, int dimen, tree * lbound,
{
char name[8 + GFC_RANK_DIGITS + GFC_MAX_SYMBOL_LEN];
tree fat_type, base_type, arraytype, lower, upper, stride, tmp;
- const char *typename;
+ const char *type_name;
int n;
base_type = gfc_get_array_descriptor_base (dimen);
@@ -1204,11 +1204,11 @@ gfc_get_array_type_bounds (tree etype, int dimen, tree * lbound,
if (tmp && TREE_CODE (tmp) == TYPE_DECL)
tmp = DECL_NAME (tmp);
if (tmp)
- typename = IDENTIFIER_POINTER (tmp);
+ type_name = IDENTIFIER_POINTER (tmp);
else
- typename = "unknown";
+ type_name = "unknown";
sprintf (name, "array" GFC_RANK_PRINTF_FORMAT "_%.*s", dimen,
- GFC_MAX_SYMBOL_LEN, typename);
+ GFC_MAX_SYMBOL_LEN, type_name);
TYPE_NAME (fat_type) = get_identifier (name);
GFC_DESCRIPTOR_TYPE_P (fat_type) = 1;
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 69a702e6034..ddb69a14cd0 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -411,7 +411,7 @@ gfc_add_block_to_block (stmtblock_t * block, stmtblock_t * append)
void
gfc_get_backend_locus (locus * loc)
{
- loc->lb = gfc_getmem (sizeof (gfc_linebuf));
+ loc->lb = (gfc_linebuf *)gfc_getmem (sizeof (gfc_linebuf));
#ifdef USE_MAPPED_LOCATION
loc->lb->location = input_location;
#else
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h
index 13c21aa2581..4e14aed2527 100644
--- a/gcc/fortran/trans.h
+++ b/gcc/fortran/trans.h
@@ -201,7 +201,7 @@ typedef struct gfc_ss
unsigned useflags:2;
}
gfc_ss;
-#define gfc_get_ss() gfc_getmem(sizeof(gfc_ss))
+#define gfc_get_ss() ((gfc_ss *)gfc_getmem(sizeof(gfc_ss)))
/* The contents of this aren't actually used. A NULL SS chain indicates a
scalar expression, so this pointer is used to terminate SS chains. */
@@ -445,7 +445,9 @@ void pushlevel (int);
tree poplevel (int, int, int);
tree getdecls (void);
tree gfc_truthvalue_conversion (tree);
-tree builtin_function (const char *, tree, int, enum built_in_class,
+tree builtin_function (const char *, tree,
+ enum built_in_function,
+ enum built_in_class,
const char *, tree);
/* In trans-openmp.c */
@@ -646,7 +648,7 @@ typedef struct gfc_interface_sym_mapping
{
struct gfc_interface_sym_mapping *next;
gfc_symbol *old;
- gfc_symtree *new;
+ gfc_symtree *fresh;
}
gfc_interface_sym_mapping;
diff --git a/gcc/function.c b/gcc/function.c
index 12e391abf24..cd86b1e9407 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -493,7 +493,7 @@ assign_stack_local_1 (enum machine_mode mode, HOST_WIDE_INT size, int align,
MEM_NOTRAP_P (x) = 1;
function->x_stack_slot_list
- = gen_rtx_EXPR_LIST (VOIDmode, x, function->x_stack_slot_list);
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, x, function->x_stack_slot_list);
if (frame_offset_overflow (function->x_frame_offset, function->decl))
function->x_frame_offset = 0;
@@ -676,7 +676,7 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
if (best_p->size - rounded_size >= alignment)
{
- p = ggc_alloc (sizeof (struct temp_slot));
+ p = (struct temp_slot *) ggc_alloc (sizeof (struct temp_slot));
p->in_use = p->addr_taken = 0;
p->size = best_p->size - rounded_size;
p->base_offset = best_p->base_offset + rounded_size;
@@ -687,7 +687,7 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
p->type = best_p->type;
insert_slot_to_list (p, &avail_temp_slots);
- stack_slot_list = gen_rtx_EXPR_LIST (VOIDmode, p->slot,
+ stack_slot_list = gen_rtx_EXPR_LIST (REG_DEP_TRUE, p->slot,
stack_slot_list);
best_p->size = rounded_size;
@@ -701,7 +701,7 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
{
HOST_WIDE_INT frame_offset_old = frame_offset;
- p = ggc_alloc (sizeof (struct temp_slot));
+ p = (struct temp_slot *) ggc_alloc (sizeof (struct temp_slot));
/* We are passing an explicit alignment request to assign_stack_local.
One side effect of that is assign_stack_local will not round SIZE
@@ -759,7 +759,7 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
/* Create a new MEM rtx to avoid clobbering MEM flags of old slots. */
slot = gen_rtx_MEM (mode, XEXP (p->slot, 0));
- stack_slot_list = gen_rtx_EXPR_LIST (VOIDmode, slot, stack_slot_list);
+ stack_slot_list = gen_rtx_EXPR_LIST (REG_DEP_TRUE, slot, stack_slot_list);
/* If we know the alias set for the memory that will be used, use
it. If there's no TYPE, then we don't know anything about the
@@ -966,11 +966,11 @@ find_temp_slot_from_address (rtx x)
that previously was known by OLD. */
void
-update_temp_slot_address (rtx old, rtx new)
+update_temp_slot_address (rtx old, rtx fresh)
{
struct temp_slot *p;
- if (rtx_equal_p (old, new))
+ if (rtx_equal_p (old, fresh))
return;
p = find_temp_slot_from_address (old);
@@ -985,36 +985,36 @@ update_temp_slot_address (rtx old, rtx new)
if (GET_CODE (old) != PLUS)
return;
- if (REG_P (new))
+ if (REG_P (fresh))
{
- update_temp_slot_address (XEXP (old, 0), new);
- update_temp_slot_address (XEXP (old, 1), new);
+ update_temp_slot_address (XEXP (old, 0), fresh);
+ update_temp_slot_address (XEXP (old, 1), fresh);
return;
}
- else if (GET_CODE (new) != PLUS)
+ else if (GET_CODE (fresh) != PLUS)
return;
- if (rtx_equal_p (XEXP (old, 0), XEXP (new, 0)))
- update_temp_slot_address (XEXP (old, 1), XEXP (new, 1));
- else if (rtx_equal_p (XEXP (old, 1), XEXP (new, 0)))
- update_temp_slot_address (XEXP (old, 0), XEXP (new, 1));
- else if (rtx_equal_p (XEXP (old, 0), XEXP (new, 1)))
- update_temp_slot_address (XEXP (old, 1), XEXP (new, 0));
- else if (rtx_equal_p (XEXP (old, 1), XEXP (new, 1)))
- update_temp_slot_address (XEXP (old, 0), XEXP (new, 0));
+ if (rtx_equal_p (XEXP (old, 0), XEXP (fresh, 0)))
+ update_temp_slot_address (XEXP (old, 1), XEXP (fresh, 1));
+ else if (rtx_equal_p (XEXP (old, 1), XEXP (fresh, 0)))
+ update_temp_slot_address (XEXP (old, 0), XEXP (fresh, 1));
+ else if (rtx_equal_p (XEXP (old, 0), XEXP (fresh, 1)))
+ update_temp_slot_address (XEXP (old, 1), XEXP (fresh, 0));
+ else if (rtx_equal_p (XEXP (old, 1), XEXP (fresh, 1)))
+ update_temp_slot_address (XEXP (old, 0), XEXP (fresh, 0));
return;
}
/* Otherwise add an alias for the temp's address. */
else if (p->address == 0)
- p->address = new;
+ p->address = fresh;
else
{
if (GET_CODE (p->address) != EXPR_LIST)
- p->address = gen_rtx_EXPR_LIST (VOIDmode, p->address, NULL_RTX);
+ p->address = gen_rtx_EXPR_LIST (REG_DEP_TRUE, p->address, NULL_RTX);
- p->address = gen_rtx_EXPR_LIST (VOIDmode, new, p->address);
+ p->address = gen_rtx_EXPR_LIST (REG_DEP_TRUE, fresh, p->address);
}
}
@@ -1239,23 +1239,23 @@ static int cfa_offset;
static rtx
instantiate_new_reg (rtx x, HOST_WIDE_INT *poffset)
{
- rtx new;
+ rtx fresh;
HOST_WIDE_INT offset;
if (x == virtual_incoming_args_rtx)
- new = arg_pointer_rtx, offset = in_arg_offset;
+ fresh = arg_pointer_rtx, offset = in_arg_offset;
else if (x == virtual_stack_vars_rtx)
- new = frame_pointer_rtx, offset = var_offset;
+ fresh = frame_pointer_rtx, offset = var_offset;
else if (x == virtual_stack_dynamic_rtx)
- new = stack_pointer_rtx, offset = dynamic_offset;
+ fresh = stack_pointer_rtx, offset = dynamic_offset;
else if (x == virtual_outgoing_args_rtx)
- new = stack_pointer_rtx, offset = out_arg_offset;
+ fresh = stack_pointer_rtx, offset = out_arg_offset;
else if (x == virtual_cfa_rtx)
{
#ifdef FRAME_POINTER_CFA_OFFSET
- new = frame_pointer_rtx;
+ fresh = frame_pointer_rtx;
#else
- new = arg_pointer_rtx;
+ fresh = arg_pointer_rtx;
#endif
offset = cfa_offset;
}
@@ -1263,7 +1263,7 @@ instantiate_new_reg (rtx x, HOST_WIDE_INT *poffset)
return NULL_RTX;
*poffset = offset;
- return new;
+ return fresh;
}
/* A subroutine of instantiate_virtual_regs, called via for_each_rtx.
@@ -1277,7 +1277,7 @@ instantiate_virtual_regs_in_rtx (rtx *loc, void *data)
{
HOST_WIDE_INT offset;
bool *changed = (bool *) data;
- rtx x, new;
+ rtx x, fresh;
x = *loc;
if (x == 0)
@@ -1286,21 +1286,21 @@ instantiate_virtual_regs_in_rtx (rtx *loc, void *data)
switch (GET_CODE (x))
{
case REG:
- new = instantiate_new_reg (x, &offset);
- if (new)
+ fresh = instantiate_new_reg (x, &offset);
+ if (fresh)
{
- *loc = plus_constant (new, offset);
+ *loc = plus_constant (fresh, offset);
if (changed)
*changed = true;
}
return -1;
case PLUS:
- new = instantiate_new_reg (XEXP (x, 0), &offset);
- if (new)
+ fresh = instantiate_new_reg (XEXP (x, 0), &offset);
+ if (fresh)
{
- new = plus_constant (new, offset);
- *loc = simplify_gen_binary (PLUS, GET_MODE (x), new, XEXP (x, 1));
+ fresh = plus_constant (fresh, offset);
+ *loc = simplify_gen_binary (PLUS, GET_MODE (x), fresh, XEXP (x, 1));
if (changed)
*changed = true;
return -1;
@@ -1346,7 +1346,7 @@ instantiate_virtual_regs_in_insn (rtx insn)
HOST_WIDE_INT offset;
int insn_code, i;
bool any_change = false;
- rtx set, new, x, seq;
+ rtx set, fresh, x, seq;
/* There are some special cases to be handled first. */
set = single_set (insn);
@@ -1356,17 +1356,17 @@ instantiate_virtual_regs_in_insn (rtx insn)
to mean that the underlying register gets assigned the inverse
transformation. This is used, for example, in the handling of
non-local gotos. */
- new = instantiate_new_reg (SET_DEST (set), &offset);
- if (new)
+ fresh = instantiate_new_reg (SET_DEST (set), &offset);
+ if (fresh)
{
start_sequence ();
for_each_rtx (&SET_SRC (set), instantiate_virtual_regs_in_rtx, NULL);
- x = simplify_gen_binary (PLUS, GET_MODE (new), SET_SRC (set),
+ x = simplify_gen_binary (PLUS, GET_MODE (fresh), SET_SRC (set),
GEN_INT (-offset));
- x = force_operand (x, new);
- if (x != new)
- emit_move_insn (new, x);
+ x = force_operand (x, fresh);
+ if (x != fresh)
+ emit_move_insn (fresh, x);
seq = get_insns ();
end_sequence ();
@@ -1380,15 +1380,15 @@ instantiate_virtual_regs_in_insn (rtx insn)
new add insn. The difference between this and falling through
to the generic case is avoiding a new pseudo and eliminating a
move insn in the initial rtl stream. */
- new = instantiate_new_reg (SET_SRC (set), &offset);
- if (new && offset != 0
+ fresh = instantiate_new_reg (SET_SRC (set), &offset);
+ if (fresh && offset != 0
&& REG_P (SET_DEST (set))
&& REGNO (SET_DEST (set)) > LAST_VIRTUAL_REGISTER)
{
start_sequence ();
x = expand_simple_binop (GET_MODE (SET_DEST (set)), PLUS,
- new, GEN_INT (offset), SET_DEST (set),
+ fresh, GEN_INT (offset), SET_DEST (set),
1, OPTAB_LIB_WIDEN);
if (x != SET_DEST (set))
emit_move_insn (SET_DEST (set), x);
@@ -1411,7 +1411,7 @@ instantiate_virtual_regs_in_insn (rtx insn)
&& recog_data.operand_loc[1] == &XEXP (SET_SRC (set), 0)
&& recog_data.operand_loc[2] == &XEXP (SET_SRC (set), 1)
&& GET_CODE (recog_data.operand[2]) == CONST_INT
- && (new = instantiate_new_reg (recog_data.operand[1], &offset)))
+ && (fresh = instantiate_new_reg (recog_data.operand[1], &offset)))
{
offset += INTVAL (recog_data.operand[2]);
@@ -1421,7 +1421,7 @@ instantiate_virtual_regs_in_insn (rtx insn)
&& REGNO (SET_DEST (set)) > LAST_VIRTUAL_REGISTER)
{
start_sequence ();
- emit_move_insn (SET_DEST (set), new);
+ emit_move_insn (SET_DEST (set), fresh);
seq = get_insns ();
end_sequence ();
@@ -1435,10 +1435,10 @@ instantiate_virtual_regs_in_insn (rtx insn)
/* Using validate_change and apply_change_group here leaves
recog_data in an invalid state. Since we know exactly what
we want to check, do those two by hand. */
- if (safe_insn_predicate (insn_code, 1, new)
+ if (safe_insn_predicate (insn_code, 1, fresh)
&& safe_insn_predicate (insn_code, 2, x))
{
- *recog_data.operand_loc[1] = recog_data.operand[1] = new;
+ *recog_data.operand_loc[1] = recog_data.operand[1] = fresh;
*recog_data.operand_loc[2] = recog_data.operand[2] = x;
any_change = true;
@@ -1479,11 +1479,11 @@ instantiate_virtual_regs_in_insn (rtx insn)
break;
case REG:
- new = instantiate_new_reg (x, &offset);
- if (new == NULL)
+ fresh = instantiate_new_reg (x, &offset);
+ if (fresh == NULL)
continue;
if (offset == 0)
- x = new;
+ x = fresh;
else
{
start_sequence ();
@@ -1494,7 +1494,7 @@ instantiate_virtual_regs_in_insn (rtx insn)
/* ??? Recognize address_operand and/or "p" constraints
to see if (plus new offset) is a valid before we put
this through expand_simple_binop. */
- x = expand_simple_binop (GET_MODE (x), PLUS, new,
+ x = expand_simple_binop (GET_MODE (x), PLUS, fresh,
GEN_INT (offset), NULL_RTX,
1, OPTAB_LIB_WIDEN);
seq = get_insns ();
@@ -1504,21 +1504,21 @@ instantiate_virtual_regs_in_insn (rtx insn)
break;
case SUBREG:
- new = instantiate_new_reg (SUBREG_REG (x), &offset);
- if (new == NULL)
+ fresh = instantiate_new_reg (SUBREG_REG (x), &offset);
+ if (fresh == NULL)
continue;
if (offset != 0)
{
start_sequence ();
- new = expand_simple_binop (GET_MODE (new), PLUS, new,
+ fresh = expand_simple_binop (GET_MODE (fresh), PLUS, fresh,
GEN_INT (offset), NULL_RTX,
1, OPTAB_LIB_WIDEN);
seq = get_insns ();
end_sequence ();
emit_insn_before (seq, insn);
}
- x = simplify_gen_subreg (recog_data.operand_mode[i], new,
- GET_MODE (new), SUBREG_BYTE (x));
+ x = simplify_gen_subreg (recog_data.operand_mode[i], fresh,
+ GET_MODE (fresh), SUBREG_BYTE (x));
break;
default:
@@ -3073,9 +3073,8 @@ assign_parms (tree fndecl)
#ifdef ARGS_GROW_DOWNWARD
current_function_arg_offset_rtx
= (all.stack_args_size.var == 0 ? GEN_INT (-all.stack_args_size.constant)
- : expand_expr (size_diffop (all.stack_args_size.var,
- size_int (-all.stack_args_size.constant)),
- NULL_RTX, VOIDmode, 0));
+ : expand_normal (size_diffop (all.stack_args_size.var,
+ size_int (-all.stack_args_size.constant))));
#else
current_function_arg_offset_rtx = ARGS_SIZE_RTX (all.stack_args_size);
#endif
@@ -3783,7 +3782,7 @@ allocate_struct_function (tree fndecl)
tree result;
tree fntype = fndecl ? TREE_TYPE (fndecl) : NULL_TREE;
- cfun = ggc_alloc_cleared (sizeof (struct function));
+ cfun = (struct function *) ggc_alloc_cleared (sizeof (struct function));
cfun->stack_alignment_needed = STACK_BOUNDARY;
cfun->preferred_stack_boundary = STACK_BOUNDARY;
@@ -4987,7 +4986,7 @@ static void
update_epilogue_consts (rtx dest, rtx x, void *data)
{
struct epi_info *p = (struct epi_info *) data;
- rtx new;
+ rtx fresh;
if (!REG_P (dest) || REGNO (dest) >= FIRST_PSEUDO_REGISTER)
return;
@@ -5008,12 +5007,12 @@ update_epilogue_consts (rtx dest, rtx x, void *data)
&& REGNO (XEXP (SET_SRC (x), 0)) < FIRST_PSEUDO_REGISTER
&& p->const_equiv[REGNO (XEXP (SET_SRC (x), 0))] != 0
&& GET_CODE (XEXP (SET_SRC (x), 1)) == CONST_INT
- && 0 != (new = simplify_binary_operation
+ && 0 != (fresh = simplify_binary_operation
(GET_CODE (SET_SRC (x)), GET_MODE (dest),
p->const_equiv[REGNO (XEXP (SET_SRC (x), 0))],
XEXP (SET_SRC (x), 1)))
- && GET_CODE (new) == CONST_INT)
- p->const_equiv[REGNO (dest)] = new;
+ && GET_CODE (fresh) == CONST_INT)
+ p->const_equiv[REGNO (dest)] = fresh;
/* Otherwise, we can't do anything with this value. */
else
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 4b12474af16..f9c889ef619 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -124,12 +124,12 @@ static const char dir_separator_str[] = { DIR_SEPARATOR, 0 };
#define MIN_FATAL_STATUS 1
-/* Flag set by cppspec.c to 1. */
-int is_cpp_driver;
+/* Flag set by cppspec.c to true. */
+bool is_cpp_driver = false;
/* Flag saying to pass the greatest exit code returned by a sub-process
to the calling program. */
-static int pass_exit_codes;
+static bool pass_exit_codes = false;
/* Definition of string containing the arguments given to configure. */
#include "configargs.h"
@@ -137,7 +137,7 @@ static int pass_exit_codes;
/* Flag saying to print the directories gcc will search through looking for
programs, libraries, etc. */
-static int print_search_dirs;
+static bool print_search_dirs = false;
/* Flag saying to print the full filename of this file
as found through our usual search mechanism. */
@@ -151,42 +151,42 @@ static const char *print_prog_name = NULL;
/* Flag saying to print the relative path we'd use to
find libgcc.a given the current compiler flags. */
-static int print_multi_directory;
+static bool print_multi_directory = false;
/* Flag saying to print the relative path we'd use to
find OS libraries given the current compiler flags. */
-static int print_multi_os_directory;
+static bool print_multi_os_directory = false;
/* Flag saying to print the list of subdirectories and
compiler flags used to select them in a standard form. */
-static int print_multi_lib;
+static bool print_multi_lib = false;
/* Flag saying to print the command line options understood by gcc and its
sub-processes. */
-static int print_help_list;
+static bool print_help_list = false;
/* Flag indicating whether we should print the command and arguments */
-static int verbose_flag;
+static bool verbose_flag = false;
/* Flag indicating whether we should ONLY print the command and
arguments (like verbose_flag) without executing the command.
Displayed arguments are quoted so that the generated command
line is suitable for execution. This is intended for use in
shell scripts to capture the driver-generated command line. */
-static int verbose_only_flag;
+static bool verbose_only_flag = false;
/* Flag indicating to print target specific command line options. */
-static int target_help_flag;
+static bool target_help_flag = false;
/* Flag indicating whether we should report subprocess execution times
(if this is supported by the system - see pexecute.c). */
-static int report_times;
+static bool report_times = false;
/* Nonzero means place this string before uses of /, so that include
and library files can be found in an alternate location. */
@@ -199,7 +199,7 @@ static const char *target_system_root = 0;
/* Nonzero means pass the updated target_system_root to the compiler. */
-static int target_system_root_changed;
+static bool target_system_root_changed = false;
/* Nonzero means append this string to target_system_root. */
@@ -212,11 +212,11 @@ static const char *target_sysroot_hdrs_suffix = 0;
/* Nonzero means write "temp" files in source directory
and use the source file's name in them, and don't delete them. */
-static int save_temps_flag;
+static bool save_temps_flag = false;
/* Nonzero means pass multiple source files to the compiler at one time. */
-static int combine_flag = 0;
+static bool combine_flag = false;
/* Nonzero means use pipes to communicate between subprocesses.
Overridden by either of the above two flags. */
@@ -244,21 +244,6 @@ static const char *cross_compile = "1";
static const char *cross_compile = "0";
#endif
-#ifdef MODIFY_TARGET_NAME
-
-/* Information on how to alter the target name based on a command-line
- switch. The only case we support now is simply appending or deleting a
- string to or from the end of the first part of the configuration name. */
-
-static const struct modify_target
-{
- const char *const sw;
- const enum add_del {ADD, DELETE} add_del;
- const char *const str;
-}
-modify_target[] = MODIFY_TARGET_NAME;
-#endif
-
/* The number of errors that have occurred; the link phase will not be
run if this is nonzero. */
static int error_count = 0;
@@ -283,7 +268,6 @@ struct path_prefix;
struct prefix_list;
static void init_spec (void);
-static void store_arg (const char *, int, int);
static char *load_specs (const char *);
static void read_specs (const char *, int);
static void set_spec (const char *, const char *);
@@ -729,7 +713,7 @@ proper position among the other output files. */
# define SYSROOT_HEADERS_SUFFIX_SPEC ""
#endif
-static const char *asm_debug;
+static const char *asm_debug = ASM_DEBUG_SPEC;
static const char *cpp_spec = CPP_SPEC;
static const char *cc1_spec = CC1_SPEC;
static const char *cc1plus_spec = CC1PLUS_SPEC;
@@ -1171,7 +1155,7 @@ translate_options (int *argcp, const char *const **argvp)
int argc = *argcp;
const char *const *argv = *argvp;
int newvsize = (argc + 2) * 2 * sizeof (const char *);
- const char **newv = xmalloc (newvsize);
+ const char **newv = (const char **) xmalloc (newvsize);
int newindex = 0;
i = 0;
@@ -1201,7 +1185,7 @@ translate_options (int *argcp, const char *const **argvp)
}
newvsize += spaces * sizeof (const char *);
- newv = xrealloc (newv, newvsize);
+ newv = (const char **) xrealloc (newv, newvsize);
sp = target_option_translations[tott_idx].replacements;
np = xstrdup (sp);
@@ -1455,30 +1439,8 @@ static const char *gcc_libexec_prefix;
#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
#endif
-#ifdef CROSS_COMPILE /* Don't use these prefixes for a cross compiler. */
-#undef MD_EXEC_PREFIX
-#undef MD_STARTFILE_PREFIX
-#undef MD_STARTFILE_PREFIX_1
-#endif
-
-/* If no prefixes defined, use the null string, which will disable them. */
-#ifndef MD_EXEC_PREFIX
-#define MD_EXEC_PREFIX ""
-#endif
-#ifndef MD_STARTFILE_PREFIX
-#define MD_STARTFILE_PREFIX ""
-#endif
-#ifndef MD_STARTFILE_PREFIX_1
-#define MD_STARTFILE_PREFIX_1 ""
-#endif
-
static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
-static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/";
-static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/";
-static const char *md_exec_prefix = MD_EXEC_PREFIX;
-static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
-static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
static const char *const standard_startfile_prefix_1
= STANDARD_STARTFILE_PREFIX_1;
@@ -1561,9 +1523,6 @@ static struct spec_list static_specs[] =
INIT_STATIC_SPEC ("multilib_options", &multilib_options),
INIT_STATIC_SPEC ("linker", &linker_name_spec),
INIT_STATIC_SPEC ("link_libgcc", &link_libgcc_spec),
- INIT_STATIC_SPEC ("md_exec_prefix", &md_exec_prefix),
- INIT_STATIC_SPEC ("md_startfile_prefix", &md_startfile_prefix),
- INIT_STATIC_SPEC ("md_startfile_prefix_1", &md_startfile_prefix_1),
INIT_STATIC_SPEC ("startfile_prefix_spec", &startfile_prefix_spec),
INIT_STATIC_SPEC ("sysroot_spec", &sysroot_spec),
INIT_STATIC_SPEC ("sysroot_suffix_spec", &sysroot_suffix_spec),
@@ -1665,8 +1624,7 @@ init_spec (void)
notice ("Using built-in specs.\n");
#ifdef EXTRA_SPECS
- extra_specs = xcalloc (sizeof (struct spec_list),
- ARRAY_SIZE (extra_specs_1));
+ extra_specs = XCNEWVEC (struct spec_list, ARRAY_SIZE (extra_specs_1));
for (i = ARRAY_SIZE (extra_specs_1) - 1; i >= 0; i--)
{
@@ -1680,10 +1638,6 @@ init_spec (void)
}
#endif
- /* Initialize here, not in definition. The IRIX 6 O32 cc sometimes chokes
- on ?: in file-scope variable initializations. */
- asm_debug = ASM_DEBUG_SPEC;
-
for (i = ARRAY_SIZE (static_specs) - 1; i >= 0; i--)
{
sl = &static_specs[i];
@@ -1776,15 +1730,6 @@ init_spec (void)
libgcc_spec = XOBFINISH (&obstack, const char *);
}
#endif
-#ifdef USE_AS_TRADITIONAL_FORMAT
- /* Prepend "--traditional-format" to whatever asm_spec we had before. */
- {
- static const char tf[] = "--traditional-format ";
- obstack_grow (&obstack, tf, sizeof(tf) - 1);
- obstack_grow0 (&obstack, asm_spec, strlen (asm_spec));
- asm_spec = XOBFINISH (&obstack, const char *);
- }
-#endif
#ifdef LINK_EH_SPEC
/* Prepend LINK_EH_SPEC to whatever link_spec we had before. */
obstack_grow (&obstack, LINK_EH_SPEC, sizeof(LINK_EH_SPEC) - 1);
@@ -1930,10 +1875,10 @@ clear_args (void)
and the file should be deleted if this compilation fails. */
static void
-store_arg (const char *arg, int delete_always, int delete_failure)
+store_arg (const char *arg, bool delete_always, bool delete_failure)
{
if (argbuf_index + 1 == argbuf_length)
- argbuf = xrealloc (argbuf, (argbuf_length *= 2) * sizeof (const char *));
+ argbuf = (const char **) xrealloc (argbuf, (argbuf_length *= 2) * sizeof (const char *));
argbuf[argbuf_index++] = arg;
argbuf[argbuf_index] = 0;
@@ -2225,7 +2170,7 @@ read_specs (const char *filename, int main_p)
{
/* Add this pair to the vector. */
compilers
- = xrealloc (compilers,
+ = (struct compiler *) xrealloc (compilers,
(n_compilers + 2) * sizeof (struct compiler));
compilers[n_compilers].suffix = suffix;
@@ -2547,7 +2492,7 @@ struct add_to_obstack_info {
static void *
add_to_obstack (char *path, void *data)
{
- struct add_to_obstack_info *info = data;
+ struct add_to_obstack_info *info = (struct add_to_obstack_info *) data;
if (info->check_dir && !is_directory (path, false))
return NULL;
@@ -2631,7 +2576,7 @@ struct file_at_path_info {
static void *
file_at_path (char *path, void *data)
{
- struct file_at_path_info *info = data;
+ struct file_at_path_info *info = (struct file_at_path_info *) data;
size_t len = strlen (path);
memcpy (path + len, info->name, info->name_len);
@@ -2690,7 +2635,7 @@ find_a_file (const struct path_prefix *pprefix, const char *name, int mode,
info.suffix_len = strlen (info.suffix);
info.mode = mode;
- return for_each_path (pprefix, do_multi, info.name_len + info.suffix_len,
+ return (char *) for_each_path (pprefix, do_multi, info.name_len + info.suffix_len,
file_at_path, &info);
}
@@ -2772,6 +2717,25 @@ add_sysrooted_prefix (struct path_prefix *pprefix, const char *prefix,
add_prefix (pprefix, prefix, component, priority,
require_machine_suffix, os_multilib);
}
+
+/* Same as add_prefix, but allways adding at the end. */
+static void
+add_prefix_last (struct path_prefix *pprefix, const char *prefix,
+ const char *component,
+ int require_machine_suffix, int os_multilib)
+{
+ add_prefix (pprefix, prefix, component, PREFIX_PRIORITY_LAST,
+ require_machine_suffix, os_multilib);
+}
+
+/* Same as add_prefix, but allways addind at the beggining. */
+static void
+add_prefix_b_opt (struct path_prefix *pprefix, const char *prefix)
+{
+ add_prefix (pprefix, prefix, NULL, PREFIX_PRIORITY_B_OPT,
+ 0, 0);
+}
+
/* Execute the command specified by the arguments on the current line of spec.
When using pipes, this includes several piped-together commands
@@ -2802,7 +2766,7 @@ execute (void)
n_commands++;
/* Get storage for each command. */
- commands = alloca (n_commands * sizeof (struct command));
+ commands = (struct command *) alloca (n_commands * sizeof (struct command));
/* Split argbuf into its separate piped processes,
and record info about each one.
@@ -2871,7 +2835,7 @@ execute (void)
fprintf (stderr, "\n");
}
fflush (stderr);
- if (verbose_only_flag != 0)
+ if (verbose_only_flag)
{
/* verbose_only_flag should act as if the spec was
executed, so increment execution_count before
@@ -2962,13 +2926,13 @@ execute (void)
struct pex_time *times = NULL;
int ret_code = 0;
- statuses = alloca (n_commands * sizeof (int));
+ statuses = (int *) alloca (n_commands * sizeof (int));
if (!pex_get_status (pex, n_commands, statuses))
pfatal_with_name (_("failed to get exit status"));
if (report_times)
{
- times = alloca (n_commands * sizeof (struct pex_time));
+ times = (struct pex_time *) alloca (n_commands * sizeof (struct pex_time));
if (!pex_get_times (pex, n_commands, times))
pfatal_with_name (_("failed to get process times"));
}
@@ -3227,7 +3191,7 @@ add_preprocessor_option (const char *option, int len)
if (! preprocessor_options)
preprocessor_options = XNEWVEC (char *, n_preprocessor_options);
else
- preprocessor_options = xrealloc (preprocessor_options,
+ preprocessor_options = (char **) xrealloc (preprocessor_options,
n_preprocessor_options * sizeof (char *));
preprocessor_options [n_preprocessor_options - 1] =
@@ -3242,7 +3206,7 @@ add_assembler_option (const char *option, int len)
if (! assembler_options)
assembler_options = XNEWVEC (char *, n_assembler_options);
else
- assembler_options = xrealloc (assembler_options,
+ assembler_options = (char **) xrealloc (assembler_options,
n_assembler_options * sizeof (char *));
assembler_options [n_assembler_options - 1] = save_string (option, len);
@@ -3256,7 +3220,7 @@ add_linker_option (const char *option, int len)
if (! linker_options)
linker_options = XNEWVEC (char *, n_linker_options);
else
- linker_options = xrealloc (linker_options,
+ linker_options = (char **) xrealloc (linker_options,
n_linker_options * sizeof (char *));
linker_options [n_linker_options - 1] = save_string (option, len);
@@ -3274,10 +3238,6 @@ process_command (int argc, const char **argv)
const char *spec_lang = 0;
int last_language_n_infiles;
int lang_n_infiles = 0;
-#ifdef MODIFY_TARGET_NAME
- int is_modify_target_name;
- unsigned int j;
-#endif
GET_ENVIRONMENT (gcc_exec_prefix, "GCC_EXEC_PREFIX");
@@ -3342,14 +3302,14 @@ process_command (int argc, const char **argv)
for (baselen = strlen (progname); baselen > 0; baselen--)
if (IS_DIR_SEPARATOR (progname[baselen-1]))
break;
- new_argv0 = xmemdup (progname, baselen,
+ new_argv0 = (char *) xmemdup (progname, baselen,
baselen + concat_length (new_version, new_machine,
"-gcc-", NULL) + 1);
strcpy (new_argv0 + baselen, new_machine);
strcat (new_argv0, "-gcc-");
strcat (new_argv0, new_version);
- new_argv = xmemdup (argv, (argc + 1) * sizeof (argv[0]),
+ new_argv = (char **) xmemdup (argv, (argc + 1) * sizeof (argv[0]),
(argc + 1) * sizeof (argv[0]));
new_argv[0] = new_argv0;
@@ -3404,10 +3364,8 @@ process_command (int argc, const char **argv)
}
set_std_prefix (gcc_exec_prefix, len);
- add_prefix (&exec_prefixes, gcc_libexec_prefix, "GCC",
- PREFIX_PRIORITY_LAST, 0, 0);
- add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC",
- PREFIX_PRIORITY_LAST, 0, 0);
+ add_prefix_last (&exec_prefixes, gcc_libexec_prefix, "GCC", 0, 0);
+ add_prefix_last (&startfile_prefixes, gcc_exec_prefix, "GCC", 0, 0);
}
/* COMPILER_PATH and LIBRARY_PATH have values
@@ -3417,7 +3375,7 @@ process_command (int argc, const char **argv)
if (temp)
{
const char *startp, *endp;
- char *nstore = alloca (strlen (temp) + 3);
+ char *nstore = (char *) alloca (strlen (temp) + 3);
startp = endp = temp;
while (1)
@@ -3434,10 +3392,8 @@ process_command (int argc, const char **argv)
}
else
nstore[endp - startp] = 0;
- add_prefix (&exec_prefixes, nstore, 0,
- PREFIX_PRIORITY_LAST, 0, 0);
- add_prefix (&include_prefixes, nstore, 0,
- PREFIX_PRIORITY_LAST, 0, 0);
+ add_prefix_last (&exec_prefixes, nstore, NULL, 0, 0);
+ add_prefix_last (&include_prefixes, nstore, NULL, 0, 0);
if (*endp == 0)
break;
endp = startp = endp + 1;
@@ -3451,40 +3407,7 @@ process_command (int argc, const char **argv)
if (temp && *cross_compile == '0')
{
const char *startp, *endp;
- char *nstore = alloca (strlen (temp) + 3);
-
- startp = endp = temp;
- while (1)
- {
- if (*endp == PATH_SEPARATOR || *endp == 0)
- {
- strncpy (nstore, startp, endp - startp);
- if (endp == startp)
- strcpy (nstore, concat (".", dir_separator_str, NULL));
- else if (!IS_DIR_SEPARATOR (endp[-1]))
- {
- nstore[endp - startp] = DIR_SEPARATOR;
- nstore[endp - startp + 1] = 0;
- }
- else
- nstore[endp - startp] = 0;
- add_prefix (&startfile_prefixes, nstore, NULL,
- PREFIX_PRIORITY_LAST, 0, 1);
- if (*endp == 0)
- break;
- endp = startp = endp + 1;
- }
- else
- endp++;
- }
- }
-
- /* Use LPATH like LIBRARY_PATH (for the CMU build program). */
- GET_ENVIRONMENT (temp, "LPATH");
- if (temp && *cross_compile == '0')
- {
- const char *startp, *endp;
- char *nstore = alloca (strlen (temp) + 3);
+ char *nstore = (char *) alloca (strlen (temp) + 3);
startp = endp = temp;
while (1)
@@ -3501,8 +3424,7 @@ process_command (int argc, const char **argv)
}
else
nstore[endp - startp] = 0;
- add_prefix (&startfile_prefixes, nstore, NULL,
- PREFIX_PRIORITY_LAST, 0, 1);
+ add_prefix_last (&startfile_prefixes, nstore, NULL, 0, 1);
if (*endp == 0)
break;
endp = startp = endp + 1;
@@ -3558,7 +3480,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
else if (strcmp (argv[i], "-fhelp") == 0)
{
/* translate_options () has turned --help into -fhelp. */
- print_help_list = 1;
+ print_help_list = true;
/* We will be passing a dummy file on to the sub-processes. */
n_infiles++;
@@ -3573,7 +3495,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
else if (strcmp (argv[i], "-ftarget-help") == 0)
{
/* translate_options() has turned --target-help into -ftarget-help. */
- target_help_flag = 1;
+ target_help_flag = false;
/* We will be passing a dummy file on to the sub-processes. */
n_infiles++;
@@ -3587,11 +3509,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
}
else if (! strcmp (argv[i], "-pass-exit-codes"))
{
- pass_exit_codes = 1;
+ pass_exit_codes = true;
n_switches++;
}
else if (! strcmp (argv[i], "-print-search-dirs"))
- print_search_dirs = 1;
+ print_search_dirs = true;
else if (! strcmp (argv[i], "-print-libgcc-file-name"))
print_file_name = "libgcc.a";
else if (! strncmp (argv[i], "-print-file-name=", 17))
@@ -3599,11 +3521,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
else if (! strncmp (argv[i], "-print-prog-name=", 17))
print_prog_name = argv[i] + 17;
else if (! strcmp (argv[i], "-print-multi-lib"))
- print_multi_lib = 1;
+ print_multi_lib = true;
else if (! strcmp (argv[i], "-print-multi-directory"))
- print_multi_directory = 1;
+ print_multi_directory = true;
else if (! strcmp (argv[i], "-print-multi-os-directory"))
- print_multi_os_directory = 1;
+ print_multi_os_directory = true;
else if (! strncmp (argv[i], "-Wa,", 4))
{
int prev, j;
@@ -3719,7 +3641,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
user_specs_tail = user;
}
else if (strcmp (argv[i], "-time") == 0)
- report_times = 1;
+ report_times = true;
else if (strcmp (argv[i], "-pipe") == 0)
{
/* -pipe has to go into the switches array as well as
@@ -3733,8 +3655,8 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
of the commands and the echoed arguments are quoted. It
is intended for use in shell scripts to capture the
driver-generated command line. */
- verbose_only_flag++;
- verbose_flag++;
+ verbose_only_flag = true;
+ verbose_flag = true;
}
else if (argv[i][0] == '-' && argv[i][1] != 0)
{
@@ -3790,24 +3712,19 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
&& (IS_DIR_SEPARATOR (value[len - 1])))
{
if (len == 7)
- add_prefix (&include_prefixes, "./", NULL,
- PREFIX_PRIORITY_B_OPT, 0, 0);
+ add_prefix_b_opt (&include_prefixes, "./");
else
{
- char *string = xmalloc (len - 6);
+ char *string = XNEWVEC (char, len - 6);
memcpy (string, value, len - 7);
string[len - 7] = 0;
- add_prefix (&include_prefixes, string, NULL,
- PREFIX_PRIORITY_B_OPT, 0, 0);
+ add_prefix_b_opt (&include_prefixes, string);
}
}
- add_prefix (&exec_prefixes, value, NULL,
- PREFIX_PRIORITY_B_OPT, 0, 0);
- add_prefix (&startfile_prefixes, value, NULL,
- PREFIX_PRIORITY_B_OPT, 0, 0);
- add_prefix (&include_prefixes, value, NULL,
- PREFIX_PRIORITY_B_OPT, 0, 0);
+ add_prefix_b_opt (&exec_prefixes, value);
+ add_prefix_b_opt (&startfile_prefixes, value);
+ add_prefix_b_opt (&include_prefixes, value);
n_switches++;
}
break;
@@ -3818,7 +3735,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
verbose_flag; rather, continue on to give the error. */
if (p[1] != 0)
break;
- verbose_flag++;
+ verbose_flag = true;
break;
case 'S':
@@ -3873,43 +3790,6 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
default:
normal_switch:
-#ifdef MODIFY_TARGET_NAME
- is_modify_target_name = 0;
-
- for (j = 0; j < ARRAY_SIZE (modify_target); j++)
- if (! strcmp (argv[i], modify_target[j].sw))
- {
- char *new_name = xmalloc (strlen (modify_target[j].str)
- + strlen (spec_machine));
- const char *p, *r;
- char *q;
- int made_addition = 0;
-
- is_modify_target_name = 1;
- for (p = spec_machine, q = new_name; *p != 0; )
- {
- if (modify_target[j].add_del == DELETE
- && (! strncmp (q, modify_target[j].str,
- strlen (modify_target[j].str))))
- p += strlen (modify_target[j].str);
- else if (modify_target[j].add_del == ADD
- && ! made_addition && *p == '-')
- {
- for (r = modify_target[j].str; *r != 0; )
- *q++ = *r++;
- made_addition = 1;
- }
-
- *q++ = *p++;
- }
-
- spec_machine = new_name;
- }
-
- if (is_modify_target_name)
- break;
-#endif
-
n_switches++;
if (SWITCH_TAKES_ARG (c) > (p[1] != 0))
@@ -3940,22 +3820,12 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
/* Use 2 as fourth arg meaning try just the machine as a suffix,
as well as trying the machine and the version. */
#ifndef OS2
- add_prefix (&exec_prefixes, standard_libexec_prefix, "GCC",
- PREFIX_PRIORITY_LAST, 1, 0);
- add_prefix (&exec_prefixes, standard_libexec_prefix, "BINUTILS",
- PREFIX_PRIORITY_LAST, 2, 0);
- add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
- PREFIX_PRIORITY_LAST, 2, 0);
- add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
- PREFIX_PRIORITY_LAST, 2, 0);
- add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
- PREFIX_PRIORITY_LAST, 2, 0);
+ add_prefix_last (&exec_prefixes, standard_libexec_prefix, "GCC", 1, 0);
+ add_prefix_last (&exec_prefixes, standard_libexec_prefix, "BINUTILS", 2, 0);
+ add_prefix_last (&exec_prefixes, standard_exec_prefix, "BINUTILS", 2, 0);
#endif
- add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
- PREFIX_PRIORITY_LAST, 1, 0);
- add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
- PREFIX_PRIORITY_LAST, 1, 0);
+ add_prefix_last (&startfile_prefixes, standard_exec_prefix, "BINUTILS", 1, 0);
tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
dir_separator_str, NULL);
@@ -3975,14 +3845,14 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
= concat (gcc_exec_prefix, spec_machine, dir_separator_str,
spec_version, dir_separator_str, tooldir_prefix, NULL);
- add_prefix (&exec_prefixes,
+ add_prefix_last (&exec_prefixes,
concat (gcc_exec_tooldir_prefix, "bin",
dir_separator_str, NULL),
- NULL, PREFIX_PRIORITY_LAST, 0, 0);
- add_prefix (&startfile_prefixes,
+ NULL, 0, 0);
+ add_prefix_last (&startfile_prefixes,
concat (gcc_exec_tooldir_prefix, "lib",
dir_separator_str, NULL),
- NULL, PREFIX_PRIORITY_LAST, 0, 1);
+ NULL, 0, 1);
}
tooldir_prefix = concat (standard_exec_prefix, spec_machine,
@@ -3990,12 +3860,12 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
dir_separator_str, tooldir_prefix, NULL);
}
- add_prefix (&exec_prefixes,
+ add_prefix_last (&exec_prefixes,
concat (tooldir_prefix, "bin", dir_separator_str, NULL),
- "BINUTILS", PREFIX_PRIORITY_LAST, 0, 0);
- add_prefix (&startfile_prefixes,
+ "BINUTILS", 0, 0);
+ add_prefix_last (&startfile_prefixes,
concat (tooldir_prefix, "lib", dir_separator_str, NULL),
- "BINUTILS", PREFIX_PRIORITY_LAST, 0, 1);
+ "BINUTILS", 0, 1);
#if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS)
/* If the normal TARGET_SYSTEM_ROOT is inside of $exec_prefix,
@@ -4010,7 +3880,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
if (tmp_prefix && access_check (tmp_prefix, F_OK) == 0)
{
target_system_root = tmp_prefix;
- target_system_root_changed = 1;
+ target_system_root_changed = true;
}
}
#endif
@@ -4033,17 +3903,6 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
for (i = 1; i < argc; i++)
{
/* Just skip the switches that were handled by the preceding loop. */
-#ifdef MODIFY_TARGET_NAME
- is_modify_target_name = 0;
-
- for (j = 0; j < ARRAY_SIZE (modify_target); j++)
- if (! strcmp (argv[i], modify_target[j].sw))
- is_modify_target_name = 1;
-
- if (is_modify_target_name)
- ;
- else
-#endif
if (! strncmp (argv[i], "-Wa,", 4))
;
else if (! strncmp (argv[i], "-Wp,", 4))
@@ -4071,7 +3930,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
else if (! strncmp (argv[i], "--sysroot=", strlen ("--sysroot=")))
{
target_system_root = argv[i] + strlen ("--sysroot=");
- target_system_root_changed = 1;
+ target_system_root_changed = true;
}
else if (argv[i][0] == '+' && argv[i][1] == 'e')
{
@@ -4356,11 +4215,11 @@ static int arg_going;
/* Nonzero means %d or %g has been seen; the next arg to be terminated
is a temporary file name. */
-static int delete_this_arg;
+static bool delete_this_arg;
/* Nonzero means %w has been seen; the next arg to be terminated
is the output file name of this compilation. */
-static int this_is_output_file;
+static bool this_is_output_file;
/* Nonzero means %s has been seen; the next arg to be terminated
is the name of a library file and we should try the standard
@@ -4408,8 +4267,8 @@ do_spec_2 (const char *spec)
clear_args ();
arg_going = 0;
- delete_this_arg = 0;
- this_is_output_file = 0;
+ delete_this_arg = false;
+ this_is_output_file = false;
this_is_library_file = 0;
input_from_pipe = 0;
suffix_subst = NULL;
@@ -4465,7 +4324,7 @@ do_option_spec (const char *name, const char *spec)
}
/* Replace each %(VALUE) by the specified value. */
- tmp_spec = alloca (strlen (spec) + 1
+ tmp_spec = (char *) alloca (strlen (spec) + 1
+ value_count * (value_len - strlen ("%(VALUE)")));
tmp_spec_p = tmp_spec;
q = spec;
@@ -4497,7 +4356,7 @@ do_self_spec (const char *spec)
first = n_switches;
n_switches += argbuf_index;
- switches = xrealloc (switches,
+ switches = (struct switchstr *) xrealloc (switches,
sizeof (struct switchstr) * (n_switches + 1));
switches[n_switches] = switches[first];
@@ -4532,7 +4391,7 @@ struct spec_path_info {
static void *
spec_path (char *path, void *data)
{
- struct spec_path_info *info = data;
+ struct spec_path_info *info = (struct spec_path_info *) data;
size_t len = 0;
char save = 0;
@@ -4636,8 +4495,8 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
/* Reinitialize for a new command, and for a new argument. */
clear_args ();
arg_going = 0;
- delete_this_arg = 0;
- this_is_output_file = 0;
+ delete_this_arg = false;
+ this_is_output_file = false;
this_is_library_file = 0;
input_from_pipe = 0;
break;
@@ -4675,8 +4534,8 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
}
/* Reinitialize for a new argument. */
arg_going = 0;
- delete_this_arg = 0;
- this_is_output_file = 0;
+ delete_this_arg = false;
+ this_is_output_file = false;
this_is_library_file = 0;
break;
@@ -4697,7 +4556,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
break;
case 'd':
- delete_this_arg = 2;
+ delete_this_arg = true;
break;
/* Dump out the directories specified with LIBRARY_PATH,
@@ -4733,7 +4592,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
char *buf;
while (*p != 0 && *p != '\n')
p++;
- buf = alloca (p - q + 1);
+ buf = (char *) alloca (p - q + 1);
strncpy (buf, q, p - q);
buf[p - q] = 0;
error ("%s", buf);
@@ -4747,7 +4606,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
char *buf;
while (*p != 0 && *p != '\n')
p++;
- buf = alloca (p - q + 1);
+ buf = (char *) alloca (p - q + 1);
strncpy (buf, q, p - q);
buf[p - q] = 0;
notice ("%s\n", buf);
@@ -4771,7 +4630,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
{
obstack_grow (&obstack, HOST_BIT_BUCKET,
strlen (HOST_BIT_BUCKET));
- delete_this_arg = 0;
+ delete_this_arg = false;
arg_going = 1;
break;
}
@@ -4781,7 +4640,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
if (use_pipes)
{
obstack_1grow (&obstack, '-');
- delete_this_arg = 0;
+ delete_this_arg = false;
arg_going = 1;
/* consume suffix */
@@ -4849,7 +4708,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
if (save_temps_flag)
{
temp_filename_length = basename_length + suffix_length;
- temp_filename = alloca (temp_filename_length + 1);
+ temp_filename = (char *) alloca (temp_filename_length + 1);
strncpy ((char *) temp_filename, input_basename, basename_length);
strncpy ((char *) temp_filename + basename_length, suffix,
suffix_length);
@@ -4890,7 +4749,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
obstack_grow (&obstack, temp_filename,
temp_filename_length);
arg_going = 1;
- delete_this_arg = 0;
+ delete_this_arg = false;
break;
}
}
@@ -4910,7 +4769,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
{
if (t == 0)
{
- t = xmalloc (sizeof (struct temp_name));
+ t = XNEW (struct temp_name);
t->next = temp_names;
temp_names = t;
}
@@ -4933,7 +4792,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
free (saved_suffix);
obstack_grow (&obstack, t->filename, t->filename_length);
- delete_this_arg = 1;
+ delete_this_arg = true;
}
arg_going = 1;
break;
@@ -4945,7 +4804,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
if ((!infiles[i].language) || (infiles[i].language[0] != '*'))
if (infiles[i].incompiler == input_file_compiler)
{
- store_arg (infiles[i].name, 0, 0);
+ store_arg (infiles[i].name, false, false);
infiles[i].compiled = true;
}
}
@@ -5008,7 +4867,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
for (i = 0; i < max; i++)
if (outfiles[i])
- store_arg (outfiles[i], 0, 0);
+ store_arg (outfiles[i], false, false);
break;
}
@@ -5026,7 +4885,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
break;
case 'w':
- this_is_output_file = 1;
+ this_is_output_file = true;
break;
case 'W':
@@ -5303,7 +5162,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
}
else
{
- char *x = alloca (strlen (name) * 2 + 1);
+ char *x = (char *) alloca (strlen (name) * 2 + 1);
char *buf = x;
const char *y = name;
int flag = 0;
@@ -5411,8 +5270,8 @@ eval_spec_function (const char *func, const char *args)
const char **save_argbuf;
int save_arg_going;
- int save_delete_this_arg;
- int save_this_is_output_file;
+ bool save_delete_this_arg;
+ bool save_this_is_output_file;
int save_this_is_library_file;
int save_input_from_pipe;
const char *save_suffix_subst;
@@ -5992,7 +5851,7 @@ is_directory (const char *path1, bool linker)
/* Ensure the string ends with "/.". The resulting path will be a
directory even if the given path is a symbolic link. */
len1 = strlen (path1);
- path = alloca (3 + len1);
+ path = (char *) alloca (3 + len1);
memcpy (path, path1, len1);
cp = path + len1;
if (!IS_DIR_SEPARATOR (cp[-1]))
@@ -6079,7 +5938,7 @@ main (int argc, char **argv)
int linker_was_run = 0;
int lang_n_infiles = 0;
int num_linker_inputs = 0;
- char *explicit_link_files;
+ bool *explicit_link_files;
char *specs_file;
const char *p;
struct user_specs *uptr;
@@ -6192,7 +6051,7 @@ main (int argc, char **argv)
/* Initialize the vector of specs to just the default.
This means one element containing 0s, as a terminator. */
- compilers = xmalloc (sizeof default_compilers);
+ compilers = (struct compiler *) xmalloc (sizeof default_compilers);
memcpy (compilers, default_compilers, sizeof default_compilers);
n_compilers = n_default_compilers;
@@ -6211,7 +6070,7 @@ main (int argc, char **argv)
/* We need to check standard_exec_prefix/just_machine_suffix/specs
for any override of as, ld and libraries. */
- specs_file = alloca (strlen (standard_exec_prefix)
+ specs_file = (char *) alloca (strlen (standard_exec_prefix)
+ strlen (just_machine_suffix) + sizeof ("specs"));
strcpy (specs_file, standard_exec_prefix);
@@ -6232,17 +6091,6 @@ main (int argc, char **argv)
for (i = 0; i < ARRAY_SIZE (driver_self_specs); i++)
do_self_spec (driver_self_specs[i]);
- /* If not cross-compiling, look for executables in the standard
- places. */
- if (*cross_compile == '0')
- {
- if (*md_exec_prefix)
- {
- add_prefix (&exec_prefixes, md_exec_prefix, "GCC",
- PREFIX_PRIORITY_LAST, 0, 0);
- }
- }
-
/* Process sysroot_suffix_spec. */
if (*sysroot_suffix_spec != 0
&& do_spec_2 (sysroot_suffix_spec) == 0)
@@ -6290,14 +6138,6 @@ main (int argc, char **argv)
startfile_prefix_spec exclusively. */
else if (*cross_compile == '0' || target_system_root)
{
- if (*md_startfile_prefix)
- add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix,
- "GCC", PREFIX_PRIORITY_LAST, 0, 1);
-
- if (*md_startfile_prefix_1)
- add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix_1,
- "GCC", PREFIX_PRIORITY_LAST, 0, 1);
-
/* If standard_startfile_prefix is relative, base it on
standard_exec_prefix. This lets us move the installed tree
as a unit. If GCC_EXEC_PREFIX is defined, base
@@ -6312,15 +6152,15 @@ main (int argc, char **argv)
else if (*cross_compile == '0')
{
if (gcc_exec_prefix)
- add_prefix (&startfile_prefixes,
+ add_prefix_last (&startfile_prefixes,
concat (gcc_exec_prefix, machine_suffix,
standard_startfile_prefix, NULL),
- NULL, PREFIX_PRIORITY_LAST, 0, 1);
- add_prefix (&startfile_prefixes,
+ NULL, 0, 1);
+ add_prefix_last (&startfile_prefixes,
concat (standard_exec_prefix,
machine_suffix,
standard_startfile_prefix, NULL),
- NULL, PREFIX_PRIORITY_LAST, 0, 1);
+ NULL, 0, 1);
}
if (*standard_startfile_prefix_1)
@@ -6441,24 +6281,10 @@ main (int argc, char **argv)
if (verbose_flag)
{
int n;
- const char *thrmod;
notice ("Target: %s\n", spec_machine);
notice ("Configured with: %s\n", configuration_arguments);
-
-#ifdef THREAD_MODEL_SPEC
- /* We could have defined THREAD_MODEL_SPEC to "%*" by default,
- but there's no point in doing all this processing just to get
- thread_model back. */
- obstack_init (&obstack);
- do_spec_1 (THREAD_MODEL_SPEC, 0, thread_model);
- obstack_1grow (&obstack, '\0');
- thrmod = XOBFINISH (&obstack, const char *);
-#else
- thrmod = thread_model;
-#endif
-
- notice ("Thread model: %s\n", thrmod);
+ notice ("Thread model: %s\n", thread_model);
/* compiler_version is truncated at the first space when initialized
from version string, so truncate version_string at the first space
@@ -6490,7 +6316,8 @@ main (int argc, char **argv)
/* Record which files were specified explicitly as link input. */
- explicit_link_files = XCNEWVEC (char, n_infiles);
+ /* DALECKI */
+ explicit_link_files = XCNEWVEC (bool, n_infiles);
if (combine_flag)
combine_inputs = true;
@@ -6520,7 +6347,7 @@ main (int argc, char **argv)
{
/* Since there is no compiler for this input file, assume it is a
linker file. */
- explicit_link_files[i] = 1;
+ explicit_link_files[i] = true;
infiles[i].incompiler = NULL;
}
infiles[i].compiled = false;
@@ -6633,7 +6460,7 @@ main (int argc, char **argv)
record it as explicit linker input. */
else
- explicit_link_files[i] = 1;
+ explicit_link_files[i] = true;
/* Clear the delete-on-failure queue, deleting the files in it
if this compilation failed. */
@@ -7031,7 +6858,7 @@ used_arg (const char *p, int len)
if (*q == ';')
cnt++;
- matches = alloca ((sizeof (struct mswitchstr)) * cnt);
+ matches = (struct mswitchstr *) alloca ((sizeof (struct mswitchstr)) * cnt);
i = 0;
q = multilib_matches;
while (*q != '\0')
diff --git a/gcc/gcc.h b/gcc/gcc.h
index 2664971c160..cef1ce9adaf 100644
--- a/gcc/gcc.h
+++ b/gcc/gcc.h
@@ -79,4 +79,7 @@ extern int lang_specific_extra_outfiles;
extern const char **outfiles;
+/* Flag set by cppspec.c to true. */
+extern bool is_cpp_driver;
+
#endif /* ! GCC_GCC_H */
diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c
index ab8e08db4d8..6f087bde883 100644
--- a/gcc/gcov-io.c
+++ b/gcc/gcov-io.c
@@ -197,7 +197,7 @@ gcov_allocate (unsigned length)
new_size *= 2;
gcov_var.alloc = new_size;
- gcov_var.buffer = xrealloc (gcov_var.buffer, new_size << 2);
+ gcov_var.buffer = (gcov_unsigned_t*) xrealloc (gcov_var.buffer, new_size << 2);
}
#endif
diff --git a/gcc/gcse.c b/gcc/gcse.c
index b28273d48ce..da4b9b48daf 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -339,7 +339,7 @@ struct occr
[one could build a mapping table without holes afterwards though].
Someday I'll perform the computation and figure it out. */
-struct hash_table
+struct expr_hash_table
{
/* The table itself.
This is an array of `expr_hash_table_size' elements. */
@@ -356,10 +356,10 @@ struct hash_table
};
/* Expression hash table. */
-static struct hash_table expr_hash_table;
+static struct expr_hash_table expr_hash_table;
/* Copy propagation hash table. */
-static struct hash_table set_hash_table;
+static struct expr_hash_table set_hash_table;
/* Mapping of uids to cuids.
Only real insns get cuids. */
@@ -524,10 +524,10 @@ static void free_reg_set_mem (void);
static void record_one_set (int, rtx);
static void record_set_info (rtx, rtx, void *);
static void compute_sets (void);
-static void hash_scan_insn (rtx, struct hash_table *, int);
-static void hash_scan_set (rtx, rtx, struct hash_table *);
-static void hash_scan_clobber (rtx, rtx, struct hash_table *);
-static void hash_scan_call (rtx, rtx, struct hash_table *);
+static void hash_scan_insn (rtx, struct expr_hash_table *, int);
+static void hash_scan_set (rtx, rtx, struct expr_hash_table *);
+static void hash_scan_clobber (rtx, rtx, struct expr_hash_table *);
+static void hash_scan_call (rtx, rtx, struct expr_hash_table *);
static int want_to_gcse_p (rtx);
static bool can_assign_to_reg_p (rtx);
static bool gcse_constant_p (rtx);
@@ -535,20 +535,20 @@ static int oprs_unchanged_p (rtx, rtx, int);
static int oprs_anticipatable_p (rtx, rtx);
static int oprs_available_p (rtx, rtx);
static void insert_expr_in_table (rtx, enum machine_mode, rtx, int, int,
- struct hash_table *);
-static void insert_set_in_table (rtx, rtx, struct hash_table *);
+ struct expr_hash_table *);
+static void insert_set_in_table (rtx, rtx, struct expr_hash_table *);
static unsigned int hash_expr (rtx, enum machine_mode, int *, int);
static unsigned int hash_set (int, int);
static int expr_equiv_p (rtx, rtx);
static void record_last_reg_set_info (rtx, int);
static void record_last_mem_set_info (rtx);
static void record_last_set_info (rtx, rtx, void *);
-static void compute_hash_table (struct hash_table *);
-static void alloc_hash_table (int, struct hash_table *, int);
-static void free_hash_table (struct hash_table *);
-static void compute_hash_table_work (struct hash_table *);
-static void dump_hash_table (FILE *, const char *, struct hash_table *);
-static struct expr *lookup_set (unsigned int, struct hash_table *);
+static void compute_hash_table (struct expr_hash_table *);
+static void alloc_hash_table (int, struct expr_hash_table *, int);
+static void free_hash_table (struct expr_hash_table *);
+static void compute_hash_table_work (struct expr_hash_table *);
+static void dump_hash_table (FILE *, const char *, struct expr_hash_table *);
+static struct expr *lookup_set (unsigned int, struct expr_hash_table *);
static struct expr *next_set (unsigned int, struct expr *);
static void reset_opr_set_tables (void);
static int oprs_not_set_p (rtx, rtx);
@@ -561,7 +561,7 @@ static void free_cprop_mem (void);
static void compute_transp (rtx, int, sbitmap *, int);
static void compute_transpout (void);
static void compute_local_properties (sbitmap *, sbitmap *, sbitmap *,
- struct hash_table *);
+ struct expr_hash_table *);
static void compute_cprop_data (void);
static void find_used_regs (rtx *, void *);
static int try_replace_reg (rtx, rtx, rtx);
@@ -701,7 +701,7 @@ gcse_main (rtx f ATTRIBUTE_UNUSED)
pass = 0;
initial_bytes_used = bytes_used;
max_pass_bytes = 0;
- gcse_obstack_bottom = gcse_alloc (1);
+ gcse_obstack_bottom = (char *) gcse_alloc (1);
changed = 1;
while (changed && pass < MAX_GCSE_PASSES)
{
@@ -736,8 +736,8 @@ gcse_main (rtx f ATTRIBUTE_UNUSED)
if (changed)
{
free_modify_mem_tables ();
- modify_mem_list = gcalloc (last_basic_block, sizeof (rtx));
- canon_modify_mem_list = gcalloc (last_basic_block, sizeof (rtx));
+ modify_mem_list = (rtx *) gcalloc (last_basic_block, sizeof (rtx));
+ canon_modify_mem_list = (rtx *) gcalloc (last_basic_block, sizeof (rtx));
}
free_reg_set_mem ();
alloc_reg_set_mem (max_reg_num ());
@@ -928,7 +928,7 @@ alloc_gcse_mem (void)
but we should never see those anyway, so this is OK.) */
max_uid = get_max_uid ();
- uid_cuid = gcalloc (max_uid + 1, sizeof (int));
+ uid_cuid = (int *) gcalloc (max_uid + 1, sizeof (int));
i = 0;
FOR_EACH_BB (bb)
FOR_BB_INSNS (bb, insn)
@@ -942,7 +942,7 @@ alloc_gcse_mem (void)
/* Create a table mapping cuids to insns. */
max_cuid = i;
- cuid_insn = gcalloc (max_cuid + 1, sizeof (rtx));
+ cuid_insn = (rtx *) gcalloc (max_cuid + 1, sizeof (rtx));
i = 0;
FOR_EACH_BB (bb)
FOR_BB_INSNS (bb, insn)
@@ -956,8 +956,8 @@ alloc_gcse_mem (void)
reg_set_in_block = sbitmap_vector_alloc (last_basic_block, max_gcse_regno);
/* Allocate array to keep a list of insns which modify memory in each
basic block. */
- modify_mem_list = gcalloc (last_basic_block, sizeof (rtx));
- canon_modify_mem_list = gcalloc (last_basic_block, sizeof (rtx));
+ modify_mem_list = (rtx *) gcalloc (last_basic_block, sizeof (rtx));
+ canon_modify_mem_list = (rtx *) gcalloc (last_basic_block, sizeof (rtx));
modify_mem_list_set = BITMAP_ALLOC (NULL);
blocks_with_calls = BITMAP_ALLOC (NULL);
}
@@ -1007,7 +1007,7 @@ free_gcse_mem (void)
static void
compute_local_properties (sbitmap *transp, sbitmap *comp, sbitmap *antloc,
- struct hash_table *table)
+ struct expr_hash_table *table)
{
unsigned int i;
@@ -1082,7 +1082,7 @@ static void
alloc_reg_set_mem (int n_regs)
{
reg_set_table_size = n_regs + REG_SET_TABLE_SLOP;
- reg_set_table = gcalloc (reg_set_table_size, sizeof (struct reg_set *));
+ reg_set_table = (struct reg_set **) gcalloc (reg_set_table_size, sizeof (struct reg_set *));
gcc_obstack_init (&reg_set_obstack);
}
@@ -1107,14 +1107,14 @@ record_one_set (int regno, rtx insn)
{
int new_size = regno + REG_SET_TABLE_SLOP;
- reg_set_table = grealloc (reg_set_table,
+ reg_set_table = (struct reg_set **) grealloc (reg_set_table,
new_size * sizeof (struct reg_set *));
memset (reg_set_table + reg_set_table_size, 0,
(new_size - reg_set_table_size) * sizeof (struct reg_set *));
reg_set_table_size = new_size;
}
- new_reg_info = obstack_alloc (&reg_set_obstack, sizeof (struct reg_set));
+ new_reg_info = (struct reg_set *) obstack_alloc (&reg_set_obstack, sizeof (struct reg_set));
bytes_used += sizeof (struct reg_set);
new_reg_info->bb_index = BLOCK_NUM (insn);
new_reg_info->next = reg_set_table[regno];
@@ -1485,7 +1485,7 @@ expr_equiv_p (rtx x, rtx y)
static void
insert_expr_in_table (rtx x, enum machine_mode mode, rtx insn, int antic_p,
- int avail_p, struct hash_table *table)
+ int avail_p, struct expr_hash_table *table)
{
int found, do_not_record_p;
unsigned int hash;
@@ -1513,7 +1513,7 @@ insert_expr_in_table (rtx x, enum machine_mode mode, rtx insn, int antic_p,
if (! found)
{
- cur_expr = gcse_alloc (sizeof (struct expr));
+ cur_expr = (struct expr *) gcse_alloc (sizeof (struct expr));
bytes_used += sizeof (struct expr);
if (table->table[hash] == NULL)
/* This is the first pattern that hashed to this index. */
@@ -1546,7 +1546,7 @@ insert_expr_in_table (rtx x, enum machine_mode mode, rtx insn, int antic_p,
else
{
/* First occurrence of this expression in this basic block. */
- antic_occr = gcse_alloc (sizeof (struct occr));
+ antic_occr = (struct occr *) gcse_alloc (sizeof (struct occr));
bytes_used += sizeof (struct occr);
antic_occr->insn = insn;
antic_occr->next = cur_expr->antic_occr;
@@ -1570,7 +1570,7 @@ insert_expr_in_table (rtx x, enum machine_mode mode, rtx insn, int antic_p,
else
{
/* First occurrence of this expression in this basic block. */
- avail_occr = gcse_alloc (sizeof (struct occr));
+ avail_occr = (struct occr *) gcse_alloc (sizeof (struct occr));
bytes_used += sizeof (struct occr);
avail_occr->insn = insn;
avail_occr->next = cur_expr->avail_occr;
@@ -1586,7 +1586,7 @@ insert_expr_in_table (rtx x, enum machine_mode mode, rtx insn, int antic_p,
basic block. */
static void
-insert_set_in_table (rtx x, rtx insn, struct hash_table *table)
+insert_set_in_table (rtx x, rtx insn, struct expr_hash_table *table)
{
int found;
unsigned int hash;
@@ -1610,7 +1610,7 @@ insert_set_in_table (rtx x, rtx insn, struct hash_table *table)
if (! found)
{
- cur_expr = gcse_alloc (sizeof (struct expr));
+ cur_expr = (struct expr *) gcse_alloc (sizeof (struct expr));
bytes_used += sizeof (struct expr);
if (table->table[hash] == NULL)
/* This is the first pattern that hashed to this index. */
@@ -1643,7 +1643,7 @@ insert_set_in_table (rtx x, rtx insn, struct hash_table *table)
else
{
/* First occurrence of this expression in this basic block. */
- cur_occr = gcse_alloc (sizeof (struct occr));
+ cur_occr = (struct occr *) gcse_alloc (sizeof (struct occr));
bytes_used += sizeof (struct occr);
cur_occr->insn = insn;
@@ -1681,7 +1681,7 @@ gcse_constant_p (rtx x)
expression one). */
static void
-hash_scan_set (rtx pat, rtx insn, struct hash_table *table)
+hash_scan_set (rtx pat, rtx insn, struct expr_hash_table *table)
{
rtx src = SET_SRC (pat);
rtx dest = SET_DEST (pat);
@@ -1803,14 +1803,14 @@ hash_scan_set (rtx pat, rtx insn, struct hash_table *table)
static void
hash_scan_clobber (rtx x ATTRIBUTE_UNUSED, rtx insn ATTRIBUTE_UNUSED,
- struct hash_table *table ATTRIBUTE_UNUSED)
+ struct expr_hash_table *table ATTRIBUTE_UNUSED)
{
/* Currently nothing to do. */
}
static void
hash_scan_call (rtx x ATTRIBUTE_UNUSED, rtx insn ATTRIBUTE_UNUSED,
- struct hash_table *table ATTRIBUTE_UNUSED)
+ struct expr_hash_table *table ATTRIBUTE_UNUSED)
{
/* Currently nothing to do. */
}
@@ -1829,7 +1829,7 @@ hash_scan_call (rtx x ATTRIBUTE_UNUSED, rtx insn ATTRIBUTE_UNUSED,
not record any expressions. */
static void
-hash_scan_insn (rtx insn, struct hash_table *table, int in_libcall_block)
+hash_scan_insn (rtx insn, struct expr_hash_table *table, int in_libcall_block)
{
rtx pat = PATTERN (insn);
int i;
@@ -1862,7 +1862,7 @@ hash_scan_insn (rtx insn, struct hash_table *table, int in_libcall_block)
}
static void
-dump_hash_table (FILE *file, const char *name, struct hash_table *table)
+dump_hash_table (FILE *file, const char *name, struct expr_hash_table *table)
{
int i;
/* Flattened out table, so it's printed in proper order. */
@@ -1870,8 +1870,8 @@ dump_hash_table (FILE *file, const char *name, struct hash_table *table)
unsigned int *hash_val;
struct expr *expr;
- flat_table = xcalloc (table->n_elems, sizeof (struct expr *));
- hash_val = xmalloc (table->n_elems * sizeof (unsigned int));
+ flat_table = XCNEWVEC (struct expr *, table->n_elems);
+ hash_val = XNEWVEC (unsigned int, table->n_elems);
for (i = 0; i < (int) table->size; i++)
for (expr = table->table[i]; expr != NULL; expr = expr->next_same_hash)
@@ -1958,9 +1958,9 @@ canon_list_insert (rtx dest ATTRIBUTE_UNUSED, rtx unused1 ATTRIBUTE_UNUSED,
bb = BLOCK_NUM (insn);
canon_modify_mem_list[bb] =
- alloc_EXPR_LIST (VOIDmode, dest_addr, canon_modify_mem_list[bb]);
+ alloc_EXPR_LIST (REG_DEP_TRUE, dest_addr, canon_modify_mem_list[bb]);
canon_modify_mem_list[bb] =
- alloc_EXPR_LIST (VOIDmode, dest, canon_modify_mem_list[bb]);
+ alloc_EXPR_LIST (REG_DEP_TRUE, dest, canon_modify_mem_list[bb]);
}
/* Record memory modification information for INSN. We do not actually care
@@ -2027,7 +2027,7 @@ record_last_set_info (rtx dest, rtx setter ATTRIBUTE_UNUSED, void *data)
TABLE is the table computed. */
static void
-compute_hash_table_work (struct hash_table *table)
+compute_hash_table_work (struct expr_hash_table *table)
{
unsigned int i;
@@ -2040,7 +2040,7 @@ compute_hash_table_work (struct hash_table *table)
/* re-Cache any INSN_LIST nodes we have allocated. */
clear_modify_mem_tables ();
/* Some working arrays used to track first and last set in each block. */
- reg_avail_info = gmalloc (max_gcse_regno * sizeof (struct reg_avail_info));
+ reg_avail_info = (struct reg_avail_info *) gmalloc (max_gcse_regno * sizeof (struct reg_avail_info));
for (i = 0; i < max_gcse_regno; ++i)
reg_avail_info[i].last_bb = NULL;
@@ -2105,7 +2105,7 @@ compute_hash_table_work (struct hash_table *table)
be created. */
static void
-alloc_hash_table (int n_insns, struct hash_table *table, int set_p)
+alloc_hash_table (int n_insns, struct expr_hash_table *table, int set_p)
{
int n;
@@ -2118,14 +2118,14 @@ alloc_hash_table (int n_insns, struct hash_table *table, int set_p)
??? Later take some measurements. */
table->size |= 1;
n = table->size * sizeof (struct expr *);
- table->table = gmalloc (n);
+ table->table = (struct expr **) gmalloc (n);
table->set_p = set_p;
}
/* Free things allocated by alloc_hash_table. */
static void
-free_hash_table (struct hash_table *table)
+free_hash_table (struct expr_hash_table *table)
{
free (table->table);
}
@@ -2134,7 +2134,7 @@ free_hash_table (struct hash_table *table)
expression hash table. */
static void
-compute_hash_table (struct hash_table *table)
+compute_hash_table (struct expr_hash_table *table)
{
/* Initialize count of number of entries in hash table. */
table->n_elems = 0;
@@ -2149,7 +2149,7 @@ compute_hash_table (struct hash_table *table)
table entry, or NULL if not found. */
static struct expr *
-lookup_set (unsigned int regno, struct hash_table *table)
+lookup_set (unsigned int regno, struct expr_hash_table *table)
{
unsigned int hash = hash_set (regno, table->size);
struct expr *expr;
@@ -2772,7 +2772,7 @@ find_avail_set (int regno, rtx insn)
static int
cprop_jump (basic_block bb, rtx setcc, rtx jump, rtx from, rtx src)
{
- rtx new, set_src, note_src;
+ rtx fresh, set_src, note_src;
rtx set = pc_set (jump);
rtx note = find_reg_equal_equiv_note (jump);
@@ -2804,22 +2804,22 @@ cprop_jump (basic_block bb, rtx setcc, rtx jump, rtx from, rtx src)
else
setcc = NULL_RTX;
- new = simplify_replace_rtx (set_src, from, src);
+ fresh = simplify_replace_rtx (set_src, from, src);
/* If no simplification can be made, then try the next register. */
- if (rtx_equal_p (new, SET_SRC (set)))
+ if (rtx_equal_p (fresh, SET_SRC (set)))
return 0;
/* If this is now a no-op delete it, otherwise this must be a valid insn. */
- if (new == pc_rtx)
+ if (fresh == pc_rtx)
delete_insn (jump);
else
{
/* Ensure the value computed inside the jump insn to be equivalent
to one computed by setcc. */
- if (setcc && modified_in_p (new, setcc))
+ if (setcc && modified_in_p (fresh, setcc))
return 0;
- if (! validate_change (jump, &SET_SRC (set), new, 0))
+ if (! validate_change (jump, &SET_SRC (set), fresh, 0))
{
/* When (some) constants are not valid in a comparison, and there
are two registers to be replaced by constants before the entire
@@ -2830,8 +2830,8 @@ cprop_jump (basic_block bb, rtx setcc, rtx jump, rtx from, rtx src)
we need to attach a note to the branch itself to make this
optimization work. */
- if (!rtx_equal_p (new, note_src))
- set_unique_reg_note (jump, REG_EQUAL, copy_rtx (new));
+ if (!rtx_equal_p (fresh, note_src))
+ set_unique_reg_note (jump, REG_EQUAL, copy_rtx (fresh));
return 0;
}
@@ -3344,7 +3344,7 @@ find_implicit_sets (void)
{
basic_block bb, dest;
unsigned int count;
- rtx cond, new;
+ rtx cond, fresh;
count = 0;
FOR_EACH_BB (bb)
@@ -3365,9 +3365,9 @@ find_implicit_sets (void)
if (dest && single_pred_p (dest)
&& dest != EXIT_BLOCK_PTR)
{
- new = gen_rtx_SET (VOIDmode, XEXP (cond, 0),
+ fresh = gen_rtx_SET (VOIDmode, XEXP (cond, 0),
XEXP (cond, 1));
- implicit_sets[dest->index] = new;
+ implicit_sets[dest->index] = fresh;
if (dump_file)
{
fprintf(dump_file, "Implicit set of reg %d in ",
@@ -3576,7 +3576,7 @@ bypass_block (basic_block bb, rtx setcc, rtx jump)
unsigned int regno = REGNO (reg_used->reg_rtx);
basic_block dest, old_dest;
struct expr *set;
- rtx src, new;
+ rtx src, fresh;
if (regno >= max_gcse_regno)
continue;
@@ -3597,7 +3597,7 @@ bypass_block (basic_block bb, rtx setcc, rtx jump)
SET_DEST (PATTERN (setcc)),
SET_SRC (PATTERN (setcc)));
- new = simplify_replace_rtx (src, reg_used->reg_rtx,
+ fresh = simplify_replace_rtx (src, reg_used->reg_rtx,
SET_SRC (set->expr));
/* Jump bypassing may have already placed instructions on
@@ -3605,14 +3605,14 @@ bypass_block (basic_block bb, rtx setcc, rtx jump)
has instructions associated with it, as these insns won't
get executed if the incoming edge is redirected. */
- if (new == pc_rtx)
+ if (fresh == pc_rtx)
{
edest = FALLTHRU_EDGE (bb);
dest = edest->insns.r ? NULL : edest->dest;
}
- else if (GET_CODE (new) == LABEL_REF)
+ else if (GET_CODE (fresh) == LABEL_REF)
{
- dest = BLOCK_FOR_INSN (XEXP (new, 0));
+ dest = BLOCK_FOR_INSN (XEXP (fresh, 0));
/* Don't bypass edges containing instructions. */
edest = find_edge (bb, dest);
if (edest && edest->insns.r)
@@ -4373,7 +4373,7 @@ pre_insert_copies (void)
static rtx
gcse_emit_move_after (rtx src, rtx dest, rtx insn)
{
- rtx new;
+ rtx fresh;
rtx set = single_set (insn), set2;
rtx note;
rtx eqv;
@@ -4381,20 +4381,20 @@ gcse_emit_move_after (rtx src, rtx dest, rtx insn)
/* This should never fail since we're creating a reg->reg copy
we've verified to be valid. */
- new = emit_insn_after (gen_move_insn (dest, src), insn);
+ fresh = emit_insn_after (gen_move_insn (dest, src), insn);
/* Note the equivalence for local CSE pass. */
- set2 = single_set (new);
+ set2 = single_set (fresh);
if (!set2 || !rtx_equal_p (SET_DEST (set2), dest))
- return new;
+ return fresh;
if ((note = find_reg_equal_equiv_note (insn)))
eqv = XEXP (note, 0);
else
eqv = SET_SRC (set);
- set_unique_reg_note (new, REG_EQUAL, copy_insn_1 (eqv));
+ set_unique_reg_note (fresh, REG_EQUAL, copy_insn_1 (eqv));
- return new;
+ return fresh;
}
/* Delete redundant computations.
@@ -5031,14 +5031,15 @@ static hashval_t
pre_ldst_expr_hash (const void *p)
{
int do_not_record_p = 0;
- const struct ls_expr *x = p;
+ const struct ls_expr *x = (const struct ls_expr *) p;
return hash_rtx (x->pattern, GET_MODE (x->pattern), &do_not_record_p, NULL, false);
}
static int
pre_ldst_expr_eq (const void *p1, const void *p2)
{
- const struct ls_expr *ptr1 = p1, *ptr2 = p2;
+ const struct ls_expr *ptr1 = (const struct ls_expr *) p1;
+ const struct ls_expr *ptr2 = (const struct ls_expr *) p2;
return expr_equiv_p (ptr1->pattern, ptr2->pattern);
}
@@ -5160,7 +5161,7 @@ find_rtx_in_ldst (rtx x)
slot = htab_find_slot (pre_ldst_table, &e, NO_INSERT);
if (!slot || ((struct ls_expr *)*slot)->invalid)
return NULL;
- return *slot;
+ return (struct ls_expr *) *slot;
}
/* Assign each element of the list of mems a monotonically increasing value. */
@@ -5414,7 +5415,7 @@ update_ld_motion_stores (struct expr * expr)
rtx pat = PATTERN (insn);
rtx src = SET_SRC (pat);
rtx reg = expr->reaching_reg;
- rtx copy, new;
+ rtx copy, fresh;
/* If we've already copied it, continue. */
if (expr->reaching_reg == src)
@@ -5430,8 +5431,8 @@ update_ld_motion_stores (struct expr * expr)
}
copy = gen_move_insn ( reg, copy_rtx (SET_SRC (pat)));
- new = emit_insn_before (copy, insn);
- record_one_set (REGNO (reg), new);
+ fresh = emit_insn_before (copy, insn);
+ record_one_set (REGNO (reg), fresh);
SET_SRC (pat) = reg;
/* un-recognize this pattern since it's probably different now. */
@@ -5467,7 +5468,7 @@ static void
reg_set_info (rtx dest, rtx setter ATTRIBUTE_UNUSED,
void *data)
{
- sbitmap bb_reg = data;
+ sbitmap bb_reg = (sbitmap) data;
if (GET_CODE (dest) == SUBREG)
dest = SUBREG_REG (dest);
@@ -5487,7 +5488,7 @@ static void
reg_clear_last_set (rtx dest, rtx setter ATTRIBUTE_UNUSED,
void *data)
{
- int *dead_vec = data;
+ int *dead_vec = (int *) data;
if (GET_CODE (dest) == SUBREG)
dest = SUBREG_REG (dest);
@@ -5541,7 +5542,7 @@ extract_mentioned_regs_helper (rtx x, rtx accum)
switch (code)
{
case REG:
- return alloc_EXPR_LIST (0, x, accum);
+ return alloc_EXPR_LIST (REG_DEP_TRUE, x, accum);
case MEM:
x = XEXP (x, 0);
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index f11532f19be..e013a7bdfb1 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -318,7 +318,7 @@ attr_hash_add_rtx (int hashcode, rtx rtl)
{
struct attr_hash *h;
- h = obstack_alloc (hash_obstack, sizeof (struct attr_hash));
+ h = (struct attr_hash *) obstack_alloc (hash_obstack, sizeof (struct attr_hash));
h->hashcode = hashcode;
h->u.rtl = rtl;
h->next = attr_hash_table[hashcode % RTL_HASH_SIZE];
@@ -332,7 +332,7 @@ attr_hash_add_string (int hashcode, char *str)
{
struct attr_hash *h;
- h = obstack_alloc (hash_obstack, sizeof (struct attr_hash));
+ h = (struct attr_hash *) obstack_alloc (hash_obstack, sizeof (struct attr_hash));
h->hashcode = -hashcode;
h->u.str = str;
h->next = attr_hash_table[hashcode % RTL_HASH_SIZE];
@@ -593,7 +593,7 @@ attr_string (const char *str, int len)
return h->u.str; /* <-- return if found. */
/* Not found; create a permanent copy and add it to the hash table. */
- new_str = obstack_alloc (hash_obstack, len + 1);
+ new_str = (char *) obstack_alloc (hash_obstack, len + 1);
memcpy (new_str, str, len);
new_str[len] = '\0';
attr_hash_add_string (hashcode, new_str);
@@ -1288,7 +1288,7 @@ get_attr_value (rtx value, struct attr_desc *attr, int insn_code)
|| insn_alternatives[av->first_insn->def->insn_code]))
return av;
- av = oballoc (sizeof (struct attr_value));
+ av = (struct attr_value *) oballoc (sizeof (struct attr_value));
av->value = value;
av->next = attr->first_value;
attr->first_value = av;
@@ -1431,7 +1431,7 @@ fill_attr (struct attr_desc *attr)
else
av = get_attr_value (value, attr, id->insn_code);
- ie = oballoc (sizeof (struct insn_ent));
+ ie = (struct insn_ent *) oballoc (sizeof (struct insn_ent));
ie->def = id;
insert_insn_ent (av, ie);
}
@@ -1562,7 +1562,7 @@ make_length_attrs (void)
no_address_fn[i],
address_fn[i]),
new_attr, ie->def->insn_code);
- new_ie = oballoc (sizeof (struct insn_ent));
+ new_ie = (struct insn_ent *) oballoc (sizeof (struct insn_ent));
new_ie->def = ie->def;
insert_insn_ent (new_av, new_ie);
}
@@ -1627,6 +1627,7 @@ write_length_unit_log (void)
for (length_unit_log = 0; length_or & 1; length_or >>= 1)
length_unit_log++;
}
+ printf ("extern const int length_unit_log;\n");
printf ("const int length_unit_log = %u;\n", length_unit_log);
}
@@ -1836,11 +1837,11 @@ insert_right_side (enum rtx_code code, rtx exp, rtx term, int insn_code, int ins
if (GET_CODE (exp) == code)
{
- rtx new = insert_right_side (code, XEXP (exp, 1),
+ rtx tmp = insert_right_side (code, XEXP (exp, 1),
term, insn_code, insn_index);
- if (new != XEXP (exp, 1))
+ if (tmp != XEXP (exp, 1))
/* Make a copy of this expression and call recursively. */
- newexp = attr_rtx (code, XEXP (exp, 0), new);
+ newexp = attr_rtx (code, XEXP (exp, 0), tmp);
else
newexp = exp;
}
@@ -1970,10 +1971,10 @@ evaluate_eq_attr (rtx exp, rtx value, int insn_code, int insn_index)
for (i = 0; i < XVECLEN (value, 0); i += 2)
{
- rtx this = simplify_test_exp_in_temp (XVECEXP (value, 0, i),
+ rtx it = simplify_test_exp_in_temp (XVECEXP (value, 0, i),
insn_code, insn_index);
- right = insert_right_side (AND, andexp, this,
+ right = insert_right_side (AND, andexp, it,
insn_code, insn_index);
right = insert_right_side (AND, right,
evaluate_eq_attr (exp,
@@ -1985,7 +1986,7 @@ evaluate_eq_attr (rtx exp, rtx value, int insn_code, int insn_index)
insn_code, insn_index);
/* Add this condition into the AND expression. */
- newexp = attr_rtx (NOT, this);
+ newexp = attr_rtx (NOT, it);
andexp = insert_right_side (AND, andexp, newexp,
insn_code, insn_index);
}
@@ -2926,7 +2927,7 @@ gen_attr (rtx exp, int lineno)
name_ptr = XSTR (exp, 1);
while ((p = next_comma_elt (&name_ptr)) != NULL)
{
- av = oballoc (sizeof (struct attr_value));
+ av = (struct attr_value *) oballoc (sizeof (struct attr_value));
av->value = attr_rtx (CONST_STRING, p);
av->next = attr->first_value;
attr->first_value = av;
@@ -3070,7 +3071,7 @@ gen_insn (rtx exp, int lineno)
{
struct insn_def *id;
- id = oballoc (sizeof (struct insn_def));
+ id = (struct insn_def *) oballoc (sizeof (struct insn_def));
id->next = defs;
defs = id;
id->def = exp;
@@ -3134,7 +3135,7 @@ gen_delay (rtx def, int lineno)
have_annul_false = 1;
}
- delay = oballoc (sizeof (struct delay_desc));
+ delay = (struct delay_desc *) oballoc (sizeof (struct delay_desc));
delay->def = def;
delay->num = ++num_delays;
delay->next = delays;
@@ -4211,7 +4212,7 @@ find_attr (const char **name_p, int create)
if (! create)
return NULL;
- attr = oballoc (sizeof (struct attr_desc));
+ attr = (struct attr_desc *) oballoc (sizeof (struct attr_desc));
attr->name = DEF_ATTR_STRING (name);
attr->first_value = attr->default_val = NULL;
attr->is_numeric = attr->is_const = attr->is_special = 0;
@@ -4350,7 +4351,7 @@ static size_t n_insn_reservs;
static void
gen_insn_reserv (rtx def)
{
- struct insn_reserv *decl = oballoc (sizeof (struct insn_reserv));
+ struct insn_reserv *decl = (struct insn_reserv *) oballoc (sizeof (struct insn_reserv));
decl->name = DEF_ATTR_STRING (XSTR (def, 0));
decl->default_latency = XINT (def, 1);
@@ -4391,7 +4392,7 @@ gen_bypass_1 (const char *s, size_t len)
if (s == b->insn)
return; /* already got that one */
- b = oballoc (sizeof (struct bypass_list));
+ b = (struct bypass_list *) oballoc (sizeof (struct bypass_list));
b->insn = s;
b->next = all_bypasses;
all_bypasses = b;
@@ -4597,13 +4598,13 @@ from the machine description file `md'. */\n\n");
printf ("#define operands recog_data.operand\n\n");
/* Make `insn_alternatives'. */
- insn_alternatives = oballoc (insn_code_number * sizeof (int));
+ insn_alternatives = (int *) oballoc (insn_code_number * sizeof (int));
for (id = defs; id; id = id->next)
if (id->insn_code >= 0)
insn_alternatives[id->insn_code] = (1 << id->num_alternatives) - 1;
/* Make `insn_n_alternatives'. */
- insn_n_alternatives = oballoc (insn_code_number * sizeof (int));
+ insn_n_alternatives = (int *) oballoc (insn_code_number * sizeof (int));
for (id = defs; id; id = id->next)
if (id->insn_code >= 0)
insn_n_alternatives[id->insn_code] = id->num_alternatives;
diff --git a/gcc/genautomata.c b/gcc/genautomata.c
index fd8edebcea8..abd51846eb7 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -1248,7 +1248,7 @@ gen_cpu_unit (rtx def)
fatal ("invalid string `%s' in define_cpu_unit", XSTR (def, 0));
for (i = 0; i < vect_length; i++)
{
- decl = create_node (sizeof (struct decl));
+ decl = (struct decl *) create_node (sizeof (struct decl));
decl->mode = dm_unit;
decl->pos = 0;
DECL_UNIT (decl)->name = check_name (str_cpu_units [i], decl->pos);
@@ -1278,7 +1278,7 @@ gen_query_cpu_unit (rtx def)
fatal ("invalid string `%s' in define_query_cpu_unit", XSTR (def, 0));
for (i = 0; i < vect_length; i++)
{
- decl = create_node (sizeof (struct decl));
+ decl = (struct decl *) create_node (sizeof (struct decl));
decl->mode = dm_unit;
decl->pos = 0;
DECL_UNIT (decl)->name = check_name (str_cpu_units [i], decl->pos);
@@ -1312,7 +1312,7 @@ gen_bypass (rtx def)
for (i = 0; i < out_length; i++)
for (j = 0; j < in_length; j++)
{
- decl = create_node (sizeof (struct decl));
+ decl = (struct decl *) create_node (sizeof (struct decl));
decl->mode = dm_bypass;
decl->pos = 0;
DECL_BYPASS (decl)->latency = XINT (def, 0);
@@ -1347,7 +1347,7 @@ gen_excl_set (rtx def)
if (second_str_cpu_units == NULL)
fatal ("invalid second string `%s' in exclusion_set", XSTR (def, 1));
length += first_vect_length;
- decl = create_node (sizeof (struct decl) + (length - 1) * sizeof (char *));
+ decl = (struct decl *) create_node (sizeof (struct decl) + (length - 1) * sizeof (char *));
decl->mode = dm_excl;
decl->pos = 0;
DECL_EXCL (decl)->all_names_num = length;
@@ -1400,14 +1400,14 @@ gen_presence_absence_set (rtx def, int presence_p, int final_p)
: (final_p
? "invalid second string `%s' in final_absence_set"
: "invalid second string `%s' in absence_set")), XSTR (def, 1));
- str_patterns = obstack_alloc (&irp, patterns_length * sizeof (char **));
+ str_patterns = (char ***) obstack_alloc (&irp, patterns_length * sizeof (char **));
for (i = 0; i < patterns_length; i++)
{
str_patterns [i] = get_str_vect (str_pattern_lists [i],
&length, ' ', FALSE);
gcc_assert (str_patterns [i]);
}
- decl = create_node (sizeof (struct decl));
+ decl = (struct decl *) create_node (sizeof (struct decl));
decl->pos = 0;
if (presence_p)
{
@@ -1492,7 +1492,7 @@ gen_automaton (rtx def)
fatal ("invalid string `%s' in define_automaton", XSTR (def, 0));
for (i = 0; i < vect_length; i++)
{
- decl = create_node (sizeof (struct decl));
+ decl = (struct decl *) create_node (sizeof (struct decl));
decl->mode = dm_automaton;
decl->pos = 0;
DECL_AUTOMATON (decl)->name = check_name (str_automata [i], decl->pos);
@@ -1543,19 +1543,19 @@ gen_regexp_el (const char *str)
len = strlen (str);
if (str [len - 1] != ')')
fatal ("garbage after ) in reservation `%s'", reserv_str);
- dstr = alloca (len - 1);
+ dstr = (char *) alloca (len - 1);
memcpy (dstr, str + 1, len - 2);
dstr [len-2] = '\0';
regexp = gen_regexp_sequence (dstr);
}
else if (strcmp (str, NOTHING_NAME) == 0)
{
- regexp = create_node (sizeof (struct decl));
+ regexp = (struct regexp *) create_node (sizeof (struct decl));
regexp->mode = rm_nothing;
}
else
{
- regexp = create_node (sizeof (struct decl));
+ regexp = (struct regexp *) create_node (sizeof (struct decl));
regexp->mode = rm_unit;
REGEXP_UNIT (regexp)->name = str;
}
@@ -1580,7 +1580,7 @@ gen_regexp_repeat (const char *str)
regexp = gen_regexp_el (repeat_vect [0]);
for (i = 1; i < els_num; i++)
{
- repeat = create_node (sizeof (struct regexp));
+ repeat = (struct regexp *) create_node (sizeof (struct regexp));
repeat->mode = rm_repeat;
REGEXP_REPEAT (repeat)->regexp = regexp;
REGEXP_REPEAT (repeat)->repeat_num = atoi (repeat_vect [i]);
@@ -1609,7 +1609,7 @@ gen_regexp_allof (const char *str)
fatal ("invalid `%s' in reservation `%s'", str, reserv_str);
if (els_num > 1)
{
- allof = create_node (sizeof (struct regexp)
+ allof = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t) * (els_num - 1));
allof->mode = rm_allof;
REGEXP_ALLOF (allof)->regexps_num = els_num;
@@ -1635,7 +1635,7 @@ gen_regexp_oneof (const char *str)
fatal ("invalid `%s' in reservation `%s'", str, reserv_str);
if (els_num > 1)
{
- oneof = create_node (sizeof (struct regexp)
+ oneof = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t) * (els_num - 1));
oneof->mode = rm_oneof;
REGEXP_ONEOF (oneof)->regexps_num = els_num;
@@ -1659,7 +1659,7 @@ gen_regexp_sequence (const char *str)
sequence_vect = get_str_vect (str, &els_num, ',', TRUE);
if (els_num > 1)
{
- sequence = create_node (sizeof (struct regexp)
+ sequence = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t) * (els_num - 1));
sequence->mode = rm_sequence;
REGEXP_SEQUENCE (sequence)->regexps_num = els_num;
@@ -1690,7 +1690,7 @@ gen_reserv (rtx def)
{
decl_t decl;
- decl = create_node (sizeof (struct decl));
+ decl = (struct decl *) create_node (sizeof (struct decl));
decl->mode = dm_reserv;
decl->pos = 0;
DECL_RESERV (decl)->name = check_name (XSTR (def, 0), decl->pos);
@@ -1708,7 +1708,7 @@ gen_insn_reserv (rtx def)
{
decl_t decl;
- decl = create_node (sizeof (struct decl));
+ decl = (struct decl *) create_node (sizeof (struct decl));
decl->mode = dm_insn_reserv;
decl->pos = 0;
DECL_INSN_RESERV (decl)->name
@@ -1785,7 +1785,7 @@ insert_automaton_decl (decl_t automaton_decl)
{
void **entry_ptr;
- entry_ptr = htab_find_slot (automaton_decl_table, automaton_decl, 1);
+ entry_ptr = htab_find_slot (automaton_decl_table, automaton_decl, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) automaton_decl;
return (decl_t) *entry_ptr;
@@ -1884,7 +1884,7 @@ insert_insn_decl (decl_t insn_decl)
{
void **entry_ptr;
- entry_ptr = htab_find_slot (insn_decl_table, insn_decl, 1);
+ entry_ptr = htab_find_slot (insn_decl_table, insn_decl, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) insn_decl;
return (decl_t) *entry_ptr;
@@ -1985,7 +1985,7 @@ insert_decl (decl_t decl)
{
void **entry_ptr;
- entry_ptr = htab_find_slot (decl_table, decl, 1);
+ entry_ptr = htab_find_slot (decl_table, decl, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) decl;
return (decl_t) *entry_ptr;
@@ -2056,7 +2056,7 @@ process_excls (char **names, int num, pos_t excl_pos ATTRIBUTE_UNUSED)
error ("`%s' in exclusion is not unit", names [i]);
else
{
- new_el = create_node (sizeof (struct unit_set_el));
+ new_el = (unit_set_el_t) create_node (sizeof (struct unit_set_el));
new_el->unit_decl = DECL_UNIT (decl_in_table);
new_el->next_unit_set_el = NULL;
if (last_el == NULL)
@@ -2109,7 +2109,7 @@ add_excls (unit_set_el_t dest_list, unit_set_el_t source_list,
if (curr_el == NULL)
{
/* Element not found - insert. */
- copy = copy_node (src, sizeof (*src));
+ copy = (unit_set_el_t) copy_node (src, sizeof (*src));
copy->next_unit_set_el = NULL;
if (prev_el == NULL)
dst->unit_decl->excl_list = copy;
@@ -2156,7 +2156,7 @@ process_presence_absence_names (char **names, int num,
: "`%s' in absence set is not unit")), names [i]);
else
{
- new_el = create_node (sizeof (struct unit_set_el));
+ new_el = (unit_set_el_t) create_node (sizeof (struct unit_set_el));
new_el->unit_decl = DECL_UNIT (decl_in_table);
new_el->next_unit_set_el = NULL;
if (last_el == NULL)
@@ -2191,7 +2191,7 @@ process_presence_absence_patterns (char ***patterns, int num,
{
for (j = 0; patterns [i] [j] != NULL; j++)
;
- new_el = create_node (sizeof (struct pattern_set_el)
+ new_el = (pattern_set_el_t) create_node (sizeof (struct pattern_set_el)
+ sizeof (struct unit_decl *) * j);
new_el->unit_decls
= (struct unit_decl **) ((char *) new_el
@@ -2338,7 +2338,7 @@ add_presence_absence (unit_set_el_t dest_list,
prev_el != NULL && prev_el->next_pattern_set_el != NULL;
prev_el = prev_el->next_pattern_set_el)
;
- copy = copy_node (pat, sizeof (*pat));
+ copy = (pattern_set_el_t) copy_node (pat, sizeof (*pat));
copy->next_pattern_set_el = NULL;
if (prev_el == NULL)
{
@@ -2668,7 +2668,7 @@ process_regexp (regexp_t regexp)
case dm_reserv:
DECL_RESERV (decl_in_table)->reserv_is_used = 1;
- new_regexp = create_node (sizeof (struct regexp));
+ new_regexp = (struct regexp *) create_node (sizeof (struct regexp));
new_regexp->mode = rm_reserv;
new_regexp->pos = regexp->pos;
REGEXP_RESERV (new_regexp)->name = REGEXP_UNIT (regexp)->name;
@@ -3109,7 +3109,7 @@ static decl_t advance_cycle_insn_decl;
static void
add_advance_cycle_insn_decl (void)
{
- advance_cycle_insn_decl = create_node (sizeof (struct decl));
+ advance_cycle_insn_decl = (struct decl *) create_node (sizeof (struct decl));
advance_cycle_insn_decl->mode = dm_insn_reserv;
advance_cycle_insn_decl->pos = no_pos;
DECL_INSN_RESERV (advance_cycle_insn_decl)->regexp = NULL;
@@ -3152,7 +3152,7 @@ get_free_alt_state (void)
#ifndef NDEBUG
allocated_alt_states_num++;
#endif
- result = create_node (sizeof (struct alt_state));
+ result = (struct alt_state *) create_node (sizeof (struct alt_state));
}
result->state = NULL;
result->next_alt_state = NULL;
@@ -3628,7 +3628,7 @@ get_free_state (int with_reservs, automaton_t automaton)
#ifndef NDEBUG
allocated_states_num++;
#endif
- result = create_node (sizeof (struct state));
+ result = (struct state *) create_node (sizeof (struct state));
result->automaton = automaton;
result->first_out_arc = NULL;
result->unique_num = curr_unique_state_num;
@@ -3719,7 +3719,7 @@ insert_state (state_t state)
{
void **entry_ptr;
- entry_ptr = htab_find_slot (state_table, (void *) state, 1);
+ entry_ptr = htab_find_slot (state_table, (void *) state, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) state;
return (state_t) *entry_ptr;
@@ -3896,7 +3896,7 @@ add_arc (state_t from_state, state_t to_state, ainsn_t ainsn)
#ifndef NDEBUG
allocated_arcs_num++;
#endif
- new_arc = create_node (sizeof (struct arc));
+ new_arc = (struct arc *) create_node (sizeof (struct arc));
new_arc->to_state = NULL;
new_arc->insn = NULL;
new_arc->next_out_arc = NULL;
@@ -3970,7 +3970,7 @@ get_free_automata_list_el (void)
= first_free_automata_list_el->next_automata_list_el;
}
else
- result = create_node (sizeof (struct automata_list_el));
+ result = (struct automata_list_el *) create_node (sizeof (struct automata_list_el));
result->automaton = NULL;
result->next_automata_list_el = NULL;
return result;
@@ -4074,8 +4074,8 @@ automata_list_finish (void)
if (current_automata_list == NULL)
return NULL;
- entry_ptr = htab_find_slot (automata_list_table,
- (void *) current_automata_list, 1);
+ entry_ptr = (void **) htab_find_slot (automata_list_table,
+ (void *) current_automata_list, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) current_automata_list;
else
@@ -4197,7 +4197,7 @@ form_reserv_sets_list (pattern_set_el_t pattern_list)
prev = first = NULL;
for (el = pattern_list; el != NULL; el = el->next_pattern_set_el)
{
- curr = create_node (sizeof (struct pattern_reserv));
+ curr = (struct pattern_reserv *) create_node (sizeof (struct pattern_reserv));
curr->reserv = alloc_empty_reserv_sets ();
curr->next_pattern_reserv = NULL;
for (i = 0; i < el->units_num; i++)
@@ -4368,17 +4368,17 @@ copy_insn_regexp (regexp_t regexp)
break;
case rm_unit:
- result = copy_node (regexp, sizeof (struct regexp));
+ result = (struct regexp *) copy_node (regexp, sizeof (struct regexp));
break;
case rm_repeat:
- result = copy_node (regexp, sizeof (struct regexp));
+ result = (struct regexp *) copy_node (regexp, sizeof (struct regexp));
REGEXP_REPEAT (result)->regexp
= copy_insn_regexp (REGEXP_REPEAT (regexp)->regexp);
break;
case rm_sequence:
- result = copy_node (regexp,
+ result = (struct regexp *) copy_node (regexp,
sizeof (struct regexp) + sizeof (regexp_t)
* (REGEXP_SEQUENCE (regexp)->regexps_num - 1));
for (i = 0; i <REGEXP_SEQUENCE (regexp)->regexps_num; i++)
@@ -4387,7 +4387,7 @@ copy_insn_regexp (regexp_t regexp)
break;
case rm_allof:
- result = copy_node (regexp,
+ result = (struct regexp *) copy_node (regexp,
sizeof (struct regexp) + sizeof (regexp_t)
* (REGEXP_ALLOF (regexp)->regexps_num - 1));
for (i = 0; i < REGEXP_ALLOF (regexp)->regexps_num; i++)
@@ -4396,7 +4396,7 @@ copy_insn_regexp (regexp_t regexp)
break;
case rm_oneof:
- result = copy_node (regexp,
+ result = (struct regexp *) copy_node (regexp,
sizeof (struct regexp) + sizeof (regexp_t)
* (REGEXP_ONEOF (regexp)->regexps_num - 1));
for (i = 0; i < REGEXP_ONEOF (regexp)->regexps_num; i++)
@@ -4405,7 +4405,7 @@ copy_insn_regexp (regexp_t regexp)
break;
case rm_nothing:
- result = copy_node (regexp, sizeof (struct regexp));
+ result = (struct regexp *) copy_node (regexp, sizeof (struct regexp));
break;
default:
@@ -4434,7 +4434,7 @@ transform_1 (regexp_t regexp)
gcc_assert (repeat_num > 1);
operand = REGEXP_REPEAT (regexp)->regexp;
pos = regexp->mode;
- regexp = create_node (sizeof (struct regexp) + sizeof (regexp_t)
+ regexp = (struct regexp *) create_node (sizeof (struct regexp) + sizeof (regexp_t)
* (repeat_num - 1));
regexp->mode = rm_sequence;
regexp->pos = pos;
@@ -4471,7 +4471,7 @@ transform_2 (regexp_t regexp)
{
gcc_assert (REGEXP_SEQUENCE (sequence)->regexps_num > 1
&& REGEXP_SEQUENCE (regexp)->regexps_num > 1);
- result = create_node (sizeof (struct regexp)
+ result = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t)
* (REGEXP_SEQUENCE (regexp)->regexps_num
+ REGEXP_SEQUENCE (sequence)->regexps_num
@@ -4515,7 +4515,7 @@ transform_2 (regexp_t regexp)
{
gcc_assert (REGEXP_ALLOF (allof)->regexps_num > 1
&& REGEXP_ALLOF (regexp)->regexps_num > 1);
- result = create_node (sizeof (struct regexp)
+ result = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t)
* (REGEXP_ALLOF (regexp)->regexps_num
+ REGEXP_ALLOF (allof)->regexps_num - 2));
@@ -4558,7 +4558,7 @@ transform_2 (regexp_t regexp)
{
gcc_assert (REGEXP_ONEOF (oneof)->regexps_num > 1
&& REGEXP_ONEOF (regexp)->regexps_num > 1);
- result = create_node (sizeof (struct regexp)
+ result = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t)
* (REGEXP_ONEOF (regexp)->regexps_num
+ REGEXP_ONEOF (oneof)->regexps_num - 2));
@@ -4613,7 +4613,7 @@ transform_3 (regexp_t regexp)
{
gcc_assert (REGEXP_ONEOF (oneof)->regexps_num > 1
&& REGEXP_SEQUENCE (regexp)->regexps_num > 1);
- result = create_node (sizeof (struct regexp)
+ result = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t)
* (REGEXP_ONEOF (oneof)->regexps_num - 1));
result->mode = rm_oneof;
@@ -4623,7 +4623,7 @@ transform_3 (regexp_t regexp)
for (i = 0; i < REGEXP_ONEOF (result)->regexps_num; i++)
{
sequence
- = create_node (sizeof (struct regexp)
+ = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t)
* (REGEXP_SEQUENCE (regexp)->regexps_num - 1));
sequence->mode = rm_sequence;
@@ -4665,7 +4665,7 @@ transform_3 (regexp_t regexp)
{
gcc_assert (REGEXP_ONEOF (oneof)->regexps_num > 1
&& REGEXP_ALLOF (regexp)->regexps_num > 1);
- result = create_node (sizeof (struct regexp)
+ result = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t)
* (REGEXP_ONEOF (oneof)->regexps_num - 1));
result->mode = rm_oneof;
@@ -4675,7 +4675,7 @@ transform_3 (regexp_t regexp)
for (i = 0; i < REGEXP_ONEOF (result)->regexps_num; i++)
{
allof
- = create_node (sizeof (struct regexp)
+ = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t)
* (REGEXP_ALLOF (regexp)->regexps_num - 1));
allof->mode = rm_allof;
@@ -4720,7 +4720,7 @@ transform_3 (regexp_t regexp)
{
gcc_assert (max_seq_length != 1
&& REGEXP_ALLOF (regexp)->regexps_num > 1);
- result = create_node (sizeof (struct regexp)
+ result = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t) * (max_seq_length - 1));
result->mode = rm_sequence;
result->pos = regexp->pos;
@@ -4758,7 +4758,7 @@ transform_3 (regexp_t regexp)
REGEXP_SEQUENCE (result)->regexps [i] = allof_op;
else
{
- allof = create_node (sizeof (struct regexp)
+ allof = (struct regexp *) create_node (sizeof (struct regexp)
+ sizeof (regexp_t)
* (allof_length - 1));
allof->mode = rm_allof;
@@ -5675,7 +5675,7 @@ cache_presence (state_t state)
sz = (description->query_units_num + sizeof (int) * CHAR_BIT - 1)
/ (sizeof (int) * CHAR_BIT);
- state->presence_signature = create_node (sz * sizeof (int));
+ state->presence_signature = (unsigned int *) create_node (sz * sizeof (int));
for (i = 0; i < description->units_num; i++)
if (units_array [i]->query_p)
{
@@ -6403,7 +6403,7 @@ create_ainsns (void)
decl = description->decls [i];
if (decl->mode == dm_insn_reserv)
{
- curr_ainsn = create_node (sizeof (struct ainsn));
+ curr_ainsn = (struct ainsn *) create_node (sizeof (struct ainsn));
curr_ainsn->insn_reserv_decl = DECL_INSN_RESERV (decl);
curr_ainsn->important_p = FALSE;
curr_ainsn->next_ainsn = NULL;
@@ -6461,7 +6461,7 @@ create_automata (void)
curr_automaton_num < automata_num;
curr_automaton_num++, prev_automaton = curr_automaton)
{
- curr_automaton = create_node (sizeof (struct automaton));
+ curr_automaton = (struct automaton *) create_node (sizeof (struct automaton));
curr_automaton->ainsn_list = create_ainsns ();
curr_automaton->corresponding_automaton_decl = NULL;
curr_automaton->next_automaton = NULL;
@@ -6482,7 +6482,7 @@ create_automata (void)
if (decl->mode == dm_automaton
&& DECL_AUTOMATON (decl)->automaton_is_used)
{
- curr_automaton = create_node (sizeof (struct automaton));
+ curr_automaton = (struct automaton *) create_node (sizeof (struct automaton));
curr_automaton->ainsn_list = create_ainsns ();
curr_automaton->corresponding_automaton_decl
= DECL_AUTOMATON (decl);
@@ -6499,7 +6499,7 @@ create_automata (void)
}
if (curr_automaton_num == 0)
{
- curr_automaton = create_node (sizeof (struct automaton));
+ curr_automaton = (struct automaton *) create_node (sizeof (struct automaton));
curr_automaton->ainsn_list = create_ainsns ();
curr_automaton->corresponding_automaton_decl = NULL;
curr_automaton->next_automaton = NULL;
@@ -7040,7 +7040,7 @@ create_state_ainsn_table (automaton_t automaton)
int full_vect_length;
int i;
- tab = create_node (sizeof (struct state_ainsn_table));
+ tab = (state_ainsn_table_t) create_node (sizeof (struct state_ainsn_table));
tab->automaton = automaton;
tab->comb_vect = VEC_alloc (vect_el_t,heap, 10000);
@@ -7954,7 +7954,7 @@ dfa_insn_code_enlarge (int uid)\n\
{\n\
int i = %s;\n\
%s = 2 * uid;\n\
- %s = xrealloc (%s,\n\
+ %s = (int *) xrealloc (%s,\n\
%s * sizeof(int));\n\
for (; i < %s; i++)\n\
%s[i] = -1;\n}\n\n",
@@ -8000,8 +8000,9 @@ output_trans_func (void)
fprintf (output_file, "{\n int %s;\n", INTERNAL_INSN_CODE_NAME);
output_internal_insn_code_evaluation (INSN_PARAMETER_NAME,
INTERNAL_INSN_CODE_NAME, -1);
- fprintf (output_file, " return %s (%s, %s);\n}\n\n",
- INTERNAL_TRANSITION_FUNC_NAME, INTERNAL_INSN_CODE_NAME, STATE_NAME);
+ fprintf (output_file, " return %s (%s, (struct %s *) %s);\n}\n\n",
+ INTERNAL_TRANSITION_FUNC_NAME, INTERNAL_INSN_CODE_NAME,
+ CHIP_NAME, STATE_NAME);
}
/* Output function `min_issue_delay'. */
@@ -8019,9 +8020,9 @@ output_min_issue_delay_func (void)
INTERNAL_INSN_CODE_NAME, ADVANCE_CYCLE_VALUE_NAME);
fprintf (output_file, " }\n else\n %s = %s;\n",
INTERNAL_INSN_CODE_NAME, ADVANCE_CYCLE_VALUE_NAME);
- fprintf (output_file, "\n return %s (%s, %s);\n",
+ fprintf (output_file, "\n return %s (%s, (struct %s *) %s);\n",
INTERNAL_MIN_ISSUE_DELAY_FUNC_NAME, INTERNAL_INSN_CODE_NAME,
- STATE_NAME);
+ CHIP_NAME, STATE_NAME);
fprintf (output_file, "}\n\n");
}
@@ -8054,8 +8055,8 @@ output_dead_lock_func (void)
{
fprintf (output_file, "int\n%s (%s %s)\n",
DEAD_LOCK_FUNC_NAME, STATE_TYPE_NAME, STATE_NAME);
- fprintf (output_file, "{\n return %s (%s);\n}\n\n",
- INTERNAL_DEAD_LOCK_FUNC_NAME, STATE_NAME);
+ fprintf (output_file, "{\n return %s ((struct %s *) %s);\n}\n\n",
+ INTERNAL_DEAD_LOCK_FUNC_NAME, CHIP_NAME, STATE_NAME);
}
/* Output function `internal_reset'. */
@@ -8082,8 +8083,8 @@ output_reset_func (void)
{
fprintf (output_file, "void\n%s (%s %s)\n",
RESET_FUNC_NAME, STATE_TYPE_NAME, STATE_NAME);
- fprintf (output_file, "{\n %s (%s);\n}\n\n", INTERNAL_RESET_FUNC_NAME,
- STATE_NAME);
+ fprintf (output_file, "{\n %s ((struct %s *) %s);\n}\n\n", INTERNAL_RESET_FUNC_NAME,
+ CHIP_NAME, STATE_NAME);
}
/* Output function `min_insn_conflict_delay'. */
@@ -8330,7 +8331,7 @@ output_get_cpu_unit_code_func (void)
LOW_VARIABLE_NAME, MIDDLE_VARIABLE_NAME, HIGH_VARIABLE_NAME);
fprintf (output_file, " static struct %s %s [] =\n {\n",
NAME_CODE_STRUCT_NAME, NAME_CODE_TABLE_NAME);
- units = xmalloc (sizeof (unit_decl_t) * description->units_num);
+ units = XNEWVEC (unit_decl_t, description->units_num);
memcpy (units, units_array, sizeof (unit_decl_t) * description->units_num);
qsort (units, description->units_num, sizeof (unit_decl_t), units_cmp);
for (i = 0; i < description->units_num; i++)
@@ -8426,7 +8427,7 @@ output_dfa_start_func (void)
fprintf (output_file,
"void\n%s (void)\n{\n %s = get_max_uid ();\n",
DFA_START_FUNC_NAME, DFA_INSN_CODES_LENGTH_VARIABLE_NAME);
- fprintf (output_file, " %s = xmalloc (%s * sizeof (int));\n",
+ fprintf (output_file, " %s = (int *) xmalloc (%s * sizeof (int));\n",
DFA_INSN_CODES_VARIABLE_NAME, DFA_INSN_CODES_LENGTH_VARIABLE_NAME);
fprintf (output_file, " %s ();\n}\n\n", DFA_CLEAN_INSN_CACHE_FUNC_NAME);
}
@@ -9106,7 +9107,7 @@ expand_automata (void)
{
int i;
- description = create_node (sizeof (struct description)
+ description = (struct description *) create_node (sizeof (struct description)
/* One entry for cycle advancing insn. */
+ sizeof (decl_t) * VEC_length (decl_t, decls));
description->decls_num = VEC_length (decl_t, decls);
diff --git a/gcc/genchecksum.c b/gcc/genchecksum.c
index 376d73c5456..d8f55a12efe 100644
--- a/gcc/genchecksum.c
+++ b/gcc/genchecksum.c
@@ -57,6 +57,7 @@ dosum (const char *file)
exit (1);
}
+ fputs ("extern const unsigned char executable_checksum[16];", stdout);
fputs ("const unsigned char executable_checksum[16] = { ", stdout);
for (i = 0; i < 16; i++)
printf ("%#02x%s", result[i], i == 15 ? " };\n" : ", ");
diff --git a/gcc/genemit.c b/gcc/genemit.c
index 79db84e7b30..3b50c19e69b 100644
--- a/gcc/genemit.c
+++ b/gcc/genemit.c
@@ -358,16 +358,16 @@ gen_insn (rtx insn, int lineno)
for (j = i + 1; j < XVECLEN (insn, 1); j++)
{
rtx old = XEXP (XVECEXP (p->pattern, 1, j), 0);
- rtx new = XEXP (XVECEXP (insn, 1, j), 0);
+ rtx fresh = XEXP (XVECEXP (insn, 1, j), 0);
/* OLD and NEW are the same if both are to be a SCRATCH
of the same mode,
or if both are registers of the same mode and number. */
- if (! (GET_MODE (old) == GET_MODE (new)
+ if (! (GET_MODE (old) == GET_MODE (fresh)
&& ((GET_CODE (old) == MATCH_SCRATCH
- && GET_CODE (new) == MATCH_SCRATCH)
- || (REG_P (old) && REG_P (new)
- && REGNO (old) == REGNO (new)))))
+ && GET_CODE (fresh) == MATCH_SCRATCH)
+ || (REG_P (old) && REG_P (fresh)
+ && REGNO (old) == REGNO (fresh)))))
break;
}
diff --git a/gcc/genextract.c b/gcc/genextract.c
index 591a697deef..ffa152f3909 100644
--- a/gcc/genextract.c
+++ b/gcc/genextract.c
@@ -153,7 +153,7 @@ gen_insn (rtx insn, int insn_code_number)
/* Otherwise, make a new extraction method. We stash the arrays
after the extraction structure in memory. */
- p = xmalloc (sizeof (struct extraction)
+ p = (struct extraction *) xmalloc (sizeof (struct extraction)
+ op_count*sizeof (char *)
+ dup_count*sizeof (char *)
+ dup_count*sizeof (int));
diff --git a/gcc/gengenrtl.c b/gcc/gengenrtl.c
index fd4a0218eb2..8e8c7bb1d5b 100644
--- a/gcc/gengenrtl.c
+++ b/gcc/gengenrtl.c
@@ -147,7 +147,9 @@ special_rtx (int idx)
|| strcmp (defs[idx].enumname, "REG") == 0
|| strcmp (defs[idx].enumname, "SUBREG") == 0
|| strcmp (defs[idx].enumname, "MEM") == 0
- || strcmp (defs[idx].enumname, "CONST_VECTOR") == 0);
+ || strcmp (defs[idx].enumname, "CONST_VECTOR") == 0
+ || strcmp (defs[idx].enumname, "EXPR_LIST") == 0
+ || strcmp (defs[idx].enumname, "INSN_LIST") == 0);
}
/* Return nonzero if the RTL code given by index IDX is one that we should
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index 2ca4ac7af36..52578851947 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -1038,7 +1038,7 @@ create_file (const char *name, const char *oname)
"Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA\n",
"02110-1301, USA. */\n",
"\n",
- "/* This file is machine generated. Do not edit. */\n"
+ "/* This file is generated using gengtype. Do not edit. */\n"
};
outf_p f;
size_t i;
@@ -2746,9 +2746,6 @@ write_array (outf_p f, pair_p v, const struct write_types_data *wtd)
if (wtd->param_prefix)
{
- oprintf (f, "static void gt_%sa_%s\n", wtd->param_prefix, v->name);
- oprintf (f,
- " (void *, void *, gt_pointer_operator, void *);\n");
oprintf (f, "static void gt_%sa_%s (ATTRIBUTE_UNUSED void *this_obj,\n",
wtd->param_prefix, v->name);
oprintf (d.of,
@@ -2763,8 +2760,6 @@ write_array (outf_p f, pair_p v, const struct write_types_data *wtd)
}
d.opt = v->opt;
- oprintf (f, "static void gt_%sa_%s (void *);\n",
- wtd->prefix, v->name);
oprintf (f, "static void\ngt_%sa_%s (ATTRIBUTE_UNUSED void *x_p)\n",
wtd->prefix, v->name);
oprintf (f, "{\n");
@@ -2860,6 +2855,9 @@ write_roots (pair_p variables)
{
fli->started_p = 1;
+ oprintf (f, "extern const struct ggc_root_tab gt_ggc_r_");
+ put_mangled_filename (f, v->line.file);
+ oprintf (f, "[];\n");
oprintf (f, "const struct ggc_root_tab gt_ggc_r_");
put_mangled_filename (f, v->line.file);
oprintf (f, "[] = {\n");
@@ -2894,6 +2892,9 @@ write_roots (pair_p variables)
{
fli->started_p = 1;
+ oprintf (f, "extern const struct ggc_root_tab gt_ggc_rd_");
+ put_mangled_filename (f, v->line.file);
+ oprintf (f, "[];\n");
oprintf (f, "const struct ggc_root_tab gt_ggc_rd_");
put_mangled_filename (f, v->line.file);
oprintf (f, "[] = {\n");
@@ -2938,6 +2939,9 @@ write_roots (pair_p variables)
{
fli->started_p = 1;
+ oprintf (f, "extern const struct ggc_cache_tab gt_ggc_rc_");
+ put_mangled_filename (f, v->line.file);
+ oprintf (f, "[];\n");
oprintf (f, "const struct ggc_cache_tab gt_ggc_rc_");
put_mangled_filename (f, v->line.file);
oprintf (f, "[] = {\n");
@@ -2974,6 +2978,9 @@ write_roots (pair_p variables)
{
fli->started_p = 1;
+ oprintf (f, "extern const struct ggc_root_tab gt_pch_rc_");
+ put_mangled_filename (f, v->line.file);
+ oprintf (f, "[];\n");
oprintf (f, "const struct ggc_root_tab gt_pch_rc_");
put_mangled_filename (f, v->line.file);
oprintf (f, "[] = {\n");
@@ -3010,6 +3017,9 @@ write_roots (pair_p variables)
{
fli->started_p = 1;
+ oprintf (f, "extern const struct ggc_root_tab gt_pch_rs_");
+ put_mangled_filename (f, v->line.file);
+ oprintf (f, "[];\n");
oprintf (f, "const struct ggc_root_tab gt_pch_rs_");
put_mangled_filename (f, v->line.file);
oprintf (f, "[] = {\n");
diff --git a/gcc/genmodes.c b/gcc/genmodes.c
index 0a70dea23e6..a983a080ea3 100644
--- a/gcc/genmodes.c
+++ b/gcc/genmodes.c
@@ -921,7 +921,7 @@ emit_mode_class (void)
int c;
struct mode_data *m;
- print_decl ("unsigned char", "mode_class", "NUM_MACHINE_MODES");
+ print_decl ("enum mode_class", "mode_class", "NUM_MACHINE_MODES");
for_all_modes (c, m)
tagged_printf ("%s", mode_class_names[m->cl], m->name);
@@ -981,7 +981,7 @@ emit_mode_wider (void)
int c;
struct mode_data *m;
- print_decl ("unsigned char", "mode_wider", "NUM_MACHINE_MODES");
+ print_decl ("enum machine_mode", "mode_wider", "NUM_MACHINE_MODES");
for_all_modes (c, m)
tagged_printf ("%smode",
@@ -989,7 +989,7 @@ emit_mode_wider (void)
m->name);
print_closer ();
- print_decl ("unsigned char", "mode_2xwider", "NUM_MACHINE_MODES");
+ print_decl ("enum machine_mode", "mode_2xwider", "NUM_MACHINE_MODES");
for_all_modes (c, m)
{
@@ -1054,7 +1054,7 @@ emit_mode_inner (void)
int c;
struct mode_data *m;
- print_decl ("unsigned char", "mode_inner", "NUM_MACHINE_MODES");
+ print_decl ("enum machine_mode", "mode_inner", "NUM_MACHINE_MODES");
for_all_modes (c, m)
tagged_printf ("%smode",
@@ -1085,7 +1085,7 @@ emit_class_narrowest_mode (void)
{
int c;
- print_decl ("unsigned char", "class_narrowest_mode", "MAX_MODE_CLASS");
+ print_decl ("enum machine_mode", "class_narrowest_mode", "MAX_MODE_CLASS");
for (c = 0; c < MAX_MODE_CLASS; c++)
/* Bleah, all this to get the comment right for MIN_MODE_INT. */
diff --git a/gcc/genoutput.c b/gcc/genoutput.c
index ddece1c2309..b2df3d91ced 100644
--- a/gcc/genoutput.c
+++ b/gcc/genoutput.c
@@ -155,7 +155,7 @@ struct data
{
struct data *next;
const char *name;
- const char *template;
+ const char *templ;
int code_number;
int index_number;
const char *filename;
@@ -337,7 +337,7 @@ output_insn_data (void)
break;
case INSN_OUTPUT_FORMAT_SINGLE:
{
- const char *p = d->template;
+ const char *p = d->templ;
char prev = 0;
printf ("#if HAVE_DESIGNATED_INITIALIZERS\n");
@@ -657,36 +657,36 @@ place_operands (struct data *d)
templates, or C code to generate the assembler code template. */
static void
-process_template (struct data *d, const char *template)
+process_template (struct data *d, const char *templ)
{
const char *cp;
int i;
/* Templates starting with * contain straight code to be run. */
- if (template[0] == '*')
+ if (templ[0] == '*')
{
- d->template = 0;
+ d->templ = 0;
d->output_format = INSN_OUTPUT_FORMAT_FUNCTION;
puts ("\nstatic const char *");
printf ("output_%d (rtx *operands ATTRIBUTE_UNUSED, rtx insn ATTRIBUTE_UNUSED)\n",
d->code_number);
puts ("{");
- print_rtx_ptr_loc (template);
- puts (template + 1);
+ print_rtx_ptr_loc (templ);
+ puts (templ + 1);
puts ("}");
}
/* If the assembler code template starts with a @ it is a newline-separated
list of assembler code templates, one for each alternative. */
- else if (template[0] == '@')
+ else if (templ[0] == '@')
{
- d->template = 0;
+ d->templ = 0;
d->output_format = INSN_OUTPUT_FORMAT_MULTI;
printf ("\nstatic const char * const output_%d[] = {\n", d->code_number);
- for (i = 0, cp = &template[1]; *cp; )
+ for (i = 0, cp = &templ[1]; *cp; )
{
const char *ep, *sp;
@@ -726,7 +726,7 @@ process_template (struct data *d, const char *template)
}
else
{
- d->template = template;
+ d->templ = templ;
d->output_format = INSN_OUTPUT_FORMAT_SINGLE;
}
}
@@ -953,7 +953,7 @@ gen_expand (rtx insn, int lineno)
d->n_operands = max_opno + 1;
d->n_dups = num_dups;
- d->template = 0;
+ d->templ = 0;
d->output_format = INSN_OUTPUT_FORMAT_NONE;
validate_insn_alternatives (d);
@@ -994,7 +994,7 @@ gen_split (rtx split, int lineno)
d->n_operands = max_opno + 1;
d->n_dups = 0;
d->n_alternatives = 0;
- d->template = 0;
+ d->templ = 0;
d->output_format = INSN_OUTPUT_FORMAT_NONE;
place_operands (d);
@@ -1121,7 +1121,7 @@ note_constraint (rtx exp, int lineno)
{
const char *name = XSTR (exp, 0);
unsigned int namelen = strlen (name);
- struct constraint_data **iter, **slot, *new;
+ struct constraint_data **iter, **slot, *tmp;
if (strchr (indep_constraints, name[0]))
{
@@ -1171,12 +1171,12 @@ note_constraint (rtx exp, int lineno)
return;
}
}
- new = xmalloc (sizeof (struct constraint_data) + namelen);
- strcpy ((char *)new + offsetof(struct constraint_data, name), name);
- new->namelen = namelen;
- new->lineno = lineno;
- new->next_this_letter = *slot;
- *slot = new;
+ tmp = (struct constraint_data *) xmalloc (sizeof (struct constraint_data) + namelen);
+ strcpy ((char *)tmp + offsetof(struct constraint_data, name), name);
+ tmp->namelen = namelen;
+ tmp->lineno = lineno;
+ tmp->next_this_letter = *slot;
+ *slot = tmp;
}
/* Return the length of the constraint name beginning at position S
diff --git a/gcc/genpreds.c b/gcc/genpreds.c
index 535c9ddde77..ced005d703e 100644
--- a/gcc/genpreds.c
+++ b/gcc/genpreds.c
@@ -729,7 +729,7 @@ mangle (const char *name)
}
obstack_1grow (rtl_obstack, '\0');
- return obstack_finish (rtl_obstack);
+ return (const char *) obstack_finish (rtl_obstack);
}
/* Add one constraint, of any sort, to the tables. NAME is its name;
@@ -894,7 +894,7 @@ add_constraint (const char *name, const char *regclass,
}
- c = obstack_alloc (rtl_obstack, sizeof (struct constraint_data));
+ c = (struct constraint_data *) obstack_alloc (rtl_obstack, sizeof (struct constraint_data));
c->name = name;
c->c_name = need_mangled_name ? mangle (name) : name;
c->lineno = lineno;
diff --git a/gcc/genrecog.c b/gcc/genrecog.c
index a65137ab377..ef9adac9b67 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -75,21 +75,23 @@ struct decision_head
their equality (or lack thereof) does affect tree merging so
it is convenient to keep them here. */
+enum decision_type
+{
+ DT_num_insns,
+ DT_mode, DT_code, DT_veclen,
+ DT_elt_zero_int, DT_elt_one_int, DT_elt_zero_wide, DT_elt_zero_wide_safe,
+ DT_const_int,
+ DT_veclen_ge, DT_dup, DT_pred, DT_c_test,
+ DT_accept_op, DT_accept_insn
+};
+
struct decision_test
{
/* A linked list through the tests attached to a node. */
struct decision_test *next;
/* These types are roughly in the order in which we'd like to test them. */
- enum decision_type
- {
- DT_num_insns,
- DT_mode, DT_code, DT_veclen,
- DT_elt_zero_int, DT_elt_one_int, DT_elt_zero_wide, DT_elt_zero_wide_safe,
- DT_const_int,
- DT_veclen_ge, DT_dup, DT_pred, DT_c_test,
- DT_accept_op, DT_accept_insn
- } type;
+ enum decision_type type;
union
{
@@ -366,7 +368,7 @@ compute_predicate_codes (rtx exp, char codes[NUM_RTX_CODE])
static void
process_define_predicate (rtx desc)
{
- struct pred_data *pred = xcalloc (sizeof (struct pred_data), 1);
+ struct pred_data *pred = XCNEW (struct pred_data);
char codes[NUM_RTX_CODE];
bool seen_one = false;
int i;
@@ -395,7 +397,7 @@ process_define_predicate (rtx desc)
pred->singleton = UNKNOWN;
else
{
- pred->singleton = i;
+ pred->singleton = (enum rtx_code) i;
seen_one = true;
}
}
@@ -493,14 +495,14 @@ extern void debug_decision_list
static struct decision *
new_decision (const char *position, struct decision_head *last)
{
- struct decision *new = xcalloc (1, sizeof (struct decision));
+ struct decision *n = XCNEW (struct decision);
- new->success = *last;
- new->position = xstrdup (position);
- new->number = next_number++;
+ n->success = *last;
+ n->position = xstrdup (position);
+ n->number = next_number++;
- last->first = last->last = new;
- return new;
+ last->first = last->last = n;
+ return n;
}
/* Create a new test and link it in at PLACE. */
@@ -896,7 +898,7 @@ add_to_sequence (rtx pattern, struct decision_head *last, const char *position,
enum routine_type insn_type, int top)
{
RTX_CODE code;
- struct decision *this, *sub;
+ struct decision *it, *sub;
struct decision_test *test;
struct decision_test **place;
char *subpos;
@@ -909,12 +911,12 @@ add_to_sequence (rtx pattern, struct decision_head *last, const char *position,
if (depth > max_depth)
max_depth = depth;
- subpos = xmalloc (depth + 2);
+ subpos = XNEWVEC (char, depth + 2);
strcpy (subpos, position);
subpos[depth + 1] = 0;
- sub = this = new_decision (position, last);
- place = &this->tests;
+ sub = it = new_decision (position, last);
+ place = &it->tests;
restart:
mode = GET_MODE (pattern);
@@ -1161,20 +1163,20 @@ add_to_sequence (rtx pattern, struct decision_head *last, const char *position,
before any of the nodes we may have added above. */
if (code != UNKNOWN)
{
- place = &this->tests;
+ place = &it->tests;
test = new_decision_test (DT_code, &place);
test->u.code = code;
}
if (mode != VOIDmode)
{
- place = &this->tests;
+ place = &it->tests;
test = new_decision_test (DT_mode, &place);
test->u.mode = mode;
}
/* If we didn't insert any tests or accept nodes, hork. */
- gcc_assert (this->tests);
+ gcc_assert (it->tests);
ret:
free (subpos);
@@ -1262,7 +1264,7 @@ maybe_both_true_2 (struct decision_test *d1, struct decision_test *d2)
else if (d2->type == DT_pred && d2->u.pred.data)
{
bool common = false;
- enum rtx_code c;
+ int c;
for (c = 0; c < NUM_RTX_CODE; c++)
if (d1->u.pred.data->codes[c] && d2->u.pred.data->codes[c])
@@ -1611,7 +1613,7 @@ factor_tests (struct decision_head *head)
for (first = head->first; first && first->next; first = next)
{
enum decision_type type;
- struct decision *new, *old_last;
+ struct decision *n, *old_last;
type = first->tests->type;
next = first->next;
@@ -1634,8 +1636,8 @@ factor_tests (struct decision_head *head)
below our first test. */
if (first->tests->next != NULL)
{
- new = new_decision (first->position, &first->success);
- new->tests = first->tests->next;
+ n = new_decision (first->position, &first->success);
+ n->tests = first->tests->next;
first->tests->next = NULL;
}
@@ -1652,14 +1654,14 @@ factor_tests (struct decision_head *head)
if (next->tests->next != NULL)
{
- new = new_decision (next->position, &next->success);
- new->tests = next->tests->next;
+ n = new_decision (next->position, &next->success);
+ n->tests = next->tests->next;
next->tests->next = NULL;
}
- new = next;
+ n = next;
next = next->next;
- new->next = NULL;
- h.first = h.last = new;
+ n->next = NULL;
+ h.first = h.last = n;
merge_trees (head, &h);
}
@@ -1940,7 +1942,7 @@ write_switch (struct decision *start, int depth)
while (p && p->tests->type == DT_pred && p->tests->u.pred.data)
{
const struct pred_data *data = p->tests->u.pred.data;
- RTX_CODE c;
+ int c;
for (c = 0; c < NUM_RTX_CODE; c++)
if (codemap[c] && data->codes[c])
goto pred_done;
@@ -1949,7 +1951,7 @@ write_switch (struct decision *start, int depth)
if (data->codes[c])
{
fputs (" case ", stdout);
- print_code (c);
+ print_code ((RTX_CODE) c);
fputs (":\n", stdout);
codemap[c] = 1;
}
@@ -2636,25 +2638,25 @@ make_insn_sequence (rtx insn, enum routine_type type)
if (i != XVECLEN (x, 0))
{
- rtx new;
+ rtx n;
struct decision_head clobber_head;
/* Build a similar insn without the clobbers. */
if (i == 1)
- new = XVECEXP (x, 0, 0);
+ n = XVECEXP (x, 0, 0);
else
{
int j;
- new = rtx_alloc (PARALLEL);
- XVEC (new, 0) = rtvec_alloc (i);
+ n = rtx_alloc (PARALLEL);
+ XVEC (n, 0) = rtvec_alloc (i);
for (j = i - 1; j >= 0; j--)
- XVECEXP (new, 0, j) = XVECEXP (x, 0, j);
+ XVECEXP (n, 0, j) = XVECEXP (x, 0, j);
}
/* Recognize it. */
memset (&clobber_head, 0, sizeof(clobber_head));
- last = add_to_sequence (new, &clobber_head, "", type, 1);
+ last = add_to_sequence (n, &clobber_head, "", type, 1);
/* Find the end of the test chain on the last node. */
for (test = last->tests; test->next; test = test->next)
diff --git a/gcc/gensupport.c b/gcc/gensupport.c
index c15540b9006..f9691189dc7 100644
--- a/gcc/gensupport.c
+++ b/gcc/gensupport.c
@@ -1412,13 +1412,13 @@ record_insn_name (int code, const char *name)
{
static const char *last_real_name = "insn";
static int last_real_code = 0;
- char *new;
+ char *tmp;
if (insn_name_ptr_size <= code)
{
int new_size;
new_size = (insn_name_ptr_size ? insn_name_ptr_size * 2 : 512);
- insn_name_ptr = xrealloc (insn_name_ptr, sizeof(char *) * new_size);
+ insn_name_ptr = (char **) xrealloc (insn_name_ptr, sizeof(char *) * new_size);
memset (insn_name_ptr + insn_name_ptr_size, 0,
sizeof(char *) * (new_size - insn_name_ptr_size));
insn_name_ptr_size = new_size;
@@ -1426,14 +1426,14 @@ record_insn_name (int code, const char *name)
if (!name || name[0] == '\0')
{
- new = xmalloc (strlen (last_real_name) + 10);
- sprintf (new, "%s+%d", last_real_name, code - last_real_code);
+ tmp = XNEWVEC (char, strlen (last_real_name) + 10);
+ sprintf (tmp, "%s+%d", last_real_name, code - last_real_code);
}
else
{
- last_real_name = new = xstrdup (name);
+ last_real_name = tmp = xstrdup (name);
last_real_code = code;
}
- insn_name_ptr[code] = new;
+ insn_name_ptr[code] = tmp;
}
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index fe75320bdb1..41a277052eb 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -271,12 +271,12 @@ gt_pch_note_object (void *obj, void *note_ptr_cookie,
return 0;
}
- *slot = xcalloc (sizeof (struct ptr_data), 1);
+ *slot = XCNEW (struct ptr_data);
(*slot)->obj = obj;
(*slot)->note_ptr_fn = note_ptr_fn;
(*slot)->note_ptr_cookie = note_ptr_cookie;
if (note_ptr_fn == gt_pch_p_S)
- (*slot)->size = strlen (obj) + 1;
+ (*slot)->size = strlen ((const char *) obj) + 1;
else
(*slot)->size = ggc_get_size (obj);
(*slot)->type = type;
@@ -294,7 +294,7 @@ gt_pch_note_reorder (void *obj, void *note_ptr_cookie,
if (obj == NULL || obj == (void *) 1)
return;
- data = htab_find_with_hash (saving_htab, obj, POINTER_HASH (obj));
+ data = (struct ptr_data *) htab_find_with_hash (saving_htab, obj, POINTER_HASH (obj));
gcc_assert (data && data->note_ptr_cookie == note_ptr_cookie);
data->reorder_fn = reorder_fn;
@@ -377,7 +377,7 @@ relocate_ptrs (void *ptr_p, void *state_p)
if (*ptr == NULL || *ptr == (void *)1)
return;
- result = htab_find_with_hash (saving_htab, *ptr, POINTER_HASH (*ptr));
+ result = (struct ptr_data *) htab_find_with_hash (saving_htab, *ptr, POINTER_HASH (*ptr));
gcc_assert (result);
*ptr = result->new_addr;
}
@@ -405,7 +405,7 @@ write_pch_globals (const struct ggc_root_tab * const *tab,
}
else
{
- new_ptr = htab_find_with_hash (saving_htab, ptr,
+ new_ptr = (struct ptr_data *) htab_find_with_hash (saving_htab, ptr,
POINTER_HASH (ptr));
if (fwrite (&new_ptr->new_addr, sizeof (void *), 1, state->f)
!= 1)
@@ -509,7 +509,7 @@ gt_pch_save (FILE *f)
if (this_object_size < state.ptrs[i]->size)
{
this_object_size = state.ptrs[i]->size;
- this_object = xrealloc (this_object, this_object_size);
+ this_object = (char *) xrealloc (this_object, this_object_size);
}
memcpy (this_object, state.ptrs[i]->obj, state.ptrs[i]->size);
if (state.ptrs[i]->reorder_fn != NULL)
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index 5d880339d5a..4baf43df441 100644
--- a/gcc/ggc-page.c
+++ b/gcc/ggc-page.c
@@ -515,7 +515,7 @@ push_depth (unsigned int i)
if (G.depth_in_use >= G.depth_max)
{
G.depth_max *= 2;
- G.depth = xrealloc (G.depth, G.depth_max * sizeof (unsigned int));
+ G.depth = (unsigned int *) xrealloc (G.depth, G.depth_max * sizeof (unsigned int));
}
G.depth[G.depth_in_use++] = i;
}
@@ -528,9 +528,9 @@ push_by_depth (page_entry *p, unsigned long *s)
if (G.by_depth_in_use >= G.by_depth_max)
{
G.by_depth_max *= 2;
- G.by_depth = xrealloc (G.by_depth,
+ G.by_depth = (page_entry **) xrealloc (G.by_depth,
G.by_depth_max * sizeof (page_entry *));
- G.save_in_use = xrealloc (G.save_in_use,
+ G.save_in_use = (unsigned long **) xrealloc (G.save_in_use,
G.by_depth_max * sizeof (unsigned long *));
}
G.by_depth[G.by_depth_in_use] = p;
@@ -669,7 +669,7 @@ static inline char *
alloc_anon (char *pref ATTRIBUTE_UNUSED, size_t size)
{
#ifdef HAVE_MMAP_ANON
- char *page = mmap (pref, size, PROT_READ | PROT_WRITE,
+ char *page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
#endif
#ifdef HAVE_MMAP_DEV_ZERO
@@ -784,7 +784,7 @@ alloc_page (unsigned order)
memory order. */
for (i = GGC_QUIRE_SIZE - 1; i >= 1; i--)
{
- e = xcalloc (1, page_entry_size);
+ e = (struct page_entry *) xcalloc (1, page_entry_size);
e->order = order;
e->bytes = G.pagesize;
e->page = page + (i << G.lg_pagesize);
@@ -855,7 +855,7 @@ alloc_page (unsigned order)
struct page_entry *e, *f = G.free_pages;
for (a = enda - G.pagesize; a != page; a -= G.pagesize)
{
- e = xcalloc (1, page_entry_size);
+ e = (struct page_entry *) xcalloc (1, page_entry_size);
e->order = order;
e->bytes = G.pagesize;
e->page = a;
@@ -869,7 +869,7 @@ alloc_page (unsigned order)
#endif
if (entry == NULL)
- entry = xcalloc (1, page_entry_size);
+ entry = (struct page_entry *) xcalloc (1, page_entry_size);
entry->bytes = entry_size;
entry->page = page;
@@ -1627,7 +1627,7 @@ clear_marks (void)
if (p->context_depth < G.context_depth)
{
if (! save_in_use_p (p))
- save_in_use_p (p) = xmalloc (bitmap_size);
+ save_in_use_p (p) = (unsigned long *) xmalloc (bitmap_size);
memcpy (save_in_use_p (p), p->in_use_p, bitmap_size);
}
@@ -2026,12 +2026,14 @@ ggc_print_statistics (void)
#endif
}
+struct ggc_pch_ondisk
+{
+ unsigned totals[NUM_ORDERS];
+};
+
struct ggc_pch_data
{
- struct ggc_pch_ondisk
- {
- unsigned totals[NUM_ORDERS];
- } d;
+ struct ggc_pch_ondisk d;
size_t base[NUM_ORDERS];
size_t written[NUM_ORDERS];
};
@@ -2121,7 +2123,7 @@ ggc_pch_write_object (struct ggc_pch_data *d ATTRIBUTE_UNUSED,
size_t size, bool is_string ATTRIBUTE_UNUSED)
{
unsigned order;
- static const char emptyBytes[256];
+ static char emptyBytes[256];
if (size < NUM_SIZE_LOOKUP)
order = size_lookup[size];
@@ -2230,7 +2232,7 @@ ggc_pch_read (FILE *f, void *addr)
{
struct ggc_pch_ondisk d;
unsigned i;
- char *offs = addr;
+ char *offs = (char *) addr;
unsigned long count_old_page_tables;
unsigned long count_new_page_tables;
@@ -2273,7 +2275,7 @@ ggc_pch_read (FILE *f, void *addr)
bytes = ROUND_UP (d.totals[i] * OBJECT_SIZE (i), G.pagesize);
num_objs = bytes / OBJECT_SIZE (i);
- entry = xcalloc (1, (sizeof (struct page_entry)
+ entry = (struct page_entry *) xcalloc (1, (sizeof (struct page_entry)
- sizeof (long)
+ BITMAP_SIZE (num_objs + 1)));
entry->bytes = bytes;
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index ab11a832fdf..417a985c0c1 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1819,7 +1819,7 @@ gimplify_compound_lval (tree *expr_p, tree *pre_p,
so as to match the min_lval predicate. Failure to do so may result
in the creation of large aggregate temporaries. */
tret = gimplify_expr (p, pre_p, post_p, is_gimple_min_lval,
- fallback | fb_lvalue);
+ (fallback_t) (fallback | fb_lvalue));
ret = MIN (ret, tret);
/* And finally, the indices and operands to BIT_FIELD_REF. During this
@@ -2048,14 +2048,14 @@ gimplify_call_expr (tree *expr_p, tree *pre_p, bool want_value)
if (decl && DECL_BUILT_IN (decl))
{
tree arglist = TREE_OPERAND (*expr_p, 1);
- tree new = fold_builtin (decl, arglist, !want_value);
+ tree fb = fold_builtin (decl, arglist, !want_value);
- if (new && new != *expr_p)
+ if (fb && fb != *expr_p)
{
/* There was a transformation of this call which computes the
same value, but in a more efficient way. Return and try
again. */
- *expr_p = new;
+ *expr_p = fb;
return GS_OK;
}
@@ -2108,14 +2108,14 @@ gimplify_call_expr (tree *expr_p, tree *pre_p, bool want_value)
if (decl && DECL_BUILT_IN (decl))
{
tree arglist = TREE_OPERAND (*expr_p, 1);
- tree new = fold_builtin (decl, arglist, !want_value);
+ tree fb = fold_builtin (decl, arglist, !want_value);
- if (new && new != *expr_p)
+ if (fb && fb != *expr_p)
{
/* There was a transformation of this call which computes the
same value, but in a more efficient way. Return and try
again. */
- *expr_p = new;
+ *expr_p = fb;
return GS_OK;
}
}
@@ -3044,20 +3044,20 @@ gimplify_init_constructor (tree *expr_p, tree *pre_p,
if (size > 0 && !can_move_by_pieces (size, align))
{
- tree new = create_tmp_var_raw (type, "C");
+ tree var = create_tmp_var_raw (type, "C");
- gimple_add_tmp_var (new);
- TREE_STATIC (new) = 1;
- TREE_READONLY (new) = 1;
- DECL_INITIAL (new) = ctor;
- if (align > DECL_ALIGN (new))
+ gimple_add_tmp_var (var);
+ TREE_STATIC (var) = 1;
+ TREE_READONLY (var) = 1;
+ DECL_INITIAL (var) = ctor;
+ if (align > DECL_ALIGN (var))
{
- DECL_ALIGN (new) = align;
- DECL_USER_ALIGN (new) = 1;
+ DECL_ALIGN (var) = align;
+ DECL_USER_ALIGN (var) = 1;
}
- walk_tree (&DECL_INITIAL (new), force_labels_r, NULL, NULL);
+ walk_tree (&DECL_INITIAL (var), force_labels_r, NULL, NULL);
- TREE_OPERAND (*expr_p, 1) = new;
+ TREE_OPERAND (*expr_p, 1) = var;
/* This is no longer an assignment of a CONSTRUCTOR, but
we still may have processing to do on the LHS. So
@@ -3926,7 +3926,7 @@ gimplify_asm_expr (tree *expr_p, tree *pre_p, tree *post_p)
tret = gimplify_expr (&TREE_VALUE (link), pre_p, post_p,
is_inout ? is_gimple_min_lval : is_gimple_lvalue,
- fb_lvalue | fb_mayfail);
+ (fallback_t) (fb_lvalue | fb_mayfail));
if (tret == GS_ERROR)
{
error ("invalid lvalue in asm output %d", i);
@@ -4037,7 +4037,7 @@ gimplify_asm_expr (tree *expr_p, tree *pre_p, tree *post_p)
if (!allows_reg && allows_mem)
{
tret = gimplify_expr (&TREE_VALUE (link), pre_p, post_p,
- is_gimple_lvalue, fb_lvalue | fb_mayfail);
+ is_gimple_lvalue, (fallback_t) (fb_lvalue | fb_mayfail));
lang_hooks.mark_addressable (TREE_VALUE (link));
if (tret == GS_ERROR)
{
@@ -4701,7 +4701,7 @@ gimplify_scan_omp_clauses (tree *list_p, tree *pre_p, bool in_parallel,
break;
case OMP_CLAUSE_DEFAULT:
- ctx->default_kind = OMP_CLAUSE_DEFAULT_KIND (c);
+ ctx->default_kind = (enum omp_clause_default_kind) OMP_CLAUSE_DEFAULT_KIND (c);
break;
default:
@@ -4872,7 +4872,7 @@ static enum gimplify_status
gimplify_omp_for (tree *expr_p, tree *pre_p)
{
tree for_stmt, decl, t;
- enum gimplify_status ret = 0;
+ enum gimplify_status ret = GS_OK;
for_stmt = *expr_p;
@@ -4890,15 +4890,15 @@ gimplify_omp_for (tree *expr_p, tree *pre_p)
else
omp_add_variable (gimplify_omp_ctxp, decl, GOVD_PRIVATE | GOVD_SEEN);
- ret |= gimplify_expr (&TREE_OPERAND (t, 1), &OMP_FOR_PRE_BODY (for_stmt),
- NULL, is_gimple_val, fb_rvalue);
+ ret = (enum gimplify_status) (ret | gimplify_expr (&TREE_OPERAND (t, 1), &OMP_FOR_PRE_BODY (for_stmt),
+ NULL, is_gimple_val, fb_rvalue));
t = OMP_FOR_COND (for_stmt);
gcc_assert (COMPARISON_CLASS_P (t));
gcc_assert (TREE_OPERAND (t, 0) == decl);
- ret |= gimplify_expr (&TREE_OPERAND (t, 1), &OMP_FOR_PRE_BODY (for_stmt),
- NULL, is_gimple_val, fb_rvalue);
+ ret = (enum gimplify_status) (ret | gimplify_expr (&TREE_OPERAND (t, 1), &OMP_FOR_PRE_BODY (for_stmt),
+ NULL, is_gimple_val, fb_rvalue));
t = OMP_FOR_INCR (for_stmt);
switch (TREE_CODE (t))
@@ -4936,8 +4936,8 @@ gimplify_omp_for (tree *expr_p, tree *pre_p)
gcc_unreachable ();
}
- ret |= gimplify_expr (&TREE_OPERAND (t, 1), &OMP_FOR_PRE_BODY (for_stmt),
- NULL, is_gimple_val, fb_rvalue);
+ ret = (enum gimplify_status) (ret | gimplify_expr (&TREE_OPERAND (t, 1), &OMP_FOR_PRE_BODY (for_stmt),
+ NULL, is_gimple_val, fb_rvalue));
break;
default:
@@ -5366,7 +5366,7 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p,
}
/* Do any language-specific gimplification. */
- ret = lang_hooks.gimplify_expr (expr_p, pre_p, post_p);
+ ret = (enum gimplify_status) lang_hooks.gimplify_expr (expr_p, pre_p, post_p);
if (ret == GS_OK)
{
if (*expr_p == NULL_TREE)
diff --git a/gcc/global.c b/gcc/global.c
index 229f862c28c..e26edc7ef2a 100644
--- a/gcc/global.c
+++ b/gcc/global.c
@@ -1052,7 +1052,7 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere
int i, best_reg, pass;
HARD_REG_SET used, used1, used2;
- enum reg_class class = (alt_regs_p
+ enum reg_class regclass = (alt_regs_p
? reg_alternate_class (allocno[num].reg)
: reg_preferred_class (allocno[num].reg));
enum machine_mode mode = PSEUDO_REGNO_MODE (allocno[num].reg);
@@ -1069,7 +1069,7 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere
if (losers)
IOR_HARD_REG_SET (used1, losers);
- IOR_COMPL_HARD_REG_SET (used1, reg_class_contents[(int) class]);
+ IOR_COMPL_HARD_REG_SET (used1, reg_class_contents[regclass]);
COPY_HARD_REG_SET (used2, used1);
IOR_HARD_REG_SET (used1, allocno[num].hard_reg_conflicts);
@@ -2082,7 +2082,7 @@ allocate_bb_info (void)
bitmap_obstack_initialize (&greg_obstack);
FOR_EACH_BB (bb)
{
- bb_info = bb->aux;
+ bb_info = (struct bb_info *) bb->aux;
bb_info->earlyclobber = BITMAP_ALLOC (&greg_obstack);
bb_info->avloc = BITMAP_ALLOC (&greg_obstack);
bb_info->killed = BITMAP_ALLOC (&greg_obstack);
@@ -2110,7 +2110,7 @@ static void
mark_reg_change (rtx reg, rtx setter, void *data)
{
int regno;
- basic_block bb = data;
+ basic_block bb = (basic_block) data;
struct bb_info *bb_info = BB_INFO (bb);
if (GET_CODE (reg) == SUBREG)
@@ -2151,10 +2151,10 @@ check_earlyclobber (rtx insn)
char c;
bool amp_p;
int i;
- enum reg_class class;
+ enum reg_class regclass;
const char *p = recog_data.constraints[opno];
- class = NO_REGS;
+ regclass = NO_REGS;
amp_p = false;
for (;;)
{
@@ -2180,7 +2180,7 @@ check_earlyclobber (rtx insn)
break;
case '\0':
case ',':
- if (amp_p && class != NO_REGS)
+ if (amp_p && regclass != NO_REGS)
{
int rc;
@@ -2189,28 +2189,28 @@ check_earlyclobber (rtx insn)
VEC_iterate (int, earlyclobber_regclass, i, rc);
i++)
{
- if (rc == (int) class)
+ if ((enum reg_class) rc == regclass)
goto found_rc;
}
/* We use VEC_quick_push here because
earlyclobber_regclass holds no more than
N_REG_CLASSES elements. */
- VEC_quick_push (int, earlyclobber_regclass, (int) class);
+ VEC_quick_push (int, earlyclobber_regclass, regclass);
found_rc:
;
}
amp_p = false;
- class = NO_REGS;
+ regclass = NO_REGS;
break;
case 'r':
- class = GENERAL_REGS;
+ regclass = GENERAL_REGS;
break;
default:
- class = REG_CLASS_FROM_CONSTRAINT (c, p);
+ regclass = REG_CLASS_FROM_CONSTRAINT (c, p);
break;
}
if (c == '\0')
@@ -2232,7 +2232,7 @@ mark_reg_use_for_earlyclobber (rtx *x, void *data ATTRIBUTE_UNUSED)
{
enum reg_class pref_class, alt_class;
int i, regno;
- basic_block bb = data;
+ basic_block bb = (basic_block) data;
struct bb_info *bb_info = BB_INFO (bb);
if (REG_P (*x) && REGNO (*x) >= FIRST_PSEUDO_REGISTER)
@@ -2247,9 +2247,9 @@ mark_reg_use_for_earlyclobber (rtx *x, void *data ATTRIBUTE_UNUSED)
alt_class = reg_alternate_class (regno);
for (i = 0; VEC_iterate (int, earlyclobber_regclass, i, rc); i++)
{
- if (reg_classes_intersect_p (rc, pref_class)
+ if (reg_classes_intersect_p ((enum reg_class) rc, pref_class)
|| (rc != NO_REGS
- && reg_classes_intersect_p (rc, alt_class)))
+ && reg_classes_intersect_p ((enum reg_class) rc, alt_class)))
{
bitmap_set_bit (bb_info->earlyclobber, regno);
break;
@@ -2519,7 +2519,7 @@ rest_of_handle_global_alloc (void)
failure = reload (get_insns (), 0);
}
- if (dump_enabled_p (pass_global_alloc.static_pass_number))
+ if (dump_enabled_p ((enum tree_dump_index) pass_global_alloc.static_pass_number))
{
timevar_push (TV_DUMP);
dump_global_regs (dump_file);
diff --git a/gcc/graph.c b/gcc/graph.c
index 5e1627d8e43..2c42e63bc42 100644
--- a/gcc/graph.c
+++ b/gcc/graph.c
@@ -167,25 +167,25 @@ darkgrey\n shape: ellipse" : "white",
}
static void
-draw_edge (FILE *fp, int from, int to, int bb_edge, int class)
+draw_edge (FILE *fp, int from, int to, int bb_edge, int kind)
{
const char * color;
switch (graph_dump_format)
{
case vcg:
color = "";
- if (class == 2)
+ if (kind == 2)
color = "color: red ";
else if (bb_edge)
color = "color: blue ";
- else if (class == 3)
+ else if (kind == 3)
color = "color: green ";
fprintf (fp,
"edge: { sourcename: \"%s.%d\" targetname: \"%s.%d\" %s",
current_function_name (), from,
current_function_name (), to, color);
- if (class)
- fprintf (fp, "class: %d ", class);
+ if (kind)
+ fprintf (fp, "class: %d ", kind);
fputs ("}\n", fp);
break;
case no_graph:
@@ -228,7 +228,7 @@ print_rtl_graph_with_bb (const char *base, rtx rtx_first)
rtx tmp_rtx;
size_t namelen = strlen (base);
size_t extlen = strlen (graph_ext[graph_dump_format]) + 1;
- char *buf = alloca (namelen + extlen);
+ char *buf = (char *) alloca (namelen + extlen);
FILE *fp;
if (basic_block_info == NULL)
@@ -391,7 +391,7 @@ clean_graph_dump_file (const char *base)
{
size_t namelen = strlen (base);
size_t extlen = strlen (graph_ext[graph_dump_format]) + 1;
- char *buf = alloca (namelen + extlen);
+ char *buf = (char *) alloca (namelen + extlen);
FILE *fp;
memcpy (buf, base, namelen);
@@ -415,7 +415,7 @@ finish_graph_dump_file (const char *base)
{
size_t namelen = strlen (base);
size_t extlen = strlen (graph_ext[graph_dump_format]) + 1;
- char *buf = alloca (namelen + extlen);
+ char *buf = (char *) alloca (namelen + extlen);
FILE *fp;
memcpy (buf, base, namelen);
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index ebe7f24ebb5..aada533eb1d 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -625,7 +625,7 @@ static rtx last_scheduled_insn;
This is the number of cycles between instruction issue and
instruction results. */
-HAIFA_INLINE int
+int
insn_cost (rtx insn, rtx link, rtx used)
{
return insn_cost1 (insn, used ? REG_NOTE_KIND (link) : REG_NOTE_MAX,
@@ -1433,7 +1433,7 @@ save_line_notes (int b, rtx head, rtx tail)
void
restore_line_notes (rtx head, rtx tail)
{
- rtx line, note, prev, new;
+ rtx line, note, prev, fresh;
int added_notes = 0;
rtx next_tail, insn;
@@ -1487,9 +1487,9 @@ restore_line_notes (rtx head, rtx tail)
else
{
added_notes++;
- new = emit_note_after (NOTE_LINE_NUMBER (note), prev);
+ fresh = emit_note_after (NOTE_LINE_NUMBER (note), prev);
#ifndef USE_MAPPED_LOCATION
- NOTE_SOURCE_FILE (new) = NOTE_SOURCE_FILE (note);
+ NOTE_SOURCE_FILE (fresh) = NOTE_SOURCE_FILE (note);
#endif
}
}
@@ -1925,7 +1925,7 @@ reemit_notes (rtx insn)
{
if (REG_NOTE_KIND (note) == REG_SAVE_NOTE)
{
- enum insn_note note_type = INTVAL (XEXP (note, 0));
+ enum insn_note note_type = (enum insn_note) INTVAL (XEXP (note, 0));
last = emit_note_before (note_type, last);
remove_note (insn, note);
@@ -2318,7 +2318,7 @@ schedule_block (basic_block *target_bb, int rgn_n_insns1)
q_ptr = 0;
q_size = 0;
- insn_queue = alloca ((max_insn_queue_index + 1) * sizeof (rtx));
+ insn_queue = (rtx *) alloca ((max_insn_queue_index + 1) * sizeof (rtx));
memset (insn_queue, 0, (max_insn_queue_index + 1) * sizeof (rtx));
/* Start just before the beginning of time. */
@@ -3273,7 +3273,7 @@ extend_h_i_d (void)
pseudos which do not cross calls. */
int new_max_uid = get_max_uid() + 1;
- h_i_d = xrecalloc (h_i_d, new_max_uid, old_max_uid, sizeof (*h_i_d));
+ h_i_d = (struct haifa_insn_data*) xrecalloc (h_i_d, new_max_uid, old_max_uid, sizeof (*h_i_d));
old_max_uid = new_max_uid;
if (targetm.sched.h_i_d_extended)
@@ -3290,7 +3290,7 @@ extend_ready (int n_new_insns)
readyp->veclen = rgn_n_insns + n_new_insns + 1 + issue_rate;
readyp->vec = XRESIZEVEC (rtx, readyp->vec, readyp->veclen);
- ready_try = xrecalloc (ready_try, rgn_n_insns + n_new_insns + 1,
+ ready_try = (char *) xrecalloc (ready_try, rgn_n_insns + n_new_insns + 1,
rgn_n_insns + 1, sizeof (char));
rgn_n_insns += n_new_insns;
@@ -4139,7 +4139,7 @@ unlink_bb_notes (basic_block first, basic_block last)
if (first == last)
return;
- bb_header = xmalloc (last_basic_block * sizeof (*bb_header));
+ bb_header = XNEWVEC (rtx, last_basic_block);
/* Make a sentinel. */
if (last->next_bb != EXIT_BLOCK_PTR)
@@ -4229,7 +4229,7 @@ extend_bb (basic_block bb)
This must be computed and saved now, because after a basic block's
predecessor has been scheduled, it is impossible to accurately
determine the correct line number for the first insn of the block. */
- line_note_head = xrecalloc (line_note_head, last_basic_block,
+ line_note_head = (rtx *) xrecalloc (line_note_head, last_basic_block,
old_last_basic_block,
sizeof (*line_note_head));
@@ -4244,9 +4244,9 @@ extend_bb (basic_block bb)
if (current_sched_info->flags & USE_GLAT)
{
- glat_start = xrealloc (glat_start,
+ glat_start = (regset *) xrealloc (glat_start,
last_basic_block * sizeof (*glat_start));
- glat_end = xrealloc (glat_end, last_basic_block * sizeof (*glat_end));
+ glat_end = (regset *) xrealloc (glat_end, last_basic_block * sizeof (*glat_end));
}
/* The following is done to keep current_sched_info->next_tail non null. */
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 8609823b33b..7310e85dd6a 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -3996,9 +3996,9 @@ gate_handle_if_after_combine (void)
static unsigned int
rest_of_handle_if_after_combine (void)
{
- no_new_pseudos = 0;
+ no_new_pseudos = false;
if_convert (1);
- no_new_pseudos = 1;
+ no_new_pseudos = true;
return 0;
}
diff --git a/gcc/integrate.c b/gcc/integrate.c
index a6eeede3985..7ce0ef37b69 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -237,17 +237,17 @@ get_hard_reg_initial_val (enum machine_mode mode, unsigned int regno)
ivs = cfun->hard_reg_initial_vals;
if (ivs == 0)
{
- ivs = ggc_alloc (sizeof (initial_value_struct));
+ ivs = (initial_value_struct *) ggc_alloc (sizeof (initial_value_struct));
ivs->num_entries = 0;
ivs->max_entries = 5;
- ivs->entries = ggc_alloc (5 * sizeof (initial_value_pair));
+ ivs->entries = (initial_value_pair *) ggc_alloc (5 * sizeof (initial_value_pair));
cfun->hard_reg_initial_vals = ivs;
}
if (ivs->num_entries >= ivs->max_entries)
{
ivs->max_entries += 5;
- ivs->entries = ggc_realloc (ivs->entries,
+ ivs->entries = (initial_value_pair *) ggc_realloc (ivs->entries,
ivs->max_entries
* sizeof (initial_value_pair));
}
diff --git a/gcc/intl.c b/gcc/intl.c
index ca4679cea38..b8a11fe370a 100644
--- a/gcc/intl.c
+++ b/gcc/intl.c
@@ -92,7 +92,7 @@ size_t
gcc_gettext_width (const char *msgstr)
{
size_t nwcs = mbstowcs (0, msgstr, 0);
- wchar_t *wmsgstr = alloca ((nwcs + 1) * sizeof (wchar_t));
+ wchar_t *wmsgstr = (wchar_t *) alloca ((nwcs + 1) * sizeof (wchar_t));
mbstowcs (wmsgstr, msgstr, nwcs + 1);
return wcswidth (wmsgstr, nwcs);
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 3837bfdc97a..f9c473d5997 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -573,7 +573,7 @@ static void
ipcp_propagate_stage (void)
{
int i;
- struct ipcp_formal cval1 = { 0, {0} }, cval = { 0,{0} };
+ struct ipcp_formal cval1 = { BOTTOM, {0} }, cval = { BOTTOM, {0} };
struct ipcp_formal *cval2;
struct cgraph_node *mt, *callee;
struct cgraph_edge *cs;
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 638fdefb8c8..73ebfc62e83 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -438,7 +438,7 @@ update_caller_keys (fibheap_t heap, struct cgraph_node *node,
for (edge = node->callers; edge; edge = edge->next_caller)
if (edge->aux)
{
- fibheap_delete_node (heap, edge->aux);
+ fibheap_delete_node (heap, (fibnode_t) edge->aux);
edge->aux = NULL;
if (edge->inline_failed)
edge->inline_failed = failed_reason;
@@ -452,7 +452,7 @@ update_caller_keys (fibheap_t heap, struct cgraph_node *node,
int badness = cgraph_edge_badness (edge);
if (edge->aux)
{
- fibnode_t n = edge->aux;
+ fibnode_t n = (fibnode_t) edge->aux;
gcc_assert (n->data == edge);
if (n->key == badness)
continue;
@@ -460,7 +460,7 @@ update_caller_keys (fibheap_t heap, struct cgraph_node *node,
/* fibheap_replace_key only increase the keys. */
if (fibheap_replace_key (heap, n, badness))
continue;
- fibheap_delete_node (heap, edge->aux);
+ fibheap_delete_node (heap, (fibnode_t) edge->aux);
}
edge->aux = fibheap_insert (heap, badness, edge);
}
@@ -616,7 +616,7 @@ cgraph_decide_recursive_inlining (struct cgraph_node *node)
&& (cgraph_estimate_size_after_inlining (1, node, master_clone)
<= limit))
{
- struct cgraph_edge *curr = fibheap_extract_min (heap);
+ struct cgraph_edge *curr = (struct cgraph_edge *) fibheap_extract_min (heap);
struct cgraph_node *cnode;
depth = 1;
@@ -749,7 +749,7 @@ cgraph_decide_inlining_of_small_functions (void)
edge->aux = fibheap_insert (heap, cgraph_edge_badness (edge), edge);
}
}
- while (overall_insns <= max_insns && (edge = fibheap_extract_min (heap)))
+ while (overall_insns <= max_insns && (edge = (struct cgraph_edge *) fibheap_extract_min (heap)))
{
int old_insns = overall_insns;
struct cgraph_node *where;
@@ -877,7 +877,7 @@ cgraph_decide_inlining_of_small_functions (void)
overall_insns - old_insns);
}
}
- while ((edge = fibheap_extract_min (heap)) != NULL)
+ while ((edge = (struct cgraph_edge *) fibheap_extract_min (heap)) != NULL)
{
gcc_assert (edge->aux);
edge->aux = NULL;
@@ -1193,7 +1193,7 @@ cgraph_early_inlining (void)
gcc_assert (!node->aux);
#endif
- order = ggc_alloc (sizeof (*order) * cgraph_n_nodes);
+ order = (struct cgraph_node **) ggc_alloc (sizeof (*order) * cgraph_n_nodes);
nnodes = cgraph_postorder (order);
for (i = nnodes - 1; i >= 0; i--)
{
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 041cf2984b1..fc485cffe9f 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -80,8 +80,8 @@ typedef struct funct_state_d * funct_state;
static inline funct_state
get_function_state (struct cgraph_node *node)
{
- struct ipa_dfs_info * info = node->aux;
- return info->aux;
+ struct ipa_dfs_info * info = (struct ipa_dfs_info *) node->aux;
+ return (funct_state) info->aux;
}
/* Check to see if the use (or definition when CHECHING_WRITE is true)
@@ -391,7 +391,7 @@ scan_function (tree *tp,
int *walk_subtrees,
void *data)
{
- struct cgraph_node *fn = data;
+ struct cgraph_node *fn = (struct cgraph_node *) data;
tree t = *tp;
funct_state local = get_function_state (fn);
@@ -493,7 +493,7 @@ analyze_function (struct cgraph_node *fn)
{
funct_state l = XCNEW (struct funct_state_d);
tree decl = fn->decl;
- struct ipa_dfs_info * w_info = fn->aux;
+ struct ipa_dfs_info * w_info = (struct ipa_dfs_info *) fn->aux;
w_info->aux = l;
@@ -653,7 +653,7 @@ static_execute (void)
}
}
}
- w_info = w->aux;
+ w_info = (struct ipa_dfs_info *) w->aux;
w = w_info->next_cycle;
}
@@ -688,7 +688,7 @@ static_execute (void)
break;
}
}
- w_info = w->aux;
+ w_info = (struct ipa_dfs_info *) w->aux;
w = w_info->next_cycle;
}
}
@@ -698,7 +698,7 @@ static_execute (void)
/* Get rid of the aux information. */
if (node->aux)
{
- w_info = node->aux;
+ w_info = (struct ipa_dfs_info *) node->aux;
if (w_info->aux)
free (w_info->aux);
free (node->aux);
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index 077aa18d723..31c17a7d1c1 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -480,7 +480,7 @@ scan_for_static_refs (tree *tp,
int *walk_subtrees,
void *data)
{
- struct cgraph_node *fn = data;
+ struct cgraph_node *fn = (struct cgraph_node *) data;
tree t = *tp;
ipa_reference_local_vars_info_t local = NULL;
if (fn)
@@ -689,7 +689,7 @@ merge_callee_local_info (struct cgraph_node *target,
get_reference_vars_info_from_cgraph (target)->local;
/* Make the world safe for tail recursion. */
- struct ipa_dfs_info *node_info = x->aux;
+ struct ipa_dfs_info *node_info = (struct ipa_dfs_info *) x->aux;
if (node_info->aux)
return;
@@ -789,9 +789,9 @@ static void
analyze_function (struct cgraph_node *fn)
{
ipa_reference_vars_info_t info
- = xcalloc (1, sizeof (struct ipa_reference_vars_info_d));
+ = XCNEW (struct ipa_reference_vars_info_d);
ipa_reference_local_vars_info_t l
- = xcalloc (1, sizeof (struct ipa_reference_local_vars_info_d));
+ = XCNEW (struct ipa_reference_local_vars_info_d);
tree decl = fn->decl;
/* Add the info to the tree's annotation. */
@@ -895,7 +895,7 @@ static_execute (void)
struct cgraph_varpool_node *vnode;
struct cgraph_node *w;
struct cgraph_node **order =
- xcalloc (cgraph_n_nodes, sizeof (struct cgraph_node *));
+ XCNEWVEC (struct cgraph_node *, cgraph_n_nodes);
int order_pos = order_pos = ipa_utils_reduced_inorder (order, false, true);
int i;
@@ -1067,7 +1067,7 @@ static_execute (void)
{
ipa_reference_vars_info_t node_info;
ipa_reference_global_vars_info_t node_g =
- xcalloc (1, sizeof (struct ipa_reference_global_vars_info_d));
+ XCNEW (struct ipa_reference_global_vars_info_d);
ipa_reference_local_vars_info_t node_l;
bool read_all;
@@ -1091,7 +1091,7 @@ static_execute (void)
/* If any node in a cycle is calls_read_all or calls_write_all
they all are. */
- w_info = node->aux;
+ w_info = (struct ipa_dfs_info *) node->aux;
w = w_info->next_cycle;
while (w)
{
@@ -1100,7 +1100,7 @@ static_execute (void)
read_all |= w_l->calls_read_all;
write_all |= w_l->calls_write_all;
- w_info = w->aux;
+ w_info = (struct ipa_dfs_info *) w->aux;
w = w_info->next_cycle;
}
@@ -1123,7 +1123,7 @@ static_execute (void)
node_l->statics_written);
}
- w_info = node->aux;
+ w_info = (struct ipa_dfs_info *) node->aux;
w = w_info->next_cycle;
while (w)
{
@@ -1144,7 +1144,7 @@ static_execute (void)
if (!write_all)
bitmap_ior_into (node_g->statics_written,
w_l->statics_written);
- w_info = w->aux;
+ w_info = (struct ipa_dfs_info *) w->aux;
w = w_info->next_cycle;
}
@@ -1152,7 +1152,7 @@ static_execute (void)
while (w)
{
propagate_bits (w);
- w_info = w->aux;
+ w_info = (struct ipa_dfs_info *) w->aux;
w = w_info->next_cycle;
}
}
@@ -1169,12 +1169,12 @@ static_execute (void)
node = order[i];
merge_callee_local_info (node, node);
- w_info = node->aux;
+ w_info = (struct ipa_dfs_info *) node->aux;
w = w_info->next_cycle;
while (w)
{
merge_callee_local_info (w, w);
- w_info = w->aux;
+ w_info = (struct ipa_dfs_info *) w->aux;
w = w_info->next_cycle;
}
}
@@ -1212,7 +1212,7 @@ static_execute (void)
get_static_name (index));
}
- w_info = node->aux;
+ w_info = (struct ipa_dfs_info *) node->aux;
w = w_info->next_cycle;
while (w)
{
@@ -1238,7 +1238,7 @@ static_execute (void)
}
- w_info = w->aux;
+ w_info = (struct ipa_dfs_info *) w->aux;
w = w_info->next_cycle;
}
fprintf (dump_file, "\n globals read: ");
diff --git a/gcc/ipa-type-escape.c b/gcc/ipa-type-escape.c
index b2ee148268e..0e93ad4db4e 100644
--- a/gcc/ipa-type-escape.c
+++ b/gcc/ipa-type-escape.c
@@ -1173,7 +1173,7 @@ okay_pointer_operation (enum tree_code code, tree op0, tree op1)
static tree
scan_for_refs (tree *tp, int *walk_subtrees, void *data)
{
- struct cgraph_node *fn = data;
+ struct cgraph_node *fn = (struct cgraph_node *) data;
tree t = *tp;
switch (TREE_CODE (t))
diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c
index f0025c7559f..d54c7f0368e 100644
--- a/gcc/ipa-utils.c
+++ b/gcc/ipa-utils.c
@@ -86,10 +86,10 @@ static void
searchc (struct searchc_env* env, struct cgraph_node *v)
{
struct cgraph_edge *edge;
- struct ipa_dfs_info *v_info = v->aux;
+ struct ipa_dfs_info *v_info = (struct ipa_dfs_info *) v->aux;
/* mark node as old */
- v_info->new = false;
+ v_info->fresh = false;
splay_tree_remove (env->nodes_marked_new, v->uid);
v_info->dfn_number = env->count;
@@ -107,8 +107,8 @@ searchc (struct searchc_env* env, struct cgraph_node *v)
w = cgraph_master_clone (w);
if (w && w->aux)
{
- w_info = w->aux;
- if (w_info->new)
+ w_info = (struct ipa_dfs_info *) w->aux;
+ if (w_info->fresh)
{
searchc (env, w);
v_info->low_link =
@@ -132,7 +132,7 @@ searchc (struct searchc_env* env, struct cgraph_node *v)
struct ipa_dfs_info *x_info;
do {
x = env->stack[--(env->stack_size)];
- x_info = x->aux;
+ x_info = (struct ipa_dfs_info *) x->aux;
x_info->on_stack = false;
if (env->reduce)
@@ -177,10 +177,10 @@ ipa_utils_reduced_inorder (struct cgraph_node **order,
AVAIL_OVERWRITABLE))))
{
/* Reuse the info if it is already there. */
- struct ipa_dfs_info *info = node->aux;
+ struct ipa_dfs_info *info = (struct ipa_dfs_info *) node->aux;
if (!info)
- info = xcalloc (1, sizeof (struct ipa_dfs_info));
- info->new = true;
+ info = XCNEW (struct ipa_dfs_info);
+ info->fresh = true;
info->on_stack = false;
info->next_cycle = NULL;
node->aux = info;
diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h
index 1bb5e6d0555..0dd85de1b39 100644
--- a/gcc/ipa-utils.h
+++ b/gcc/ipa-utils.h
@@ -30,7 +30,7 @@ extern tree memory_identifier_string;
struct ipa_dfs_info {
int dfn_number;
int low_link;
- bool new;
+ bool fresh;
bool on_stack;
struct cgraph_node* next_cycle;
PTR aux;
diff --git a/gcc/ipa.c b/gcc/ipa.c
index b78709bc166..2783b067d3a 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -56,7 +56,7 @@ cgraph_postorder (struct cgraph_node **order)
{
while (node2->aux != &last)
{
- edge = node2->aux;
+ edge = (struct cgraph_edge *) node2->aux;
if (edge->next_caller)
node2->aux = edge->next_caller;
else
@@ -96,7 +96,7 @@ cgraph_postorder (struct cgraph_node **order)
bool
cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
{
- struct cgraph_node *first = (void *) 1;
+ struct cgraph_node *first = (struct cgraph_node *) 1;
struct cgraph_node *node, *next;
bool changed = false;
int insns = 0;
@@ -129,7 +129,7 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
{
struct cgraph_edge *e;
node = first;
- first = first->aux;
+ first = (struct cgraph_node *) first->aux;
for (e = node->callees; e; e = e->next_callee)
if (!e->callee->aux
diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in
index e77327134a3..944eaacc32c 100644
--- a/gcc/java/Make-lang.in
+++ b/gcc/java/Make-lang.in
@@ -104,7 +104,7 @@ JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \
java/zextract.o java/jcf-io.o java/win32-host.o java/jcf-parse.o java/mangle.o \
java/mangle_name.o java/builtins.o java/resource.o \
java/jcf-write.o java/buffer.o java/check-init.o java/jcf-depend.o \
- java/jcf-path.o java/boehm.o java/java-gimplify.o
+ java/jcf-path.o java/boehm.o java/java-gimplify.o tree-mudflap.o
GCJH_OBJS = java/gjavah.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \
java/win32-host.o java/zextract.o version.o errors.o ggc-none.o \
diff --git a/gcc/java/buffer.c b/gcc/java/buffer.c
index 996dac78585..685682fc766 100644
--- a/gcc/java/buffer.c
+++ b/gcc/java/buffer.c
@@ -44,7 +44,7 @@ buffer_grow (struct buffer *bufp, int size)
{
int index = bufp->ptr - bufp->data;
size += 2 * (bufp->limit - bufp->data);
- bufp->data = xrealloc (bufp->data, size);
+ bufp->data = (unsigned char *) xrealloc (bufp->data, size);
bufp->ptr = bufp->data + index;
}
bufp->limit = bufp->data + size;
diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c
index 77936395cbb..8dec468f117 100644
--- a/gcc/java/builtins.c
+++ b/gcc/java/builtins.c
@@ -70,9 +70,9 @@ struct builtin_record GTY(())
static GTY(()) struct builtin_record java_builtins[] =
{
- { { "java.lang.Math" }, { "min" }, min_builtin, 0 },
- { { "java.lang.Math" }, { "max" }, max_builtin, 0 },
- { { "java.lang.Math" }, { "abs" }, abs_builtin, 0 },
+ { { "java.lang.Math" }, { "min" }, min_builtin, BUILT_IN_NONE },
+ { { "java.lang.Math" }, { "max" }, max_builtin, BUILT_IN_NONE },
+ { { "java.lang.Math" }, { "abs" }, abs_builtin, BUILT_IN_NONE },
{ { "java.lang.Math" }, { "acos" }, NULL, BUILT_IN_ACOS },
{ { "java.lang.Math" }, { "asin" }, NULL, BUILT_IN_ASIN },
{ { "java.lang.Math" }, { "atan" }, NULL, BUILT_IN_ATAN },
@@ -86,10 +86,10 @@ static GTY(()) struct builtin_record java_builtins[] =
{ { "java.lang.Math" }, { "sin" }, NULL, BUILT_IN_SIN },
{ { "java.lang.Math" }, { "sqrt" }, NULL, BUILT_IN_SQRT },
{ { "java.lang.Math" }, { "tan" }, NULL, BUILT_IN_TAN },
- { { "java.lang.Float" }, { "intBitsToFloat" }, convert_real, 0 },
- { { "java.lang.Double" }, { "longBitsToDouble" }, convert_real, 0 },
- { { "java.lang.Float" }, { "floatToRawIntBits" }, convert_real, 0 },
- { { "java.lang.Double" }, { "doubleToRawLongBits" }, convert_real, 0 },
+ { { "java.lang.Float" }, { "intBitsToFloat" }, convert_real, BUILT_IN_NONE },
+ { { "java.lang.Double" }, { "longBitsToDouble" }, convert_real, BUILT_IN_NONE },
+ { { "java.lang.Float" }, { "floatToRawIntBits" }, convert_real, BUILT_IN_NONE },
+ { { "java.lang.Double" }, { "doubleToRawLongBits" }, convert_real, BUILT_IN_NONE },
{ { NULL }, { NULL }, NULL, END_BUILTINS }
};
diff --git a/gcc/java/check-init.c b/gcc/java/check-init.c
index 6eb1f162a7a..dee7fe9a291 100644
--- a/gcc/java/check-init.c
+++ b/gcc/java/check-init.c
@@ -29,6 +29,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "java-tree-code.h"
#include "tree.h"
#include "flags.h" /* Needed for optimize. */
#include "java-tree.h"
@@ -111,7 +112,7 @@ static tree get_variable_decl (tree);
static void final_assign_error (tree);
static void check_final_reassigned (tree, words);
-#define ALLOC_WORDS(NUM) (xmalloc ((NUM) * sizeof (word)))
+#define ALLOC_WORDS(NUM) ((words)xmalloc ((NUM) * sizeof (word)))
#define FREE_WORDS(PTR) (free (PTR))
/* DECLARE_BUFFERS is used to allocate NUMBUFFER bit sets, each of
@@ -125,7 +126,7 @@ static void check_final_reassigned (tree, words);
#define DECLARE_BUFFERS(BUFFER, NUMBUFFERS) \
word BUFFER##_short[2 * NUMBUFFERS]; \
- words BUFFER = ALLOC_BUFFER(BUFFER##_short, NUMBUFFERS * num_current_words)
+ words BUFFER = (words)ALLOC_BUFFER(BUFFER##_short, NUMBUFFERS * num_current_words)
#define RELEASE_BUFFERS(BUFFER) \
FREE_BUFFER(BUFFER, BUFFER##_short)
diff --git a/gcc/java/class.c b/gcc/java/class.c
index cdb298e77a1..b1701f202c1 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -273,7 +273,7 @@ ident_subst (const char* old_name,
int prefix_len = strlen (prefix);
int suffix_len = strlen (suffix);
int i = prefix_len + old_length + suffix_len + 1;
- char *buffer = alloca (i);
+ char *buffer = (char *) alloca (i);
strcpy (buffer, prefix);
for (i = 0; i < old_length; i++)
@@ -353,11 +353,11 @@ unmangle_classname (const char *name, int name_length)
#define GEN_TABLE(TABLE, NAME, TABLE_TYPE, TYPE) \
do \
{ \
- const char *typename = IDENTIFIER_POINTER (mangled_classname ("", TYPE)); \
- char *buf = alloca (strlen (typename) + strlen (#NAME "_syms_") + 1); \
+ const char *type_name = IDENTIFIER_POINTER (mangled_classname ("", TYPE)); \
+ char *buf = (char *) alloca (strlen (type_name) + strlen (#NAME "_syms_") + 1); \
tree decl; \
\
- sprintf (buf, #NAME "_%s", typename); \
+ sprintf (buf, #NAME "_%s", type_name); \
TYPE_## TABLE ##_DECL (type) = decl = \
build_decl (VAR_DECL, get_identifier (buf), TABLE_TYPE); \
DECL_EXTERNAL (decl) = 1; \
@@ -369,7 +369,7 @@ do \
pushdecl (decl); \
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); \
DECL_OWNER (decl) = TYPE; \
- sprintf (buf, #NAME "_syms_%s", typename); \
+ sprintf (buf, #NAME "_syms_%s", type_name); \
TYPE_## TABLE ##_SYMS_DECL (TYPE) = \
build_decl (VAR_DECL, get_identifier (buf), symbols_array_type); \
TREE_STATIC (TYPE_## TABLE ##_SYMS_DECL (TYPE)) = 1; \
@@ -383,13 +383,13 @@ while (0)
void
gen_indirect_dispatch_tables (tree type)
{
- const char *typename = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
+ const char *type_name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
{
tree field = NULL;
- char *buf = alloca (strlen (typename) + strlen ("_catch_classes_") + 1);
+ char *buf = (char *) alloca (strlen (type_name) + strlen ("_catch_classes_") + 1);
tree catch_class_type = make_node (RECORD_TYPE);
- sprintf (buf, "_catch_classes_%s", typename);
+ sprintf (buf, "_catch_classes_%s", type_name);
PUSH_FIELD (catch_class_type, field, "address", utf8const_ptr_type);
PUSH_FIELD (catch_class_type, field, "classname", ptr_type_node);
FINISH_RECORD (catch_class_type);
@@ -706,7 +706,7 @@ add_method_1 (tree this_class, int access_flags, tree name, tree function_type)
DECL_CONTEXT (fndecl) = this_class;
DECL_LANG_SPECIFIC (fndecl)
- = ggc_alloc_cleared (sizeof (struct lang_decl));
+ = (struct lang_decl *) ggc_alloc_cleared (sizeof (struct lang_decl));
DECL_LANG_SPECIFIC (fndecl)->desc = LANG_DECL_FUNC;
/* Initialize the static initializer test table. */
@@ -772,14 +772,14 @@ add_method (tree this_class, int access_flags, tree name, tree method_sig)
}
tree
-add_field (tree class, tree name, tree field_type, int flags)
+add_field (tree class_stmt, tree name, tree field_type, int flags)
{
int is_static = (flags & ACC_STATIC) != 0;
tree field;
field = build_decl (is_static ? VAR_DECL : FIELD_DECL, name, field_type);
- TREE_CHAIN (field) = TYPE_FIELDS (class);
- TYPE_FIELDS (class) = field;
- DECL_CONTEXT (field) = class;
+ TREE_CHAIN (field) = TYPE_FIELDS (class_stmt);
+ TYPE_FIELDS (class_stmt) = field;
+ DECL_CONTEXT (field) = class_stmt;
if (flags & ACC_PUBLIC) FIELD_PUBLIC (field) = 1;
if (flags & ACC_PROTECTED) FIELD_PROTECTED (field) = 1;
@@ -1119,7 +1119,7 @@ build_fieldref_cache_entry (int index, tree fdecl ATTRIBUTE_UNUSED)
{
tree decl, decl_name;
const char *name = IDENTIFIER_POINTER (mangled_classname ("_cpool_", output_class));
- char *buf = alloca (strlen (name) + 20);
+ char *buf = (char *) alloca (strlen (name) + 20);
sprintf (buf, "%s_%d_ref", name, index);
decl_name = get_identifier (buf);
decl = IDENTIFIER_GLOBAL_VALUE (decl_name);
@@ -1283,8 +1283,8 @@ make_local_function_alias (tree method)
tree alias;
const char *method_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (method));
- char *name = alloca (strlen (method_name) + 2);
- char *buf = alloca (strlen (method_name) + 128);
+ char *name = (char *) alloca (strlen (method_name) + 2);
+ char *buf = (char *) alloca (strlen (method_name) + 128);
/* Only create aliases for local functions. */
if (DECL_EXTERNAL (method))
@@ -2057,42 +2057,42 @@ finish_class (void)
return 0 if we cannot assume that CLASS is compiled.
Returns 1 for primitive and 0 for array types. */
int
-is_compiled_class (tree class)
+is_compiled_class (tree cclass)
{
int seen_in_zip;
- if (TREE_CODE (class) == POINTER_TYPE)
- class = TREE_TYPE (class);
- if (TREE_CODE (class) != RECORD_TYPE) /* Primitive types are static. */
+ if (TREE_CODE (cclass) == POINTER_TYPE)
+ cclass = TREE_TYPE (cclass);
+ if (TREE_CODE (cclass) != RECORD_TYPE) /* Primitive types are static. */
return 1;
- if (TYPE_ARRAY_P (class))
+ if (TYPE_ARRAY_P (cclass))
return 0;
- if (class == current_class)
+ if (cclass == current_class)
return 2;
- seen_in_zip = (TYPE_JCF (class) && JCF_SEEN_IN_ZIP (TYPE_JCF (class)));
- if (CLASS_FROM_CURRENTLY_COMPILED_P (class) || seen_in_zip)
+ seen_in_zip = (TYPE_JCF (cclass) && JCF_SEEN_IN_ZIP (TYPE_JCF (cclass)));
+ if (CLASS_FROM_CURRENTLY_COMPILED_P (cclass) || seen_in_zip)
{
/* The class was seen in the current ZIP file and will be
available as a compiled class in the future but may not have
been loaded already. Load it if necessary. This prevent
build_class_ref () from crashing. */
- if (seen_in_zip && !CLASS_LOADED_P (class))
- load_class (class, 1);
+ if (seen_in_zip && !CLASS_LOADED_P (cclass))
+ load_class (cclass, 1);
/* We return 2 for class seen in ZIP and class from files
belonging to the same compilation unit */
return 2;
}
- if (assume_compiled (IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class)))))
+ if (assume_compiled (IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (cclass)))))
{
- if (!CLASS_LOADED_P (class))
+ if (!CLASS_LOADED_P (cclass))
{
- if (CLASS_FROM_SOURCE_P (class))
- safe_layout_class (class);
+ if (CLASS_FROM_SOURCE_P (cclass))
+ safe_layout_class (cclass);
else
- load_class (class, 1);
+ load_class (cclass, 1);
}
return 1;
}
@@ -2261,7 +2261,7 @@ layout_class (tree this_class)
obstack_grow (&temporary_obstack, buffer, strlen (buffer));
}
obstack_1grow (&temporary_obstack, '\0');
- report = obstack_finish (&temporary_obstack);
+ report = (char *) obstack_finish (&temporary_obstack);
cyclic_inheritance_report = ggc_strdup (report);
obstack_free (&temporary_obstack, report);
TYPE_SIZE (this_class) = error_mark_node;
@@ -2854,11 +2854,11 @@ add_assertion_table_entry (void **htab_entry, void *ptr)
/* Generate the type assertion table for CLASS, and return its DECL. */
static tree
-emit_assertion_table (tree class)
+emit_assertion_table (tree aclass)
{
tree null_entry, ctor, table_decl;
tree list = NULL_TREE;
- htab_t assertions_htab = TYPE_ASSERTIONS (class);
+ htab_t assertions_htab = TYPE_ASSERTIONS (aclass);
/* Iterate through the hash table. */
htab_traverse (assertions_htab, add_assertion_table_entry, &list);
@@ -2876,7 +2876,7 @@ emit_assertion_table (tree class)
list = nreverse (list);
ctor = build_constructor_from_list (assertion_table_type, list);
- table_decl = build_decl (VAR_DECL, mangled_classname ("_type_assert_", class),
+ table_decl = build_decl (VAR_DECL, mangled_classname ("_type_assert_", aclass),
assertion_table_type);
TREE_STATIC (table_decl) = 1;
@@ -2927,7 +2927,7 @@ java_treetreehash_find (htab_t ht, tree t)
{
struct treetreehash_entry *e;
hashval_t hv = JAVA_TREEHASHHASH_H (t);
- e = htab_find_with_hash (ht, t, hv);
+ e = (struct treetreehash_entry *) htab_find_with_hash (ht, t, hv);
if (e == NULL)
return NULL;
else
@@ -2944,7 +2944,7 @@ java_treetreehash_new (htab_t ht, tree t)
e = htab_find_slot_with_hash (ht, t, hv, INSERT);
if (*e == NULL)
{
- tthe = (*ht->alloc_f) (1, sizeof (*tthe));
+ tthe = (struct treetreehash_entry *) (*ht->alloc_f) (1, sizeof (*tthe));
tthe->key = t;
*e = tthe;
}
@@ -2974,7 +2974,7 @@ split_qualified_name (tree *left, tree *right, tree source)
char *p, *base;
int l = IDENTIFIER_LENGTH (source);
- base = alloca (l + 1);
+ base = (char *) alloca (l + 1);
memcpy (base, IDENTIFIER_POINTER (source), l + 1);
/* Breakdown NAME into REMAINDER . IDENTIFIER. */
diff --git a/gcc/java/constants.c b/gcc/java/constants.c
index 2f4c0530035..3f40aa376eb 100644
--- a/gcc/java/constants.c
+++ b/gcc/java/constants.c
@@ -48,8 +48,8 @@ set_constant_entry (CPool *cpool, int index, int tag, jword value)
if (cpool->data == NULL)
{
cpool->capacity = 100;
- cpool->tags = ggc_alloc_cleared (sizeof(uint8) * cpool->capacity);
- cpool->data = ggc_alloc_cleared (sizeof(union cpool_entry)
+ cpool->tags = (uint8 *) ggc_alloc_cleared (sizeof(uint8) * cpool->capacity);
+ cpool->data = (union cpool_entry *) ggc_alloc_cleared (sizeof(union cpool_entry)
* cpool->capacity);
cpool->count = 1;
}
@@ -59,9 +59,9 @@ set_constant_entry (CPool *cpool, int index, int tag, jword value)
cpool->capacity *= 2;
if (index >= cpool->capacity)
cpool->capacity = index + 10;
- cpool->tags = ggc_realloc (cpool->tags,
+ cpool->tags = (uint8 *) ggc_realloc (cpool->tags,
sizeof(uint8) * cpool->capacity);
- cpool->data = ggc_realloc (cpool->data,
+ cpool->data = (union cpool_entry *) ggc_realloc (cpool->data,
sizeof(union cpool_entry) * cpool->capacity);
/* Make sure GC never sees uninitialized tag values. */
@@ -330,14 +330,14 @@ get_tag_node (int tag)
/* Given a class, return its constant pool, creating one if necessary. */
static CPool *
-cpool_for_class (tree class)
+cpool_for_class (tree jclass)
{
- CPool *cpool = TYPE_CPOOL (class);
+ CPool *cpool = TYPE_CPOOL (jclass);
if (cpool == NULL)
{
- cpool = ggc_alloc_cleared (sizeof (struct CPool));
- TYPE_CPOOL (class) = cpool;
+ cpool = (struct CPool *) ggc_alloc_cleared (sizeof (struct CPool));
+ TYPE_CPOOL (jclass) = cpool;
}
return cpool;
}
@@ -377,9 +377,9 @@ find_name_and_type_constant_tree (CPool *cpool, tree name, tree type)
Return the index of the entry. */
int
-alloc_constant_fieldref (tree class, tree decl)
+alloc_constant_fieldref (tree jclass, tree decl)
{
- CPool *outgoing_cpool = cpool_for_class (class);
+ CPool *outgoing_cpool = cpool_for_class (jclass);
int class_index
= find_tree_constant (outgoing_cpool, CONSTANT_Class,
DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))));
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 4fcc6c06ee3..266e9af1906 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -30,6 +30,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "java-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "real.h"
@@ -477,7 +478,7 @@ push_promoted_type (const char *name, tree actual_type)
tree
builtin_function (const char *name,
tree type,
- int function_code,
+ enum built_in_function function_code,
enum built_in_class cl,
const char *library_name,
tree ARG_UNUSED (attrs))
@@ -944,29 +945,29 @@ java_init_decl_processing (void)
t = tree_cons (NULL_TREE, class_ptr_type, endlink);
alloc_object_node = builtin_function ("_Jv_AllocObject",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_MALLOC (alloc_object_node) = 1;
alloc_no_finalizer_node =
builtin_function ("_Jv_AllocObjectNoFinalizer",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_MALLOC (alloc_no_finalizer_node) = 1;
t = tree_cons (NULL_TREE, ptr_type_node, endlink);
soft_initclass_node = builtin_function ("_Jv_InitClass",
build_function_type (void_type_node,
t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, class_ptr_type,
tree_cons (NULL_TREE, int_type_node, endlink));
soft_resolvepoolentry_node
= builtin_function ("_Jv_ResolvePoolEntry",
build_function_type (ptr_type_node, t),
- 0,NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_PURE (soft_resolvepoolentry_node) = 1;
throw_node = builtin_function ("_Jv_Throw",
build_function_type (void_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
/* Mark throw_nodes as `noreturn' functions with side effects. */
TREE_THIS_VOLATILE (throw_node) = 1;
TREE_SIDE_EFFECTS (throw_node) = 1;
@@ -974,10 +975,10 @@ java_init_decl_processing (void)
t = build_function_type (void_type_node, tree_cons (NULL_TREE, ptr_type_node,
endlink));
soft_monitorenter_node
- = builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN,
+ = builtin_function ("_Jv_MonitorEnter", t, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
soft_monitorexit_node
- = builtin_function ("_Jv_MonitorExit", t, 0, NOT_BUILT_IN,
+ = builtin_function ("_Jv_MonitorExit", t, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
t = tree_cons (NULL_TREE, ptr_type_node,
@@ -985,7 +986,7 @@ java_init_decl_processing (void)
soft_newarray_node
= builtin_function ("_Jv_NewPrimArray",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_MALLOC (soft_newarray_node) = 1;
t = tree_cons (NULL_TREE, int_type_node,
@@ -995,7 +996,7 @@ java_init_decl_processing (void)
soft_anewarray_node
= builtin_function ("_Jv_NewObjectArray",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_MALLOC (soft_anewarray_node) = 1;
/* There is no endlink here because _Jv_NewMultiArray is a varargs
@@ -1005,14 +1006,14 @@ java_init_decl_processing (void)
soft_multianewarray_node
= builtin_function ("_Jv_NewMultiArray",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_MALLOC (soft_multianewarray_node) = 1;
t = build_function_type (void_type_node,
tree_cons (NULL_TREE, int_type_node, endlink));
soft_badarrayindex_node
= builtin_function ("_Jv_ThrowBadArrayIndex", t,
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
/* Mark soft_badarrayindex_node as a `noreturn' function with side
effects. */
TREE_THIS_VOLATILE (soft_badarrayindex_node) = 1;
@@ -1021,7 +1022,7 @@ java_init_decl_processing (void)
soft_nullpointer_node
= builtin_function ("_Jv_ThrowNullPointerException",
build_function_type (void_type_node, endlink),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
/* Mark soft_nullpointer_node as a `noreturn' function with side
effects. */
TREE_THIS_VOLATILE (soft_nullpointer_node) = 1;
@@ -1030,7 +1031,7 @@ java_init_decl_processing (void)
soft_abstractmethod_node
= builtin_function ("_Jv_ThrowAbstractMethodError",
build_function_type (void_type_node, endlink),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
/* Mark soft_abstractmethod_node as a `noreturn' function with side
effects. */
TREE_THIS_VOLATILE (soft_abstractmethod_node) = 1;
@@ -1039,7 +1040,7 @@ java_init_decl_processing (void)
soft_nosuchfield_node
= builtin_function ("_Jv_ThrowNoSuchFieldError",
build_function_type (void_type_node, endlink),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
/* Mark soft_nosuchfield_node as a `noreturn' function with side
effects. */
TREE_THIS_VOLATILE (soft_nosuchfield_node) = 1;
@@ -1050,27 +1051,27 @@ java_init_decl_processing (void)
soft_checkcast_node
= builtin_function ("_Jv_CheckCast",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, object_ptr_type_node,
tree_cons (NULL_TREE, class_ptr_type, endlink));
soft_instanceof_node
= builtin_function ("_Jv_IsInstanceOf",
build_function_type (boolean_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_PURE (soft_instanceof_node) = 1;
t = tree_cons (NULL_TREE, object_ptr_type_node,
tree_cons (NULL_TREE, object_ptr_type_node, endlink));
soft_checkarraystore_node
= builtin_function ("_Jv_CheckArrayStore",
build_function_type (void_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, int_type_node, endlink)));
soft_lookupinterfacemethod_node
= builtin_function ("_Jv_LookupInterfaceMethodIdx",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
DECL_IS_PURE (soft_lookupinterfacemethod_node) = 1;
t = tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
@@ -1078,7 +1079,7 @@ java_init_decl_processing (void)
soft_lookupinterfacemethodbyname_node
= builtin_function ("_Jv_LookupInterfaceMethod",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, object_ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
@@ -1087,46 +1088,46 @@ java_init_decl_processing (void)
soft_lookupjnimethod_node
= builtin_function ("_Jv_LookupJNIMethod",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, ptr_type_node, endlink);
soft_getjnienvnewframe_node
= builtin_function ("_Jv_GetJNIEnvNewFrame",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
soft_jnipopsystemframe_node
= builtin_function ("_Jv_JNI_PopSystemFrame",
build_function_type (void_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, object_ptr_type_node, endlink);
soft_unwrapjni_node
= builtin_function ("_Jv_UnwrapJNIweakReference",
build_function_type (object_ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, int_type_node,
tree_cons (NULL_TREE, int_type_node, endlink));
soft_idiv_node
= builtin_function ("_Jv_divI",
build_function_type (int_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
soft_irem_node
= builtin_function ("_Jv_remI",
build_function_type (int_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
t = tree_cons (NULL_TREE, long_type_node,
tree_cons (NULL_TREE, long_type_node, endlink));
soft_ldiv_node
= builtin_function ("_Jv_divJ",
build_function_type (long_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
soft_lrem_node
= builtin_function ("_Jv_remJ",
build_function_type (long_type_node, t),
- 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
/* Initialize variables for except.c. */
eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
@@ -1397,7 +1398,7 @@ static struct binding_level *
make_binding_level (void)
{
/* NOSTRICT */
- return ggc_alloc_cleared (sizeof (struct binding_level));
+ return (struct binding_level *) ggc_alloc_cleared (sizeof (struct binding_level));
}
void
@@ -1790,7 +1791,7 @@ java_dup_lang_specific_decl (tree node)
return;
lang_decl_size = sizeof (struct lang_decl);
- x = ggc_alloc (lang_decl_size);
+ x = (struct lang_decl *) ggc_alloc (lang_decl_size);
memcpy (x, DECL_LANG_SPECIFIC (node), lang_decl_size);
DECL_LANG_SPECIFIC (node) = x;
}
@@ -1925,7 +1926,7 @@ start_java_method (tree fndecl)
i = DECL_MAX_LOCALS(fndecl) + DECL_MAX_STACK(fndecl);
decl_map = make_tree_vec (i);
base_decl_map = make_tree_vec (i);
- type_map = xrealloc (type_map, i * sizeof (tree));
+ type_map = (tree *) xrealloc (type_map, i * sizeof (tree));
#if defined(DEBUG_JAVA_BINDING_LEVELS)
fprintf (stderr, "%s:\n", lang_printable_name (fndecl, 2));
@@ -2124,15 +2125,15 @@ java_mark_cni_decl_local (tree decl)
/* Use the preceding two functions and mark all members of the class. */
void
-java_mark_class_local (tree class)
+java_mark_class_local (tree lclass)
{
tree t;
- for (t = TYPE_FIELDS (class); t ; t = TREE_CHAIN (t))
+ for (t = TYPE_FIELDS (lclass); t ; t = TREE_CHAIN (t))
if (FIELD_STATIC (t))
java_mark_decl_local (t);
- for (t = TYPE_METHODS (class); t ; t = TREE_CHAIN (t))
+ for (t = TYPE_METHODS (lclass); t ; t = TREE_CHAIN (t))
if (!METHOD_ABSTRACT (t))
{
if (METHOD_NATIVE (t) && !flag_jni)
diff --git a/gcc/java/except.c b/gcc/java/except.c
index 788c260ae28..ef4b91b0631 100644
--- a/gcc/java/except.c
+++ b/gcc/java/except.c
@@ -392,7 +392,7 @@ prepare_eh_table_type (tree type)
if (is_compiled_class (type) && !flag_indirect_dispatch)
{
name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
- buf = alloca (strlen (name) + 5);
+ buf = (char *) alloca (strlen (name) + 5);
sprintf (buf, "%s_ref", name);
decl = build_decl (VAR_DECL, get_identifier (buf), ptr_type_node);
TREE_STATIC (decl) = 1;
@@ -409,7 +409,7 @@ prepare_eh_table_type (tree type)
{
utf8_ref = build_utf8_ref (DECL_NAME (TYPE_NAME (type)));
name = IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (utf8_ref, 0)));
- buf = alloca (strlen (name) + 5);
+ buf = (char *) alloca (strlen (name) + 5);
sprintf (buf, "%s_ref", name);
decl = build_decl (VAR_DECL, get_identifier (buf), utf8const_ptr_type);
TREE_STATIC (decl) = 1;
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 3cb3db7bb2c..4aefbff88a4 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -29,6 +29,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "java-tree-code.h"
#include "tree.h"
#include "real.h"
#include "rtl.h"
@@ -434,7 +435,7 @@ type_assertion_eq (const void * k1_p, const void * k2_p)
static hashval_t
type_assertion_hash (const void *p)
{
- const type_assertion *k_p = p;
+ const type_assertion *k_p = (const type_assertion *) p;
hashval_t hash = iterative_hash (&k_p->assertion_code, sizeof
k_p->assertion_code, 0);
hash = iterative_hash (&k_p->op1, sizeof k_p->op1, hash);
@@ -449,13 +450,13 @@ type_assertion_hash (const void *p)
specific to each assertion_code. */
void
-add_type_assertion (tree class, int assertion_code, tree op1, tree op2)
+add_type_assertion (tree aclass, int assertion_code, tree op1, tree op2)
{
htab_t assertions_htab;
type_assertion as;
void **as_pp;
- assertions_htab = TYPE_ASSERTIONS (class);
+ assertions_htab = TYPE_ASSERTIONS (aclass);
if (assertions_htab == NULL)
{
assertions_htab = htab_create_ggc (7, type_assertion_hash,
@@ -881,7 +882,7 @@ build_java_indirect_ref (tree type, tree expr, int check)
tree
build_java_arrayaccess (tree array, tree type, tree index)
{
- tree node, throw = NULL_TREE;
+ tree node, thr = NULL_TREE;
tree data_field;
tree ref;
tree array_type = TREE_TYPE (TREE_TYPE (array));
@@ -908,17 +909,17 @@ build_java_arrayaccess (tree array, tree type, tree index)
len);
if (! integer_zerop (test))
{
- throw = build2 (TRUTH_ANDIF_EXPR, int_type_node, test,
+ thr = build2 (TRUTH_ANDIF_EXPR, int_type_node, test,
build_java_throw_out_of_bounds_exception (index));
/* allows expansion within COMPOUND */
- TREE_SIDE_EFFECTS( throw ) = 1;
+ TREE_SIDE_EFFECTS( thr ) = 1;
}
}
/* If checking bounds, wrap the index expr with a COMPOUND_EXPR in order
to have the bounds check evaluated first. */
- if (throw != NULL_TREE)
- index = build2 (COMPOUND_EXPR, int_type_node, throw, index);
+ if (thr != NULL_TREE)
+ index = build2 (COMPOUND_EXPR, int_type_node, thr, index);
data_field = lookup_field (&array_type, get_identifier ("data"));
@@ -2948,7 +2949,7 @@ note_instructions (JCF *jcf, tree method)
JCF_SEEK (jcf, DECL_CODE_OFFSET (method));
byte_ops = jcf->read_ptr;
- instruction_bits = xrealloc (instruction_bits, length + 1);
+ instruction_bits = (char *) xrealloc (instruction_bits, length + 1);
memset (instruction_bits, 0, length + 1);
/* This pass figures out which PC can be the targets of jumps. */
@@ -3379,9 +3380,9 @@ process_jvm_instruction (int PC, const unsigned char* byte_ops,
}
#define ARRAY_NEW_MULTI() \
{ \
- tree class = get_class_constant (current_jcf, IMMEDIATE_u2 ); \
+ tree aclass = get_class_constant (current_jcf, IMMEDIATE_u2 ); \
int ndims = IMMEDIATE_u1; \
- expand_java_multianewarray( class, ndims ); \
+ expand_java_multianewarray( aclass, ndims ); \
}
#define UNOP(OPERAND_TYPE, OPERAND_VALUE) \
diff --git a/gcc/java/java-gimplify.c b/gcc/java/java-gimplify.c
index 54900d3f9ab..4b2497e97a3 100644
--- a/gcc/java/java-gimplify.c
+++ b/gcc/java/java-gimplify.c
@@ -26,6 +26,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "java-tree-code.h"
#include "tree.h"
#include "java-tree.h"
#include "tree-dump.h"
@@ -453,7 +454,7 @@ java_gimplify_try_expr (tree try_expr)
{
tree body = TREE_OPERAND (try_expr, 0);
tree handler = TREE_OPERAND (try_expr, 1);
- tree catch = NULL_TREE;
+ tree catch_tree = NULL_TREE;
/* Build a CATCH_EXPR for each handler. */
while (handler)
@@ -463,13 +464,13 @@ java_gimplify_try_expr (tree try_expr)
tree expr = build2 (CATCH_EXPR, void_type_node,
prepare_eh_table_type (catch_type),
handler);
- if (catch)
- catch = build2 (COMPOUND_EXPR, void_type_node, catch, expr);
+ if (catch_tree)
+ catch_tree = build2 (COMPOUND_EXPR, void_type_node, catch_tree, expr);
else
- catch = expr;
+ catch_tree = expr;
handler = TREE_CHAIN (handler);
}
- return build2 (TRY_CATCH_EXPR, void_type_node, body, catch);
+ return build2 (TRY_CATCH_EXPR, void_type_node, body, catch_tree);
}
/* Dump a tree of some kind. This is a convenience wrapper for the
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index f3478692d70..bab27cf5a0d 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -31,15 +31,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "hashtab.h"
-/* Java language-specific tree codes. */
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
-enum java_tree_code {
- __DUMMY = LAST_AND_UNUSED_TREE_CODE,
-#include "java-tree.def"
- LAST_JAVA_TREE_CODE
-};
-#undef DEFTREECODE
-
struct JCF;
/* Usage of TREE_LANG_FLAG_?:
@@ -926,7 +917,7 @@ union lang_tree_node
if (DECL_LANG_SPECIFIC (T) == NULL) \
{ \
DECL_LANG_SPECIFIC ((T)) \
- = ggc_alloc_cleared (sizeof (struct lang_decl)); \
+ = (struct lang_decl *) ggc_alloc_cleared (sizeof (struct lang_decl)); \
DECL_LANG_SPECIFIC (T)->desc = LANG_DECL_VAR; \
}
@@ -1055,7 +1046,7 @@ struct lang_decl GTY(())
#define MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC(T) \
if (TYPE_LANG_SPECIFIC ((T)) == NULL) \
TYPE_LANG_SPECIFIC ((T)) \
- = ggc_alloc_cleared (sizeof (struct lang_type));
+ = (struct lang_type *) ggc_alloc_cleared (sizeof (struct lang_type));
#define TYPE_FINIT_STMT_LIST(T) (TYPE_LANG_SPECIFIC (T)->finit_stmt_list)
#define TYPE_CLINIT_STMT_LIST(T) (TYPE_LANG_SPECIFIC (T)->clinit_stmt_list)
@@ -1402,7 +1393,9 @@ extern void gen_indirect_dispatch_tables (tree type);
extern int split_qualified_name (tree *left, tree *right, tree source);
extern int in_same_package (tree, tree);
-extern tree builtin_function (const char *, tree, int, enum built_in_class,
+extern tree builtin_function (const char *, tree,
+ enum built_in_function,
+ enum built_in_class,
const char *, tree);
#define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL)
diff --git a/gcc/java/jcf-io.c b/gcc/java/jcf-io.c
index c8651b6715f..848ebfcc51a 100644
--- a/gcc/java/jcf-io.c
+++ b/gcc/java/jcf-io.c
@@ -79,8 +79,8 @@ jcf_filbuf_from_stdio (JCF *jcf, int count)
JCF_u4 old_read_end = jcf->read_end - jcf->buffer;
JCF_u4 old_size = jcf->buffer_end - jcf->buffer;
JCF_u4 new_size = (old_size == 0 ? 2000 : 2 * old_size) + count;
- unsigned char *new_buffer = jcf->buffer == NULL ? ALLOC (new_size)
- : REALLOC (jcf->buffer, new_size);
+ unsigned char *new_buffer = (unsigned char *) (jcf->buffer == NULL ? XNEWVEC (unsigned char, new_size)
+ : xrealloc (jcf->buffer, new_size));
jcf->buffer = new_buffer;
jcf->buffer_end = new_buffer + new_size;
jcf->read_ptr = new_buffer + old_read_ptr;
@@ -116,7 +116,7 @@ opendir_in_zip (const char *zipfile, int is_system)
return zipf;
}
- zipf = ALLOC (sizeof (struct ZipFile) + strlen (zipfile) + 1);
+ zipf = (struct ZipFile *) xmalloc (sizeof (struct ZipFile) + strlen (zipfile) + 1);
zipf->next = SeenZipFiles;
zipf->name = (char*)(zipf+1);
strcpy (zipf->name, zipfile);
@@ -291,7 +291,11 @@ compare_path (const void *key, const void *entry)
/* Returns nonzero if ENTRY names a .java or .class file. */
static int
+#ifdef __APPLE__
+java_or_class_file (struct dirent *entry)
+#else
java_or_class_file (const struct dirent *entry)
+#endif
{
const char *base = lbasename (entry->d_name);
return (fnmatch ("*.java", base, 0) == 0 ||
@@ -392,7 +396,7 @@ caching_stat (char *filename, struct stat *buf)
to (void *) and use __extension__ so that either way it is
quietly accepted. FIXME: scandir is not in POSIX. */
dent->num_files = __extension__ scandir (filename, &dent->files,
- (void *) java_or_class_file,
+ java_or_class_file,
alphasort);
*slot = dent;
}
@@ -441,7 +445,7 @@ find_class (const char *classname, int classname_length, JCF *jcf,
int source_ok)
{
int fd;
- int i, k, java = -1, class = -1;
+ int i, k, java = -1, jclass = -1;
struct stat java_buf, class_buf;
char *dep_file;
void *entry;
@@ -466,17 +470,17 @@ find_class (const char *classname, int classname_length, JCF *jcf,
/* Allocate and zero out the buffer, since we don't explicitly put a
null pointer when we're copying it below. */
buflen = jcf_path_max_len () + classname_length + 10;
- buffer = ALLOC (buflen);
+ buffer = XNEWVEC (char, buflen);
memset (buffer, 0, buflen);
- java_buffer = alloca (buflen);
+ java_buffer = (char *) alloca (buflen);
jcf->java_source = 0;
for (entry = jcf_path_start (); entry != NULL; entry = jcf_path_next (entry))
{
const char *path_name = jcf_path_name (entry);
- if (class != 0)
+ if (jclass != 0)
{
int dir_len;
@@ -519,7 +523,7 @@ find_class (const char *classname, int classname_length, JCF *jcf,
else
continue;
}
- class = caching_stat(buffer, &class_buf);
+ jclass = caching_stat(buffer, &class_buf);
}
if (source_ok)
@@ -543,18 +547,18 @@ find_class (const char *classname, int classname_length, JCF *jcf,
source file instead.
There should be a flag to allow people have the class file picked
up no matter what. FIXME. */
- if (! java && ! class && java_buf.st_mtime > class_buf.st_mtime)
+ if (! java && ! jclass && java_buf.st_mtime > class_buf.st_mtime)
{
if (flag_newer)
warning (0, "source file for class %qs is newer than its matching class file. Source file %qs used instead", classname, java_buffer);
- class = -1;
+ jclass = -1;
}
if (! java)
dep_file = java_buffer;
else
dep_file = buffer;
- if (!class)
+ if (!jclass)
{
SOURCE_FRONTEND_DEBUG ((stderr, "[Class selected: %s]\n",
classname+classname_length-
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index b9d52b61f8c..32f16d2af6f 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -422,8 +422,8 @@ handle_innerclass_attribute (int count, JCF *jcf)
/* If icii is 0, don't try to read the class. */
if (icii >= 0)
{
- tree class = get_class_constant (jcf, icii);
- tree decl = TYPE_NAME (class);
+ tree jclass = get_class_constant (jcf, icii);
+ tree decl = TYPE_NAME (jclass);
/* Skip reading further if ocii is null */
if (DECL_P (decl) && !CLASS_COMPLETE_P (decl) && ocii)
{
@@ -521,7 +521,7 @@ int
read_class (tree name)
{
JCF this_jcf, *jcf;
- tree icv, class = NULL_TREE;
+ tree icv, jclass = NULL_TREE;
tree save_current_class = current_class;
tree save_output_class = output_class;
location_t save_location = input_location;
@@ -529,8 +529,8 @@ read_class (tree name)
if ((icv = IDENTIFIER_CLASS_VALUE (name)) != NULL_TREE)
{
- class = TREE_TYPE (icv);
- jcf = TYPE_JCF (class);
+ jclass = TREE_TYPE (icv);
+ jcf = TYPE_JCF (jclass);
}
else
jcf = NULL;
@@ -594,11 +594,11 @@ read_class (tree name)
}
else
{
- if (class == NULL_TREE || ! CLASS_PARSED_P (class))
+ if (jclass == NULL_TREE || ! CLASS_PARSED_P (jclass))
{
java_parser_context_save_global ();
java_push_parser_context ();
- output_class = current_class = class;
+ output_class = current_class = jclass;
ctxp->save_location = input_location;
if (JCF_SEEN_IN_ZIP (current_jcf))
read_zip_member(current_jcf,
@@ -606,14 +606,14 @@ read_class (tree name)
jcf_parse (current_jcf);
/* Parsing might change the class, in which case we have to
put it back where we found it. */
- if (current_class != class && icv != NULL_TREE)
+ if (current_class != jclass && icv != NULL_TREE)
TREE_TYPE (icv) = current_class;
- class = current_class;
+ jclass = current_class;
java_pop_parser_context (0);
java_parser_context_restore_global ();
}
- layout_class (class);
- load_inner_classes (class);
+ layout_class (jclass);
+ load_inner_classes (jclass);
}
output_class = save_output_class;
@@ -1090,7 +1090,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
{
count = next - list;
avail = 2 * (count + avail);
- list = xrealloc (list, avail);
+ list = (char *) xrealloc (list, avail);
next = list + count;
avail = avail - count;
}
@@ -1231,7 +1231,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
if (magic == 0xcafebabe)
{
CLASS_FILE_P (node) = 1;
- current_jcf = ggc_alloc (sizeof (JCF));
+ current_jcf = (JCF *) ggc_alloc (sizeof (JCF));
JCF_ZERO (current_jcf);
current_jcf->read_state = finput;
current_jcf->filbuf = jcf_filbuf_from_stdio;
@@ -1249,7 +1249,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
}
else if (magic == (JCF_u4)ZIPMAGIC)
{
- main_jcf = ggc_alloc (sizeof (JCF));
+ main_jcf = (JCF *) ggc_alloc (sizeof (JCF));
JCF_ZERO (main_jcf);
main_jcf->read_state = finput;
main_jcf->filbuf = jcf_filbuf_from_stdio;
@@ -1261,7 +1261,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
fatal_error ("bad zip/jar file %s", filename);
localToFile = SeenZipFiles;
/* Register all the classes defined there. */
- process_zip_dir (main_jcf->read_state);
+ process_zip_dir ((FILE *) main_jcf->read_state);
#ifdef USE_MAPPED_LOCATION
linemap_add (&line_table, LC_LEAVE, false, NULL, 0);
#endif
@@ -1394,7 +1394,7 @@ parse_zip_file_entries (void)
for (i = 0, zdir = (ZipDirectory *)localToFile->central_directory;
i < localToFile->count; i++, zdir = ZIPDIR_NEXT (zdir))
{
- tree class;
+ tree jclass;
switch (classify_zip_file (zdir))
{
@@ -1404,10 +1404,10 @@ parse_zip_file_entries (void)
case 1:
{
char *class_name = compute_class_name (zdir);
- class = lookup_class (get_identifier (class_name));
- FREE (class_name);
- current_jcf = TYPE_JCF (class);
- output_class = current_class = class;
+ jclass = lookup_class (get_identifier (class_name));
+ free (class_name);
+ current_jcf = TYPE_JCF (jclass);
+ output_class = current_class = jclass;
if (CLASS_FROM_CURRENTLY_COMPILED_P (current_class))
{
@@ -1420,7 +1420,7 @@ parse_zip_file_entries (void)
/* This is a dummy class, and now we're compiling it for
real. */
- gcc_assert (! TYPE_DUMMY (class));
+ gcc_assert (! TYPE_DUMMY (jclass));
/* This is for a corner case where we have a superclass
but no superclass fields.
@@ -1431,13 +1431,13 @@ parse_zip_file_entries (void)
class dependencies via inner classes. Setting
TYPE_SIZE to null here causes CLASS_LOADED_P to return
false, so layout_class() will be called again. */
- if (TYPE_SIZE (class) && CLASSTYPE_SUPER (class)
- && integer_zerop (TYPE_SIZE (class)))
- TYPE_SIZE (class) = NULL_TREE;
+ if (TYPE_SIZE (jclass) && CLASSTYPE_SUPER (jclass)
+ && integer_zerop (TYPE_SIZE (jclass)))
+ TYPE_SIZE (jclass) = NULL_TREE;
- if (! CLASS_LOADED_P (class))
+ if (! CLASS_LOADED_P (jclass))
{
- if (! CLASS_PARSED_P (class))
+ if (! CLASS_PARSED_P (jclass))
{
read_zip_member (current_jcf, zdir, localToFile);
jcf_parse (current_jcf);
@@ -1513,7 +1513,7 @@ process_zip_dir (FILE *finput)
i < localToFile->count; i++, zdir = ZIPDIR_NEXT (zdir))
{
char *class_name, *file_name, *class_name_in_zip_dir;
- tree class;
+ tree jclass;
JCF *jcf;
class_name_in_zip_dir = ZIPDIR_FILENAME (zdir);
@@ -1524,13 +1524,13 @@ process_zip_dir (FILE *finput)
class_name = compute_class_name (zdir);
file_name = XNEWVEC (char, zdir->filename_length+1);
- jcf = ggc_alloc (sizeof (JCF));
+ jcf = (JCF *) ggc_alloc (sizeof (JCF));
JCF_ZERO (jcf);
strncpy (file_name, class_name_in_zip_dir, zdir->filename_length);
file_name [zdir->filename_length] = '\0';
- class = lookup_class (get_identifier (class_name));
+ jclass = lookup_class (get_identifier (class_name));
jcf->read_state = finput;
jcf->filbuf = jcf_filbuf_from_stdio;
@@ -1539,7 +1539,7 @@ process_zip_dir (FILE *finput)
jcf->filename = file_name;
jcf->zipd = zdir;
- TYPE_JCF (class) = jcf;
+ TYPE_JCF (jclass) = jcf;
}
}
diff --git a/gcc/java/jcf-path.c b/gcc/java/jcf-path.c
index 65cd80ef30c..3d588178c4e 100644
--- a/gcc/java/jcf-path.c
+++ b/gcc/java/jcf-path.c
@@ -155,7 +155,7 @@ add_entry (struct entry **entp, const char *filename, int is_system)
work more easily. Eww. */
if (! IS_DIR_SEPARATOR (filename[len - 1]))
{
- char *f2 = alloca (len + 2);
+ char *f2 = (char *)alloca (len + 2);
strcpy (f2, filename);
f2[len] = DIR_SEPARATOR;
f2[len + 1] = '\0';
@@ -178,7 +178,7 @@ add_path (struct entry **entp, const char *cp, int is_system)
if (cp)
{
- char *buf = alloca (strlen (cp) + 3);
+ char *buf = (char *)alloca (strlen (cp) + 3);
startp = endp = cp;
while (1)
{
@@ -214,7 +214,7 @@ void
jcf_path_init (void)
{
char *cp;
- char *try, sep[2];
+ char *check, sep[2];
struct stat stat_b;
int found = 0, len;
@@ -228,56 +228,56 @@ jcf_path_init (void)
GET_ENVIRONMENT (cp, "GCC_EXEC_PREFIX");
if (cp)
{
- try = alloca (strlen (cp) + 50);
+ check = (char *) alloca (strlen (cp) + 50);
/* The exec prefix can be something like
/usr/local/bin/../lib/gcc-lib/. We want to change this
into a pointer to the share/java directory. We support two
configurations: one where prefix and exec-prefix are the
same, and one where exec-prefix is `prefix/SOMETHING'. */
- strcpy (try, cp);
- strcat (try, DIR_UP);
- strcat (try, sep);
- strcat (try, DIR_UP);
- strcat (try, sep);
- len = strlen (try);
-
- strcpy (try + len, "share");
- strcat (try, sep);
- strcat (try, "java");
- strcat (try, sep);
- strcat (try, "libgcj-" DEFAULT_TARGET_VERSION ".jar");
- if (! stat (try, &stat_b))
+ strcpy (check, cp);
+ strcat (check, DIR_UP);
+ strcat (check, sep);
+ strcat (check, DIR_UP);
+ strcat (check, sep);
+ len = strlen (check);
+
+ strcpy (check + len, "share");
+ strcat (check, sep);
+ strcat (check, "java");
+ strcat (check, sep);
+ strcat (check, "libgcj-" DEFAULT_TARGET_VERSION ".jar");
+ if (! stat (check, &stat_b))
{
- add_entry (&sys_dirs, try, 1);
+ add_entry (&sys_dirs, check, 1);
found = 1;
- strcpy (&try[strlen (try)
+ strcpy (&check[strlen (check)
- strlen ("libgcj-" DEFAULT_TARGET_VERSION ".jar")],
sep);
- strcat (try, "ext");
- strcat (try, sep);
- if (! stat (try, &stat_b))
- jcf_path_extdirs_arg (try);
+ strcat (check, "ext");
+ strcat (check, sep);
+ if (! stat (check, &stat_b))
+ jcf_path_extdirs_arg (check);
}
else
{
- strcpy (try + len, DIR_UP);
- strcat (try, sep);
- strcat (try, "share");
- strcat (try, sep);
- strcat (try, "java");
- strcat (try, sep);
- strcat (try, "libgcj-" DEFAULT_TARGET_VERSION ".jar");
- if (! stat (try, &stat_b))
+ strcpy (check + len, DIR_UP);
+ strcat (check, sep);
+ strcat (check, "share");
+ strcat (check, sep);
+ strcat (check, "java");
+ strcat (check, sep);
+ strcat (check, "libgcj-" DEFAULT_TARGET_VERSION ".jar");
+ if (! stat (check, &stat_b))
{
- add_entry (&sys_dirs, try, 1);
+ add_entry (&sys_dirs, check, 1);
found = 1;
- strcpy (&try[strlen (try)
+ strcpy (&check[strlen (check)
- strlen ("libgcj-" DEFAULT_TARGET_VERSION ".jar")],
sep);
- strcat (try, "ext");
- strcat (try, sep);
- if (! stat (try, &stat_b))
- jcf_path_extdirs_arg (try);
+ strcat (check, "ext");
+ strcat (check, sep);
+ if (! stat (check, &stat_b))
+ jcf_path_extdirs_arg (check);
}
}
}
@@ -286,7 +286,7 @@ jcf_path_init (void)
/* Desperation: use the installed one. */
char *extdirs;
add_entry (&sys_dirs, LIBGCJ_ZIP_FILE, 1);
- extdirs = alloca (strlen (LIBGCJ_ZIP_FILE) + 1);
+ extdirs = (char *)alloca (strlen (LIBGCJ_ZIP_FILE) + 1);
strcpy (extdirs, LIBGCJ_ZIP_FILE);
strcpy (&extdirs[strlen (LIBGCJ_ZIP_FILE)
- strlen ("libgcj-" DEFAULT_TARGET_VERSION ".jar")],
@@ -330,7 +330,7 @@ jcf_path_extdirs_arg (const char *cp)
if (cp)
{
- char *buf = alloca (strlen (cp) + 3);
+ char *buf = (char *)alloca (strlen (cp) + 3);
startp = endp = cp;
while (1)
{
@@ -359,7 +359,7 @@ jcf_path_extdirs_arg (const char *cp)
if (direntp->d_name[0] != '.')
{
- char *name = alloca (dirname_length
+ char *name = (char *)alloca (dirname_length
+ strlen (direntp->d_name) + 2);
strcpy (name, buf);
if (! IS_DIR_SEPARATOR (name[dirname_length-1]))
diff --git a/gcc/java/jcf-reader.c b/gcc/java/jcf-reader.c
index 219cf657be1..6f12f311992 100644
--- a/gcc/java/jcf-reader.c
+++ b/gcc/java/jcf-reader.c
@@ -273,8 +273,8 @@ jcf_parse_constant_pool (JCF* jcf)
{
int i, n;
JPOOL_SIZE (jcf) = (JCF_FILL (jcf, 2), JCF_readu2 (jcf));
- jcf->cpool.tags = ggc_alloc (JPOOL_SIZE (jcf));
- jcf->cpool.data = ggc_alloc (sizeof (jword) * JPOOL_SIZE (jcf));
+ jcf->cpool.tags = (uint8 *) ggc_alloc (JPOOL_SIZE (jcf));
+ jcf->cpool.data = (union cpool_entry *) ggc_alloc (sizeof (jword) * JPOOL_SIZE (jcf));
jcf->cpool.tags[0] = 0;
#ifdef HANDLE_START_CONSTANT_POOL
HANDLE_START_CONSTANT_POOL (JPOOL_SIZE (jcf));
diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c
index b68ec250229..582f1eb0ac7 100644
--- a/gcc/java/jcf-write.c
+++ b/gcc/java/jcf-write.c
@@ -27,6 +27,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "coretypes.h"
#include "tm.h"
#include "jcf.h"
+#include "java-tree-code.h"
#include "tree.h"
#include "real.h"
#include "java-tree.h"
@@ -304,7 +305,7 @@ static void perform_relocations (struct jcf_partial *);
static void init_jcf_state (struct jcf_partial *, struct obstack *);
static void init_jcf_method (struct jcf_partial *, tree);
static void release_jcf_state (struct jcf_partial *);
-static int get_classfile_modifiers (tree class);
+static int get_classfile_modifiers (tree);
static struct chunk * generate_classfile (tree, struct jcf_partial *);
static struct jcf_handler *alloc_handler (struct jcf_block *,
struct jcf_block *,
@@ -385,10 +386,10 @@ static struct chunk *
alloc_chunk (struct chunk *last, unsigned char *data,
int size, struct obstack *work)
{
- struct chunk *chunk = obstack_alloc (work, sizeof(struct chunk));
+ struct chunk *chunk = (struct chunk *)obstack_alloc (work, sizeof(struct chunk));
if (data == NULL && size > 0)
- data = obstack_alloc (work, size);
+ data = (unsigned char *)obstack_alloc (work, size);
chunk->next = NULL;
chunk->data = data;
@@ -431,7 +432,7 @@ static struct jcf_block *
gen_jcf_label (struct jcf_partial *state)
{
struct jcf_block *block
- = obstack_alloc (state->chunk_obstack, sizeof (struct jcf_block));
+ = (struct jcf_block*)obstack_alloc (state->chunk_obstack, sizeof (struct jcf_block));
block->next = NULL;
block->linenumber = -1;
block->pc = UNDEFINED_PC;
@@ -515,7 +516,7 @@ alloc_handler (struct jcf_block *start_label, struct jcf_block *end_label,
struct jcf_partial *state)
{
struct jcf_handler *handler
- = obstack_alloc (state->chunk_obstack, sizeof (struct jcf_handler));
+ = (struct jcf_handler *)obstack_alloc (state->chunk_obstack, sizeof (struct jcf_handler));
handler->start_label = start_label;
handler->end_label = end_label;
handler->handler_label = get_jcf_label_here (state);
@@ -572,7 +573,7 @@ localvar_alloc (tree decl, struct jcf_partial *state)
ptr = (struct localvar_info**) state->localvars.data + index;
state->localvars.ptr = (unsigned char *) (ptr + 1 + wide);
}
- info = obstack_alloc (state->chunk_obstack, sizeof (struct localvar_info));
+ info = (struct localvar_info *)obstack_alloc (state->chunk_obstack, sizeof (struct localvar_info));
ptr[0] = info;
if (wide)
ptr[1] = (struct localvar_info *)(~0);
@@ -1023,7 +1024,7 @@ emit_reloc (HOST_WIDE_INT value, int kind,
struct jcf_block *target, struct jcf_partial *state)
{
struct jcf_relocation *reloc
- = obstack_alloc (state->chunk_obstack, sizeof (struct jcf_relocation));
+ = (struct jcf_relocation *)obstack_alloc (state->chunk_obstack, sizeof (struct jcf_relocation));
struct jcf_block *block = state->last_block;
reloc->next = block->u.relocations;
block->u.relocations = reloc;
@@ -1158,12 +1159,12 @@ generate_bytecode_conditional (tree exp,
compare_1:
/* Assuming op is one of the 2-operand if_icmp<COND> instructions,
set it to the corresponding 1-operand if<COND> instructions. */
- op = op - 6;
+ op = (enum java_opcode) (op - 6);
/* FALLTHROUGH */
compare_2:
/* The opcodes with their inverses are allocated in pairs.
E.g. The inverse of if_icmplt (161) is if_icmpge (162). */
- negop = (op & 1) ? op + 1 : op - 1;
+ negop = (enum java_opcode)((op & 1) ? op + 1 : op - 1);
compare_2_ptr:
if (true_branch_first)
{
@@ -1243,8 +1244,8 @@ generate_bytecode_conditional (tree exp,
{
generate_bytecode_insns (integer_zerop (exp0) ? exp1 : exp0,
STACK_TARGET, state);
- op = op + (OPCODE_ifnull - OPCODE_if_acmpeq);
- negop = (op & 1) ? op - 1 : op + 1;
+ op = (enum java_opcode)(op + (OPCODE_ifnull - OPCODE_if_acmpeq));
+ negop = (enum java_opcode)((op & 1) ? op - 1 : op + 1);
NOTE_POP (1);
goto compare_2_ptr;
}
@@ -1293,11 +1294,11 @@ generate_bytecode_conditional (tree exp,
{
case OPCODE_if_icmplt:
case OPCODE_if_icmpge:
- op += 2;
+ op = (enum java_opcode) (op + 2);
break;
case OPCODE_if_icmpgt:
case OPCODE_if_icmple:
- op -= 2;
+ op = (enum java_opcode) (op - 2);
break;
default:
break;
@@ -1553,7 +1554,7 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
generate_bytecode_insns (TREE_OPERAND (exp, 1), target, state);
if (target != IGNORE_TARGET)
{
- jopcode = OPCODE_iaload + adjust_typed_op (type, 7);
+ jopcode = (enum java_opcode) (OPCODE_iaload + adjust_typed_op (type, 7));
RESERVE(1);
OP1 (jopcode);
if (! TYPE_IS_WIDE (type))
@@ -1640,7 +1641,7 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
{
struct jcf_switch_state *sw_state = state->sw_state;
struct jcf_relocation *reloc
- = obstack_alloc (state->chunk_obstack, sizeof (struct jcf_relocation));
+ = (struct jcf_relocation *) obstack_alloc (state->chunk_obstack, sizeof (struct jcf_relocation));
HOST_WIDE_INT case_value = TREE_INT_CST_LOW (TREE_OPERAND (exp, 0));
reloc->kind = 0;
reloc->label = get_jcf_label_here (state);
@@ -1934,7 +1935,7 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
generate_bytecode_insns (TREE_OPERAND (exp, 1), STACK_TARGET, state);
emit_dup (2, 0, state);
/* Stack: ..., array, index, array, index. */
- jopcode = OPCODE_iaload + adjust_typed_op (TREE_TYPE (exp), 7);
+ jopcode = (enum java_opcode)(OPCODE_iaload + adjust_typed_op (TREE_TYPE (exp), 7));
RESERVE(1);
OP1 (jopcode);
NOTE_POP (2-size);
@@ -1956,8 +1957,8 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
/* Stack, if COMPONENT_REF: ..., [result, ] objectref, oldvalue. */
/* Stack, otherwise: ..., [result, ] oldvalue. */
generate_bytecode_insns (arg, STACK_TARGET, state);
- emit_binop ((value >= 0 ? OPCODE_iadd : OPCODE_isub)
- + adjust_typed_op (type, 3),
+ emit_binop ((enum java_opcode)((value >= 0 ? OPCODE_iadd : OPCODE_isub)
+ + adjust_typed_op (type, 3)),
type, state);
if (target != IGNORE_TARGET && ! post_op)
emit_dup (size, offset, state);
@@ -2066,7 +2067,7 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
stack, so that we can load the old value. */
emit_dup (2, 0, state);
NOTE_POP (2);
- jopcode = OPCODE_iaload + adjust_typed_op (TREE_TYPE (lhs), 7);
+ jopcode = (enum java_opcode) (OPCODE_iaload + adjust_typed_op (TREE_TYPE (lhs), 7));
RESERVE (1);
OP1 (jopcode);
NOTE_PUSH (TYPE_IS_WIDE (TREE_TYPE (lhs)) ? 2 : 1);
@@ -2112,7 +2113,7 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
}
else if (TREE_CODE (exp) == ARRAY_REF)
{
- jopcode = OPCODE_iastore + adjust_typed_op (TREE_TYPE (exp), 7);
+ jopcode = (enum java_opcode) (OPCODE_iastore + adjust_typed_op (TREE_TYPE (exp), 7));
RESERVE (1);
OP1 (jopcode);
NOTE_POP (TYPE_IS_WIDE (TREE_TYPE (exp)) ? 4 : 3);
@@ -2151,7 +2152,7 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
{
tree arg0 = TREE_OPERAND (exp, 0);
tree arg1 = TREE_OPERAND (exp, 1);
- jopcode += adjust_typed_op (type, 3);
+ jopcode = (enum java_opcode)(jopcode + adjust_typed_op (type, 3));
if (arg0 != NULL_TREE && operand_equal_p (arg0, arg1, 0))
{
/* fold may (e.g) convert 2*x to x+x. */
@@ -2193,7 +2194,7 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
break;
case NEGATE_EXPR:
jopcode = OPCODE_ineg;
- jopcode += adjust_typed_op (type, 3);
+ jopcode = (enum java_opcode)(jopcode + adjust_typed_op (type, 3));
generate_bytecode_insns (TREE_OPERAND (exp, 0), target, state);
if (target == STACK_TARGET)
emit_unop (jopcode, type, state);
@@ -2479,7 +2480,7 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
OP2 (index);
}
offset = 0;
- jopcode = OPCODE_iastore + adjust_typed_op (element_type, 7);
+ jopcode = (enum java_opcode) (OPCODE_iastore + adjust_typed_op (element_type, 7));
FOR_EACH_CONSTRUCTOR_VALUE (v, idx, value)
{
int save_SP = state->code_SP;
@@ -2515,9 +2516,9 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
}
case NEW_CLASS_EXPR:
{
- tree class = TREE_TYPE (TREE_TYPE (exp));
+ tree jclass = TREE_TYPE (TREE_TYPE (exp));
int need_result = target != IGNORE_TARGET;
- int index = find_class_constant (&state->cpool, class);
+ int index = find_class_constant (&state->cpool, jclass);
RESERVE (4);
OP1 (OPCODE_new);
OP2 (index);
@@ -2779,7 +2780,7 @@ perform_relocations (struct jcf_partial *state)
unsigned char *old_ptr = old_buffer + old_size;
if (new_size != old_size)
{
- chunk->data = obstack_alloc (state->chunk_obstack, new_size);
+ chunk->data = (unsigned char *) obstack_alloc (state->chunk_obstack, new_size);
chunk->size = new_size;
}
new_ptr = chunk->data + new_size;
@@ -2910,13 +2911,13 @@ release_jcf_state (struct jcf_partial *state)
access_flags field of the class file header. */
static int
-get_classfile_modifiers (tree class)
+get_classfile_modifiers (tree jclass)
{
/* These are the flags which are valid class file modifiers.
See JVMS2 S4.1. */
int valid_toplevel_class_flags = (ACC_PUBLIC | ACC_FINAL | ACC_SUPER |
ACC_INTERFACE | ACC_ABSTRACT);
- int flags = get_access_flags (class);
+ int flags = get_access_flags (jclass);
/* ACC_SUPER should always be set, except for interfaces. */
if (! (flags & ACC_INTERFACE))
@@ -3286,7 +3287,7 @@ generate_classfile (tree clas, struct jcf_partial *state)
/* New finally generate the contents of the constant pool chunk. */
i = count_constant_pool_bytes (&state->cpool);
- ptr = obstack_alloc (state->chunk_obstack, i);
+ ptr = (unsigned char *)obstack_alloc (state->chunk_obstack, i);
cpool_chunk->data = ptr;
cpool_chunk->size = i;
write_constant_pool (&state->cpool, ptr, i);
@@ -3323,12 +3324,12 @@ append_deprecated_attribute (struct jcf_partial *state)
}
static void
-append_gcj_attribute (struct jcf_partial *state, tree class)
+append_gcj_attribute (struct jcf_partial *state, tree jclass)
{
unsigned char *ptr;
int i;
- if (class != object_type_node)
+ if (jclass != object_type_node)
return;
ptr = append_chunk (NULL, 6, state); /* 2+4 */
@@ -3340,14 +3341,14 @@ append_gcj_attribute (struct jcf_partial *state, tree class)
static tree InnerClasses_node;
static void
-append_innerclasses_attribute (struct jcf_partial *state, tree class)
+append_innerclasses_attribute (struct jcf_partial *state, tree jclass)
{
- tree orig_decl = TYPE_NAME (class);
+ tree orig_decl = TYPE_NAME (jclass);
tree current, decl;
int length = 0, i;
unsigned char *ptr, *length_marker, *number_marker;
- if (!INNER_CLASS_TYPE_P (class) && !DECL_INNER_CLASS_LIST (orig_decl))
+ if (!INNER_CLASS_TYPE_P (jclass) && !DECL_INNER_CLASS_LIST (orig_decl))
return;
ptr = append_chunk (NULL, 8, state); /* 2+4+2 */
@@ -3363,11 +3364,11 @@ append_innerclasses_attribute (struct jcf_partial *state, tree class)
/* Generate the entries: all inner classes visible from the one we
process: itself, up and down. */
- while (class && INNER_CLASS_TYPE_P (class))
+ while (jclass && INNER_CLASS_TYPE_P (jclass))
{
const char *n;
- decl = TYPE_NAME (class);
+ decl = TYPE_NAME (jclass);
n = IDENTIFIER_POINTER (DECL_NAME (decl)) +
IDENTIFIER_LENGTH (DECL_NAME (decl));
@@ -3376,7 +3377,7 @@ append_innerclasses_attribute (struct jcf_partial *state, tree class)
append_innerclasses_attribute_entry (state, decl, get_identifier (n));
length++;
- class = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (class)));
+ jclass = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (jclass)));
}
decl = orig_decl;
diff --git a/gcc/java/jcf.h b/gcc/java/jcf.h
index 0e378970298..f458b19c986 100644
--- a/gcc/java/jcf.h
+++ b/gcc/java/jcf.h
@@ -36,12 +36,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#define JCF_u2 unsigned short
#endif
-#define ALLOC xmalloc
-#define REALLOC xrealloc
-#ifndef FREE
-#define FREE(PTR) free(PTR)
-#endif
-
#ifdef JCF_word
#define JCF_word JCF_u4
#endif
diff --git a/gcc/java/jvgenmain.c b/gcc/java/jvgenmain.c
index e0cddc0d4d5..a3310f67c39 100644
--- a/gcc/java/jvgenmain.c
+++ b/gcc/java/jvgenmain.c
@@ -164,5 +164,5 @@ do_mangle_classname (const char *string)
append_gpp_mangled_name (&ptr [-count], count);
obstack_grow (mangle_obstack, "7class$$E", strlen ("7class$$E"));
obstack_1grow (mangle_obstack, '\0');
- return obstack_finish (mangle_obstack);
+ return (char *) obstack_finish (mangle_obstack);
}
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 6344c3c8707..20974eadecd 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -29,6 +29,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "java-tree-code.h"
#include "tree.h"
#include "input.h"
#include "rtl.h"
@@ -420,7 +421,7 @@ put_decl_string (const char *str, int len)
else
{
decl_buflen *= 2;
- decl_buf = xrealloc (decl_buf, decl_buflen);
+ decl_buf = (char *) xrealloc (decl_buf, decl_buflen);
}
}
strcpy (decl_buf + decl_bufpos, str);
diff --git a/gcc/java/lex.c b/gcc/java/lex.c
index 661f1411bd0..eedd2c0ea00 100644
--- a/gcc/java/lex.c
+++ b/gcc/java/lex.c
@@ -1266,7 +1266,7 @@ do_java_lex (YYSTYPE *java_lval)
}
obstack_1grow (&temporary_obstack, '\0');
- string = obstack_finish (&temporary_obstack);
+ string = (char *) obstack_finish (&temporary_obstack);
/* If we have something all ascii, we consider a keyword, a boolean
literal, a null literal or an all ASCII identifier. Otherwise,
@@ -1411,7 +1411,7 @@ do_java_lex (YYSTYPE *java_lval)
}
obstack_1grow (&temporary_obstack, '\0');
- string = obstack_finish (&temporary_obstack);
+ string = (char *) obstack_finish (&temporary_obstack);
#ifndef JC1_LITE
if (!no_error || (c != '"'))
java_lval->node = error_mark_node; /* FIXME: Requires further
@@ -1482,8 +1482,8 @@ do_java_lex (YYSTYPE *java_lval)
return CP_TK;
case '{':
#ifndef JC1_LITE
- java_lval->operator.token = OCB_TK;
- java_lval->operator.location = BUILD_LOCATION();
+ java_lval->joperator.token = OCB_TK;
+ java_lval->joperator.location = BUILD_LOCATION();
#ifdef USE_MAPPED_LOCATION
if (ctxp->ccb_indent == 1)
ctxp->first_ccb_indent1 = input_location;
@@ -1497,8 +1497,8 @@ do_java_lex (YYSTYPE *java_lval)
case '}':
ctxp->ccb_indent--;
#ifndef JC1_LITE
- java_lval->operator.token = CCB_TK;
- java_lval->operator.location = BUILD_LOCATION();
+ java_lval->joperator.token = CCB_TK;
+ java_lval->joperator.location = BUILD_LOCATION();
#ifdef USE_MAPPED_LOCATION
if (ctxp->ccb_indent == 1)
ctxp->last_ccb_indent1 = input_location;
@@ -1904,7 +1904,7 @@ java_get_line_col (const char *filename ATTRIBUTE_UNUSED,
obstack_grow0 (&temporary_obstack, "^", 1);
fclose (fp);
- return obstack_finish (&temporary_obstack);
+ return (char *) obstack_finish (&temporary_obstack);
#endif
}
diff --git a/gcc/java/lex.h b/gcc/java/lex.h
index 20f7680b0fd..aa339a72c95 100644
--- a/gcc/java/lex.h
+++ b/gcc/java/lex.h
@@ -181,16 +181,16 @@ extern void java_destroy_lexer (java_lexer *);
/* Build an operator tree node and return TOKEN */
#define BUILD_OPERATOR(TOKEN) \
{ \
- java_lval->operator.token = (TOKEN); \
- java_lval->operator.location = BUILD_LOCATION(); \
+ java_lval->joperator.token = (TOKEN); \
+ java_lval->joperator.location = BUILD_LOCATION(); \
return (TOKEN); \
}
/* Build an operator tree node but return ASSIGN_ANY_TK */
#define BUILD_OPERATOR2(TOKEN) \
{ \
- java_lval->operator.token = (TOKEN); \
- java_lval->operator.location = BUILD_LOCATION(); \
+ java_lval->joperator.token = (TOKEN); \
+ java_lval->joperator.location = BUILD_LOCATION(); \
return ASSIGN_ANY_TK; \
}
/* Set java_lval->node and TREE_TYPE(java_lval->node) in macros */
diff --git a/gcc/java/mangle.c b/gcc/java/mangle.c
index 0fe5220b5b2..c6a7f027b79 100644
--- a/gcc/java/mangle.c
+++ b/gcc/java/mangle.c
@@ -631,13 +631,13 @@ compression_table_add (tree type)
{
if (compression_next == TREE_VEC_LENGTH (compression_table))
{
- tree new = make_tree_vec (2*compression_next);
+ tree tmp = make_tree_vec (2*compression_next);
int i;
for (i = 0; i < compression_next; i++)
- TREE_VEC_ELT (new, i) = TREE_VEC_ELT (compression_table, i);
+ TREE_VEC_ELT (tmp, i) = TREE_VEC_ELT (compression_table, i);
- compression_table = new;
+ compression_table = tmp;
}
TREE_VEC_ELT (compression_table, compression_next++) = type;
}
diff --git a/gcc/java/parse-scan.y b/gcc/java/parse-scan.y
index cedba9eb8e3..4340644023d 100644
--- a/gcc/java/parse-scan.y
+++ b/gcc/java/parse-scan.y
@@ -1272,7 +1272,7 @@ get_class_name (void)
obstack_grow0 (&name_stack, current_class_context->name,
strlen (current_class_context->name));
- result = xstrdup (obstack_finish (&name_stack));
+ result = (char *)xstrdup ((const char *)obstack_finish (&name_stack));
obstack_free (&name_stack, NULL);
return result;
diff --git a/gcc/java/parse.h b/gcc/java/parse.h
index 6b14ffe871e..fb16ad222b1 100644
--- a/gcc/java/parse.h
+++ b/gcc/java/parse.h
@@ -254,7 +254,7 @@ extern void parse_error_context (tree cl, const char *gmsgid, ...) ATTRIBUTE_GCC
obstack_grow (&temporary_obstack, \
IDENTIFIER_POINTER ((O)), IDENTIFIER_LENGTH ((O))); \
obstack_1grow (&temporary_obstack, '\0'); \
- mangled_name = obstack_finish (&temporary_obstack); \
+ mangled_name = (char *) obstack_finish (&temporary_obstack); \
(N) = get_identifier (mangled_name); \
obstack_free (&temporary_obstack, mangled_name); \
}
@@ -269,7 +269,7 @@ extern void parse_error_context (tree cl, const char *gmsgid, ...) ATTRIBUTE_GCC
obstack_grow (&temporary_obstack, \
IDENTIFIER_POINTER ((O)), IDENTIFIER_LENGTH ((O))); \
obstack_1grow (&temporary_obstack, '\0'); \
- mangled_name = obstack_finish (&temporary_obstack); \
+ mangled_name = (char *) obstack_finish (&temporary_obstack); \
(N) = get_identifier (mangled_name); \
obstack_free (&temporary_obstack, mangled_name); \
}
@@ -280,7 +280,7 @@ extern void parse_error_context (tree cl, const char *gmsgid, ...) ATTRIBUTE_GCC
obstack_grow (&temporary_obstack, "parm$", 5); \
obstack_grow (&temporary_obstack, (S), strlen ((S))); \
obstack_1grow (&temporary_obstack, '\0'); \
- mangled_name = obstack_finish (&temporary_obstack); \
+ mangled_name = (char *) obstack_finish (&temporary_obstack); \
(N) = get_identifier (mangled_name); \
obstack_free (&temporary_obstack, mangled_name); \
}
@@ -519,7 +519,7 @@ typedef struct _jdep {
#define JDEP_WFL(J) ((J)->wfl)
#define JDEP_MISC(J) ((J)->misc)
#define JDEP_ENCLOSING(J) ((J)->enclosing)
-#define JDEP_CLASS(J) ((J)->class)
+#define JDEP_CLASS(J) ((J)->jclass)
#define JDEP_APPLY_PATCH(J,P) (*(J)->patch = (P))
#define JDEP_GET_PATCH(J) ((J)->patch)
#define JDEP_CHAIN(J) ((J)->next)
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 4b6521ca243..0900366e731 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -52,6 +52,7 @@ definitions and other extensions. */
#include "coretypes.h"
#include "tm.h"
#include <dirent.h>
+#include "java-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "real.h"
@@ -139,7 +140,7 @@ static int argument_types_convertible (tree, tree);
static tree patch_invoke (tree, tree, tree);
static int maybe_use_access_method (int, tree *, tree *);
static tree lookup_method_invoke (int, tree, tree, tree, tree);
-static tree register_incomplete_type (int, tree, tree, tree);
+static tree register_incomplete_type (enum jdep_code, tree, tree, tree);
static tree check_inner_circular_reference (tree, tree);
static tree check_circular_reference (tree);
static tree obtain_incomplete_type (tree);
@@ -458,7 +459,7 @@ static GTY(()) tree src_parse_roots[1];
#else
int location;
#endif
- } operator;
+ } joperator;
int value;
}
@@ -589,19 +590,19 @@ static GTY(()) tree src_parse_roots[1];
anonymous_class_creation trap_overflow_corner_case
%type <node> return_statement break_statement continue_statement
-%type <operator> ASSIGN_TK MULT_ASSIGN_TK DIV_ASSIGN_TK
-%type <operator> REM_ASSIGN_TK PLUS_ASSIGN_TK MINUS_ASSIGN_TK
-%type <operator> LS_ASSIGN_TK SRS_ASSIGN_TK ZRS_ASSIGN_TK
-%type <operator> AND_ASSIGN_TK XOR_ASSIGN_TK OR_ASSIGN_TK
-%type <operator> ASSIGN_ANY_TK assignment_operator
-%token <operator> EQ_TK GTE_TK ZRS_TK SRS_TK GT_TK LTE_TK LS_TK
-%token <operator> BOOL_AND_TK AND_TK BOOL_OR_TK OR_TK INCR_TK PLUS_TK
-%token <operator> DECR_TK MINUS_TK MULT_TK DIV_TK XOR_TK REM_TK NEQ_TK
-%token <operator> NEG_TK REL_QM_TK REL_CL_TK NOT_TK LT_TK OCB_TK CCB_TK
-%token <operator> OP_TK OSB_TK DOT_TK THROW_TK INSTANCEOF_TK
-%type <operator> THIS_TK SUPER_TK RETURN_TK BREAK_TK CONTINUE_TK
-%type <operator> CASE_TK DEFAULT_TK TRY_TK CATCH_TK SYNCHRONIZED_TK
-%type <operator> NEW_TK ASSERT_TK
+%type <joperator> ASSIGN_TK MULT_ASSIGN_TK DIV_ASSIGN_TK
+%type <joperator> REM_ASSIGN_TK PLUS_ASSIGN_TK MINUS_ASSIGN_TK
+%type <joperator> LS_ASSIGN_TK SRS_ASSIGN_TK ZRS_ASSIGN_TK
+%type <joperator> AND_ASSIGN_TK XOR_ASSIGN_TK OR_ASSIGN_TK
+%type <joperator> ASSIGN_ANY_TK assignment_operator
+%token <joperator> EQ_TK GTE_TK ZRS_TK SRS_TK GT_TK LTE_TK LS_TK
+%token <joperator> BOOL_AND_TK AND_TK BOOL_OR_TK OR_TK INCR_TK PLUS_TK
+%token <joperator> DECR_TK MINUS_TK MULT_TK DIV_TK XOR_TK REM_TK NEQ_TK
+%token <joperator> NEG_TK REL_QM_TK REL_CL_TK NOT_TK LT_TK OCB_TK CCB_TK
+%token <joperator> OP_TK OSB_TK DOT_TK THROW_TK INSTANCEOF_TK
+%type <joperator> THIS_TK SUPER_TK RETURN_TK BREAK_TK CONTINUE_TK
+%type <joperator> CASE_TK DEFAULT_TK TRY_TK CATCH_TK SYNCHRONIZED_TK
+%type <joperator> NEW_TK ASSERT_TK
%type <node> method_body
@@ -2160,7 +2161,7 @@ array_creation_initialized:
while (osb--)
obstack_grow (&temporary_obstack, "[]", 2);
obstack_1grow (&temporary_obstack, '\0');
- sig = obstack_finish (&temporary_obstack);
+ sig = (char *) obstack_finish (&temporary_obstack);
$$ = build3 (NEW_ANONYMOUS_ARRAY_EXPR, NULL_TREE,
$2, get_identifier (sig), $4);
}
@@ -2226,10 +2227,10 @@ dims:
{
allocate *= sizeof (int);
if (ctxp->osb_number)
- ctxp->osb_number = xrealloc (ctxp->osb_number,
+ ctxp->osb_number = (int *) xrealloc (ctxp->osb_number,
allocate);
else
- ctxp->osb_number = xmalloc (allocate);
+ ctxp->osb_number = (int *) xmalloc (allocate);
}
ctxp->osb_depth++;
CURRENT_OSB (ctxp) = 1;
@@ -2431,7 +2432,7 @@ cast_expression: /* Error handling here is potentially weak */
while (osb--)
obstack_grow (&temporary_obstack, "[]", 2);
obstack_1grow (&temporary_obstack, '\0');
- ptr = obstack_finish (&temporary_obstack);
+ ptr = (const char *) obstack_finish (&temporary_obstack);
EXPR_WFL_NODE ($2) = get_identifier (ptr);
$$ = build_cast ($1.location, $2, $5);
}
@@ -2712,21 +2713,21 @@ pop_current_osb (struct parser_ctxt *ctxp)
static void
create_new_parser_context (int copy_from_previous)
{
- struct parser_ctxt *new;
+ struct parser_ctxt *tmp;
- new = ggc_alloc (sizeof (struct parser_ctxt));
+ tmp = (struct parser_ctxt *) ggc_alloc (sizeof (struct parser_ctxt));
if (copy_from_previous)
{
- memcpy (new, ctxp, sizeof (struct parser_ctxt));
+ memcpy (tmp, ctxp, sizeof (struct parser_ctxt));
/* This flag, indicating the context saves global values,
should only be set by java_parser_context_save_global. */
- new->saved_data_ctx = 0;
+ tmp->saved_data_ctx = 0;
}
else
- memset (new, 0, sizeof (struct parser_ctxt));
+ memset (tmp, 0, sizeof (struct parser_ctxt));
- new->next = ctxp;
- ctxp = new;
+ tmp->next = ctxp;
+ ctxp = tmp;
}
/* Create a new parser context and make it the current one. */
@@ -3110,7 +3111,7 @@ yyerror (const char *msgid)
obstack_grow0 (&temporary_obstack,
code_from_source, strlen (code_from_source));
- remainder = obstack_finish (&temporary_obstack);
+ remainder = (char *) obstack_finish (&temporary_obstack);
if (do_warning)
warning (0, "%s.\n%s", msgid, remainder);
else
@@ -3485,7 +3486,7 @@ build_unresolved_array_type (tree type_or_wfl)
IDENTIFIER_POINTER (EXPR_WFL_NODE (type_or_wfl)),
IDENTIFIER_LENGTH (EXPR_WFL_NODE (type_or_wfl)));
obstack_grow0 (&temporary_obstack, "[]", 2);
- ptr = obstack_finish (&temporary_obstack);
+ ptr = (const char *) obstack_finish (&temporary_obstack);
#ifdef USE_MAPPED_LOCATION
wfl = build_expr_wfl (get_identifier (ptr), EXPR_LOCATION (type_or_wfl));
#else
@@ -3865,7 +3866,7 @@ maybe_make_nested_class_name (tree name)
obstack_grow0 (&temporary_obstack,
IDENTIFIER_POINTER (name),
IDENTIFIER_LENGTH (name));
- id = get_identifier (obstack_finish (&temporary_obstack));
+ id = get_identifier ((char *) obstack_finish (&temporary_obstack));
if (ctxp->package)
QUALIFIED_P (id) = 1;
}
@@ -4030,9 +4031,9 @@ create_interface (int flags, tree id, tree super)
static void
patch_anonymous_class (tree type_decl, tree class_decl, tree wfl)
{
- tree class = TREE_TYPE (class_decl);
+ tree class_stmt = TREE_TYPE (class_decl);
tree type = TREE_TYPE (type_decl);
- tree binfo = TYPE_BINFO (class);
+ tree binfo = TYPE_BINFO (class_stmt);
/* If it's an interface, implement it */
if (CLASS_INTERFACE (type_decl))
@@ -4052,7 +4053,7 @@ patch_anonymous_class (tree type_decl, tree class_decl, tree wfl)
BINFO_BASE_APPEND (new_binfo, base_binfo);
CLASS_HAS_SUPER_FLAG (new_binfo) = CLASS_HAS_SUPER_FLAG (binfo);
BINFO_VTABLE (new_binfo) = BINFO_VTABLE (binfo);
- TYPE_BINFO (class) = new_binfo;
+ TYPE_BINFO (class_stmt) = new_binfo;
}
/* And add the interface */
@@ -4075,7 +4076,7 @@ create_anonymous_class (tree type_name)
{
char buffer [80];
tree super = NULL_TREE, itf = NULL_TREE;
- tree id, type_decl, class;
+ tree id, type_decl, class_stmt;
/* The unqualified name of the anonymous class. It's just a number. */
sprintf (buffer, "%d", anonymous_class_counter++);
@@ -4099,14 +4100,14 @@ create_anonymous_class (tree type_name)
super = type_name;
}
- class = create_class (ACC_FINAL, id, super, itf);
+ class_stmt = create_class (ACC_FINAL, id, super, itf);
/* We didn't know anything about the stuff. We register a dependence. */
if (!type_decl)
- register_incomplete_type (JDEP_ANONYMOUS, type_name, class, NULL_TREE);
+ register_incomplete_type (JDEP_ANONYMOUS, type_name, class_stmt, NULL_TREE);
- ANONYMOUS_CLASS_P (TREE_TYPE (class)) = 1;
- return class;
+ ANONYMOUS_CLASS_P (TREE_TYPE (class_stmt)) = 1;
+ return class_stmt;
}
/* Create a class in pass1 and return its decl. Return class
@@ -4330,10 +4331,10 @@ add_inner_class_fields (tree class_decl, tree fct_decl)
can't set the CLASS_LOADED_P flag */
static tree
-find_field (tree class, tree name)
+find_field (tree class_stmt, tree name)
{
tree decl;
- for (decl = TYPE_FIELDS (class); decl; decl = TREE_CHAIN (decl))
+ for (decl = TYPE_FIELDS (class_stmt); decl; decl = TREE_CHAIN (decl))
{
if (DECL_NAME (decl) == name)
return decl;
@@ -4345,16 +4346,16 @@ find_field (tree class, tree name)
of CLASS */
static tree
-lookup_field_wrapper (tree class, tree name)
+lookup_field_wrapper (tree class_stmt, tree name)
{
- tree type = class;
+ tree type = class_stmt;
tree decl = NULL_TREE;
java_parser_context_save_global ();
/* Last chance: if we're within the context of an inner class, we
might be trying to access a local variable defined in an outer
context. We try to look for it now. */
- if (INNER_CLASS_TYPE_P (class) && TREE_CODE (name) == IDENTIFIER_NODE)
+ if (INNER_CLASS_TYPE_P (class_stmt) && TREE_CODE (name) == IDENTIFIER_NODE)
{
tree new_name;
MANGLE_OUTER_LOCAL_VARIABLE_NAME (new_name, name);
@@ -4364,14 +4365,14 @@ lookup_field_wrapper (tree class, tree name)
}
if (!decl || decl == error_mark_node)
{
- type = class;
+ type = class_stmt;
decl = lookup_field (&type, name);
}
/* If the field still hasn't been found, try the next enclosing context. */
- if (!decl && INNER_CLASS_TYPE_P (class))
+ if (!decl && INNER_CLASS_TYPE_P (class_stmt))
{
- tree outer_type = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (class)));
+ tree outer_type = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (class_stmt)));
decl = lookup_field_wrapper (outer_type, name);
}
@@ -4664,7 +4665,7 @@ build_instinit_invocation (tree class_type)
(JDEP_NO_PATCH) or a patch (JDEP_METHOD or JDEP_METHOD_RETURN)
pending on the currently defined method. */
-static int patch_stage;
+static enum jdep_code patch_stage;
/* Check the method declaration and add the method to its current
class. If the argument list is known to contain incomplete types,
@@ -4826,7 +4827,7 @@ method_header (int flags, tree type, tree mdecl, tree throws)
/* Remember the original argument list */
orig_arg = TYPE_ARG_TYPES (meth);
- if (patch_stage) /* includes ret type and/or all args */
+ if (patch_stage != JDEP_NO_PATCH) /* includes ret type and/or all args */
{
jdep *jdep;
meth = add_method_1 (this_class, flags, meth_name, meth);
@@ -5288,10 +5289,10 @@ parser_check_super (tree super_decl, tree this_decl, tree wfl)
static void
create_jdep_list (struct parser_ctxt *ctxp)
{
- jdeplist *new = xmalloc (sizeof (jdeplist));
- new->first = new->last = NULL;
- new->next = ctxp->classd_list;
- ctxp->classd_list = new;
+ jdeplist *tmp = XNEW (jdeplist);
+ tmp->first = tmp->last = NULL;
+ tmp->next = ctxp->classd_list;
+ ctxp->classd_list = tmp;
}
static jdeplist *
@@ -5337,29 +5338,29 @@ obtain_incomplete_type (tree type_name)
manner. */
static tree
-register_incomplete_type (int kind, tree wfl, tree decl, tree ptr)
+register_incomplete_type (enum jdep_code kind, tree wfl, tree decl, tree ptr)
{
- jdep *new = xmalloc (sizeof (jdep));
+ jdep *tmp = XNEW (jdep);
if (!ptr && kind != JDEP_METHOD_END) /* JDEP_METHOD_END is a mere marker */
ptr = obtain_incomplete_type (wfl);
- JDEP_KIND (new) = kind;
- JDEP_DECL (new) = decl;
- JDEP_TO_RESOLVE (new) = ptr;
- JDEP_WFL (new) = wfl;
- JDEP_CHAIN (new) = NULL;
- JDEP_MISC (new) = NULL_TREE;
+ JDEP_KIND (tmp) = kind;
+ JDEP_DECL (tmp) = decl;
+ JDEP_TO_RESOLVE (tmp) = ptr;
+ JDEP_WFL (tmp) = wfl;
+ JDEP_CHAIN (tmp) = NULL;
+ JDEP_MISC (tmp) = NULL_TREE;
/* For some dependencies, set the enclosing class of the current
class to be the enclosing context */
if ((kind == JDEP_INTERFACE || kind == JDEP_ANONYMOUS || kind == JDEP_SUPER)
&& GET_ENCLOSING_CPC ())
- JDEP_ENCLOSING (new) = TREE_VALUE (GET_ENCLOSING_CPC ());
+ JDEP_ENCLOSING (tmp) = TREE_VALUE (GET_ENCLOSING_CPC ());
else
- JDEP_ENCLOSING (new) = GET_CPC ();
- JDEP_GET_PATCH (new) = (tree *)NULL;
+ JDEP_ENCLOSING (tmp) = GET_CPC ();
+ JDEP_GET_PATCH (tmp) = (tree *)NULL;
- JDEP_INSERT (ctxp->classd_list, new);
+ JDEP_INSERT (ctxp->classd_list, tmp);
return ptr;
}
@@ -5636,12 +5637,12 @@ java_fix_constructors (void)
about the class processed currently. */
void
-safe_layout_class (tree class)
+safe_layout_class (tree class_stmt)
{
tree save_current_class = current_class;
location_t save_location = input_location;
- layout_class (class);
+ layout_class (class_stmt);
current_class = save_current_class;
input_location = save_location;
@@ -6004,7 +6005,7 @@ do_resolve_class (tree enclosing, tree import_type, tree class_type, tree decl,
{
char *separator;
tree name = TYPE_NAME (class_type);
- char *namebuffer = alloca (IDENTIFIER_LENGTH (name) + 1);
+ char *namebuffer = (char *) alloca (IDENTIFIER_LENGTH (name) + 1);
strcpy (namebuffer, IDENTIFIER_POINTER (name));
@@ -6134,7 +6135,7 @@ purify_type_name (const char *name)
STRING_STRIP_BRACKETS (name, len, bracket_found);
if (bracket_found)
{
- char *stripped_name = xmemdup (name, len, len+1);
+ char *stripped_name = (char *) xmemdup (name, len, len+1);
stripped_name [len] = '\0';
return stripped_name;
}
@@ -6233,7 +6234,7 @@ get_printable_method_name (tree decl)
function it's a FWL, so we can track errors more accurately.) */
static int
-check_method_redefinition (tree class, tree method)
+check_method_redefinition (tree class_stmt, tree method)
{
tree redef, sig;
@@ -6243,7 +6244,7 @@ check_method_redefinition (tree class, tree method)
return 0;
sig = TYPE_ARGUMENT_SIGNATURE (TREE_TYPE (method));
- for (redef = TYPE_METHODS (class); redef; redef = TREE_CHAIN (redef))
+ for (redef = TYPE_METHODS (class_stmt); redef; redef = TREE_CHAIN (redef))
{
if (redef == method)
break;
@@ -6266,7 +6267,7 @@ static int
check_abstract_method_definitions (int do_interface, tree class_decl,
tree type)
{
- tree class = TREE_TYPE (class_decl);
+ tree class_stmt = TREE_TYPE (class_decl);
tree method, end_type;
int ok = 1;
@@ -6289,7 +6290,7 @@ check_abstract_method_definitions (int do_interface, tree class_decl,
if (TREE_CODE (method_name) == EXPR_WITH_FILE_LOCATION)
method_name = EXPR_WFL_NODE (method_name);
- other_super = class;
+ other_super = class_stmt;
do {
if (other_super == end_type)
end_type_reached = 1;
@@ -6361,7 +6362,7 @@ check_abstract_method_definitions (int do_interface, tree class_decl,
static void
java_check_abstract_method_definitions (tree class_decl)
{
- tree class = TREE_TYPE (class_decl);
+ tree class_stmt = TREE_TYPE (class_decl);
tree super, base_binfo;
int i;
@@ -6369,14 +6370,14 @@ java_check_abstract_method_definitions (tree class_decl)
return;
/* Check for inherited types */
- super = class;
+ super = class_stmt;
do {
super = CLASSTYPE_SUPER (super);
check_abstract_method_definitions (0, class_decl, super);
} while (super != object_type_node);
/* Check for implemented interfaces. */
- for (i = 1; BINFO_BASE_ITERATE (TYPE_BINFO (class), i, base_binfo); i++)
+ for (i = 1; BINFO_BASE_ITERATE (TYPE_BINFO (class_stmt), i, base_binfo); i++)
check_abstract_method_definitions (1, class_decl, BINFO_TYPE (base_binfo));
}
@@ -6453,26 +6454,26 @@ java_check_regular_methods (tree class_decl)
{
int saw_constructor = ANONYMOUS_CLASS_P (TREE_TYPE (class_decl));
tree method;
- tree class = TREE_TYPE (class_decl);
+ tree class_stmt = TREE_TYPE (class_decl);
tree found = NULL_TREE;
tree mthrows;
/* It is not necessary to check methods defined in java.lang.Object */
- if (class == object_type_node)
+ if (class_stmt == object_type_node)
return;
- if (!TYPE_NVIRTUALS (class))
- TYPE_METHODS (class) = nreverse (TYPE_METHODS (class));
+ if (!TYPE_NVIRTUALS (class_stmt))
+ TYPE_METHODS (class_stmt) = nreverse (TYPE_METHODS (class_stmt));
/* Should take interfaces into account. FIXME */
- for (method = TYPE_METHODS (class); method; method = TREE_CHAIN (method))
+ for (method = TYPE_METHODS (class_stmt); method; method = TREE_CHAIN (method))
{
tree sig;
tree method_wfl = DECL_FUNCTION_WFL (method);
int aflags;
/* Check for redefinitions */
- if (check_method_redefinition (class, method))
+ if (check_method_redefinition (class_stmt, method))
continue;
/* We verify things thrown by the method. They must inherit from
@@ -6497,13 +6498,13 @@ java_check_regular_methods (tree class_decl)
}
sig = build_java_argument_signature (TREE_TYPE (method));
- found = lookup_argument_method_generic (class, DECL_NAME (method), sig,
+ found = lookup_argument_method_generic (class_stmt, DECL_NAME (method), sig,
SEARCH_SUPER | SEARCH_INTERFACE);
/* Inner class can't declare static methods */
if (METHOD_STATIC (method) && !TOPLEVEL_CLASS_DECL_P (class_decl))
{
- char *t = xstrdup (lang_printable_name (class, 0));
+ char *t = xstrdup (lang_printable_name (class_stmt, 0));
parse_error_context
(method_wfl, "Method %qs can't be static in inner class %qs. Only members of interfaces and top-level classes can be static",
lang_printable_name (method, 2), t);
@@ -6607,17 +6608,17 @@ java_check_regular_methods (tree class_decl)
of the checking is done later. If this method is just a
Miranda method, we can skip the check. */
if (! METHOD_INVISIBLE (method))
- check_concrete_throws_clauses (class, method, DECL_NAME (method), sig);
+ check_concrete_throws_clauses (class_stmt, method, DECL_NAME (method), sig);
}
/* The above throws clause check only looked at superclasses. Now
we must also make sure that all methods declared in interfaces
have compatible throws clauses. FIXME: there are more efficient
ways to organize this checking; we should implement one. */
- check_interface_throws_clauses (class, class);
+ check_interface_throws_clauses (class_stmt, class_stmt);
- if (!TYPE_NVIRTUALS (class))
- TYPE_METHODS (class) = nreverse (TYPE_METHODS (class));
+ if (!TYPE_NVIRTUALS (class_stmt))
+ TYPE_METHODS (class_stmt) = nreverse (TYPE_METHODS (class_stmt));
/* Search for inherited abstract method not yet implemented in this
class. */
@@ -6689,14 +6690,14 @@ check_interface_throws_clauses (tree check_class_decl, tree class_decl)
methods it overrides. We do this by searching up the class
hierarchy, examining all matching accessible methods. */
static void
-check_concrete_throws_clauses (tree class, tree self_method,
+check_concrete_throws_clauses (tree class_stmt, tree self_method,
tree name, tree signature)
{
- tree method = lookup_argument_method_generic (class, name, signature,
+ tree method = lookup_argument_method_generic (class_stmt, name, signature,
SEARCH_SUPER | SEARCH_VISIBLE);
while (method != NULL_TREE)
{
- if (! METHOD_INVISIBLE (method) && hack_is_accessible_p (method, class))
+ if (! METHOD_INVISIBLE (method) && hack_is_accessible_p (method, class_stmt))
check_throws_clauses (self_method, DECL_FUNCTION_WFL (self_method),
method);
@@ -6805,20 +6806,20 @@ java_check_abstract_methods (tree interface_decl)
signature. Return a matching method only if their types differ. */
static tree
-lookup_java_interface_method2 (tree class, tree method_decl)
+lookup_java_interface_method2 (tree class_stmt, tree method_decl)
{
int i;
tree base_binfo;
tree to_return;
- for (i = 0; BINFO_BASE_ITERATE (TYPE_BINFO (class), i, base_binfo); i++)
+ for (i = 0; BINFO_BASE_ITERATE (TYPE_BINFO (class_stmt), i, base_binfo); i++)
{
if ((BINFO_TYPE (base_binfo) != object_type_node)
&& (to_return =
lookup_java_method2 (BINFO_TYPE (base_binfo), method_decl, 1)))
return to_return;
}
- for (i = 0; BINFO_BASE_ITERATE (TYPE_BINFO (class), i, base_binfo); i++)
+ for (i = 0; BINFO_BASE_ITERATE (TYPE_BINFO (class_stmt), i, base_binfo); i++)
{
to_return = lookup_java_interface_method2
(BINFO_TYPE (base_binfo), method_decl);
@@ -6930,7 +6931,7 @@ process_imports (void)
if (IDENTIFIER_CLASS_VALUE (to_be_found))
continue;
- original_name = xmemdup (IDENTIFIER_POINTER (to_be_found),
+ original_name = (char *) xmemdup (IDENTIFIER_POINTER (to_be_found),
IDENTIFIER_LENGTH (to_be_found),
IDENTIFIER_LENGTH (to_be_found) + 1);
@@ -7169,7 +7170,7 @@ find_in_imports_on_demand (tree enclosing_type, tree class_type)
obstack_grow0 (&temporary_obstack,
IDENTIFIER_POINTER (class_type_name),
IDENTIFIER_LENGTH (class_type_name));
- id_name = obstack_finish (&temporary_obstack);
+ id_name = (const char *) obstack_finish (&temporary_obstack);
if (! (node = maybe_get_identifier (id_name)))
continue;
@@ -7586,13 +7587,13 @@ source_start_java_method (tree fndecl)
/* Called during parsing. Creates an artificial method declaration. */
static tree
-create_artificial_method (tree class, int flags, tree type,
+create_artificial_method (tree class_stmt, int flags, tree type,
tree name, tree args)
{
tree mdecl;
location_t save_location = input_location;
- input_location = DECL_SOURCE_LOCATION (TYPE_NAME (class));
+ input_location = DECL_SOURCE_LOCATION (TYPE_NAME (class_stmt));
mdecl = make_node (FUNCTION_TYPE);
TREE_TYPE (mdecl) = type;
TYPE_ARG_TYPES (mdecl) = args;
@@ -7600,7 +7601,7 @@ create_artificial_method (tree class, int flags, tree type,
add_method(), but that failed because our caller might modify
the type of the returned method, which trashes the cache in
get_type_from_signature(). */
- mdecl = add_method_1 (class, flags, name, mdecl);
+ mdecl = add_method_1 (class_stmt, flags, name, mdecl);
input_location = save_location;
DECL_ARTIFICIAL (mdecl) = 1;
return mdecl;
@@ -8268,10 +8269,10 @@ java_complete_expand_method (tree mdecl)
/* For with each class for which there's code to generate. */
static void
-java_expand_method_bodies (tree class)
+java_expand_method_bodies (tree class_stmt)
{
tree decl;
- for (decl = TYPE_METHODS (class); decl; decl = TREE_CHAIN (decl))
+ for (decl = TYPE_METHODS (class_stmt); decl; decl = TREE_CHAIN (decl))
{
tree block;
@@ -8677,15 +8678,15 @@ build_nested_field_access_methods (tree decl)
/* Build a field access method NAME. */
static tree
-build_nested_field_access_method (tree class, tree type, tree name,
+build_nested_field_access_method (tree class_stmt, tree type, tree name,
tree args, tree body)
{
tree saved_current_function_decl, mdecl;
/* Create the method */
- mdecl = create_artificial_method (class, ACC_STATIC, type, name, args);
+ mdecl = create_artificial_method (class_stmt, ACC_STATIC, type, name, args);
fix_method_argument_names (args, mdecl);
- layout_class_method (class, NULL_TREE, mdecl, NULL_TREE);
+ layout_class_method (class_stmt, NULL_TREE, mdecl, NULL_TREE);
/* Attach the method body. */
saved_current_function_decl = current_function_decl;
@@ -8706,7 +8707,7 @@ build_nested_method_access_method (tree decl)
{
tree saved_current_function_decl, mdecl;
tree args = NULL_TREE, call_args = NULL_TREE;
- tree carg, id, body, class;
+ tree carg, id, body, class_stmt;
char buffer [80];
int parm_id_count = 0;
@@ -8718,7 +8719,7 @@ build_nested_method_access_method (tree decl)
if (DECL_FUNCTION_INNER_ACCESS (decl))
return DECL_FUNCTION_INNER_ACCESS (decl);
- class = DECL_CONTEXT (decl);
+ class_stmt = DECL_CONTEXT (decl);
/* Obtain an access identifier and mark it */
id = build_new_access_id ();
@@ -8736,9 +8737,9 @@ build_nested_method_access_method (tree decl)
args = chainon (args, end_params_node);
/* Create the method */
- mdecl = create_artificial_method (class, ACC_STATIC,
+ mdecl = create_artificial_method (class_stmt, ACC_STATIC,
TREE_TYPE (TREE_TYPE (decl)), id, args);
- layout_class_method (class, NULL_TREE, mdecl, NULL_TREE);
+ layout_class_method (class_stmt, NULL_TREE, mdecl, NULL_TREE);
/* There is a potential bug here. We should be able to use
fix_method_argument_names, but then arg names get mixed up and
eventually a constructor will have its this$0 altered and the
@@ -8949,7 +8950,7 @@ static GTY(()) tree get_message_wfl;
static GTY(()) tree type_parm_wfl;
static tree
-build_dot_class_method (tree class)
+build_dot_class_method (tree class_stmt)
{
#define BWF(S) build_wfl_node (get_identifier ((S)))
#ifdef USE_MAPPED_LOCATION
@@ -8976,7 +8977,7 @@ build_dot_class_method (tree class)
BWF ("lang")), BWF ("Class")), BWF ("forName"));
/* Create the "class$" function */
- mdecl = create_artificial_method (class, ACC_STATIC,
+ mdecl = create_artificial_method (class_stmt, ACC_STATIC,
build_pointer_type (class_type_node),
classdollar_identifier_node, args);
qual_name = MQN (MQN (BWF ("java"), BWF ("lang")),
@@ -9017,13 +9018,13 @@ build_dot_class_method (tree class)
stmt = encapsulate_with_try_catch (0, qual_name, stmt, throw_stmt);
fix_method_argument_names (args, mdecl);
- layout_class_method (class, NULL_TREE, mdecl, NULL_TREE);
+ layout_class_method (class_stmt, NULL_TREE, mdecl, NULL_TREE);
saved_current_function_decl = current_function_decl;
start_artificial_method_body (mdecl);
java_method_add_stmt (mdecl, stmt);
end_artificial_method_body (mdecl);
current_function_decl = saved_current_function_decl;
- TYPE_DOT_CLASS (class) = mdecl;
+ TYPE_DOT_CLASS (class_stmt) = mdecl;
return mdecl;
}
@@ -9189,18 +9190,18 @@ fix_constructors (tree mdecl)
static tree
get_constructor_super (tree mdecl)
{
- tree class = CLASSTYPE_SUPER (current_class);
- int super_inner = PURE_INNER_CLASS_TYPE_P (class);
+ tree class_stmt = CLASSTYPE_SUPER (current_class);
+ int super_inner = PURE_INNER_CLASS_TYPE_P (class_stmt);
tree sdecl;
- if (!class)
+ if (!class_stmt)
return NULL_TREE;
if (ANONYMOUS_CLASS_P (current_class))
{
tree mdecl_arg_type;
SKIP_THIS_AND_ARTIFICIAL_PARMS (mdecl_arg_type, mdecl);
- for (sdecl = TYPE_METHODS (class); sdecl; sdecl = TREE_CHAIN (sdecl))
+ for (sdecl = TYPE_METHODS (class_stmt); sdecl; sdecl = TREE_CHAIN (sdecl))
if (DECL_CONSTRUCTOR_P (sdecl))
{
tree m_arg_type;
@@ -9223,7 +9224,7 @@ get_constructor_super (tree mdecl)
}
else
{
- for (sdecl = TYPE_METHODS (class); sdecl; sdecl = TREE_CHAIN (sdecl))
+ for (sdecl = TYPE_METHODS (class_stmt); sdecl; sdecl = TREE_CHAIN (sdecl))
{
tree arg = TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (sdecl)));
if (super_inner)
@@ -10477,9 +10478,9 @@ check_deprecation (tree wfl, tree decl)
/* Returns 1 if class was declared in the current package, 0 otherwise */
static int
-class_in_current_package (tree class)
+class_in_current_package (tree class_stmt)
{
- if (TYPE_PACKAGE (current_class) == TYPE_PACKAGE (class))
+ if (TYPE_PACKAGE (current_class) == TYPE_PACKAGE (class_stmt))
return 1;
return 0;
}
@@ -11106,30 +11107,30 @@ patch_invoke (tree patch, tree method, tree args)
class. */
if (TREE_CODE (original_call) == NEW_CLASS_EXPR)
{
- tree class = DECL_CONTEXT (method);
- tree c1, saved_new, new;
+ tree class_stmt = DECL_CONTEXT (method);
+ tree c1, saved_new, tmp;
tree alloc_node;
if (flag_emit_class_files)
{
- TREE_TYPE (patch) = build_pointer_type (class);
+ TREE_TYPE (patch) = build_pointer_type (class_stmt);
return patch;
}
- if (!TYPE_SIZE (class))
- safe_layout_class (class);
+ if (!TYPE_SIZE (class_stmt))
+ safe_layout_class (class_stmt);
alloc_node =
- (class_has_finalize_method (class) ? alloc_object_node
+ (class_has_finalize_method (class_stmt) ? alloc_object_node
: alloc_no_finalizer_node);
- new = build3 (CALL_EXPR, promote_type (class),
+ tmp = build3 (CALL_EXPR, promote_type (class_stmt),
build_address_of (alloc_node),
- build_tree_list (NULL_TREE, build_class_ref (class)),
+ build_tree_list (NULL_TREE, build_class_ref (class_stmt)),
NULL_TREE);
- saved_new = save_expr (new);
+ saved_new = save_expr (tmp);
c1 = build_tree_list (NULL_TREE, saved_new);
TREE_CHAIN (c1) = TREE_OPERAND (original_call, 1);
TREE_OPERAND (original_call, 1) = c1;
TREE_SET_CODE (original_call, CALL_EXPR);
- patch = build2 (COMPOUND_EXPR, TREE_TYPE (new), patch, saved_new);
+ patch = build2 (COMPOUND_EXPR, TREE_TYPE (tmp), patch, saved_new);
}
/* If CHECK is set, then we are building a check to see if the object
@@ -11215,7 +11216,7 @@ invocation_mode (tree method, int super)
15.11.2 (Compile-Time Step 2) */
static tree
-lookup_method_invoke (int lc, tree cl, tree class, tree name, tree arg_list)
+lookup_method_invoke (int lc, tree cl, tree class_stmt, tree name, tree arg_list)
{
tree atl = end_params_node; /* Arg Type List */
tree method, signature, list, node;
@@ -11236,7 +11237,7 @@ lookup_method_invoke (int lc, tree cl, tree class, tree name, tree arg_list)
the arguments has array type, cast it to a size-less array
type. This prevents us from getting a strange gcj-specific
"sized array" signature in the constructor's signature. */
- if (lc && ANONYMOUS_CLASS_P (class)
+ if (lc && ANONYMOUS_CLASS_P (class_stmt)
&& TREE_CODE (current_arg) == POINTER_TYPE
&& TYPE_ARRAY_P (TREE_TYPE (current_arg)))
{
@@ -11250,18 +11251,18 @@ lookup_method_invoke (int lc, tree cl, tree class, tree name, tree arg_list)
constructor call, generate the right constructor now, since we
know the arguments' types. */
- if (lc && ANONYMOUS_CLASS_P (class))
+ if (lc && ANONYMOUS_CLASS_P (class_stmt))
{
- tree mdecl = craft_constructor (TYPE_NAME (class), atl);
+ tree mdecl = craft_constructor (TYPE_NAME (class_stmt), atl);
/* The anonymous class may have already been laid out, so make sure
the new constructor is laid out here. */
- layout_class_method (class, CLASSTYPE_SUPER (class), mdecl, NULL_TREE);
+ layout_class_method (class_stmt, CLASSTYPE_SUPER (class_stmt), mdecl, NULL_TREE);
}
/* Find all candidates and then refine the list, searching for the
most specific method. */
- list = find_applicable_accessible_methods_list (lc, class, name, atl);
- list = find_most_specific_methods_list (list, class);
+ list = find_applicable_accessible_methods_list (lc, class_stmt, name, atl);
+ list = find_most_specific_methods_list (list, class_stmt);
if (list && !TREE_CHAIN (list))
return TREE_VALUE (list);
@@ -11277,7 +11278,7 @@ lookup_method_invoke (int lc, tree cl, tree class, tree name, tree arg_list)
{
tree cm = TREE_VALUE (current);
char string [4096];
- if (!cm || not_accessible_p (class, cm, NULL_TREE, 0))
+ if (!cm || not_accessible_p (class_stmt, cm, NULL_TREE, 0))
continue;
sprintf
(string, " '%s' in '%s'%s",
@@ -11287,13 +11288,13 @@ lookup_method_invoke (int lc, tree cl, tree class, tree name, tree arg_list)
obstack_grow (&temporary_obstack, string, strlen (string));
}
obstack_1grow (&temporary_obstack, '\0');
- candidates = obstack_finish (&temporary_obstack);
+ candidates = (const char *) obstack_finish (&temporary_obstack);
}
/* Issue the error message */
method = make_node (FUNCTION_TYPE);
TYPE_ARG_TYPES (method) = atl;
signature = build_java_argument_signature (method);
- dup = xstrdup (lang_printable_name (class, 0));
+ dup = xstrdup (lang_printable_name (class_stmt, 0));
parse_error_context (cl, "Can't find %s %<%s(%s)%> in type %qs%s",
(lc ? "constructor" : "method"),
(lc ? dup : IDENTIFIER_POINTER (name)),
@@ -11307,7 +11308,7 @@ lookup_method_invoke (int lc, tree cl, tree class, tree name, tree arg_list)
when we're looking for a constructor. */
static tree
-find_applicable_accessible_methods_list (int lc, tree class, tree name,
+find_applicable_accessible_methods_list (int lc, tree class_stmt, tree name,
tree arglist)
{
static htab_t searched_classes;
@@ -11320,7 +11321,7 @@ find_applicable_accessible_methods_list (int lc, tree class, tree name,
already. */
if (searched_classes)
{
- if (htab_find (searched_classes, class) != NULL)
+ if (htab_find (searched_classes, class_stmt) != NULL)
return NULL;
}
else
@@ -11330,21 +11331,21 @@ find_applicable_accessible_methods_list (int lc, tree class, tree name,
}
search_not_done++;
- *htab_find_slot (searched_classes, class, INSERT) = class;
+ *htab_find_slot (searched_classes, class_stmt, INSERT) = class_stmt;
- if (!CLASS_LOADED_P (class))
+ if (!CLASS_LOADED_P (class_stmt))
{
- load_class (class, 1);
- safe_layout_class (class);
+ load_class (class_stmt, 1);
+ safe_layout_class (class_stmt);
}
/* Search interfaces */
- if (TREE_CODE (TYPE_NAME (class)) == TYPE_DECL
- && CLASS_INTERFACE (TYPE_NAME (class)))
+ if (TREE_CODE (TYPE_NAME (class_stmt)) == TYPE_DECL
+ && CLASS_INTERFACE (TYPE_NAME (class_stmt)))
{
- search_applicable_methods_list (lc, TYPE_METHODS (class),
+ search_applicable_methods_list (lc, TYPE_METHODS (class_stmt),
name, arglist, &list, &all_list);
- for (i = 1; BINFO_BASE_ITERATE (TYPE_BINFO (class), i, base_binfo); i++)
+ for (i = 1; BINFO_BASE_ITERATE (TYPE_BINFO (class_stmt), i, base_binfo); i++)
{
tree t = BINFO_TYPE (base_binfo);
tree rlist;
@@ -11357,7 +11358,7 @@ find_applicable_accessible_methods_list (int lc, tree class, tree name,
/* Search classes */
else
{
- search_applicable_methods_list (lc, TYPE_METHODS (class),
+ search_applicable_methods_list (lc, TYPE_METHODS (class_stmt),
name, arglist, &list, &all_list);
/* When looking finit$, class$ or instinit$, we turn LC to 1 so
@@ -11374,7 +11375,7 @@ find_applicable_accessible_methods_list (int lc, tree class, tree name,
if (!lc)
{
for (i = 1;
- BINFO_BASE_ITERATE (TYPE_BINFO (class), i, base_binfo); i++)
+ BINFO_BASE_ITERATE (TYPE_BINFO (class_stmt), i, base_binfo); i++)
{
tree t = BINFO_TYPE (base_binfo);
if (t != object_type_node)
@@ -11388,11 +11389,11 @@ find_applicable_accessible_methods_list (int lc, tree class, tree name,
}
/* Search superclass */
- if (!lc && CLASSTYPE_SUPER (class) != NULL_TREE)
+ if (!lc && CLASSTYPE_SUPER (class_stmt) != NULL_TREE)
{
tree rlist;
- class = CLASSTYPE_SUPER (class);
- rlist = find_applicable_accessible_methods_list (lc, class,
+ class_stmt = CLASSTYPE_SUPER (class_stmt);
+ rlist = find_applicable_accessible_methods_list (lc, class_stmt,
name, arglist);
list = chainon (rlist, list);
}
@@ -11453,7 +11454,7 @@ search_applicable_methods_list (int lc, tree method, tree name, tree arglist,
/* 15.11.2.2 Choose the Most Specific Method */
static tree
-find_most_specific_methods_list (tree list, tree class)
+find_most_specific_methods_list (tree list, tree cls)
{
int max = 0;
int abstract, candidates;
@@ -11488,8 +11489,8 @@ find_most_specific_methods_list (tree list, tree class)
tree context_v = DECL_CONTEXT (current_v);
if (TYPE_INTERFACE_P (DECL_CONTEXT (method_v))
&& ! TYPE_INTERFACE_P (context_v)
- && ! TYPE_INTERFACE_P (class))
- context_v = class;
+ && ! TYPE_INTERFACE_P (cls))
+ context_v = cls;
if (valid_method_invocation_conversion_p
(DECL_CONTEXT (method_v), context_v))
@@ -13960,20 +13961,20 @@ do_merge_string_cste (tree cste, const char *string, int string_len, int after)
const char *old = TREE_STRING_POINTER (cste);
int old_len = TREE_STRING_LENGTH (cste);
int len = old_len + string_len;
- char *new = alloca (len+1);
+ char *tmp = (char *) alloca (len+1);
if (after)
{
- memcpy (new, string, string_len);
- memcpy (&new [string_len], old, old_len);
+ memcpy (tmp, string, string_len);
+ memcpy (&tmp [string_len], old, old_len);
}
else
{
- memcpy (new, old, old_len);
- memcpy (&new [old_len], string, string_len);
+ memcpy (tmp, old, old_len);
+ memcpy (&tmp [old_len], string, string_len);
}
- new [len] = '\0';
- return build_string (len, new);
+ tmp [len] = '\0';
+ return build_string (len, tmp);
}
/* Tries to merge OP1 (a STRING_CST) and OP2 (if suitable). Return a
@@ -15687,7 +15688,7 @@ static tree
encapsulate_with_try_catch (int location, tree type_or_name, tree try_stmts,
tree catch_stmts)
{
- tree try_block, catch_clause_param, catch_block, catch;
+ tree try_block, catch_clause_param, catch_block, catch_stmt;
/* First build a try block */
try_block = build_expr_block (try_stmts, NULL_TREE);
@@ -15711,9 +15712,9 @@ encapsulate_with_try_catch (int location, tree type_or_name, tree try_stmts,
catch_block = build_expr_block (NULL_TREE, catch_clause_param);
/* Initialize the variable and store in the block */
- catch = build2 (MODIFY_EXPR, NULL_TREE, catch_clause_param,
+ catch_stmt = build2 (MODIFY_EXPR, NULL_TREE, catch_clause_param,
build0 (JAVA_EXC_OBJ_EXPR, ptr_type_node));
- add_stmt_to_block (catch_block, NULL_TREE, catch);
+ add_stmt_to_block (catch_block, NULL_TREE, catch_stmt);
/* Add the catch statements */
add_stmt_to_block (catch_block, NULL_TREE, catch_stmts);
@@ -15744,16 +15745,16 @@ static tree
patch_try_statement (tree node)
{
int error_found = 0;
- tree try = TREE_OPERAND (node, 0);
+ tree try_stmt = TREE_OPERAND (node, 0);
/* Exception handlers are considered in left to right order */
- tree catch = nreverse (TREE_OPERAND (node, 1));
+ tree catch_stmt = nreverse (TREE_OPERAND (node, 1));
tree current, caught_type_list = NULL_TREE;
/* Check catch clauses, if any. Every time we find an error, we try
to process the next catch clause. We process the catch clause before
the try block so that when processing the try block we can check thrown
exceptions against the caught type list. */
- for (current = catch; current; current = TREE_CHAIN (current))
+ for (current = catch_stmt; current; current = TREE_CHAIN (current))
{
tree carg_decl, carg_type;
tree sub_current, catch_block, catch_clause;
@@ -15794,7 +15795,7 @@ patch_try_statement (tree node)
clause's parameter is the same as or a subclass of the
type of A's parameter */
unreachable = 0;
- for (sub_current = catch;
+ for (sub_current = catch_stmt;
sub_current != current; sub_current = TREE_CHAIN (sub_current))
{
tree sub_catch_clause, decl;
@@ -15833,9 +15834,9 @@ patch_try_statement (tree node)
}
PUSH_EXCEPTIONS (caught_type_list);
- if ((try = java_complete_tree (try)) == error_mark_node)
+ if ((try_stmt = java_complete_tree (try_stmt)) == error_mark_node)
error_found = 1;
- if (CAN_COMPLETE_NORMALLY (try))
+ if (CAN_COMPLETE_NORMALLY (try_stmt))
CAN_COMPLETE_NORMALLY (node) = 1;
POP_EXCEPTIONS ();
@@ -15843,8 +15844,8 @@ patch_try_statement (tree node)
if (error_found)
return error_mark_node;
- TREE_OPERAND (node, 0) = try;
- TREE_OPERAND (node, 1) = catch;
+ TREE_OPERAND (node, 0) = try_stmt;
+ TREE_OPERAND (node, 1) = catch_stmt;
TREE_TYPE (node) = void_type_node;
return node;
}
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index 3441a1d8663..499d6d4fba0 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -731,9 +731,9 @@ lookup_java_method (tree searched_class, tree method_name,
/* Return true iff CLASS (or its ancestors) has a method METHOD_NAME.  */
int
-has_method (tree class, tree method_name)
+has_method (tree jclass, tree method_name)
{
- return lookup_do (class, SEARCH_INTERFACE,
+ return lookup_do (jclass, SEARCH_INTERFACE,
method_name, NULL_TREE,
build_null_signature) != NULL_TREE;
}
diff --git a/gcc/java/verify-impl.c b/gcc/java/verify-impl.c
index 886dfe7d66c..9802154f5c7 100644
--- a/gcc/java/verify-impl.c
+++ b/gcc/java/verify-impl.c
@@ -983,7 +983,7 @@ copy_state_with_stack (state *s, state *orig, int max_stack, int max_locals)
static state *
make_state_copy (state *orig, int max_stack, int max_locals)
{
- state *s = vfy_alloc (sizeof (state));
+ state *s = (state *) vfy_alloc (sizeof (state));
copy_state_with_stack (s, orig, max_stack, max_locals);
return s;
}
@@ -991,7 +991,7 @@ make_state_copy (state *orig, int max_stack, int max_locals)
static state *
make_state (int max_stack, int max_locals)
{
- state *s = vfy_alloc (sizeof (state));
+ state *s = (state *) vfy_alloc (sizeof (state));
init_state_with_stack (s, max_stack, max_locals);
return s;
}
@@ -1385,7 +1385,7 @@ add_new_state (int npc, state *old_state)
debug_print_state (new_state, "New", npc, current_method->max_stack,
current_method->max_locals);
- nlink = vfy_alloc (sizeof (state_list));
+ nlink = (state_list *) vfy_alloc (sizeof (state_list));
nlink->val = new_state;
nlink->next = vfr->states[npc];
vfr->states[npc] = nlink;
@@ -1946,7 +1946,7 @@ check_pool_index (int index)
static type
check_class_constant (int index)
{
- type t = { 0, 0, 0 };
+ type t = { void_type, 0, 0 };
vfy_constants *pool;
check_pool_index (index);
@@ -1963,7 +1963,7 @@ check_class_constant (int index)
static type
check_constant (int index)
{
- type t = { 0, 0, 0 };
+ type t = { void_type, 0, 0 };
vfy_constants *pool;
check_pool_index (index);
@@ -1987,7 +1987,7 @@ check_constant (int index)
static type
check_wide_constant (int index)
{
- type t = { 0, 0, 0 };
+ type t = { void_type, 0, 0 };
vfy_constants *pool;
check_pool_index (index);
@@ -3023,7 +3023,7 @@ verify_instructions_0 (void)
case op_newarray:
{
- int atype = get_byte ();
+ enum type_val atype = (enum type_val) get_byte ();
type t;
/* We intentionally have chosen constants to make this
valid. */
diff --git a/gcc/java/verify.h b/gcc/java/verify.h
index b85176ea85d..f762c66f806 100644
--- a/gcc/java/verify.h
+++ b/gcc/java/verify.h
@@ -27,11 +27,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#ifndef GCC_VERIFY_H
#define GCC_VERIFY_H
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
#include "system.h"
#include "coretypes.h"
#include "jcf.h"
@@ -157,8 +152,4 @@ typedef enum
int verify_method (vfy_method *meth);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* ! GCC_VERIFY_H */
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index 2a03fd31cd5..15319b9faa9 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -156,7 +156,7 @@ lambda_body_vector_new (int size)
{
lambda_body_vector ret;
- ret = ggc_alloc (sizeof (*ret));
+ ret = (lambda_body_vector) ggc_alloc (sizeof (*ret));
LBV_COEFFICIENTS (ret) = lambda_vector_new (size);
LBV_SIZE (ret) = size;
LBV_DENOMINATOR (ret) = 1;
@@ -228,7 +228,7 @@ lambda_linear_expression_new (int dim, int invariants)
{
lambda_linear_expression ret;
- ret = ggc_alloc_cleared (sizeof (*ret));
+ ret = (lambda_linear_expression) ggc_alloc_cleared (sizeof (*ret));
LLE_COEFFICIENTS (ret) = lambda_vector_new (dim);
LLE_CONSTANT (ret) = 0;
@@ -329,9 +329,9 @@ lambda_loopnest
lambda_loopnest_new (int depth, int invariants)
{
lambda_loopnest ret;
- ret = ggc_alloc (sizeof (*ret));
+ ret = (lambda_loopnest) ggc_alloc (sizeof (*ret));
- LN_LOOPS (ret) = ggc_alloc_cleared (depth * sizeof (lambda_loop));
+ LN_LOOPS (ret) = (lambda_loop *) ggc_alloc_cleared (depth * sizeof (lambda_loop));
LN_DEPTH (ret) = depth;
LN_INVARIANTS (ret) = invariants;
@@ -361,7 +361,7 @@ static lambda_lattice
lambda_lattice_new (int depth, int invariants)
{
lambda_lattice ret;
- ret = ggc_alloc (sizeof (*ret));
+ ret = (lambda_lattice) ggc_alloc (sizeof (*ret));
LATTICE_BASE (ret) = lambda_matrix_new (depth, depth);
LATTICE_ORIGIN (ret) = lambda_vector_new (depth);
LATTICE_ORIGIN_INVARIANTS (ret) = lambda_matrix_new (depth, invariants);
diff --git a/gcc/lambda-mat.c b/gcc/lambda-mat.c
index 39b75e66f73..01f1db80f6d 100644
--- a/gcc/lambda-mat.c
+++ b/gcc/lambda-mat.c
@@ -37,7 +37,7 @@ lambda_matrix_new (int m, int n)
lambda_matrix mat;
int i;
- mat = ggc_alloc (m * sizeof (lambda_vector));
+ mat = (lambda_matrix) ggc_alloc (m * sizeof (lambda_vector));
for (i = 0; i < m; i++)
mat[i] = lambda_vector_new (n);
diff --git a/gcc/lambda-trans.c b/gcc/lambda-trans.c
index aff2f1df040..c2b4f5dcaea 100644
--- a/gcc/lambda-trans.c
+++ b/gcc/lambda-trans.c
@@ -35,7 +35,7 @@ lambda_trans_matrix_new (int colsize, int rowsize)
{
lambda_trans_matrix ret;
- ret = ggc_alloc (sizeof (*ret));
+ ret = (lambda_trans_matrix) ggc_alloc (sizeof (*ret));
LTM_MATRIX (ret) = lambda_matrix_new (rowsize, colsize);
LTM_ROWSIZE (ret) = rowsize;
LTM_COLSIZE (ret) = colsize;
diff --git a/gcc/lambda.h b/gcc/lambda.h
index 5eb63997c0d..c361a374447 100644
--- a/gcc/lambda.h
+++ b/gcc/lambda.h
@@ -40,7 +40,7 @@ typedef lambda_vector *lambda_matrix;
/* A transformation matrix, which is a self-contained ROWSIZE x COLSIZE
matrix. Rather than use floats, we simply keep a single DENOMINATOR that
represents the denominator for every element in the matrix. */
-typedef struct
+typedef struct lambda_trans_matrix_s
{
lambda_matrix matrix;
int rowsize;
@@ -61,7 +61,7 @@ typedef struct
This structure is used during code generation in order to rewrite the old
induction variable uses in a statement in terms of the newly created
induction variables. */
-typedef struct
+typedef struct lambda_body_vector_s
{
lambda_vector coefficients;
int size;
@@ -127,7 +127,7 @@ typedef struct lambda_loop_s
and an integer representing the number of INVARIANTS in the loop. Both of
these integers are used to size the associated coefficient vectors in the
linear expression structures. */
-typedef struct
+typedef struct lambda_loopnest_s
{
lambda_loop *loops;
int depth;
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index e6148936829..ee97c40c40c 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -451,7 +451,8 @@ struct lang_hooks
If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME,
the name to be called if we can't opencode the function. If
ATTRS is nonzero, use that for the function's attribute list. */
- tree (*builtin_function) (const char *name, tree type, int function_code,
+ tree (*builtin_function) (const char *name, tree type,
+ enum built_in_function function_code,
enum built_in_class bt_class,
const char *library_name, tree attrs);
diff --git a/gcc/lcm.c b/gcc/lcm.c
index 2571b56ff54..d25e678a8d4 100644
--- a/gcc/lcm.c
+++ b/gcc/lcm.c
@@ -351,13 +351,13 @@ compute_laterin (struct edge_list *edge_list, sbitmap *earliest,
static void
compute_insert_delete (struct edge_list *edge_list, sbitmap *antloc,
sbitmap *later, sbitmap *laterin, sbitmap *insert,
- sbitmap *delete)
+ sbitmap *del)
{
int x;
basic_block bb;
FOR_EACH_BB (bb)
- sbitmap_difference (delete[bb->index], antloc[bb->index],
+ sbitmap_difference (del[bb->index], antloc[bb->index],
laterin[bb->index]);
for (x = 0; x < NUM_EDGES (edge_list); x++)
@@ -378,7 +378,7 @@ compute_insert_delete (struct edge_list *edge_list, sbitmap *antloc,
struct edge_list *
pre_edge_lcm (int n_exprs, sbitmap *transp,
sbitmap *avloc, sbitmap *antloc, sbitmap *kill,
- sbitmap **insert, sbitmap **delete)
+ sbitmap **insert, sbitmap **del)
{
sbitmap *antin, *antout, *earliest;
sbitmap *avin, *avout;
@@ -451,8 +451,8 @@ pre_edge_lcm (int n_exprs, sbitmap *transp,
sbitmap_vector_free (earliest);
*insert = sbitmap_vector_alloc (num_edges, n_exprs);
- *delete = sbitmap_vector_alloc (last_basic_block, n_exprs);
- compute_insert_delete (edge_list, antloc, later, laterin, *insert, *delete);
+ *del = sbitmap_vector_alloc (last_basic_block, n_exprs);
+ compute_insert_delete (edge_list, antloc, later, laterin, *insert, *del);
sbitmap_vector_free (laterin);
sbitmap_vector_free (later);
@@ -461,7 +461,7 @@ pre_edge_lcm (int n_exprs, sbitmap *transp,
if (dump_file)
{
dump_sbitmap_vector (dump_file, "pre_insert_map", "", *insert, num_edges);
- dump_sbitmap_vector (dump_file, "pre_delete_map", "", *delete,
+ dump_sbitmap_vector (dump_file, "pre_delete_map", "", *del,
last_basic_block);
}
#endif
@@ -685,13 +685,13 @@ compute_nearerout (struct edge_list *edge_list, sbitmap *farthest,
static void
compute_rev_insert_delete (struct edge_list *edge_list, sbitmap *st_avloc,
sbitmap *nearer, sbitmap *nearerout,
- sbitmap *insert, sbitmap *delete)
+ sbitmap *insert, sbitmap *del)
{
int x;
basic_block bb;
FOR_EACH_BB (bb)
- sbitmap_difference (delete[bb->index], st_avloc[bb->index],
+ sbitmap_difference (del[bb->index], st_avloc[bb->index],
nearerout[bb->index]);
for (x = 0; x < NUM_EDGES (edge_list); x++)
@@ -712,7 +712,7 @@ compute_rev_insert_delete (struct edge_list *edge_list, sbitmap *st_avloc,
struct edge_list *
pre_edge_rev_lcm (int n_exprs, sbitmap *transp,
sbitmap *st_avloc, sbitmap *st_antloc, sbitmap *kill,
- sbitmap **insert, sbitmap **delete)
+ sbitmap **insert, sbitmap **del)
{
sbitmap *st_antin, *st_antout;
sbitmap *st_avout, *st_avin, *farthest;
@@ -791,9 +791,9 @@ pre_edge_rev_lcm (int n_exprs, sbitmap *transp,
sbitmap_vector_free (farthest);
*insert = sbitmap_vector_alloc (num_edges, n_exprs);
- *delete = sbitmap_vector_alloc (last_basic_block, n_exprs);
+ *del = sbitmap_vector_alloc (last_basic_block, n_exprs);
compute_rev_insert_delete (edge_list, st_avloc, nearer, nearerout,
- *insert, *delete);
+ *insert, *del);
sbitmap_vector_free (nearerout);
sbitmap_vector_free (nearer);
@@ -802,7 +802,7 @@ pre_edge_rev_lcm (int n_exprs, sbitmap *transp,
if (dump_file)
{
dump_sbitmap_vector (dump_file, "pre_insert_map", "", *insert, num_edges);
- dump_sbitmap_vector (dump_file, "pre_delete_map", "", *delete,
+ dump_sbitmap_vector (dump_file, "pre_delete_map", "", *del,
last_basic_block);
}
#endif
diff --git a/gcc/lists.c b/gcc/lists.c
index 23529a362e2..b99b3fc3387 100644
--- a/gcc/lists.c
+++ b/gcc/lists.c
@@ -128,7 +128,7 @@ alloc_INSN_LIST (rtx val, rtx next)
gcc_assert (GET_CODE (r) == INSN_LIST);
}
else
- r = gen_rtx_INSN_LIST (VOIDmode, val, next);
+ r = gen_rtx_INSN_LIST (REG_DEP_TRUE, val, next);
return r;
}
@@ -137,7 +137,7 @@ alloc_INSN_LIST (rtx val, rtx next)
node available, we'll use it, otherwise a call to gen_rtx_EXPR_LIST
is made. */
rtx
-alloc_EXPR_LIST (int kind, rtx val, rtx next)
+alloc_EXPR_LIST (enum reg_note kind, rtx val, rtx next)
{
rtx r;
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index c103400b8ea..7e4fb59ec43 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -801,7 +801,7 @@ update_equiv_regs (void)
reg_equiv = XCNEWVEC (struct equivalence, max_regno);
INIT_REG_SET (&cleared_regs);
- reg_equiv_init = ggc_alloc_cleared (max_regno * sizeof (rtx));
+ reg_equiv_init = (rtx *) ggc_alloc_cleared (max_regno * sizeof (rtx));
reg_equiv_init_size = max_regno;
init_alias_analysis ();
@@ -868,7 +868,7 @@ update_equiv_regs (void)
/* Record for reload that this is an equivalencing insn. */
if (rtx_equal_p (src, XEXP (note, 0)))
reg_equiv_init[regno]
- = gen_rtx_INSN_LIST (VOIDmode, insn, reg_equiv_init[regno]);
+ = gen_rtx_INSN_LIST (REG_DEP_TRUE, insn, reg_equiv_init[regno]);
/* Continue normally in case this is a candidate for
replacements. */
@@ -926,7 +926,7 @@ update_equiv_regs (void)
}
/* Record this insn as initializing this register. */
reg_equiv[regno].init_insns
- = gen_rtx_INSN_LIST (VOIDmode, insn, reg_equiv[regno].init_insns);
+ = gen_rtx_INSN_LIST (REG_DEP_TRUE, insn, reg_equiv[regno].init_insns);
/* If this register is known to be equal to a constant, record that
it is always equivalent to the constant. */
@@ -965,7 +965,7 @@ update_equiv_regs (void)
equivalencing insn. */
if (!reg_equiv[regno].is_arg_equivalence)
reg_equiv_init[regno]
- = gen_rtx_INSN_LIST (VOIDmode, insn, reg_equiv_init[regno]);
+ = gen_rtx_INSN_LIST (REG_DEP_TRUE, insn, reg_equiv_init[regno]);
/* Record whether or not we created a REG_EQUIV note for a LABEL_REF.
We might end up substituting the LABEL_REF for uses of the
@@ -1066,7 +1066,7 @@ update_equiv_regs (void)
/* This insn makes the equivalence, not the one initializing
the register. */
reg_equiv_init[regno]
- = gen_rtx_INSN_LIST (VOIDmode, insn, NULL_RTX);
+ = gen_rtx_INSN_LIST (REG_DEP_TRUE, insn, NULL_RTX);
}
}
}
@@ -1198,7 +1198,7 @@ update_equiv_regs (void)
SET_REGNO_REG_SET (&cleared_regs, regno);
clear_regnos++;
reg_equiv_init[regno]
- = gen_rtx_INSN_LIST (VOIDmode, new_insn, NULL_RTX);
+ = gen_rtx_INSN_LIST (REG_DEP_TRUE, new_insn, NULL_RTX);
}
}
}
@@ -2055,11 +2055,11 @@ combine_regs (rtx usedreg, rtx setreg, int may_save_copy, int insn_number,
True if REG's reg class either contains or is contained in CLASS. */
static int
-reg_meets_class_p (int reg, enum reg_class class)
+reg_meets_class_p (int reg, enum reg_class kind)
{
enum reg_class rclass = reg_preferred_class (reg);
- return (reg_class_subset_p (rclass, class)
- || reg_class_subset_p (class, rclass));
+ return (reg_class_subset_p (rclass, kind)
+ || reg_class_subset_p (kind, rclass));
}
/* Update the class of QTYNO assuming that REG is being tied to it. */
@@ -2210,7 +2210,7 @@ wipe_dead_reg (rtx reg, int output_p)
register is available. If not, return -1. */
static int
-find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno,
+find_free_reg (enum reg_class kind, enum machine_mode mode, int qtyno,
int accept_call_clobbered, int just_try_suggested,
int born_index, int dead_index)
{
@@ -2242,7 +2242,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno,
for (ins = born_index; ins < dead_index; ins++)
IOR_HARD_REG_SET (used, regs_live_at[ins]);
- IOR_COMPL_HARD_REG_SET (used, reg_class_contents[(int) class]);
+ IOR_COMPL_HARD_REG_SET (used, reg_class_contents[kind]);
/* Don't use the frame pointer reg in local-alloc even if
we may omit the frame pointer, because if we do that and then we
@@ -2329,7 +2329,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno,
{
/* Don't try the copy-suggested regs again. */
qty_phys_num_copy_sugg[qtyno] = 0;
- return find_free_reg (class, mode, qtyno, accept_call_clobbered, 1,
+ return find_free_reg (kind, mode, qtyno, accept_call_clobbered, 1,
born_index, dead_index);
}
@@ -2346,7 +2346,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno,
&& CALLER_SAVE_PROFITABLE (qty[qtyno].n_refs,
qty[qtyno].n_calls_crossed))
{
- i = find_free_reg (class, mode, qtyno, 1, 0, born_index, dead_index);
+ i = find_free_reg (kind, mode, qtyno, 1, 0, born_index, dead_index);
if (i >= 0)
caller_save_needed = 1;
return i;
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index cf229495015..74e151c81c4 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -246,7 +246,7 @@ invariant_for_use (struct df_ref *use)
def_bb = DF_REF_BB (def);
if (!dominated_by_p (CDI_DOMINATORS, bb, def_bb))
return NULL;
- return DF_REF_DATA (def);
+ return (struct invariant *) DF_REF_DATA (def);
}
/* Computes hash value for invariant expression X in INSN. */
@@ -397,7 +397,7 @@ invariant_expr_equal_p (rtx insn1, rtx e1, rtx insn2, rtx e2)
static hashval_t
hash_invariant_expr (const void *e)
{
- const struct invariant_expr_entry *entry = e;
+ const struct invariant_expr_entry *entry = (const struct invariant_expr_entry *) e;
return entry->hash;
}
@@ -407,8 +407,8 @@ hash_invariant_expr (const void *e)
static int
eq_invariant_expr (const void *e1, const void *e2)
{
- const struct invariant_expr_entry *entry1 = e1;
- const struct invariant_expr_entry *entry2 = e2;
+ const struct invariant_expr_entry *entry1 = (const struct invariant_expr_entry *) e1;
+ const struct invariant_expr_entry *entry2 = (const struct invariant_expr_entry *) e2;
if (entry1->mode != entry2->mode)
return 0;
@@ -434,7 +434,7 @@ find_or_insert_inv (htab_t eq, rtx expr, enum machine_mode mode,
pentry.inv = inv;
pentry.mode = mode;
slot = htab_find_slot_with_hash (eq, &pentry, hash, INSERT);
- entry = *slot;
+ entry = (struct invariant_expr_entry *) *slot;
if (entry)
return entry->inv;
@@ -710,7 +710,7 @@ check_dependencies (rtx insn, bitmap depends_on)
return false;
def = defs->ref;
- inv = DF_REF_DATA (def);
+ inv = (struct invariant *) DF_REF_DATA (def);
if (!inv)
return false;
@@ -1267,7 +1267,7 @@ free_inv_motion_data (void)
if (!ref)
continue;
- inv = DF_REF_DATA (ref);
+ inv = (struct invariant *) DF_REF_DATA (ref);
if (!inv)
continue;
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index e234fd93b79..0f0964686e2 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -795,7 +795,7 @@ record_iv (struct df_ref *def, struct rtx_iv *iv)
static bool
analyzed_for_bivness_p (rtx def, struct rtx_iv *iv)
{
- struct biv_entry *biv = htab_find_with_hash (bivs, def, REGNO (def));
+ struct biv_entry *biv = (struct biv_entry *) htab_find_with_hash (bivs, def, REGNO (def));
if (!biv)
return false;
@@ -1334,7 +1334,7 @@ altered_reg_used (rtx *reg, void *alt)
if (!REG_P (*reg))
return 0;
- return REGNO_REG_SET_P (alt, REGNO (*reg));
+ return REGNO_REG_SET_P ((bitmap) alt, REGNO (*reg));
}
/* Marks registers altered by EXPR in set ALT. */
@@ -1347,7 +1347,7 @@ mark_altered (rtx expr, rtx by ATTRIBUTE_UNUSED, void *alt)
if (!REG_P (expr))
return;
- SET_REGNO_REG_SET (alt, REGNO (expr));
+ SET_REGNO_REG_SET ((bitmap) alt, REGNO (expr));
}
/* Checks whether RHS is simple enough to process. */
@@ -1831,10 +1831,10 @@ shorten_into_mode (struct rtx_iv *iv, enum machine_mode mode,
case LTU:
if (cond_under != const0_rtx)
desc->infinite =
- alloc_EXPR_LIST (0, cond_under, desc->infinite);
+ alloc_EXPR_LIST (REG_DEP_TRUE, cond_under, desc->infinite);
if (cond_over != const0_rtx)
desc->noloop_assumptions =
- alloc_EXPR_LIST (0, cond_over, desc->noloop_assumptions);
+ alloc_EXPR_LIST (REG_DEP_TRUE, cond_over, desc->noloop_assumptions);
break;
case GE:
@@ -1843,19 +1843,19 @@ shorten_into_mode (struct rtx_iv *iv, enum machine_mode mode,
case GTU:
if (cond_over != const0_rtx)
desc->infinite =
- alloc_EXPR_LIST (0, cond_over, desc->infinite);
+ alloc_EXPR_LIST (REG_DEP_TRUE, cond_over, desc->infinite);
if (cond_under != const0_rtx)
desc->noloop_assumptions =
- alloc_EXPR_LIST (0, cond_under, desc->noloop_assumptions);
+ alloc_EXPR_LIST (REG_DEP_TRUE, cond_under, desc->noloop_assumptions);
break;
case NE:
if (cond_over != const0_rtx)
desc->infinite =
- alloc_EXPR_LIST (0, cond_over, desc->infinite);
+ alloc_EXPR_LIST (REG_DEP_TRUE, cond_over, desc->infinite);
if (cond_under != const0_rtx)
desc->infinite =
- alloc_EXPR_LIST (0, cond_under, desc->infinite);
+ alloc_EXPR_LIST (REG_DEP_TRUE, cond_under, desc->infinite);
break;
default:
@@ -2158,7 +2158,7 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
if (assumption != const0_rtx)
desc->noloop_assumptions =
- alloc_EXPR_LIST (0, assumption, desc->noloop_assumptions);
+ alloc_EXPR_LIST (REG_DEP_TRUE, assumption, desc->noloop_assumptions);
cond = (cond == LT) ? LE : LEU;
/* It will be useful to be able to tell the difference once more in
@@ -2177,7 +2177,7 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
if (rtx_equal_p (tmp, mode_mmin))
{
desc->infinite =
- alloc_EXPR_LIST (0, const_true_rtx, NULL_RTX);
+ alloc_EXPR_LIST (REG_DEP_TRUE, const_true_rtx, NULL_RTX);
/* Fill in the remaining fields somehow. */
goto zero_iter_simplify;
}
@@ -2188,7 +2188,7 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
if (rtx_equal_p (tmp, mode_mmax))
{
desc->infinite =
- alloc_EXPR_LIST (0, const_true_rtx, NULL_RTX);
+ alloc_EXPR_LIST (REG_DEP_TRUE, const_true_rtx, NULL_RTX);
/* Fill in the remaining fields somehow. */
goto zero_iter_simplify;
}
@@ -2265,10 +2265,10 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
computed overflows, the cycle is infinite. Otherwise it
is nontrivial to compute the number of iterations. */
if (step_is_pow2)
- desc->infinite = alloc_EXPR_LIST (0, may_not_xform,
+ desc->infinite = alloc_EXPR_LIST (REG_DEP_TRUE, may_not_xform,
desc->infinite);
else
- desc->assumptions = alloc_EXPR_LIST (0, may_xform,
+ desc->assumptions = alloc_EXPR_LIST (REG_DEP_TRUE, may_xform,
desc->assumptions);
}
@@ -2304,7 +2304,7 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
goto zero_iter_simplify;
else if (assumption != const0_rtx)
desc->noloop_assumptions =
- alloc_EXPR_LIST (0, assumption, desc->noloop_assumptions);
+ alloc_EXPR_LIST (REG_DEP_TRUE, assumption, desc->noloop_assumptions);
cond = NE;
}
}
@@ -2342,7 +2342,7 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
tmp1 = lowpart_subreg (mode, iv1.base, comp_mode);
tmp = simplify_gen_binary (UMOD, mode, tmp1, GEN_INT (d));
assumption = simplify_gen_relational (NE, SImode, mode, tmp, const0_rtx);
- desc->infinite = alloc_EXPR_LIST (0, assumption, desc->infinite);
+ desc->infinite = alloc_EXPR_LIST (REG_DEP_TRUE, assumption, desc->infinite);
tmp = simplify_gen_binary (UDIV, mode, tmp1, GEN_INT (d));
inv = inverse (s, size);
@@ -2381,14 +2381,14 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
tmp = simplify_gen_relational (cond, SImode, mode, t0, t1);
assumption = simplify_gen_binary (AND, SImode, assumption, tmp);
desc->infinite =
- alloc_EXPR_LIST (0, assumption, desc->infinite);
+ alloc_EXPR_LIST (REG_DEP_TRUE, assumption, desc->infinite);
}
else
{
assumption = simplify_gen_relational (cond, SImode, mode,
tmp1, bound);
desc->assumptions =
- alloc_EXPR_LIST (0, assumption, desc->assumptions);
+ alloc_EXPR_LIST (REG_DEP_TRUE, assumption, desc->assumptions);
}
tmp = simplify_gen_binary (PLUS, comp_mode, iv1.base, iv0.step);
@@ -2425,14 +2425,14 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
tmp = simplify_gen_relational (cond, SImode, mode, t0, t1);
assumption = simplify_gen_binary (AND, SImode, assumption, tmp);
desc->infinite =
- alloc_EXPR_LIST (0, assumption, desc->infinite);
+ alloc_EXPR_LIST (REG_DEP_TRUE, assumption, desc->infinite);
}
else
{
assumption = simplify_gen_relational (cond, SImode, mode,
bound, tmp0);
desc->assumptions =
- alloc_EXPR_LIST (0, assumption, desc->assumptions);
+ alloc_EXPR_LIST (REG_DEP_TRUE, assumption, desc->assumptions);
}
tmp = simplify_gen_binary (PLUS, comp_mode, iv0.base, iv1.step);
@@ -2447,7 +2447,7 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
goto zero_iter_simplify;
else if (assumption != const0_rtx)
desc->noloop_assumptions =
- alloc_EXPR_LIST (0, assumption, desc->noloop_assumptions);
+ alloc_EXPR_LIST (REG_DEP_TRUE, assumption, desc->noloop_assumptions);
delta = simplify_gen_binary (UDIV, mode, delta, step);
desc->niter_expr = delta;
}
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index 711b02161ab..fe068728719 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -1474,8 +1474,8 @@ si_info_hash (const void *ivts)
static int
si_info_eq (const void *ivts1, const void *ivts2)
{
- const struct iv_to_split *i1 = ivts1;
- const struct iv_to_split *i2 = ivts2;
+ const struct iv_to_split *i1 = (const struct iv_to_split *) ivts1;
+ const struct iv_to_split *i2 = (const struct iv_to_split *) ivts2;
return i1->insn == i2->insn;
}
@@ -1494,8 +1494,8 @@ ve_info_hash (const void *ves)
static int
ve_info_eq (const void *ivts1, const void *ivts2)
{
- const struct var_to_expand *i1 = ivts1;
- const struct var_to_expand *i2 = ivts2;
+ const struct var_to_expand *i1 = (const struct var_to_expand *) ivts1;
+ const struct var_to_expand *i2 = (const struct var_to_expand *) ivts2;
return i1->insn == i2->insn;
}
@@ -1830,7 +1830,7 @@ get_ivts_expr (rtx expr, struct iv_to_split *ivts)
static int
allocate_basic_variable (void **slot, void *data ATTRIBUTE_UNUSED)
{
- struct iv_to_split *ivts = *slot;
+ struct iv_to_split *ivts = (struct iv_to_split *) *slot;
rtx expr = *get_ivts_expr (single_set (ivts->insn), ivts);
ivts->base_var = gen_reg_rtx (GET_MODE (expr));
@@ -1980,7 +1980,7 @@ expand_var_during_unrolling (struct var_to_expand *ve, rtx insn)
static int
insert_var_expansion_initialization (void **slot, void *place_p)
{
- struct var_to_expand *ve = *slot;
+ struct var_to_expand *ve = (struct var_to_expand *) *slot;
basic_block place = (basic_block)place_p;
rtx seq, var, zero_init, insn;
unsigned i;
@@ -2022,7 +2022,7 @@ insert_var_expansion_initialization (void **slot, void *place_p)
static int
combine_var_copies_in_loop_exit (void **slot, void *place_p)
{
- struct var_to_expand *ve = *slot;
+ struct var_to_expand *ve = (struct var_to_expand *) *slot;
basic_block place = (basic_block)place_p;
rtx sum = ve->reg;
rtx expr, seq, var, insn;
@@ -2115,7 +2115,7 @@ apply_opt_in_copies (struct opt_info *opt_info,
/* Apply splitting iv optimization. */
if (opt_info->insns_to_split)
{
- ivts = htab_find (opt_info->insns_to_split, &ivts_templ);
+ ivts = (struct iv_to_split *) htab_find (opt_info->insns_to_split, &ivts_templ);
if (ivts)
{
@@ -2130,7 +2130,7 @@ apply_opt_in_copies (struct opt_info *opt_info,
/* Apply variable expansion optimization. */
if (unrolling && opt_info->insns_with_var_to_expand)
{
- ves = htab_find (opt_info->insns_with_var_to_expand, &ve_templ);
+ ves = (struct var_to_expand *) htab_find (opt_info->insns_with_var_to_expand, &ve_templ);
if (ves)
{
gcc_assert (GET_CODE (PATTERN (insn))
@@ -2180,7 +2180,7 @@ apply_opt_in_copies (struct opt_info *opt_info,
ivts_templ.insn = orig_insn;
if (opt_info->insns_to_split)
{
- ivts = htab_find (opt_info->insns_to_split, &ivts_templ);
+ ivts = (struct iv_to_split *) htab_find (opt_info->insns_to_split, &ivts_templ);
if (ivts)
{
if (!delta)
@@ -2200,7 +2200,7 @@ apply_opt_in_copies (struct opt_info *opt_info,
static int
release_var_copies (void **slot, void *data ATTRIBUTE_UNUSED)
{
- struct var_to_expand *ve = *slot;
+ struct var_to_expand *ve = (struct var_to_expand *) *slot;
VEC_free (rtx, heap, ve->var_expansions);
diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c
index c76f481e08e..d6ae8b0cbc2 100644
--- a/gcc/loop-unswitch.c
+++ b/gcc/loop-unswitch.c
@@ -366,9 +366,9 @@ unswitch_single_loop (struct loops *loops, struct loop *loop,
} while (repeat);
/* We found the condition we can unswitch on. */
- conds = alloc_EXPR_LIST (0, cond, cond_checked);
+ conds = alloc_EXPR_LIST (REG_DEP_TRUE, cond, cond_checked);
if (rcond)
- rconds = alloc_EXPR_LIST (0, rcond, cond_checked);
+ rconds = alloc_EXPR_LIST (REG_DEP_TRUE, rcond, cond_checked);
else
rconds = cond_checked;
diff --git a/gcc/machmode.h b/gcc/machmode.h
index 3948fc9388b..41b3071f192 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -41,7 +41,7 @@ enum mode_class { MODE_CLASSES, MAX_MODE_CLASS };
/* Get the general kind of object that mode MODE represents
(integer, floating, complex, etc.) */
-extern const unsigned char mode_class[NUM_MACHINE_MODES];
+extern const enum mode_class mode_class[NUM_MACHINE_MODES];
#define GET_MODE_CLASS(MODE) mode_class[MODE]
/* Nonzero if MODE is an integral mode. */
@@ -108,7 +108,7 @@ extern const unsigned HOST_WIDE_INT mode_mask_array[NUM_MACHINE_MODES];
/* Return the mode of the inner elements in a vector. */
-extern const unsigned char mode_inner[NUM_MACHINE_MODES];
+extern const enum machine_mode mode_inner[NUM_MACHINE_MODES];
#define GET_MODE_INNER(MODE) mode_inner[MODE]
/* Get the size in bytes of the basic parts of an object of mode MODE. */
@@ -125,10 +125,10 @@ extern const unsigned char mode_nunits[NUM_MACHINE_MODES];
/* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI). */
-extern const unsigned char mode_wider[NUM_MACHINE_MODES];
+extern const enum machine_mode mode_wider[NUM_MACHINE_MODES];
#define GET_MODE_WIDER_MODE(MODE) mode_wider[MODE]
-extern const unsigned char mode_2xwider[NUM_MACHINE_MODES];
+extern const enum machine_mode mode_2xwider[NUM_MACHINE_MODES];
#define GET_MODE_2XWIDER_MODE(MODE) mode_2xwider[MODE]
/* Return the mode for data of a given size SIZE and mode class CLASS.
@@ -163,7 +163,7 @@ extern unsigned get_mode_alignment (enum machine_mode);
/* For each class, get the narrowest mode in that class. */
-extern const unsigned char class_narrowest_mode[MAX_MODE_CLASS];
+extern const enum machine_mode class_narrowest_mode[MAX_MODE_CLASS];
#define GET_CLASS_NARROWEST_MODE(CLASS) class_narrowest_mode[CLASS]
/* Define the integer modes whose sizes are BITS_PER_UNIT and BITS_PER_WORD
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index 407ae76a8c6..7236092a62d 100644
--- a/gcc/mode-switching.c
+++ b/gcc/mode-switching.c
@@ -541,8 +541,8 @@ optimize_mode_switching (void)
for (i = 0; i < max_num_modes; i++)
{
int current_mode[N_ENTITIES];
- sbitmap *delete;
- sbitmap *insert;
+ sbitmap *del;
+ sbitmap *ins;
/* Set the anticipatable and computing arrays. */
sbitmap_vector_zero (antic, last_basic_block);
@@ -568,7 +568,7 @@ optimize_mode_switching (void)
FOR_EACH_BB (bb)
sbitmap_not (kill[bb->index], transp[bb->index]);
edge_list = pre_edge_lcm (n_entities, transp, comp, antic,
- kill, &insert, &delete);
+ kill, &ins, &del);
for (j = n_entities - 1; j >= 0; j--)
{
@@ -592,7 +592,7 @@ optimize_mode_switching (void)
eg->aux = 0;
- if (! TEST_BIT (insert[e], j))
+ if (! TEST_BIT (ins[e], j))
continue;
eg->aux = (void *)1;
@@ -620,7 +620,7 @@ optimize_mode_switching (void)
}
FOR_EACH_BB_REVERSE (bb)
- if (TEST_BIT (delete[bb->index], j))
+ if (TEST_BIT (del[bb->index], j))
{
make_preds_opaque (bb, j);
/* Cancel the 'deleted' mode set. */
@@ -628,8 +628,8 @@ optimize_mode_switching (void)
}
}
- sbitmap_vector_free (delete);
- sbitmap_vector_free (insert);
+ sbitmap_vector_free (del);
+ sbitmap_vector_free (ins);
clear_aux_for_edges ();
free_edge_list (edge_list);
}
@@ -716,9 +716,9 @@ static unsigned int
rest_of_handle_mode_switching (void)
{
#ifdef OPTIMIZE_MODE_SWITCHING
- no_new_pseudos = 0;
+ no_new_pseudos = false;
optimize_mode_switching ();
- no_new_pseudos = 1;
+ no_new_pseudos = true;
#endif /* OPTIMIZE_MODE_SWITCHING */
return 0;
}
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index 56df63c894c..c3eb56ced88 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -920,11 +920,11 @@ sms_schedule (void)
/* Initialize issue_rate. */
if (targetm.sched.issue_rate)
{
- int temp = reload_completed;
+ bool tmp = reload_completed;
- reload_completed = 1;
+ reload_completed = true;
issue_rate = targetm.sched.issue_rate ();
- reload_completed = temp;
+ reload_completed = tmp;
}
else
issue_rate = 1;
@@ -2510,7 +2510,7 @@ rest_of_handle_sms (void)
basic_block bb;
/* We want to be able to create new pseudos. */
- no_new_pseudos = 0;
+ no_new_pseudos = false;
/* Collect loop information to be used in SMS. */
cfg_layout_initialize (CLEANUP_UPDATE_LIFE);
sms_schedule ();
@@ -2524,7 +2524,7 @@ rest_of_handle_sms (void)
| PROP_KILL_DEAD_CODE
| PROP_SCAN_DEAD_CODE));
- no_new_pseudos = 1;
+ no_new_pseudos = true;
/* Finalize layout changes. */
FOR_EACH_BB (bb)
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 1d3513b6a58..d7d3016fcf6 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -43,6 +43,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "objc-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "tm_p.h"
@@ -59,6 +60,7 @@ Boston, MA 02110-1301, USA. */
#include "flags.h"
#include "langhooks.h"
#include "objc-act.h"
+#include "tree-gimple.h"
#include "input.h"
#include "except.h"
#include "function.h"
@@ -628,19 +630,19 @@ lookup_protocol_in_reflist (tree rproto_list, tree lproto)
}
void
-objc_start_class_interface (tree class, tree super_class, tree protos)
+objc_start_class_interface (tree cls, tree super_class, tree protos)
{
objc_interface_context
= objc_ivar_context
- = start_class (CLASS_INTERFACE_TYPE, class, super_class, protos);
+ = start_class (CLASS_INTERFACE_TYPE, cls, super_class, protos);
objc_public_flag = 0;
}
void
-objc_start_category_interface (tree class, tree categ, tree protos)
+objc_start_category_interface (tree cls, tree categ, tree protos)
{
objc_interface_context
- = start_class (CATEGORY_INTERFACE_TYPE, class, categ, protos);
+ = start_class (CATEGORY_INTERFACE_TYPE, cls, categ, protos);
objc_ivar_chain
= continue_class (objc_interface_context);
}
@@ -667,19 +669,19 @@ objc_finish_interface (void)
}
void
-objc_start_class_implementation (tree class, tree super_class)
+objc_start_class_implementation (tree cls, tree super_class)
{
objc_implementation_context
= objc_ivar_context
- = start_class (CLASS_IMPLEMENTATION_TYPE, class, super_class, NULL_TREE);
+ = start_class (CLASS_IMPLEMENTATION_TYPE, cls, super_class, NULL_TREE);
objc_public_flag = 0;
}
void
-objc_start_category_implementation (tree class, tree categ)
+objc_start_category_implementation (tree cls, tree categ)
{
objc_implementation_context
- = start_class (CATEGORY_IMPLEMENTATION_TYPE, class, categ, NULL_TREE);
+ = start_class (CATEGORY_IMPLEMENTATION_TYPE, cls, categ, NULL_TREE);
objc_ivar_chain
= continue_class (objc_implementation_context);
}
@@ -797,9 +799,9 @@ objc_is_class_id (tree type)
SUPER_NAME (if any), and FIELDS indicated. */
static tree
-objc_build_struct (tree class, tree fields, tree super_name)
+objc_build_struct (tree cls, tree fields, tree super_name)
{
- tree name = CLASS_NAME (class);
+ tree name = CLASS_NAME (cls);
tree s = start_struct (RECORD_TYPE, name);
tree super = (super_name ? xref_tag (RECORD_TYPE, super_name) : NULL_TREE);
tree t, objc_info = NULL_TREE;
@@ -859,7 +861,7 @@ objc_build_struct (tree class, tree fields, tree super_name)
/* Point the struct at its related Objective-C class. */
INIT_TYPE_OBJC_INFO (s);
- TYPE_OBJC_INTERFACE (s) = class;
+ TYPE_OBJC_INTERFACE (s) = cls;
s = finish_struct (s, fields, NULL_TREE);
@@ -868,14 +870,14 @@ objc_build_struct (tree class, tree fields, tree super_name)
{
TYPE_OBJC_INFO (t) = TREE_VALUE (objc_info);
/* Replace the IDENTIFIER_NODE with an actual @interface. */
- TYPE_OBJC_INTERFACE (t) = class;
+ TYPE_OBJC_INTERFACE (t) = cls;
}
/* Use TYPE_BINFO structures to point at the super class, if any. */
objc_xref_basetypes (s, super);
/* Mark this struct as a class template. */
- CLASS_STATIC_TEMPLATE (class) = s;
+ CLASS_STATIC_TEMPLATE (cls) = s;
return s;
}
@@ -1496,7 +1498,7 @@ setup_string_decl (void)
/* %s in format will provide room for terminating null */
length = strlen (STRING_OBJECT_GLOBAL_FORMAT)
+ strlen (constant_string_class_name);
- name = xmalloc (length);
+ name = XNEWVEC (char, length);
sprintf (name, STRING_OBJECT_GLOBAL_FORMAT,
constant_string_class_name);
constant_string_global_id = get_identifier (name);
@@ -1617,16 +1619,16 @@ synth_module_prologue (void)
tree_cons (NULL_TREE, objc_selector_type,
NULL_TREE)));
umsg_decl = builtin_function (TAG_MSGSEND,
- type, 0, NOT_BUILT_IN,
+ type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
umsg_nonnil_decl = builtin_function (TAG_MSGSEND_NONNIL,
- type, 0, NOT_BUILT_IN,
+ type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
umsg_stret_decl = builtin_function (TAG_MSGSEND_STRET,
- type, 0, NOT_BUILT_IN,
+ type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
umsg_nonnil_stret_decl = builtin_function (TAG_MSGSEND_NONNIL_STRET,
- type, 0, NOT_BUILT_IN,
+ type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
/* These can throw, because the function that gets called can throw
@@ -1641,7 +1643,7 @@ synth_module_prologue (void)
__attribute__ ((hard_coded_address (OFFS_MSGSEND_FAST))); */
#ifdef OFFS_MSGSEND_FAST
umsg_fast_decl = builtin_function (TAG_MSGSEND_FAST,
- type, 0, NOT_BUILT_IN,
+ type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
TREE_NOTHROW (umsg_fast_decl) = 0;
DECL_ATTRIBUTES (umsg_fast_decl)
@@ -1661,10 +1663,10 @@ synth_module_prologue (void)
tree_cons (NULL_TREE, objc_selector_type,
NULL_TREE)));
umsg_super_decl = builtin_function (TAG_MSGSENDSUPER,
- type, 0, NOT_BUILT_IN,
+ type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
umsg_super_stret_decl = builtin_function (TAG_MSGSENDSUPER_STRET,
- type, 0, NOT_BUILT_IN, 0,
+ type, BUILT_IN_NONE, NOT_BUILT_IN, 0,
NULL_TREE);
TREE_NOTHROW (umsg_super_decl) = 0;
TREE_NOTHROW (umsg_super_stret_decl) = 0;
@@ -1688,7 +1690,7 @@ synth_module_prologue (void)
tree_cons (NULL_TREE, objc_selector_type,
OBJC_VOID_AT_END)));
umsg_decl = builtin_function (TAG_MSGSEND,
- type, 0, NOT_BUILT_IN,
+ type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
TREE_NOTHROW (umsg_decl) = 0;
@@ -1699,7 +1701,7 @@ synth_module_prologue (void)
tree_cons (NULL_TREE, objc_selector_type,
OBJC_VOID_AT_END)));
umsg_super_decl = builtin_function (TAG_MSGSENDSUPER,
- type, 0, NOT_BUILT_IN,
+ type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
TREE_NOTHROW (umsg_super_decl) = 0;
@@ -1712,7 +1714,7 @@ synth_module_prologue (void)
tree_cons (NULL_TREE, ptr_type_node,
OBJC_VOID_AT_END));
execclass_decl = builtin_function (TAG_EXECCLASS,
- type, 0, NOT_BUILT_IN,
+ type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
}
@@ -1724,13 +1726,13 @@ synth_module_prologue (void)
OBJC_VOID_AT_END));
objc_get_class_decl
- = builtin_function (TAG_GETCLASS, type, 0, NOT_BUILT_IN,
+ = builtin_function (TAG_GETCLASS, type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
/* id objc_getMetaClass (const char *); */
objc_get_meta_class_decl
- = builtin_function (TAG_GETMETACLASS, type, 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ = builtin_function (TAG_GETMETACLASS, type, BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
build_class_template ();
build_super_template ();
@@ -1925,12 +1927,12 @@ objc_build_string_object (tree string)
/* Perhaps we already constructed a constant string just like this one? */
key.literal = string;
loc = htab_find_slot (string_htab, &key, INSERT);
- desc = *loc;
+ desc = (struct string_descriptor *) *loc;
if (!desc)
{
tree var;
- *loc = desc = ggc_alloc (sizeof (*desc));
+ *loc = desc = (struct string_descriptor *) ggc_alloc (sizeof (*desc));
desc->literal = string;
/* GNU: (NXConstantString *) & ((__builtin_ObjCString) { NULL, string, length }) */
@@ -2418,7 +2420,7 @@ static void
generate_static_references (void)
{
tree decls = NULL_TREE, expr = NULL_TREE;
- tree class_name, class, decl, initlist;
+ tree class_name, cls, decl, initlist;
tree cl_chain, in_chain, type
= build_array_type (build_pointer_type (void_type_node), NULL_TREE);
int num_inst, num_class;
@@ -2437,8 +2439,8 @@ generate_static_references (void)
decl = start_var_decl (type, buf);
/* Output {class_name, ...}. */
- class = TREE_VALUE (cl_chain);
- class_name = get_objc_string_decl (OBJC_TYPE_NAME (class), class_names);
+ cls = TREE_VALUE (cl_chain);
+ class_name = get_objc_string_decl (OBJC_TYPE_NAME (cls), class_names);
initlist = build_tree_list (NULL_TREE,
build_unary_op (ADDR_EXPR, class_name, 1));
@@ -3287,14 +3289,14 @@ static GTY ((param_is (struct interface_tuple))) htab_t interface_htab;
static hashval_t
hash_interface (const void *p)
{
- const struct interface_tuple *d = p;
+ const struct interface_tuple *d = (const struct interface_tuple *) p;
return htab_hash_pointer (d->id);
}
static int
eq_interface (const void *p1, const void *p2)
{
- const struct interface_tuple *d = p1;
+ const struct interface_tuple *d = (const struct interface_tuple *) p1;
return d->id == p2;
}
@@ -3749,7 +3751,7 @@ next_sjlj_build_try_catch_finally (void)
void
objc_begin_try_stmt (location_t try_locus, tree body)
{
- struct objc_try_context *c = xcalloc (1, sizeof (*c));
+ struct objc_try_context *c = XCNEW (struct objc_try_context);
c->outer = cur_try_context;
c->try_body = body;
c->try_locus = try_locus;
@@ -3994,7 +3996,7 @@ build_next_objc_exception_stuff (void)
'int _setjmp(jmp_buf);' */
temp_type = build_function_type (integer_type_node, NULL_TREE);
objc_setjmp_decl
- = builtin_function (TAG_SETJMP, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ = builtin_function (TAG_SETJMP, temp_type, BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
/* id objc_exception_extract(struct _objc_exception_data *); */
temp_type
@@ -4003,7 +4005,7 @@ build_next_objc_exception_stuff (void)
build_pointer_type (objc_exception_data_template),
OBJC_VOID_AT_END));
objc_exception_extract_decl
- = builtin_function (TAG_EXCEPTIONEXTRACT, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ = builtin_function (TAG_EXCEPTIONEXTRACT, temp_type, BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
/* void objc_exception_try_enter(struct _objc_exception_data *); */
/* void objc_exception_try_exit(struct _objc_exception_data *); */
temp_type
@@ -4012,9 +4014,9 @@ build_next_objc_exception_stuff (void)
build_pointer_type (objc_exception_data_template),
OBJC_VOID_AT_END));
objc_exception_try_enter_decl
- = builtin_function (TAG_EXCEPTIONTRYENTER, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ = builtin_function (TAG_EXCEPTIONTRYENTER, temp_type, BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
objc_exception_try_exit_decl
- = builtin_function (TAG_EXCEPTIONTRYEXIT, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ = builtin_function (TAG_EXCEPTIONTRYEXIT, temp_type, BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
/* int objc_exception_match(id, id); */
temp_type
@@ -4023,7 +4025,7 @@ build_next_objc_exception_stuff (void)
tree_cons (NULL_TREE, objc_object_type,
OBJC_VOID_AT_END)));
objc_exception_match_decl
- = builtin_function (TAG_EXCEPTIONMATCH, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ = builtin_function (TAG_EXCEPTIONMATCH, temp_type, BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
/* id objc_assign_ivar (id, id, unsigned int); */
/* id objc_assign_ivar_Fast (id, id, unsigned int)
@@ -4037,11 +4039,11 @@ build_next_objc_exception_stuff (void)
unsigned_type_node,
OBJC_VOID_AT_END))));
objc_assign_ivar_decl
- = builtin_function (TAG_ASSIGNIVAR, temp_type, 0, NOT_BUILT_IN,
+ = builtin_function (TAG_ASSIGNIVAR, temp_type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, NULL_TREE);
#ifdef OFFS_ASSIGNIVAR_FAST
objc_assign_ivar_fast_decl
- = builtin_function (TAG_ASSIGNIVAR_FAST, temp_type, 0,
+ = builtin_function (TAG_ASSIGNIVAR_FAST, temp_type, BUILT_IN_NONE,
NOT_BUILT_IN, NULL, NULL_TREE);
DECL_ATTRIBUTES (objc_assign_ivar_fast_decl)
= tree_cons (get_identifier ("hard_coded_address"),
@@ -4059,9 +4061,9 @@ build_next_objc_exception_stuff (void)
tree_cons (NULL_TREE, build_pointer_type (objc_object_type),
OBJC_VOID_AT_END)));
objc_assign_global_decl
- = builtin_function (TAG_ASSIGNGLOBAL, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ = builtin_function (TAG_ASSIGNGLOBAL, temp_type, BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
objc_assign_strong_cast_decl
- = builtin_function (TAG_ASSIGNSTRONGCAST, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE);
+ = builtin_function (TAG_ASSIGNSTRONGCAST, temp_type, BUILT_IN_NONE, NOT_BUILT_IN, NULL, NULL_TREE);
}
static void
@@ -4079,13 +4081,13 @@ build_objc_exception_stuff (void)
tree_cons (NULL_TREE, objc_object_type,
OBJC_VOID_AT_END));
objc_exception_throw_decl
- = builtin_function (TAG_EXCEPTIONTHROW, temp_type, 0, NOT_BUILT_IN, NULL,
+ = builtin_function (TAG_EXCEPTIONTHROW, temp_type, BUILT_IN_NONE, NOT_BUILT_IN, NULL,
noreturn_list);
objc_sync_enter_decl
- = builtin_function (TAG_SYNCENTER, temp_type, 0, NOT_BUILT_IN,
+ = builtin_function (TAG_SYNCENTER, temp_type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, nothrow_list);
objc_sync_exit_decl
- = builtin_function (TAG_SYNCEXIT, temp_type, 0, NOT_BUILT_IN,
+ = builtin_function (TAG_SYNCEXIT, temp_type, BUILT_IN_NONE, NOT_BUILT_IN,
NULL, nothrow_list);
}
@@ -4098,13 +4100,13 @@ build_objc_exception_stuff (void)
}; */
static void
-build_private_template (tree class)
+build_private_template (tree cls)
{
- if (!CLASS_STATIC_TEMPLATE (class))
+ if (!CLASS_STATIC_TEMPLATE (cls))
{
- tree record = objc_build_struct (class,
- get_class_ivars (class, false),
- CLASS_SUPER_NAME (class));
+ tree record = objc_build_struct (cls,
+ get_class_ivars (cls, false),
+ CLASS_SUPER_NAME (cls));
/* Set the TREE_USED bit for this struct, so that stab generator
can emit stabs for this struct type. */
@@ -4340,7 +4342,7 @@ encode_method_prototype (tree method_decl)
finish_encoding:
obstack_1grow (&util_obstack, '\0');
- result = get_identifier (obstack_finish (&util_obstack));
+ result = get_identifier ((const char *) obstack_finish (&util_obstack));
obstack_free (&util_obstack, util_firstobj);
return result;
}
@@ -5152,7 +5154,7 @@ build_ivar_list_initializer (tree type, tree field_decl)
ivar
= tree_cons
(NULL_TREE,
- add_objc_string (get_identifier (obstack_finish (&util_obstack)),
+ add_objc_string (get_identifier ((const char *) obstack_finish (&util_obstack)),
meth_var_types),
ivar);
obstack_free (&util_obstack, util_firstobj);
@@ -5642,9 +5644,9 @@ build_shared_structure_initializer (tree type, tree isa, tree super,
/* Retrieve category interface CAT_NAME (if any) associated with CLASS. */
static inline tree
-lookup_category (tree class, tree cat_name)
+lookup_category (tree cls, tree cat_name)
{
- tree category = CLASS_CATEGORY_LIST (class);
+ tree category = CLASS_CATEGORY_LIST (cls);
while (category && CLASS_SUPER_NAME (category) != cat_name)
category = CLASS_CATEGORY_LIST (category);
@@ -6685,7 +6687,7 @@ objc_build_encode_expr (tree type)
encode_type (type, obstack_object_size (&util_obstack),
OBJC_ENCODE_INLINE_DEFS);
obstack_1grow (&util_obstack, 0); /* null terminate string */
- string = obstack_finish (&util_obstack);
+ string = (const char *) obstack_finish (&util_obstack);
/* Synthesize a string that represents the encoded struct/union. */
result = my_build_string (strlen (string) + 1, string);
@@ -6910,24 +6912,24 @@ add_method_to_hash_list (hash *hash_list, tree method)
}
static tree
-objc_add_method (tree class, tree method, int is_class)
+objc_add_method (tree cls, tree method, int is_class)
{
tree mth;
if (!(mth = lookup_method (is_class
- ? CLASS_CLS_METHODS (class)
- : CLASS_NST_METHODS (class), method)))
+ ? CLASS_CLS_METHODS (cls)
+ : CLASS_NST_METHODS (cls), method)))
{
/* put method on list in reverse order */
if (is_class)
{
- TREE_CHAIN (method) = CLASS_CLS_METHODS (class);
- CLASS_CLS_METHODS (class) = method;
+ TREE_CHAIN (method) = CLASS_CLS_METHODS (cls);
+ CLASS_CLS_METHODS (cls) = method;
}
else
{
- TREE_CHAIN (method) = CLASS_NST_METHODS (class);
- CLASS_NST_METHODS (class) = method;
+ TREE_CHAIN (method) = CLASS_NST_METHODS (cls);
+ CLASS_NST_METHODS (cls) = method;
}
}
else
@@ -6937,8 +6939,8 @@ objc_add_method (tree class, tree method, int is_class)
and/or return types. We do not do this for @implementations, because
C/C++ will do it for us (i.e., there will be duplicate function
definition errors). */
- if ((TREE_CODE (class) == CLASS_INTERFACE_TYPE
- || TREE_CODE (class) == CATEGORY_INTERFACE_TYPE)
+ if ((TREE_CODE (cls) == CLASS_INTERFACE_TYPE
+ || TREE_CODE (cls) == CATEGORY_INTERFACE_TYPE)
&& !comp_proto_with_proto (method, mth, 1))
error ("duplicate declaration of method %<%c%s%>",
is_class ? '+' : '-',
@@ -6956,12 +6958,12 @@ objc_add_method (tree class, tree method, int is_class)
instance methods listed in @protocol declarations to
the class hash table, on the assumption that @protocols
may be adopted by root classes or categories. */
- if (TREE_CODE (class) == CATEGORY_INTERFACE_TYPE
- || TREE_CODE (class) == CATEGORY_IMPLEMENTATION_TYPE)
- class = lookup_interface (CLASS_NAME (class));
+ if (TREE_CODE (cls) == CATEGORY_INTERFACE_TYPE
+ || TREE_CODE (cls) == CATEGORY_IMPLEMENTATION_TYPE)
+ cls = lookup_interface (CLASS_NAME (cls));
- if (TREE_CODE (class) == PROTOCOL_INTERFACE_TYPE
- || !CLASS_SUPER_NAME (class))
+ if (TREE_CODE (cls) == PROTOCOL_INTERFACE_TYPE
+ || !CLASS_SUPER_NAME (cls))
add_method_to_hash_list (cls_method_hash_list, method);
}
@@ -6994,21 +6996,21 @@ add_class (tree class_name, tree name)
}
static void
-add_category (tree class, tree category)
+add_category (tree cls, tree category)
{
/* Put categories on list in reverse order. */
- tree cat = lookup_category (class, CLASS_SUPER_NAME (category));
+ tree cat = lookup_category (cls, CLASS_SUPER_NAME (category));
if (cat)
{
warning (0, "duplicate interface declaration for category %<%s(%s)%>",
- IDENTIFIER_POINTER (CLASS_NAME (class)),
+ IDENTIFIER_POINTER (CLASS_NAME (cls)),
IDENTIFIER_POINTER (CLASS_SUPER_NAME (category)));
}
else
{
- CLASS_CATEGORY_LIST (category) = CLASS_CATEGORY_LIST (class);
- CLASS_CATEGORY_LIST (class) = category;
+ CLASS_CATEGORY_LIST (category) = CLASS_CATEGORY_LIST (cls);
+ CLASS_CATEGORY_LIST (cls) = category;
}
}
@@ -7018,7 +7020,7 @@ add_category (tree class, tree category)
PUBLIC is 1 for public, 0 for protected, and 2 for private. */
static tree
-add_instance_variable (tree class, int public, tree field_decl)
+add_instance_variable (tree cls, int pub, tree field_decl)
{
tree field_type = TREE_TYPE (field_decl);
const char *ivar_name = DECL_NAME (field_decl)
@@ -7031,7 +7033,7 @@ add_instance_variable (tree class, int public, tree field_decl)
error ("illegal reference type specified for instance variable %qs",
ivar_name);
/* Return class as is without adding this ivar. */
- return class;
+ return cls;
}
#endif
@@ -7041,7 +7043,7 @@ add_instance_variable (tree class, int public, tree field_decl)
{
error ("instance variable %qs has unknown size", ivar_name);
/* Return class as is without adding this ivar. */
- return class;
+ return cls;
}
#ifdef OBJCPLUS
@@ -7087,7 +7089,7 @@ add_instance_variable (tree class, int public, tree field_decl)
"for instance variable %qs",
type_name, ivar_name);
/* Return class as is without adding this ivar. */
- return class;
+ return cls;
}
/* User-defined constructors and destructors are not known to Obj-C
@@ -7108,7 +7110,7 @@ add_instance_variable (tree class, int public, tree field_decl)
#endif
/* Overload the public attribute, it is not used for FIELD_DECLs. */
- switch (public)
+ switch (pub)
{
case 0:
TREE_PUBLIC (field_decl) = 0;
@@ -7130,9 +7132,9 @@ add_instance_variable (tree class, int public, tree field_decl)
}
- CLASS_RAW_IVARS (class) = chainon (CLASS_RAW_IVARS (class), field_decl);
+ CLASS_RAW_IVARS (cls) = chainon (CLASS_RAW_IVARS (cls), field_decl);
- return class;
+ return cls;
}
static tree
@@ -7175,16 +7177,16 @@ objc_is_public (tree expr, tree identifier)
{
if (TYPE_HAS_OBJC_INFO (basetype) && TYPE_OBJC_INTERFACE (basetype))
{
- tree class = lookup_interface (OBJC_TYPE_NAME (basetype));
+ tree cls = lookup_interface (OBJC_TYPE_NAME (basetype));
- if (!class)
+ if (!cls)
{
error ("cannot find interface declaration for %qs",
IDENTIFIER_POINTER (OBJC_TYPE_NAME (basetype)));
return 0;
}
- if ((decl = is_ivar (get_class_ivars (class, true), identifier)))
+ if ((decl = is_ivar (get_class_ivars (cls, true), identifier)))
{
if (TREE_PUBLIC (decl))
return 1;
@@ -7205,13 +7207,13 @@ objc_is_public (tree expr, tree identifier)
if (basetype == curtype
|| DERIVED_FROM_P (basetype, curtype))
{
- int private = is_private (decl);
+ bool priv = is_private (decl);
- if (private)
+ if (priv)
error ("instance variable %qs is declared private",
IDENTIFIER_POINTER (DECL_NAME (decl)));
- return !private;
+ return !priv;
}
}
@@ -7274,18 +7276,18 @@ check_methods (tree chain, tree list, int mtype)
/* Check if CLASS, or its superclasses, explicitly conforms to PROTOCOL. */
static int
-conforms_to_protocol (tree class, tree protocol)
+conforms_to_protocol (tree cls, tree protocol)
{
if (TREE_CODE (protocol) == PROTOCOL_INTERFACE_TYPE)
{
- tree p = CLASS_PROTOCOL_LIST (class);
+ tree p = CLASS_PROTOCOL_LIST (cls);
while (p && TREE_VALUE (p) != protocol)
p = TREE_CHAIN (p);
if (!p)
{
- tree super = (CLASS_SUPER_NAME (class)
- ? lookup_interface (CLASS_SUPER_NAME (class))
+ tree super = (CLASS_SUPER_NAME (cls)
+ ? lookup_interface (CLASS_SUPER_NAME (cls))
: NULL_TREE);
int tmp = super ? conforms_to_protocol (super, protocol) : 0;
if (!tmp)
@@ -7439,7 +7441,7 @@ static tree
start_class (enum tree_code code, tree class_name, tree super_name,
tree protocol_list)
{
- tree class, decl;
+ tree cls, decl;
#ifdef OBJCPLUS
if (current_namespace != global_namespace) {
@@ -7455,8 +7457,8 @@ start_class (enum tree_code code, tree class_name, tree super_name,
objc_implementation_context = NULL_TREE;
}
- class = make_node (code);
- TYPE_LANG_SLOT_1 (class) = make_tree_vec (CLASS_LANG_SLOT_ELTS);
+ cls = make_node (code);
+ TYPE_LANG_SLOT_1 (cls) = make_tree_vec (CLASS_LANG_SLOT_ELTS);
/* Check for existence of the super class, if one was specified. Note
that we must have seen an @interface, not just a @class. If we
@@ -7477,9 +7479,9 @@ start_class (enum tree_code code, tree class_name, tree super_name,
super_name = super;
}
- CLASS_NAME (class) = class_name;
- CLASS_SUPER_NAME (class) = super_name;
- CLASS_CLS_METHODS (class) = NULL_TREE;
+ CLASS_NAME (cls) = class_name;
+ CLASS_SUPER_NAME (cls) = super_name;
+ CLASS_CLS_METHODS (cls) = NULL_TREE;
if (! objc_is_class_name (class_name)
&& (decl = lookup_name (class_name)))
@@ -7509,7 +7511,7 @@ start_class (enum tree_code code, tree class_name, tree super_name,
/* Reset for multiple classes per file. */
method_slot = 0;
- objc_implementation_context = class;
+ objc_implementation_context = cls;
/* Lookup the interface for this implementation. */
@@ -7552,10 +7554,10 @@ start_class (enum tree_code code, tree class_name, tree super_name,
#endif
IDENTIFIER_POINTER (class_name));
else
- add_class (class, class_name);
+ add_class (cls, class_name);
if (protocol_list)
- CLASS_PROTOCOL_LIST (class)
+ CLASS_PROTOCOL_LIST (cls)
= lookup_and_install_protocols (protocol_list);
}
@@ -7574,10 +7576,10 @@ start_class (enum tree_code code, tree class_name, tree super_name,
exit (FATAL_EXIT_CODE);
}
else
- add_category (class_category_is_assoc_with, class);
+ add_category (class_category_is_assoc_with, cls);
if (protocol_list)
- CLASS_PROTOCOL_LIST (class)
+ CLASS_PROTOCOL_LIST (cls)
= lookup_and_install_protocols (protocol_list);
}
@@ -7586,7 +7588,7 @@ start_class (enum tree_code code, tree class_name, tree super_name,
/* Reset for multiple classes per file. */
method_slot = 0;
- objc_implementation_context = class;
+ objc_implementation_context = cls;
/* For a category, class_name is really the name of the class that
the following set of methods will be associated with. We must
@@ -7599,21 +7601,21 @@ start_class (enum tree_code code, tree class_name, tree super_name,
exit (FATAL_EXIT_CODE);
}
}
- return class;
+ return cls;
}
static tree
-continue_class (tree class)
+continue_class (tree cls)
{
- if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE
- || TREE_CODE (class) == CATEGORY_IMPLEMENTATION_TYPE)
+ if (TREE_CODE (cls) == CLASS_IMPLEMENTATION_TYPE
+ || TREE_CODE (cls) == CATEGORY_IMPLEMENTATION_TYPE)
{
struct imp_entry *imp_entry;
/* Check consistency of the instance variables. */
- if (CLASS_RAW_IVARS (class))
- check_ivars (implementation_template, class);
+ if (CLASS_RAW_IVARS (cls))
+ check_ivars (implementation_template, cls);
/* code generation */
@@ -7628,7 +7630,7 @@ continue_class (tree class)
imp_entry = (struct imp_entry *) ggc_alloc (sizeof (struct imp_entry));
imp_entry->next = imp_list;
- imp_entry->imp_context = class;
+ imp_entry->imp_context = cls;
imp_entry->imp_template = implementation_template;
synth_forward_declarations ();
@@ -7638,7 +7640,7 @@ continue_class (tree class)
/* Append to front and increment count. */
imp_list = imp_entry;
- if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE)
+ if (TREE_CODE (cls) == CLASS_IMPLEMENTATION_TYPE)
imp_count++;
else
cat_count++;
@@ -7650,13 +7652,13 @@ continue_class (tree class)
return get_class_ivars (implementation_template, true);
}
- else if (TREE_CODE (class) == CLASS_INTERFACE_TYPE)
+ else if (TREE_CODE (cls) == CLASS_INTERFACE_TYPE)
{
#ifdef OBJCPLUS
push_lang_context (lang_name_c);
#endif /* OBJCPLUS */
- build_private_template (class);
+ build_private_template (cls);
#ifdef OBJCPLUS
pop_lang_context ();
@@ -7672,9 +7674,9 @@ continue_class (tree class)
/* This is called once we see the "@end" in an interface/implementation. */
static void
-finish_class (tree class)
+finish_class (tree cls)
{
- if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE)
+ if (TREE_CODE (cls) == CLASS_IMPLEMENTATION_TYPE)
{
/* All code generation is done in finish_objc. */
@@ -7693,9 +7695,9 @@ finish_class (tree class)
}
}
- else if (TREE_CODE (class) == CATEGORY_IMPLEMENTATION_TYPE)
+ else if (TREE_CODE (cls) == CATEGORY_IMPLEMENTATION_TYPE)
{
- tree category = lookup_category (implementation_template, CLASS_SUPER_NAME (class));
+ tree category = lookup_category (implementation_template, CLASS_SUPER_NAME (cls));
if (category)
{
@@ -8515,19 +8517,23 @@ objc_start_function (tree name, tree type, tree attrs,
#else
struct c_label_context_se *nstack_se;
struct c_label_context_vm *nstack_vm;
+
+ current_function_returns_value = false; /* Assume, until we see it does. */
+ current_function_returns_null = false;
+ current_function_returns_abnormally = false;
+
nstack_se = XOBNEW (&parser_obstack, struct c_label_context_se);
nstack_se->labels_def = NULL;
nstack_se->labels_used = NULL;
nstack_se->next = label_context_stack_se;
label_context_stack_se = nstack_se;
+
nstack_vm = XOBNEW (&parser_obstack, struct c_label_context_vm);
nstack_vm->labels_def = NULL;
nstack_vm->labels_used = NULL;
nstack_vm->scope = 0;
nstack_vm->next = label_context_stack_vm;
label_context_stack_vm = nstack_vm;
- current_function_returns_value = 0; /* Assume, until we see it does. */
- current_function_returns_null = 0;
decl_attributes (&fndecl, attrs, 0);
announce_function (fndecl);
@@ -9464,7 +9470,7 @@ objc_rewrite_function_call (tree function, tree params)
a function in OBJ_TYPE_REF_EXPR (presumably objc_msgSend or one
of its cousins). */
-enum gimplify_status
+int
objc_gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p)
{
enum gimplify_status r0, r1;
diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h
index d801865688b..3d6bc3f3762 100644
--- a/gcc/objc/objc-act.h
+++ b/gcc/objc/objc-act.h
@@ -22,9 +22,6 @@ Boston, MA 02110-1301, USA. */
#ifndef GCC_OBJC_ACT_H
#define GCC_OBJC_ACT_H
-/* For enum gimplify_status */
-#include "tree-gimple.h"
-
/*** Language hooks ***/
bool objc_init (void);
@@ -32,7 +29,7 @@ const char *objc_printable_name (tree, int);
tree objc_get_callee_fndecl (tree);
void objc_finish_file (void);
tree objc_fold_obj_type_ref (tree, tree);
-enum gimplify_status objc_gimplify_expr (tree *, tree *, tree *);
+int objc_gimplify_expr (tree *, tree *, tree *);
/* NB: The remaining public functions are prototyped in c-common.h, for the
benefit of stub-objc.c and objc-act.c. */
@@ -122,24 +119,6 @@ enum gimplify_status objc_gimplify_expr (tree *, tree *, tree *);
#define OBJC_TYPE_NAME(TYPE) TYPE_NAME(TYPE)
#define OBJC_SET_TYPE_NAME(TYPE, NAME) (TYPE_NAME (TYPE) = NAME)
-/* Define the Objective-C or Objective-C++ language-specific tree codes. */
-
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
-enum objc_tree_code {
-#if defined (GCC_CP_TREE_H)
- LAST_BASE_TREE_CODE = LAST_CPLUS_TREE_CODE,
-#else
-#if defined (GCC_C_TREE_H)
- LAST_BASE_TREE_CODE = LAST_C_TREE_CODE,
-#else
- #error You must include <c-tree.h> or <cp/cp-tree.h> before <objc/objc-act.h>
-#endif
-#endif
-#include "objc-tree.def"
- LAST_OBJC_TREE_CODE
-};
-#undef DEFTREECODE
-
/* Hash tables to manage the global pool of method prototypes. */
typedef struct hashed_entry *hash;
diff --git a/gcc/objc/objc-lang.c b/gcc/objc/objc-lang.c
index b94f037c547..0b0133807d1 100644
--- a/gcc/objc/objc-lang.c
+++ b/gcc/objc/objc-lang.c
@@ -23,6 +23,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "objc-tree-code.h"
#include "tree.h"
#include "c-tree.h"
#include "c-common.h"
diff --git a/gcc/objc/objc-tree-code.h b/gcc/objc/objc-tree-code.h
new file mode 100644
index 00000000000..d989b33462c
--- /dev/null
+++ b/gcc/objc/objc-tree-code.h
@@ -0,0 +1,54 @@
+/* Definitions for ObjcC codes of tree nodes.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
+
+/* Define the Objective-C or Objective-C++ language-specific tree codes. */
+
+#define DEFTREECODE(SYM, STRING, TYPE, NARGS) SYM,
+
+enum tree_code {
+#ifdef OBJCPLUS
+#include "tree.def"
+
+ LAST_AND_UNUSED_TREE_CODE, /* A convenient way to get a value for
+ NUM_TREE_CODES. */
+ C_DUMMY_TREE_CODE = LAST_AND_UNUSED_TREE_CODE,
+#include "c-common.def"
+ LAST_C_TREE_CODE,
+ CP_DUMMY_TREE_CODE = LAST_C_TREE_CODE,
+#include "cp-tree.def"
+ LAST_CPLUS_TREE_CODE,
+ LAST_BASE_TREE_CODE = LAST_CPLUS_TREE_CODE,
+#else
+#include "tree.def"
+
+ LAST_AND_UNUSED_TREE_CODE, /* A convenient way to get a value for
+ NUM_TREE_CODES. */
+ C_DUMMY_TREE_CODE = LAST_AND_UNUSED_TREE_CODE,
+#include "c-common.def"
+ LAST_C_TREE_CODE,
+ LAST_BASE_TREE_CODE = LAST_C_TREE_CODE,
+#endif
+#include "objc-tree.def"
+ LAST_OBJC_TREE_CODE
+};
+
+#undef DEFTREECODE
+
+#define TREE_CODE_DEFINED 1
diff --git a/gcc/objcp/objcp-decl.c b/gcc/objcp/objcp-decl.c
index f0d14e50d03..962726c518c 100644
--- a/gcc/objcp/objcp-decl.c
+++ b/gcc/objcp/objcp-decl.c
@@ -24,6 +24,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "objc-tree-code.h"
#include "tree.h"
#include "rtl.h"
#include "expr.h"
diff --git a/gcc/objcp/objcp-lang.c b/gcc/objcp/objcp-lang.c
index 19a865475a6..f4282965b34 100644
--- a/gcc/objcp/objcp-lang.c
+++ b/gcc/objcp/objcp-lang.c
@@ -23,6 +23,7 @@ Boston, MA 02110-1301, USA. */
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "objc-tree-code.h"
#include "tree.h"
#include "cp-tree.h"
#include "c-common.h"
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 0816103f190..2858a538b1c 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -118,7 +118,7 @@ static tree maybe_lookup_decl_in_outer_ctx (tree, omp_context *);
/* Find an OpenMP clause of type KIND within CLAUSES. */
static tree
-find_omp_clause (tree clauses, enum tree_code kind)
+find_omp_clause (tree clauses, enum omp_clause_code kind)
{
for (; clauses ; clauses = OMP_CLAUSE_CHAIN (clauses))
if (OMP_CLAUSE_CODE (clauses) == kind)
@@ -757,7 +757,7 @@ debug_all_omp_regions (void)
struct omp_region *
new_omp_region (basic_block bb, enum tree_code type, struct omp_region *parent)
{
- struct omp_region *region = xcalloc (1, sizeof (*region));
+ struct omp_region *region = XCNEW(struct omp_region);
region->outer = parent;
region->entry = bb;
@@ -1081,7 +1081,7 @@ create_omp_child_function_name (void)
size_t len = IDENTIFIER_LENGTH (name);
char *tmp_name, *prefix;
- prefix = alloca (len + sizeof ("_omp_fn"));
+ prefix = (char *) alloca (len + sizeof ("_omp_fn"));
memcpy (prefix, IDENTIFIER_POINTER (name), len);
strcpy (prefix + len, "_omp_fn");
#ifndef NO_DOT_IN_LABEL
@@ -1328,8 +1328,8 @@ check_omp_nesting_restrictions (tree t, omp_context *ctx)
static tree
scan_omp_1 (tree *tp, int *walk_subtrees, void *data)
{
- struct walk_stmt_info *wi = data;
- omp_context *ctx = wi->info;
+ struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
+ omp_context *ctx = (omp_context *) wi->info;
tree t = *tp;
if (EXPR_HAS_LOCATION (t))
@@ -3110,7 +3110,7 @@ expand_omp_for (struct omp_region *region)
int fn_index = fd.sched_kind + fd.have_ordered * 4;
int start_ix = BUILT_IN_GOMP_LOOP_STATIC_START + fn_index;
int next_ix = BUILT_IN_GOMP_LOOP_STATIC_NEXT + fn_index;
- expand_omp_for_generic (region, &fd, start_ix, next_ix);
+ expand_omp_for_generic (region, &fd, (enum built_in_function) start_ix, (enum built_in_function) next_ix);
}
pop_gimplify_context (NULL);
@@ -4139,8 +4139,8 @@ lower_regimplify (tree *tp, struct walk_stmt_info *wi)
static tree
lower_omp_1 (tree *tp, int *walk_subtrees, void *data)
{
- struct walk_stmt_info *wi = data;
- omp_context *ctx = wi->info;
+ struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
+ omp_context *ctx = (omp_context *) wi->info;
tree t = *tp;
/* If we have issued syntax errors, avoid doing any heavy lifting.
@@ -4343,7 +4343,7 @@ diagnose_sb_0 (tree *stmt_p, tree branch_ctx, tree label_ctx)
static tree
diagnose_sb_1 (tree *tp, int *walk_subtrees, void *data)
{
- struct walk_stmt_info *wi = data;
+ struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
tree context = (tree) wi->info;
tree inner_context;
tree t = *tp;
@@ -4397,7 +4397,7 @@ diagnose_sb_1 (tree *tp, int *walk_subtrees, void *data)
static tree
diagnose_sb_2 (tree *tp, int *walk_subtrees, void *data)
{
- struct walk_stmt_info *wi = data;
+ struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
tree context = (tree) wi->info;
splay_tree_node n;
tree t = *tp;
diff --git a/gcc/optabs.c b/gcc/optabs.c
index fe7ae065962..d84b464605f 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -368,10 +368,10 @@ expand_widen_pattern_expr (tree exp, rtx op0, rtx op1, rtx wide_op, rtx target,
int unsignedp)
{
tree oprnd0, oprnd1, oprnd2;
- enum machine_mode wmode = 0, tmode0, tmode1 = 0;
+ enum machine_mode wmode = VOIDmode, tmode0, tmode1 = VOIDmode;
optab widen_pattern_optab;
int icode;
- enum machine_mode xmode0, xmode1 = 0, wxmode = 0;
+ enum machine_mode xmode0, xmode1 = VOIDmode, wxmode = VOIDmode;
rtx temp;
rtx pat;
rtx xop0, xop1, wxop;
@@ -635,18 +635,18 @@ expand_vec_shift_expr (tree vec_shift_expr, rtx target)
gcc_unreachable ();
}
- icode = (int) shift_optab->handlers[(int) mode].insn_code;
+ icode = shift_optab->handlers[mode].insn_code;
gcc_assert (icode != CODE_FOR_nothing);
mode1 = insn_data[icode].operand[1].mode;
mode2 = insn_data[icode].operand[2].mode;
- rtx_op1 = expand_expr (vec_oprnd, NULL_RTX, VOIDmode, EXPAND_NORMAL);
+ rtx_op1 = expand_normal (vec_oprnd);
if (!(*insn_data[icode].operand[1].predicate) (rtx_op1, mode1)
&& mode1 != VOIDmode)
rtx_op1 = force_reg (mode1, rtx_op1);
- rtx_op2 = expand_expr (shift_oprnd, NULL_RTX, VOIDmode, EXPAND_NORMAL);
+ rtx_op2 = expand_normal (shift_oprnd);
if (!(*insn_data[icode].operand[2].predicate) (rtx_op2, mode2)
&& mode2 != VOIDmode)
rtx_op2 = force_reg (mode2, rtx_op2);
@@ -1201,7 +1201,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
enum optab_methods next_methods
= (methods == OPTAB_LIB || methods == OPTAB_LIB_WIDEN
? OPTAB_WIDEN : methods);
- enum mode_class class;
+ enum mode_class kind;
enum machine_mode wider_mode;
rtx temp;
int commutative_op = 0;
@@ -1214,7 +1214,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
rtx last;
bool first_pass_p = true;
- class = GET_MODE_CLASS (mode);
+ kind = GET_MODE_CLASS (mode);
/* If subtracting an integer constant, convert this into an addition of
the negated constant. */
@@ -1358,7 +1358,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
shifts and bitwise-or. */
if (first_pass_p
&& (binoptab == rotl_optab || binoptab == rotr_optab)
- && class == MODE_INT
+ && kind == MODE_INT
&& GET_CODE (op1) == CONST_INT
&& INTVAL (op1) > 0
&& (unsigned int) INTVAL (op1) < GET_MODE_BITSIZE (mode))
@@ -1397,7 +1397,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
can open-code the operation. Check for a widening multiply at the
wider mode as well. */
- if (CLASS_HAS_WIDER_MODES_P (class)
+ if (CLASS_HAS_WIDER_MODES_P (kind)
&& methods != OPTAB_DIRECT && methods != OPTAB_LIB)
for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode;
@@ -1421,7 +1421,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
|| binoptab == xor_optab
|| binoptab == add_optab || binoptab == sub_optab
|| binoptab == smul_optab || binoptab == ashl_optab)
- && class == MODE_INT)
+ && kind == MODE_INT)
no_extend = 1;
xop0 = widen_operand (xop0, wider_mode, mode, unsignedp, no_extend);
@@ -1434,7 +1434,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
unsignedp, OPTAB_DIRECT);
if (temp)
{
- if (class != MODE_INT
+ if (kind != MODE_INT
|| !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (wider_mode)))
{
@@ -1453,7 +1453,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
/* These can be done a word at a time. */
if ((binoptab == and_optab || binoptab == ior_optab || binoptab == xor_optab)
- && class == MODE_INT
+ && kind == MODE_INT
&& GET_MODE_SIZE (mode) > UNITS_PER_WORD
&& binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
{
@@ -1504,7 +1504,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
/* Synthesize double word shifts from single word shifts. */
if ((binoptab == lshr_optab || binoptab == ashl_optab
|| binoptab == ashr_optab)
- && class == MODE_INT
+ && kind == MODE_INT
&& (GET_CODE (op1) == CONST_INT || !optimize_size)
&& GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
&& binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing
@@ -1575,7 +1575,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
/* Synthesize double word rotates from single word shifts. */
if ((binoptab == rotl_optab || binoptab == rotr_optab)
- && class == MODE_INT
+ && kind == MODE_INT
&& GET_CODE (op1) == CONST_INT
&& GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
&& ashl_optab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing
@@ -1693,7 +1693,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
/* These can be done a word at a time by propagating carries. */
if ((binoptab == add_optab || binoptab == sub_optab)
- && class == MODE_INT
+ && kind == MODE_INT
&& GET_MODE_SIZE (mode) >= 2 * UNITS_PER_WORD
&& binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
{
@@ -1819,7 +1819,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
try using a signed widening multiply. */
if (binoptab == smul_optab
- && class == MODE_INT
+ && kind == MODE_INT
&& GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
&& smul_optab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing
&& add_optab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
@@ -1921,7 +1921,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
/* Look for a wider mode of the same class for which it appears we can do
the operation. */
- if (CLASS_HAS_WIDER_MODES_P (class))
+ if (CLASS_HAS_WIDER_MODES_P (kind))
{
for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode;
@@ -1943,7 +1943,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
|| binoptab == xor_optab
|| binoptab == add_optab || binoptab == sub_optab
|| binoptab == smul_optab || binoptab == ashl_optab)
- && class == MODE_INT)
+ && kind == MODE_INT)
no_extend = 1;
xop0 = widen_operand (xop0, wider_mode, mode,
@@ -1957,7 +1957,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
unsignedp, methods);
if (temp)
{
- if (class != MODE_INT
+ if (kind != MODE_INT
|| !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (wider_mode)))
{
@@ -1993,7 +1993,7 @@ sign_expand_binop (enum machine_mode mode, optab uoptab, optab soptab,
{
rtx temp;
optab direct_optab = unsignedp ? uoptab : soptab;
- struct optab wide_soptab;
+ struct optab_s wide_soptab;
/* Do it without widening, if possible. */
temp = expand_binop (mode, direct_optab, op0, op1, target,
@@ -2004,10 +2004,10 @@ sign_expand_binop (enum machine_mode mode, optab uoptab, optab soptab,
/* Try widening to a signed int. Make a fake signed optab that
hides any signed insn for direct use. */
wide_soptab = *soptab;
- wide_soptab.handlers[(int) mode].insn_code = CODE_FOR_nothing;
- wide_soptab.handlers[(int) mode].libfunc = 0;
+ wide_soptab.handlers[mode].insn_code = CODE_FOR_nothing;
+ wide_soptab.handlers[mode].libfunc = 0;
- temp = expand_binop (mode, &wide_soptab, op0, op1, target,
+ temp = expand_binop (mode, (optab) &wide_soptab, op0, op1, target,
unsignedp, OPTAB_WIDEN);
/* For unsigned operands, try widening to an unsigned int. */
@@ -2049,12 +2049,12 @@ expand_twoval_unop (optab unoptab, rtx op0, rtx targ0, rtx targ1,
int unsignedp)
{
enum machine_mode mode = GET_MODE (targ0 ? targ0 : targ1);
- enum mode_class class;
+ enum mode_class kind;
enum machine_mode wider_mode;
rtx entry_last = get_last_insn ();
rtx last;
- class = GET_MODE_CLASS (mode);
+ kind = GET_MODE_CLASS (mode);
if (!targ0)
targ0 = gen_reg_rtx (mode);
@@ -2096,7 +2096,7 @@ expand_twoval_unop (optab unoptab, rtx op0, rtx targ0, rtx targ1,
/* It can't be done in this mode. Can we do it in a wider mode? */
- if (CLASS_HAS_WIDER_MODES_P (class))
+ if (CLASS_HAS_WIDER_MODES_P (kind))
{
for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode;
@@ -2142,12 +2142,12 @@ expand_twoval_binop (optab binoptab, rtx op0, rtx op1, rtx targ0, rtx targ1,
int unsignedp)
{
enum machine_mode mode = GET_MODE (targ0 ? targ0 : targ1);
- enum mode_class class;
+ enum mode_class kind;
enum machine_mode wider_mode;
rtx entry_last = get_last_insn ();
rtx last;
- class = GET_MODE_CLASS (mode);
+ kind = GET_MODE_CLASS (mode);
/* If we are inside an appropriately-short loop and we are optimizing,
force expensive constants into a register. */
@@ -2219,7 +2219,7 @@ expand_twoval_binop (optab binoptab, rtx op0, rtx op1, rtx targ0, rtx targ1,
/* It can't be done in this mode. Can we do it in a wider mode? */
- if (CLASS_HAS_WIDER_MODES_P (class))
+ if (CLASS_HAS_WIDER_MODES_P (kind))
{
for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode;
@@ -2318,8 +2318,8 @@ expand_simple_unop (enum machine_mode mode, enum rtx_code code, rtx op0,
static rtx
widen_clz (enum machine_mode mode, rtx op0, rtx target)
{
- enum mode_class class = GET_MODE_CLASS (mode);
- if (CLASS_HAS_WIDER_MODES_P (class))
+ enum mode_class kind = GET_MODE_CLASS (mode);
+ if (CLASS_HAS_WIDER_MODES_P (kind))
{
enum machine_mode wider_mode;
for (wider_mode = GET_MODE_WIDER_MODE (mode);
@@ -2357,8 +2357,8 @@ widen_clz (enum machine_mode mode, rtx op0, rtx target)
static rtx
expand_parity (enum machine_mode mode, rtx op0, rtx target)
{
- enum mode_class class = GET_MODE_CLASS (mode);
- if (CLASS_HAS_WIDER_MODES_P (class))
+ enum mode_class kind = GET_MODE_CLASS (mode);
+ if (CLASS_HAS_WIDER_MODES_P (kind))
{
enum machine_mode wider_mode;
for (wider_mode = mode; wider_mode != VOIDmode;
@@ -2529,13 +2529,13 @@ rtx
expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
int unsignedp)
{
- enum mode_class class;
+ enum mode_class kind;
enum machine_mode wider_mode;
rtx temp;
rtx last = get_last_insn ();
rtx pat;
- class = GET_MODE_CLASS (mode);
+ kind = GET_MODE_CLASS (mode);
if (unoptab->handlers[(int) mode].insn_code != CODE_FOR_nothing)
{
@@ -2590,7 +2590,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
goto try_libcall;
}
- if (CLASS_HAS_WIDER_MODES_P (class))
+ if (CLASS_HAS_WIDER_MODES_P (kind))
for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode;
wider_mode = GET_MODE_WIDER_MODE (wider_mode))
@@ -2606,14 +2606,14 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
xop0 = widen_operand (xop0, wider_mode, mode, unsignedp,
(unoptab == neg_optab
|| unoptab == one_cmpl_optab)
- && class == MODE_INT);
+ && kind == MODE_INT);
temp = expand_unop (wider_mode, unoptab, xop0, NULL_RTX,
unsignedp);
if (temp)
{
- if (class != MODE_INT
+ if (kind != MODE_INT
|| !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (wider_mode)))
{
@@ -2632,7 +2632,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
/* These can be done a word at a time. */
if (unoptab == one_cmpl_optab
- && class == MODE_INT
+ && kind == MODE_INT
&& GET_MODE_SIZE (mode) > UNITS_PER_WORD
&& unoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
{
@@ -2730,7 +2730,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
/* It can't be done in this mode. Can we do it in a wider mode? */
- if (CLASS_HAS_WIDER_MODES_P (class))
+ if (CLASS_HAS_WIDER_MODES_P (kind))
{
for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode;
@@ -2749,7 +2749,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
xop0 = widen_operand (xop0, wider_mode, mode, unsignedp,
(unoptab == neg_optab
|| unoptab == one_cmpl_optab)
- && class == MODE_INT);
+ && kind == MODE_INT);
temp = expand_unop (wider_mode, unoptab, xop0, NULL_RTX,
unsignedp);
@@ -2764,7 +2764,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
if (temp)
{
- if (class != MODE_INT)
+ if (kind != MODE_INT)
{
if (target == 0)
target = gen_reg_rtx (mode);
@@ -3192,7 +3192,7 @@ struct no_conflict_data
static void
no_conflict_move_test (rtx dest, rtx set, void *p0)
{
- struct no_conflict_data *p= p0;
+ struct no_conflict_data *p= (struct no_conflict_data *) p0;
/* If this inns directly contributes to setting the target, it must stay. */
if (reg_overlap_mentioned_p (p->target, dest))
@@ -3771,7 +3771,7 @@ emit_cmp_and_jump_insn_1 (rtx x, rtx y, enum machine_mode mode,
enum rtx_code comparison, int unsignedp, rtx label)
{
rtx test = gen_rtx_fmt_ee (comparison, mode, x, y);
- enum mode_class class = GET_MODE_CLASS (mode);
+ enum mode_class kind = GET_MODE_CLASS (mode);
enum machine_mode wider_mode = mode;
/* Try combined insns first. */
@@ -3795,19 +3795,19 @@ emit_cmp_and_jump_insn_1 (rtx x, rtx y, enum machine_mode mode,
}
/* Handle some compares against zero. */
- icode = (int) tst_optab->handlers[(int) wider_mode].insn_code;
+ icode = (enum insn_code) tst_optab->handlers[wider_mode].insn_code;
if (y == CONST0_RTX (mode) && icode != CODE_FOR_nothing)
{
x = prepare_operand (icode, x, 0, mode, wider_mode, unsignedp);
emit_insn (GEN_FCN (icode) (x));
if (label)
- emit_jump_insn (bcc_gen_fctn[(int) comparison] (label));
+ emit_jump_insn (bcc_gen_fctn[comparison] (label));
return;
}
/* Handle compares for which there is a directly suitable insn. */
- icode = (int) cmp_optab->handlers[(int) wider_mode].insn_code;
+ icode = (enum insn_code) cmp_optab->handlers[(int) wider_mode].insn_code;
if (icode != CODE_FOR_nothing)
{
x = prepare_operand (icode, x, 0, mode, wider_mode, unsignedp);
@@ -3818,7 +3818,7 @@ emit_cmp_and_jump_insn_1 (rtx x, rtx y, enum machine_mode mode,
return;
}
- if (!CLASS_HAS_WIDER_MODES_P (class))
+ if (!CLASS_HAS_WIDER_MODES_P (kind))
break;
wider_mode = GET_MODE_WIDER_MODE (wider_mode);
@@ -4877,7 +4877,7 @@ static optab
new_optab (void)
{
int i;
- optab op = ggc_alloc (sizeof (struct optab));
+ optab op = (optab) ggc_alloc (sizeof (struct optab_s));
for (i = 0; i < NUM_MACHINE_MODES; i++)
{
op->handlers[i].insn_code = CODE_FOR_nothing;
@@ -4891,7 +4891,7 @@ static convert_optab
new_convert_optab (void)
{
int i, j;
- convert_optab op = ggc_alloc (sizeof (struct convert_optab));
+ convert_optab op = (convert_optab) ggc_alloc (sizeof (struct convert_optab_s));
for (i = 0; i < NUM_MACHINE_MODES; i++)
for (j = 0; j < NUM_MACHINE_MODES; j++)
{
@@ -4960,7 +4960,7 @@ init_libfuncs (optab optable, int first_mode, int last_mode,
{
const char *mname = GET_MODE_NAME (mode);
unsigned mname_len = strlen (mname);
- char *libfunc_name = alloca (2 + opname_len + mname_len + 1 + 1);
+ char *libfunc_name = (char *) alloca (2 + opname_len + mname_len + 1 + 1);
char *p;
const char *q;
@@ -5039,7 +5039,7 @@ init_interclass_conv_libfuncs (convert_optab tab, const char *opname,
tmode = GET_MODE_WIDER_MODE (tmode))
max_mname_len = MAX (max_mname_len, strlen (GET_MODE_NAME (tmode)));
- libfunc_name = alloca (2 + opname_len + 2*max_mname_len + 1 + 1);
+ libfunc_name = (char *) alloca (2 + opname_len + 2*max_mname_len + 1 + 1);
libfunc_name[0] = '_';
libfunc_name[1] = '_';
memcpy (&libfunc_name[2], opname, opname_len);
@@ -5074,9 +5074,9 @@ init_interclass_conv_libfuncs (convert_optab tab, const char *opname,
have two mode names _and_ an operand count. */
static void
init_intraclass_conv_libfuncs (convert_optab tab, const char *opname,
- enum mode_class class, bool widening)
+ enum mode_class kind, bool widening)
{
- enum machine_mode first_mode = GET_CLASS_NARROWEST_MODE (class);
+ enum machine_mode first_mode = GET_CLASS_NARROWEST_MODE (kind);
size_t opname_len = strlen (opname);
size_t max_mname_len = 0;
@@ -5090,7 +5090,7 @@ init_intraclass_conv_libfuncs (convert_optab tab, const char *opname,
nmode = GET_MODE_WIDER_MODE (nmode))
max_mname_len = MAX (max_mname_len, strlen (GET_MODE_NAME (nmode)));
- libfunc_name = alloca (2 + opname_len + 2*max_mname_len + 1 + 1);
+ libfunc_name = (char *) alloca (2 + opname_len + 2*max_mname_len + 1 + 1);
libfunc_name[0] = '_';
libfunc_name[1] = '_';
memcpy (&libfunc_name[2], opname, opname_len);
@@ -5676,8 +5676,8 @@ vector_compare_rtx (tree cond, bool unsignedp, enum insn_code icode)
t_op1 = TREE_OPERAND (cond, 1);
/* Expand operands. */
- rtx_op0 = expand_expr (t_op0, NULL_RTX, TYPE_MODE (TREE_TYPE (t_op0)), 1);
- rtx_op1 = expand_expr (t_op1, NULL_RTX, TYPE_MODE (TREE_TYPE (t_op1)), 1);
+ rtx_op0 = expand_expr (t_op0, NULL_RTX, TYPE_MODE (TREE_TYPE (t_op0)), EXPAND_STACK_PARM);
+ rtx_op1 = expand_expr (t_op1, NULL_RTX, TYPE_MODE (TREE_TYPE (t_op1)), EXPAND_STACK_PARM);
if (!insn_data[icode].operand[4].predicate (rtx_op0, GET_MODE (rtx_op0))
&& GET_MODE (rtx_op0) != VOIDmode)
@@ -5738,14 +5738,12 @@ expand_vec_cond_expr (tree vec_cond_expr, rtx target)
cc_op0 = XEXP (comparison, 0);
cc_op1 = XEXP (comparison, 1);
/* Expand both operands and force them in reg, if required. */
- rtx_op1 = expand_expr (TREE_OPERAND (vec_cond_expr, 1),
- NULL_RTX, VOIDmode, EXPAND_NORMAL);
+ rtx_op1 = expand_normal (TREE_OPERAND (vec_cond_expr, 1));
if (!insn_data[icode].operand[1].predicate (rtx_op1, mode)
&& mode != VOIDmode)
rtx_op1 = force_reg (mode, rtx_op1);
- rtx_op2 = expand_expr (TREE_OPERAND (vec_cond_expr, 2),
- NULL_RTX, VOIDmode, EXPAND_NORMAL);
+ rtx_op2 = expand_normal (TREE_OPERAND (vec_cond_expr, 2));
if (!insn_data[icode].operand[2].predicate (rtx_op2, mode)
&& mode != VOIDmode)
rtx_op2 = force_reg (mode, rtx_op2);
diff --git a/gcc/optabs.h b/gcc/optabs.h
index 58fb6905175..863763bcd09 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -45,22 +45,22 @@ struct optab_handlers GTY(())
rtx libfunc;
};
-struct optab GTY(())
+struct optab_s GTY(())
{
enum rtx_code code;
struct optab_handlers handlers[NUM_MACHINE_MODES];
};
-typedef struct optab * optab;
+typedef struct optab_s * optab;
/* A convert_optab is for some sort of conversion operation between
modes. The first array index is the destination mode, the second
is the source mode. */
-struct convert_optab GTY(())
+struct convert_optab_s GTY(())
{
enum rtx_code code;
struct optab_handlers handlers[NUM_MACHINE_MODES][NUM_MACHINE_MODES];
};
-typedef struct convert_optab *convert_optab;
+typedef struct convert_optab_s *convert_optab;
/* Given an enum insn_code, access the function to construct
the body of that kind of insn. */
diff --git a/gcc/opts-common.c b/gcc/opts-common.c
index 958e6677322..bddcc27847f 100644
--- a/gcc/opts-common.c
+++ b/gcc/opts-common.c
@@ -132,8 +132,8 @@ void
prune_options (int *argcp, char ***argvp)
{
int argc = *argcp;
- int *options = xmalloc (argc * sizeof (*options));
- char **argv = xmalloc (argc * sizeof (char *));
+ int *options = XNEWVEC (int, argc);
+ char **argv = XNEWVEC (char *, argc);
int i, arg_count, need_prune = 0;
const struct cl_option *option;
size_t opt_index;
diff --git a/gcc/opts.c b/gcc/opts.c
index 01ec30d6ceb..22744b08850 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -343,7 +343,7 @@ static void
add_input_filename (const char *filename)
{
num_in_fnames++;
- in_fnames = xrealloc (in_fnames, num_in_fnames * sizeof (in_fnames[0]));
+ in_fnames = (const char **) xrealloc (in_fnames, num_in_fnames * sizeof (in_fnames[0]));
in_fnames[num_in_fnames - 1] = filename;
}
@@ -693,7 +693,7 @@ common_handle_option (size_t scode, const char *arg, int value,
else
{
int kind = value ? DK_ERROR : DK_WARNING;
- diagnostic_classify_diagnostic (global_dc, option_index, kind);
+ diagnostic_classify_diagnostic (global_dc, option_index, (diagnostic_t) kind);
/* -Werror=foo implies -Wfoo. */
if (cl_options[option_index].var_type == CLVC_BOOLEAN
@@ -1142,11 +1142,11 @@ set_debug_level (enum debug_info_type type, int extended, const char *arg)
if (*arg == '\0')
{
if (!debug_info_level)
- debug_info_level = 2;
+ debug_info_level = DINFO_LEVEL_NORMAL;
}
else
{
- debug_info_level = integral_argument (arg);
+ debug_info_level = (enum debug_info_level) integral_argument (arg);
if (debug_info_level == (unsigned int) -1)
error ("unrecognised debug output level \"%s\"", arg);
else if (debug_info_level > 3)
@@ -1236,14 +1236,15 @@ print_filtered_help (unsigned int flag)
unsigned int i, len, filter, indent = 0;
bool duplicates = false;
const char *help, *opt, *tab;
- static char *printed;
+ static bool *printed;
if (flag == CL_COMMON || flag == CL_TARGET)
{
filter = flag;
if (!printed)
- printed = xmalloc (cl_options_count);
- memset (printed, 0, cl_options_count);
+ printed = XCNEWVEC (bool, cl_options_count);
+ for (i = 0; i < cl_options_count; ++i)
+ printed[i] = false;
}
else
{
@@ -1442,7 +1443,7 @@ get_option_state (int option, struct cl_option_state *state)
state->data = *(const char **) cl_options[option].flag_var;
if (state->data == 0)
state->data = "";
- state->size = strlen (state->data) + 1;
+ state->size = strlen ((char *) state->data) + 1;
break;
}
return true;
diff --git a/gcc/params.c b/gcc/params.c
index 40daae77a09..d287ce997e3 100644
--- a/gcc/params.c
+++ b/gcc/params.c
@@ -43,7 +43,7 @@ void
add_params (const param_info params[], size_t n)
{
/* Allocate enough space for the new parameters. */
- compiler_params = xrealloc (compiler_params,
+ compiler_params = (param_info *) xrealloc (compiler_params,
(num_compiler_params + n) * sizeof (param_info));
/* Copy them into the table. */
memcpy (compiler_params + num_compiler_params,
diff --git a/gcc/passes.c b/gcc/passes.c
index 46e4756e84d..2bdc2b6f302 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -209,35 +209,35 @@ rest_of_type_compilation (tree type, int toplev)
void
finish_optimization_passes (void)
{
- enum tree_dump_index i;
+ int i;
struct dump_file_info *dfi;
char *name;
timevar_push (TV_DUMP);
if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities)
{
- dump_file = dump_begin (pass_profile.static_pass_number, NULL);
+ dump_file = dump_begin ((enum tree_dump_index) pass_profile.static_pass_number, NULL);
end_branch_prob ();
if (dump_file)
- dump_end (pass_profile.static_pass_number, dump_file);
+ dump_end ((enum tree_dump_index) pass_profile.static_pass_number, dump_file);
}
if (optimize > 0)
{
- dump_file = dump_begin (pass_combine.static_pass_number, NULL);
+ dump_file = dump_begin ((enum tree_dump_index) pass_combine.static_pass_number, NULL);
if (dump_file)
{
dump_combine_total_stats (dump_file);
- dump_end (pass_combine.static_pass_number, dump_file);
+ dump_end ((enum tree_dump_index) pass_combine.static_pass_number, dump_file);
}
}
/* Do whatever is necessary to finish printing the graphs. */
if (graph_dump_format != no_graph)
- for (i = TDI_end; (dfi = get_dump_file_info (i)) != NULL; ++i)
- if (dump_initialized_p (i)
+ for (i = TDI_end; (dfi = get_dump_file_info ((enum tree_dump_index) i)) != NULL; ++i)
+ if (dump_initialized_p ((enum tree_dump_index) i)
&& (dfi->flags & TDF_GRAPH) != 0
- && (name = get_dump_file_name (i)) != NULL)
+ && (name = get_dump_file_name ((enum tree_dump_index) i)) != NULL)
{
finish_graph_dump_file (name);
free (name);
@@ -385,10 +385,10 @@ next_pass_1 (struct tree_opt_pass **list, struct tree_opt_pass *pass)
pass is already in the list. */
if (pass->static_pass_number)
{
- struct tree_opt_pass *new;
+ struct tree_opt_pass *tmp;
- new = xmalloc (sizeof (*new));
- memcpy (new, pass, sizeof (*new));
+ tmp = XNEW (struct tree_opt_pass);
+ memcpy (tmp, pass, sizeof (*tmp));
/* Indicate to register_dump_files that this pass has duplicates,
and so it should rename the dump file. The first instance will
@@ -397,10 +397,10 @@ next_pass_1 (struct tree_opt_pass **list, struct tree_opt_pass *pass)
if (pass->name)
{
pass->static_pass_number -= 1;
- new->static_pass_number = -pass->static_pass_number;
+ tmp->static_pass_number = -pass->static_pass_number;
}
- *list = new;
+ *list = tmp;
}
else
{
@@ -840,9 +840,9 @@ execute_one_pass (struct tree_opt_pass *pass)
/* If a dump file name is present, open it if enabled. */
if (pass->static_pass_number != -1)
{
- initializing_dump = !dump_initialized_p (pass->static_pass_number);
- dump_file_name = get_dump_file_name (pass->static_pass_number);
- dump_file = dump_begin (pass->static_pass_number, &dump_flags);
+ initializing_dump = !dump_initialized_p ((enum tree_dump_index) pass->static_pass_number);
+ dump_file_name = get_dump_file_name ((enum tree_dump_index) pass->static_pass_number);
+ dump_file = dump_begin ((enum tree_dump_index) pass->static_pass_number, &dump_flags);
if (dump_file && current_function_decl)
{
const char *dname, *aname;
@@ -862,7 +862,7 @@ execute_one_pass (struct tree_opt_pass *pass)
/* If a timevar is present, start it. */
if (pass->tv_id)
- timevar_push (pass->tv_id);
+ timevar_push ((timevar_id_t) pass->tv_id);
/* Do it! */
if (pass->execute)
@@ -873,7 +873,7 @@ execute_one_pass (struct tree_opt_pass *pass)
/* Stop timevar. */
if (pass->tv_id)
- timevar_pop (pass->tv_id);
+ timevar_pop ((timevar_id_t ) pass->tv_id);
curr_properties = (curr_properties | pass->properties_provided)
& ~pass->properties_destroyed;
@@ -883,7 +883,7 @@ execute_one_pass (struct tree_opt_pass *pass)
&& graph_dump_format != no_graph
&& (curr_properties & (PROP_cfg | PROP_rtl)) == (PROP_cfg | PROP_rtl))
{
- get_dump_file_info (pass->static_pass_number)->flags |= TDF_GRAPH;
+ get_dump_file_info ((enum tree_dump_index) pass->static_pass_number)->flags |= TDF_GRAPH;
dump_flags |= TDF_GRAPH;
clean_graph_dump_file (dump_file_name);
}
@@ -899,7 +899,7 @@ execute_one_pass (struct tree_opt_pass *pass)
}
if (dump_file)
{
- dump_end (pass->static_pass_number, dump_file);
+ dump_end ((enum tree_dump_index) pass->static_pass_number, dump_file);
dump_file = NULL;
}
diff --git a/gcc/postreload.c b/gcc/postreload.c
index 5f4ae4f5b18..383df12ab2f 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -392,9 +392,9 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
if (! constrain_operands (1))
fatal_insn_not_found (insn);
- alternative_reject = alloca (recog_data.n_alternatives * sizeof (int));
- alternative_nregs = alloca (recog_data.n_alternatives * sizeof (int));
- alternative_order = alloca (recog_data.n_alternatives * sizeof (int));
+ alternative_reject = (int *) alloca (recog_data.n_alternatives * sizeof (int));
+ alternative_nregs = (int *) alloca (recog_data.n_alternatives * sizeof (int));
+ alternative_order = (int *) alloca (recog_data.n_alternatives * sizeof (int));
memset (alternative_reject, 0, recog_data.n_alternatives * sizeof (int));
memset (alternative_nregs, 0, recog_data.n_alternatives * sizeof (int));
@@ -485,7 +485,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
int regno;
const char *p;
- op_alt_regno[i] = alloca (recog_data.n_alternatives * sizeof (int));
+ op_alt_regno[i] = (int *) alloca (recog_data.n_alternatives * sizeof (int));
for (j = 0; j < recog_data.n_alternatives; j++)
op_alt_regno[i][j] = -1;
@@ -516,7 +516,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
{
- int class = (int) NO_REGS;
+ enum reg_class rc = NO_REGS;
if (! TEST_HARD_REG_BIT (equiv_regs[i], regno))
continue;
@@ -550,13 +550,13 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
break;
case 'g': case 'r':
- class = reg_class_subunion[(int) class][(int) GENERAL_REGS];
+ rc = reg_class_subunion[rc][(int) GENERAL_REGS];
break;
default:
- class
+ rc
= (reg_class_subunion
- [(int) class]
+ [rc]
[(int) REG_CLASS_FROM_CONSTRAINT ((unsigned char) c, p)]);
break;
@@ -566,7 +566,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
alternative yet and the operand being replaced is not
a cheap CONST_INT. */
if (op_alt_regno[i][j] == -1
- && reg_fits_class_p (testreg, class, 0, mode)
+ && reg_fits_class_p (testreg, (enum reg_class) rc, 0, mode)
&& (GET_CODE (recog_data.operand[i]) != CONST_INT
|| (rtx_cost (recog_data.operand[i], SET)
> rtx_cost (testreg, SET))))
@@ -575,7 +575,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
op_alt_regno[i][j] = regno;
}
j++;
- class = (int) NO_REGS;
+ rc = NO_REGS;
break;
}
p += CONSTRAINT_LEN (c, p);
diff --git a/gcc/predict.c b/gcc/predict.c
index 90307635dd8..b163c43d82b 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -274,7 +274,7 @@ tree_predict_edge (edge e, enum br_predictor predictor, int probability)
if ((e->src != ENTRY_BLOCK_PTR && EDGE_COUNT (e->src->succs) > 1)
&& flag_guess_branch_prob && optimize)
{
- struct edge_prediction *i = ggc_alloc (sizeof (struct edge_prediction));
+ struct edge_prediction *i = (struct edge_prediction *) ggc_alloc (sizeof (struct edge_prediction));
i->ep_next = e->src->predictions;
e->src->predictions = i;
@@ -407,7 +407,7 @@ combine_predictions_for_insn (rtx insn, basic_block bb)
rtx *pnote;
rtx note;
int best_probability = PROB_EVEN;
- int best_predictor = END_PREDICTORS;
+ enum br_predictor best_predictor = END_PREDICTORS;
int combined_probability = REG_BR_PROB_BASE / 2;
int d;
bool first_match = false;
@@ -430,7 +430,7 @@ combine_predictions_for_insn (rtx insn, basic_block bb)
for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
if (REG_NOTE_KIND (note) == REG_BR_PRED)
{
- int predictor = INTVAL (XEXP (XEXP (note, 0), 0));
+ enum br_predictor predictor = (enum br_predictor) INTVAL (XEXP (XEXP (note, 0), 0));
int probability = INTVAL (XEXP (XEXP (note, 0), 1));
found = true;
@@ -476,7 +476,7 @@ combine_predictions_for_insn (rtx insn, basic_block bb)
{
if (REG_NOTE_KIND (*pnote) == REG_BR_PRED)
{
- int predictor = INTVAL (XEXP (XEXP (*pnote, 0), 0));
+ enum br_predictor predictor = (enum br_predictor) INTVAL (XEXP (XEXP (*pnote, 0), 0));
int probability = INTVAL (XEXP (XEXP (*pnote, 0), 1));
dump_prediction (dump_file, predictor, probability, bb,
@@ -520,7 +520,7 @@ static void
combine_predictions_for_bb (basic_block bb)
{
int best_probability = PROB_EVEN;
- int best_predictor = END_PREDICTORS;
+ enum br_predictor best_predictor = END_PREDICTORS;
int combined_probability = REG_BR_PROB_BASE / 2;
int d;
bool first_match = false;
@@ -564,7 +564,7 @@ combine_predictions_for_bb (basic_block bb)
by predictor with smallest index. */
for (pred = bb->predictions; pred; pred = pred->ep_next)
{
- int predictor = pred->ep_predictor;
+ enum br_predictor predictor = pred->ep_predictor;
int probability = pred->ep_probability;
if (pred->ep_edge != first)
@@ -610,7 +610,7 @@ combine_predictions_for_bb (basic_block bb)
for (pred = bb->predictions; pred; pred = pred->ep_next)
{
- int predictor = pred->ep_predictor;
+ enum br_predictor predictor = pred->ep_predictor;
int probability = pred->ep_probability;
if (pred->ep_edge != EDGE_SUCC (bb, 0))
diff --git a/gcc/predict.h b/gcc/predict.h
index 8972525092a..e9253391220 100644
--- a/gcc/predict.h
+++ b/gcc/predict.h
@@ -33,7 +33,8 @@ enum br_predictor
enum prediction
{
NOT_TAKEN,
- TAKEN
+ TAKEN,
+ NO_PREDICTION
};
extern void predict_insn_def (rtx, enum br_predictor, enum prediction);
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index 57b07ace4bb..7e725b647a0 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -72,12 +72,12 @@ dump_addr (FILE *file, const char *prefix, void *addr)
void
print_node_brief (FILE *file, const char *prefix, tree node, int indent)
{
- enum tree_code_class class;
+ enum tree_code_class tcc;
if (node == 0)
return;
- class = TREE_CODE_CLASS (TREE_CODE (node));
+ tcc = TREE_CODE_CLASS (TREE_CODE (node));
/* Always print the slot this node is in, and its code, address and
name if any. */
@@ -86,7 +86,7 @@ print_node_brief (FILE *file, const char *prefix, tree node, int indent)
fprintf (file, "%s <%s", prefix, tree_code_name[(int) TREE_CODE (node)]);
dump_addr (file, " ", node);
- if (class == tcc_declaration)
+ if (tcc == tcc_declaration)
{
if (DECL_NAME (node))
fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
@@ -97,7 +97,7 @@ print_node_brief (FILE *file, const char *prefix, tree node, int indent)
fprintf (file, " %c.%u", TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
DECL_UID (node));
}
- else if (class == tcc_type)
+ else if (tcc == tcc_type)
{
if (TYPE_NAME (node))
{
@@ -173,7 +173,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
int hash;
struct bucket *b;
enum machine_mode mode;
- enum tree_code_class class;
+ enum tree_code_class tcc;
int len;
int i;
expanded_location xloc;
@@ -183,7 +183,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
return;
code = TREE_CODE (node);
- class = TREE_CODE_CLASS (code);
+ tcc = TREE_CODE_CLASS (code);
/* Don't get too deep in nesting. If the user wants to see deeper,
it is easy to use the address of a lowest-level node
@@ -195,7 +195,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
return;
}
- if (indent > 8 && (class == tcc_type || class == tcc_declaration))
+ if (indent > 8 && (tcc == tcc_type || tcc == tcc_declaration))
{
print_node_brief (file, prefix, node, indent);
return;
@@ -232,7 +232,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
dump_addr (file, " ", node);
/* Print the name, if any. */
- if (class == tcc_declaration)
+ if (tcc == tcc_declaration)
{
if (DECL_NAME (node))
fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
@@ -243,7 +243,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
fprintf (file, " %c.%u", TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
DECL_UID (node));
}
- else if (class == tcc_type)
+ else if (tcc == tcc_type)
{
if (TYPE_NAME (node))
{
diff --git a/gcc/profile.c b/gcc/profile.c
index 9b493095684..c49ce31c82b 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -655,7 +655,7 @@ compute_value_histograms (histogram_values values)
aact_count = act_count[t];
act_count[t] += hist->n_counters;
- hist->hvalue.next = ann->histograms;
+ hist->hvalue.next = (struct histogram_value_t *) ann->histograms;
ann->histograms = hist;
hist->hvalue.counters = XNEWVEC (gcov_type, hist->n_counters);
for (j = 0; j < hist->n_counters; j++)
@@ -802,8 +802,8 @@ branch_prob (void)
|| (e->goto_locus->line != EXPR_LOCUS (last)->line)))
#endif
{
- basic_block new = split_edge (e);
- single_succ_edge (new)->goto_locus = e->goto_locus;
+ basic_block bb = split_edge (e);
+ single_succ_edge (bb)->goto_locus = e->goto_locus;
}
if ((e->flags & (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL))
&& e->dest != EXIT_BLOCK_PTR)
diff --git a/gcc/real.c b/gcc/real.c
index 1e1083f9abe..66a9a573764 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -995,10 +995,10 @@ bool
real_arithmetic (REAL_VALUE_TYPE *r, int icode, const REAL_VALUE_TYPE *op0,
const REAL_VALUE_TYPE *op1)
{
- enum tree_code code = icode;
+ enum tree_code code = (enum tree_code) icode;
if (op0->decimal || (op1 && op1->decimal))
- return decimal_real_arithmetic (r, icode, op0, op1);
+ return decimal_real_arithmetic (r, code, op0, op1);
switch (code)
{
@@ -1067,7 +1067,7 @@ bool
real_compare (int icode, const REAL_VALUE_TYPE *op0,
const REAL_VALUE_TYPE *op1)
{
- enum tree_code code = icode;
+ enum tree_code code = (enum tree_code) icode;
switch (code)
{
@@ -1482,14 +1482,14 @@ real_to_decimal (char *str, const REAL_VALUE_TYPE *r_orig, size_t buf_size,
}
/* Bound the number of digits printed by the size of the representation. */
- max_digits = SIGNIFICAND_BITS * M_LOG10_2;
+ max_digits = (size_t) (SIGNIFICAND_BITS * M_LOG10_2);
if (digits == 0 || digits > max_digits)
digits = max_digits;
/* Estimate the decimal exponent, and compute the length of the string it
will print as. Be conservative and add one to account for possible
overflow or rounding error. */
- dec_exp = REAL_EXP (&r) * M_LOG10_2;
+ dec_exp = (size_t) (REAL_EXP (&r) * M_LOG10_2);
for (max_digits = 1; dec_exp ; max_digits++)
dec_exp /= 10;
@@ -2588,7 +2588,7 @@ significand_size (enum machine_mode mode)
than the number of bits required to hold the largest coefficient
of this mode. */
double log2_10 = 3.3219281;
- return fmt->p * log2_10;
+ return (int) (fmt->p * log2_10);
}
return fmt->p * fmt->log2_b;
}
diff --git a/gcc/recog.c b/gcc/recog.c
index cd1cb7d6bee..e814b829d17 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -72,7 +72,7 @@ static rtx split_insn (rtx);
init_recog and init_recog_no_volatile are responsible for setting this. */
-int volatile_ok;
+bool volatile_ok;
struct recog_data recog_data;
@@ -85,14 +85,14 @@ struct operand_alternative recog_op_alt[MAX_RECOG_OPERANDS][MAX_RECOG_ALTERNATIV
int which_alternative;
-/* Nonzero after end of reload pass.
- Set to 1 or 0 by toplev.c.
+/* True after end of reload pass.
+ Set by toplev.c.
Controls the significance of (SUBREG (MEM)). */
-int reload_completed;
+bool reload_completed;
-/* Nonzero after thread_prologue_and_epilogue_insns has run. */
-int epilogue_completed;
+/* True after thread_prologue_and_epilogue_insns has run. */
+bool epilogue_completed;
/* Initialize data used by the function `recog'.
This must be called once in the compilation of a function
@@ -101,13 +101,13 @@ int epilogue_completed;
void
init_recog_no_volatile (void)
{
- volatile_ok = 0;
+ volatile_ok = false;
}
void
init_recog (void)
{
- volatile_ok = 1;
+ volatile_ok = true;
}
@@ -137,8 +137,8 @@ check_asm_operands (rtx x)
if (noperands == 0)
return 1;
- operands = alloca (noperands * sizeof (rtx));
- constraints = alloca (noperands * sizeof (char *));
+ operands = (rtx *) alloca (noperands * sizeof (rtx));
+ constraints = (const char **) alloca (noperands * sizeof (char *));
decode_asm_operands (x, operands, NULL, constraints, NULL);
@@ -191,16 +191,16 @@ static int num_changes = 0;
Otherwise, perform the change and return 1. */
int
-validate_change (rtx object, rtx *loc, rtx new, int in_group)
+validate_change (rtx object, rtx *loc, rtx fresh, int in_group)
{
rtx old = *loc;
- if (old == new || rtx_equal_p (old, new))
+ if (old == fresh || rtx_equal_p (old, fresh))
return 1;
gcc_assert (in_group != 0 || num_changes == 0);
- *loc = new;
+ *loc = fresh;
/* Save the information describing this change. */
if (num_changes >= changes_allocated)
@@ -212,7 +212,7 @@ validate_change (rtx object, rtx *loc, rtx new, int in_group)
else
changes_allocated *= 2;
- changes = xrealloc (changes, sizeof (change_t) * changes_allocated);
+ changes = (change_t *) xrealloc (changes, sizeof (change_t) * changes_allocated);
}
changes[num_changes].object = object;
@@ -460,7 +460,7 @@ validate_replace_rtx_1 (rtx *loc, rtx from, rtx to, rtx object)
enum rtx_code code;
enum machine_mode op0_mode = VOIDmode;
int prev_changes = num_changes;
- rtx new;
+ rtx fresh;
if (!x)
return;
@@ -568,25 +568,25 @@ validate_replace_rtx_1 (rtx *loc, rtx from, rtx to, rtx object)
case SIGN_EXTEND:
if (GET_MODE (XEXP (x, 0)) == VOIDmode)
{
- new = simplify_gen_unary (code, GET_MODE (x), XEXP (x, 0),
+ fresh = simplify_gen_unary (code, GET_MODE (x), XEXP (x, 0),
op0_mode);
/* If any of the above failed, substitute in something that
we know won't be recognized. */
- if (!new)
- new = gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
- validate_change (object, loc, new, 1);
+ if (!fresh)
+ fresh = gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
+ validate_change (object, loc, fresh, 1);
}
break;
case SUBREG:
/* All subregs possible to simplify should be simplified. */
- new = simplify_subreg (GET_MODE (x), SUBREG_REG (x), op0_mode,
+ fresh = simplify_subreg (GET_MODE (x), SUBREG_REG (x), op0_mode,
SUBREG_BYTE (x));
/* Subregs of VOIDmode operands are incorrect. */
- if (!new && GET_MODE (SUBREG_REG (x)) == VOIDmode)
- new = gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
- if (new)
- validate_change (object, loc, new, 1);
+ if (!fresh && GET_MODE (SUBREG_REG (x)) == VOIDmode)
+ fresh = gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
+ if (fresh)
+ validate_change (object, loc, fresh, 1);
break;
case ZERO_EXTRACT:
case SIGN_EXTRACT:
@@ -1474,7 +1474,7 @@ decode_asm_operands (rtx body, rtx *operands, rtx **operand_locs,
{
int i;
int noperands;
- const char *template = 0;
+ const char *templ = 0;
if (GET_CODE (body) == SET && GET_CODE (SET_SRC (body)) == ASM_OPERANDS)
{
@@ -1505,7 +1505,7 @@ decode_asm_operands (rtx body, rtx *operands, rtx **operand_locs,
constraints[0] = ASM_OPERANDS_OUTPUT_CONSTRAINT (asmop);
if (modes)
modes[0] = GET_MODE (SET_DEST (body));
- template = ASM_OPERANDS_TEMPLATE (asmop);
+ templ = ASM_OPERANDS_TEMPLATE (asmop);
}
else if (GET_CODE (body) == ASM_OPERANDS)
{
@@ -1527,7 +1527,7 @@ decode_asm_operands (rtx body, rtx *operands, rtx **operand_locs,
if (modes)
modes[i] = ASM_OPERANDS_INPUT_MODE (asmop, i);
}
- template = ASM_OPERANDS_TEMPLATE (asmop);
+ templ = ASM_OPERANDS_TEMPLATE (asmop);
}
else if (GET_CODE (body) == PARALLEL
&& GET_CODE (XVECEXP (body, 0, 0)) == SET
@@ -1570,7 +1570,7 @@ decode_asm_operands (rtx body, rtx *operands, rtx **operand_locs,
modes[i + nout] = ASM_OPERANDS_INPUT_MODE (asmop, i);
}
- template = ASM_OPERANDS_TEMPLATE (asmop);
+ templ = ASM_OPERANDS_TEMPLATE (asmop);
}
else if (GET_CODE (body) == PARALLEL
&& GET_CODE (XVECEXP (body, 0, 0)) == ASM_OPERANDS)
@@ -1592,10 +1592,10 @@ decode_asm_operands (rtx body, rtx *operands, rtx **operand_locs,
modes[i] = ASM_OPERANDS_INPUT_MODE (asmop, i);
}
- template = ASM_OPERANDS_TEMPLATE (asmop);
+ templ = ASM_OPERANDS_TEMPLATE (asmop);
}
- return template;
+ return templ;
}
/* Check if an asm_operand matches its constraints.
@@ -2265,7 +2265,7 @@ preprocess_constraints (void)
struct funny_match
{
- int this, other;
+ int it, other;
};
int
@@ -2404,7 +2404,7 @@ constrain_operands (int strict)
output op is the one that will be printed. */
if (val == 2 && strict > 0)
{
- funny_match[funny_match_index].this = opno;
+ funny_match[funny_match_index].it = opno;
funny_match[funny_match_index++].other = match;
}
}
@@ -2637,7 +2637,7 @@ constrain_operands (int strict)
while (--funny_match_index >= 0)
{
recog_data.operand[funny_match[funny_match_index].other]
- = recog_data.operand[funny_match[funny_match_index].this];
+ = recog_data.operand[funny_match[funny_match_index].it];
}
return 1;
@@ -3088,7 +3088,7 @@ peephole2_optimize (void)
prev = PREV_INSN (insn);
if (INSN_P (insn))
{
- rtx try, before_try, x;
+ rtx check, before_try, x;
int match_len;
rtx note;
bool was_call = false;
@@ -3109,13 +3109,13 @@ peephole2_optimize (void)
substitution would lose the
REG_FRAME_RELATED_EXPR that is attached. */
peep2_current_count = 0;
- try = NULL;
+ check = NULL;
}
else
/* Match the peephole. */
- try = peephole2_insns (PATTERN (insn), insn, &match_len);
+ check = peephole2_insns (PATTERN (insn), insn, &match_len);
- if (try != NULL)
+ if (check != NULL)
{
/* If we are splitting a CALL_INSN, look for the CALL_INSN
in SEQ and copy our CALL_INSN_FUNCTION_USAGE and other
@@ -3133,7 +3133,7 @@ peephole2_optimize (void)
continue;
was_call = true;
- new_insn = try;
+ new_insn = check;
while (new_insn != NULL_RTX)
{
if (CALL_P (new_insn))
@@ -3182,7 +3182,7 @@ peephole2_optimize (void)
REG_EH_REGION, NULL_RTX);
/* Replace the old sequence with the new. */
- try = emit_insn_after_setloc (try, peep2_insn_data[i].insn,
+ check = emit_insn_after_setloc (check, peep2_insn_data[i].insn,
INSN_LOCATOR (peep2_insn_data[i].insn));
before_try = PREV_INSN (insn);
delete_insn_chain (insn, peep2_insn_data[i].insn);
@@ -3197,7 +3197,7 @@ peephole2_optimize (void)
if (eh_edge->flags & (EDGE_EH | EDGE_ABNORMAL_CALL))
break;
- for (x = try ; x != before_try ; x = PREV_INSN (x))
+ for (x = check ; x != before_try ; x = PREV_INSN (x))
if (CALL_P (x)
|| (flag_non_call_exceptions
&& may_trap_p (PATTERN (x))
@@ -3262,7 +3262,7 @@ peephole2_optimize (void)
COPY_REG_SET (live, peep2_insn_data[i].live_before);
/* Update life information for the new sequence. */
- x = try;
+ x = check;
do
{
if (INSN_P (x))
@@ -3288,7 +3288,7 @@ peephole2_optimize (void)
/* If we generated a jump instruction, it won't have
JUMP_LABEL set. Recompute after we're done. */
- for (x = try; x != before_try; x = PREV_INSN (x))
+ for (x = check; x != before_try; x = PREV_INSN (x))
if (JUMP_P (x))
{
do_rebuild_jump_labels = true;
diff --git a/gcc/recog.h b/gcc/recog.h
index 8281a9e55e7..8eaa242044e 100644
--- a/gcc/recog.h
+++ b/gcc/recog.h
@@ -142,8 +142,8 @@ recog_memoized (rtx insn)
}
#endif
-/* Nonzero means volatile operands are recognized. */
-extern int volatile_ok;
+/* True means volatile operands are recognized. */
+extern bool volatile_ok;
/* Set by constrain_operands to the number of the alternative that
matched. */
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index fc742bdce60..3a1e4de012c 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -500,7 +500,7 @@ check_asm_stack_operands (rtx insn)
if (GET_CODE (body) == PARALLEL)
{
- clobber_reg = alloca (XVECLEN (body, 0) * sizeof (rtx));
+ clobber_reg = (rtx *) alloca (XVECLEN (body, 0) * sizeof (rtx));
for (i = 0; i < XVECLEN (body, 0); i++)
if (GET_CODE (XVECEXP (body, 0, i)) == CLOBBER)
@@ -711,18 +711,18 @@ replace_reg (rtx *reg, int regno)
static void
remove_regno_note (rtx insn, enum reg_note note, unsigned int regno)
{
- rtx *note_link, this;
+ rtx *note_link, it;
note_link = &REG_NOTES (insn);
- for (this = *note_link; this; this = XEXP (this, 1))
- if (REG_NOTE_KIND (this) == note
- && REG_P (XEXP (this, 0)) && REGNO (XEXP (this, 0)) == regno)
+ for (it = *note_link; it; it = XEXP (it, 1))
+ if (REG_NOTE_KIND (it) == note
+ && REG_P (XEXP (it, 0)) && REGNO (XEXP (it, 0)) == regno)
{
- *note_link = XEXP (this, 1);
+ *note_link = XEXP (it, 1);
return;
}
else
- note_link = &XEXP (this, 1);
+ note_link = &XEXP (it, 1);
gcc_unreachable ();
}
@@ -1977,9 +1977,9 @@ subst_asm_stack_regs (rtx insn, stack regstack)
for (i = 0, note = REG_NOTES (insn); note; note = XEXP (note, 1))
i++;
- note_reg = alloca (i * sizeof (rtx));
- note_loc = alloca (i * sizeof (rtx *));
- note_kind = alloca (i * sizeof (enum reg_note));
+ note_reg = (rtx *) alloca (i * sizeof (rtx));
+ note_loc = (rtx **) alloca (i * sizeof (rtx *));
+ note_kind = (enum reg_note *) alloca (i * sizeof (enum reg_note));
n_notes = 0;
for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
@@ -2010,8 +2010,8 @@ subst_asm_stack_regs (rtx insn, stack regstack)
if (GET_CODE (body) == PARALLEL)
{
- clobber_reg = alloca (XVECLEN (body, 0) * sizeof (rtx));
- clobber_loc = alloca (XVECLEN (body, 0) * sizeof (rtx *));
+ clobber_reg = (rtx *) alloca (XVECLEN (body, 0) * sizeof (rtx));
+ clobber_loc = (rtx **) alloca (XVECLEN (body, 0) * sizeof (rtx *));
for (i = 0; i < XVECLEN (body, 0); i++)
if (GET_CODE (XVECEXP (body, 0, i)) == CLOBBER)
@@ -2323,7 +2323,7 @@ subst_stack_regs (rtx insn, stack regstack)
is no longer needed once this has executed. */
static void
-change_stack (rtx insn, stack old, stack new, enum emit_where where)
+change_stack (rtx insn, stack old, stack fresh, enum emit_where where)
{
int reg;
int update_end = 0;
@@ -2335,9 +2335,9 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
&& starting_stack_p
&& where == EMIT_BEFORE)
{
- BLOCK_INFO (current_block)->stack_in = *new;
+ BLOCK_INFO (current_block)->stack_in = *fresh;
starting_stack_p = false;
- *old = *new;
+ *old = *fresh;
return;
}
@@ -2356,28 +2356,28 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
/* If the destination block's stack already has a specified layout
and contains two or more registers, use a more intelligent algorithm
to pop registers that minimizes the number number of fxchs below. */
- if (new->top > 0)
+ if (fresh->top > 0)
{
bool slots[REG_STACK_SIZE];
int pops[REG_STACK_SIZE];
int next, dest, topsrc;
/* First pass to determine the free slots. */
- for (reg = 0; reg <= new->top; reg++)
- slots[reg] = TEST_HARD_REG_BIT (new->reg_set, old->reg[reg]);
+ for (reg = 0; reg <= fresh->top; reg++)
+ slots[reg] = TEST_HARD_REG_BIT (fresh->reg_set, old->reg[reg]);
/* Second pass to allocate preferred slots. */
topsrc = -1;
- for (reg = old->top; reg > new->top; reg--)
- if (TEST_HARD_REG_BIT (new->reg_set, old->reg[reg]))
+ for (reg = old->top; reg > fresh->top; reg--)
+ if (TEST_HARD_REG_BIT (fresh->reg_set, old->reg[reg]))
{
dest = -1;
- for (next = 0; next <= new->top; next++)
- if (!slots[next] && new->reg[next] == old->reg[reg])
+ for (next = 0; next <= fresh->top; next++)
+ if (!slots[next] && fresh->reg[next] == old->reg[reg])
{
/* If this is a preference for the new top of stack, record
the fact by remembering it's old->reg in topsrc. */
- if (next == new->top)
+ if (next == fresh->top)
topsrc = reg;
slots[next] = true;
dest = next;
@@ -2394,18 +2394,18 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
slot is still unallocated, in which case we should place the
top of stack there. */
if (topsrc != -1)
- for (reg = 0; reg < new->top; reg++)
+ for (reg = 0; reg < fresh->top; reg++)
if (!slots[reg])
{
pops[topsrc] = reg;
- slots[new->top] = false;
+ slots[fresh->top] = false;
slots[reg] = true;
break;
}
/* Third pass allocates remaining slots and emits pop insns. */
- next = new->top;
- for (reg = old->top; reg > new->top; reg--)
+ next = fresh->top;
+ for (reg = old->top; reg > fresh->top; reg--)
{
dest = pops[reg];
if (dest == -1)
@@ -2428,14 +2428,14 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
live = 0;
for (reg = 0; reg <= old->top; reg++)
- if (TEST_HARD_REG_BIT (new->reg_set, old->reg[reg]))
+ if (TEST_HARD_REG_BIT (fresh->reg_set, old->reg[reg]))
live++;
next = live;
while (old->top >= live)
- if (TEST_HARD_REG_BIT (new->reg_set, old->reg[old->top]))
+ if (TEST_HARD_REG_BIT (fresh->reg_set, old->reg[old->top]))
{
- while (TEST_HARD_REG_BIT (new->reg_set, old->reg[next]))
+ while (TEST_HARD_REG_BIT (fresh->reg_set, old->reg[next]))
next--;
emit_pop_insn (insn, old, FP_MODE_REG (old->reg[next], DFmode),
EMIT_BEFORE);
@@ -2445,13 +2445,13 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
EMIT_BEFORE);
}
- if (new->top == -2)
+ if (fresh->top == -2)
{
/* If the new block has never been processed, then it can inherit
the old stack order. */
- new->top = old->top;
- memcpy (new->reg, old->reg, sizeof (new->reg));
+ fresh->top = old->top;
+ memcpy (fresh->reg, old->reg, sizeof (fresh->reg));
}
else
{
@@ -2461,12 +2461,12 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
/* By now, the only difference should be the order of the stack,
not their depth or liveliness. */
- GO_IF_HARD_REG_EQUAL (old->reg_set, new->reg_set, win);
+ GO_IF_HARD_REG_EQUAL (old->reg_set, fresh->reg_set, win);
gcc_unreachable ();
win:
- gcc_assert (old->top == new->top);
+ gcc_assert (old->top == fresh->top);
- /* If the stack is not empty (new->top != -1), loop here emitting
+ /* If the stack is not empty (fresh->top != -1), loop here emitting
swaps until the stack is correct.
The worst case number of swaps emitted is N + 2, where N is the
@@ -2475,16 +2475,16 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
other regs. But since we never swap any other reg away from
its correct slot, this algorithm will converge. */
- if (new->top != -1)
+ if (fresh->top != -1)
do
{
/* Swap the reg at top of stack into the position it is
supposed to be in, until the correct top of stack appears. */
- while (old->reg[old->top] != new->reg[new->top])
+ while (old->reg[old->top] != fresh->reg[fresh->top])
{
- for (reg = new->top; reg >= 0; reg--)
- if (new->reg[reg] == old->reg[old->top])
+ for (reg = fresh->top; reg >= 0; reg--)
+ if (fresh->reg[reg] == old->reg[old->top])
break;
gcc_assert (reg != -1);
@@ -2497,8 +2497,8 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
incorrect reg to the top of stack, and let the while loop
above fix it. */
- for (reg = new->top; reg >= 0; reg--)
- if (new->reg[reg] != old->reg[reg])
+ for (reg = fresh->top; reg >= 0; reg--)
+ if (fresh->reg[reg] != old->reg[reg])
{
emit_swap_insn (insn, old,
FP_MODE_REG (old->reg[reg], DFmode));
@@ -2509,7 +2509,7 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
/* At this point there must be no differences. */
for (reg = old->top; reg >= 0; reg--)
- gcc_assert (old->reg[reg] == new->reg[reg]);
+ gcc_assert (old->reg[reg] == fresh->reg[reg]);
}
if (update_end)
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 8a0bab19026..d79eb3db886 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -476,10 +476,10 @@ init_reg_sets_1 (void)
memset (contains_reg_of_mode, 0, sizeof (contains_reg_of_mode));
for (m = 0; m < (unsigned int) MAX_MACHINE_MODE; m++)
for (i = 0; i < N_REG_CLASSES; i++)
- if ((unsigned) CLASS_MAX_NREGS (i, m) <= reg_class_size[i])
+ if ((unsigned) CLASS_MAX_NREGS ((enum reg_class) i, (enum machine_mode) m) <= reg_class_size[i])
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
if (!fixed_regs [j] && TEST_HARD_REG_BIT (reg_class_contents[i], j)
- && HARD_REGNO_MODE_OK (j, m))
+ && HARD_REGNO_MODE_OK (j, (enum machine_mode) m))
{
contains_reg_of_mode [i][m] = 1;
have_regs_of_mode [m] = 1;
@@ -507,7 +507,7 @@ init_reg_sets_1 (void)
}
else
{
- cost = REGISTER_MOVE_COST (m, i, j);
+ cost = REGISTER_MOVE_COST ((enum machine_mode) m, (enum reg_class) i, (enum reg_class) j);
for (p2 = &reg_class_subclasses[j][0];
*p2 != LIM_REG_CLASSES;
@@ -523,12 +523,12 @@ init_reg_sets_1 (void)
move_cost[m][i][j] = cost;
- if (reg_class_subset_p (i, j))
+ if (reg_class_subset_p ((enum reg_class) i, (enum reg_class) j))
may_move_in_cost[m][i][j] = 0;
else
may_move_in_cost[m][i][j] = cost;
- if (reg_class_subset_p (j, i))
+ if (reg_class_subset_p ((enum reg_class) j, (enum reg_class) i))
may_move_out_cost[m][i][j] = 0;
else
may_move_out_cost[m][i][j] = cost;
@@ -594,7 +594,7 @@ init_fake_stack_mems (void)
int i;
for (i = 0; i < MAX_MACHINE_MODE; i++)
- top_of_stack[i] = gen_rtx_MEM (i, stack_pointer_rtx);
+ top_of_stack[i] = gen_rtx_MEM ((enum machine_mode) i, stack_pointer_rtx);
}
}
@@ -603,7 +603,7 @@ init_fake_stack_mems (void)
Only needed if secondary reloads are required for memory moves. */
int
-memory_move_secondary_cost (enum machine_mode mode, enum reg_class class, int in)
+memory_move_secondary_cost (enum machine_mode mode, enum reg_class kind, int in)
{
enum reg_class altclass;
int partial_cost = 0;
@@ -612,17 +612,17 @@ memory_move_secondary_cost (enum machine_mode mode, enum reg_class class, int in
rtx mem ATTRIBUTE_UNUSED = top_of_stack[(int) mode];
- altclass = secondary_reload_class (in ? 1 : 0, class, mode, mem);
+ altclass = secondary_reload_class (in ? 1 : 0, kind, mode, mem);
if (altclass == NO_REGS)
return 0;
if (in)
- partial_cost = REGISTER_MOVE_COST (mode, altclass, class);
+ partial_cost = REGISTER_MOVE_COST (mode, altclass, kind);
else
- partial_cost = REGISTER_MOVE_COST (mode, class, altclass);
+ partial_cost = REGISTER_MOVE_COST (mode, kind, altclass);
- if (class == altclass)
+ if (kind == altclass)
/* This isn't simply a copy-to-temporary situation. Can't guess
what it is, so MEMORY_MOVE_COST really ought not to be calling
here in that case.
@@ -931,23 +931,23 @@ dump_regclass (FILE *dump)
int i;
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
{
- int /* enum reg_class */ class;
+ int /* enum reg_class */ kind;
if (REG_N_REFS (i))
{
fprintf (dump, " Register %i costs:", i);
- for (class = 0; class < (int) N_REG_CLASSES; class++)
- if (contains_reg_of_mode [(enum reg_class) class][PSEUDO_REGNO_MODE (i)]
+ for (kind = 0; kind < N_REG_CLASSES; kind++)
+ if (contains_reg_of_mode [kind][PSEUDO_REGNO_MODE (i)]
#ifdef FORBIDDEN_INC_DEC_CLASSES
&& (!in_inc_dec[i]
- || !forbidden_inc_dec_class[(enum reg_class) class])
+ || !forbidden_inc_dec_class[kind])
#endif
#ifdef CANNOT_CHANGE_MODE_CLASS
- && ! invalid_mode_change_p (i, (enum reg_class) class,
+ && ! invalid_mode_change_p (i, (enum reg_class) kind,
PSEUDO_REGNO_MODE (i))
#endif
)
- fprintf (dump, " %s:%i", reg_class_names[class],
- costs[i].cost[(enum reg_class) class]);
+ fprintf (dump, " %s:%i", reg_class_names[kind],
+ costs[i].cost[kind]);
fprintf (dump, " MEM:%i\n", costs[i].mem_cost);
}
}
@@ -1284,7 +1284,7 @@ regclass (rtx f, int nregs)
enum reg_class best = ALL_REGS, alt = NO_REGS;
/* This is an enum reg_class, but we call it an int
to save lots of casts. */
- int class;
+ int kind;
struct costs *p = &costs[i];
/* In non-optimizing compilation REG_N_REFS is not initialized
@@ -1292,27 +1292,27 @@ regclass (rtx f, int nregs)
if (optimize && !REG_N_REFS (i) && !REG_N_SETS (i))
continue;
- for (class = (int) ALL_REGS - 1; class > 0; class--)
+ for (kind = ALL_REGS - 1; kind > 0; kind--)
{
/* Ignore classes that are too small for this operand or
invalid for an operand that was auto-incremented. */
- if (!contains_reg_of_mode [class][PSEUDO_REGNO_MODE (i)]
+ if (!contains_reg_of_mode [kind][PSEUDO_REGNO_MODE (i)]
#ifdef FORBIDDEN_INC_DEC_CLASSES
- || (in_inc_dec[i] && forbidden_inc_dec_class[class])
+ || (in_inc_dec[i] && forbidden_inc_dec_class[kind])
#endif
#ifdef CANNOT_CHANGE_MODE_CLASS
- || invalid_mode_change_p (i, (enum reg_class) class,
+ || invalid_mode_change_p (i, (enum reg_class) kind,
PSEUDO_REGNO_MODE (i))
#endif
)
;
- else if (p->cost[class] < best_cost)
+ else if (p->cost[kind] < best_cost)
{
- best_cost = p->cost[class];
- best = (enum reg_class) class;
+ best_cost = p->cost[kind];
+ best = (enum reg_class) kind;
}
- else if (p->cost[class] == best_cost)
- best = reg_class_subunion[(int) best][class];
+ else if (p->cost[kind] == best_cost)
+ best = reg_class_subunion[best][kind];
}
/* If no register class is better than memory, use memory. */
@@ -1327,19 +1327,19 @@ regclass (rtx f, int nregs)
will be doing it again later. */
if ((pass == 1 || dump_file) || ! flag_expensive_optimizations)
- for (class = 0; class < N_REG_CLASSES; class++)
- if (p->cost[class] < p->mem_cost
- && (reg_class_size[(int) reg_class_subunion[(int) alt][class]]
+ for (kind = 0; kind < N_REG_CLASSES; kind++)
+ if (p->cost[kind] < p->mem_cost
+ && (reg_class_size[(int) reg_class_subunion[alt][kind]]
> reg_class_size[(int) alt])
#ifdef FORBIDDEN_INC_DEC_CLASSES
- && ! (in_inc_dec[i] && forbidden_inc_dec_class[class])
+ && ! (in_inc_dec[i] && forbidden_inc_dec_class[kind])
#endif
#ifdef CANNOT_CHANGE_MODE_CLASS
- && ! invalid_mode_change_p (i, (enum reg_class) class,
+ && ! invalid_mode_change_p (i, (enum reg_class) kind,
PSEUDO_REGNO_MODE (i))
#endif
)
- alt = reg_class_subunion[(int) alt][class];
+ alt = reg_class_subunion[(int) alt][kind];
/* If we don't add any classes, nothing to try. */
if (alt == best)
@@ -1416,7 +1416,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
int alt_cost = 0;
enum reg_class classes[MAX_RECOG_OPERANDS];
int allows_mem[MAX_RECOG_OPERANDS];
- int class;
+ int kind;
for (i = 0; i < n_ops; i++)
{
@@ -1503,13 +1503,13 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
struct costs *pp = &this_op_costs[i];
- for (class = 0; class < N_REG_CLASSES; class++)
- pp->cost[class]
+ for (kind = 0; kind < N_REG_CLASSES; kind++)
+ pp->cost[kind]
= ((recog_data.operand_type[i] != OP_OUT
- ? may_move_in_cost[mode][class][(int) classes[i]]
+ ? may_move_in_cost[mode][kind][classes[i]]
: 0)
+ (recog_data.operand_type[i] != OP_IN
- ? may_move_out_cost[mode][(int) classes[i]][class]
+ ? may_move_out_cost[mode][classes[i]][kind]
: 0));
/* If the alternative actually allows memory, make things
@@ -1729,13 +1729,13 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
{
struct costs *pp = &this_op_costs[i];
- for (class = 0; class < N_REG_CLASSES; class++)
- pp->cost[class]
+ for (kind = 0; kind < N_REG_CLASSES; kind++)
+ pp->cost[kind]
= ((recog_data.operand_type[i] != OP_OUT
- ? may_move_in_cost[mode][class][(int) classes[i]]
+ ? may_move_in_cost[mode][kind][classes[i]]
: 0)
+ (recog_data.operand_type[i] != OP_IN
- ? may_move_out_cost[mode][(int) classes[i]][class]
+ ? may_move_out_cost[mode][classes[i]][kind]
: 0));
/* If the alternative actually allows memory, make things
@@ -1809,9 +1809,9 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
pp->mem_cost = MIN (pp->mem_cost,
(qq->mem_cost + alt_cost) * scale);
- for (class = 0; class < N_REG_CLASSES; class++)
- pp->cost[class] = MIN (pp->cost[class],
- (qq->cost[class] + alt_cost) * scale);
+ for (kind = 0; kind < N_REG_CLASSES; kind++)
+ pp->cost[kind] = MIN (pp->cost[kind],
+ (qq->cost[kind] + alt_cost) * scale);
}
}
@@ -1838,13 +1838,13 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
{
unsigned int regno = REGNO (ops[!i]);
enum machine_mode mode = GET_MODE (ops[!i]);
- int class;
+ int kind;
unsigned int nr;
if (regno >= FIRST_PSEUDO_REGISTER && reg_pref != 0
&& reg_pref[regno].prefclass != NO_REGS)
{
- enum reg_class pref = reg_pref[regno].prefclass;
+ enum reg_class pref = (enum reg_class) reg_pref[regno].prefclass;
if ((reg_class_size[(unsigned char) pref]
== (unsigned) CLASS_MAX_NREGS (pref, mode))
@@ -1852,23 +1852,23 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
op_costs[i].cost[(unsigned char) pref] = -1;
}
else if (regno < FIRST_PSEUDO_REGISTER)
- for (class = 0; class < N_REG_CLASSES; class++)
- if (TEST_HARD_REG_BIT (reg_class_contents[class], regno)
- && reg_class_size[class] == (unsigned) CLASS_MAX_NREGS (class, mode))
+ for (kind = 0; kind < N_REG_CLASSES; kind++)
+ if (TEST_HARD_REG_BIT (reg_class_contents[kind], regno)
+ && reg_class_size[kind] == (unsigned) CLASS_MAX_NREGS ((enum reg_class) kind, mode))
{
- if (reg_class_size[class] == 1)
- op_costs[i].cost[class] = -1;
+ if (reg_class_size[kind] == 1)
+ op_costs[i].cost[kind] = -1;
else
{
for (nr = 0; nr < (unsigned) hard_regno_nregs[regno][mode]; nr++)
{
- if (! TEST_HARD_REG_BIT (reg_class_contents[class],
+ if (! TEST_HARD_REG_BIT (reg_class_contents[kind],
regno + nr))
break;
}
if (nr == (unsigned) hard_regno_nregs[regno][mode])
- op_costs[i].cost[class] = -1;
+ op_costs[i].cost[kind] = -1;
}
}
}
@@ -1880,7 +1880,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
X must not be a pseudo. */
static int
-copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p,
+copy_cost (rtx x, enum machine_mode mode, enum reg_class kind, int to_p,
secondary_reload_info *prev_sri)
{
enum reg_class secondary_class = NO_REGS;
@@ -1893,7 +1893,7 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p,
return 0;
/* Get the class we will actually use for a reload. */
- class = PREFERRED_RELOAD_CLASS (x, class);
+ kind = PREFERRED_RELOAD_CLASS (x, kind);
/* If we need a secondary reload for an intermediate, the
cost is that to load the input into the intermediate register, then
@@ -1901,10 +1901,10 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p,
sri.prev_sri = prev_sri;
sri.extra_cost = 0;
- secondary_class = targetm.secondary_reload (to_p, x, class, mode, &sri);
+ secondary_class = targetm.secondary_reload (to_p, x, kind, mode, &sri);
if (secondary_class != NO_REGS)
- return (move_cost[mode][(int) secondary_class][(int) class]
+ return (move_cost[mode][secondary_class][kind]
+ sri.extra_cost
+ copy_cost (x, mode, secondary_class, to_p, &sri));
@@ -1912,12 +1912,12 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p,
cost to move between the register classes, and use 2 for everything
else (constants). */
- if (MEM_P (x) || class == NO_REGS)
- return sri.extra_cost + MEMORY_MOVE_COST (mode, class, to_p);
+ if (MEM_P (x) || kind == NO_REGS)
+ return sri.extra_cost + MEMORY_MOVE_COST (mode, kind, to_p);
else if (REG_P (x))
return (sri.extra_cost
- + move_cost[mode][(int) REGNO_REG_CLASS (REGNO (x))][(int) class]);
+ + move_cost[mode][REGNO_REG_CLASS (REGNO (x))][kind]);
else
/* If this is a constant, we may eventually want to call rtx_cost here. */
@@ -1943,12 +1943,12 @@ record_address_regs (enum machine_mode mode, rtx x, int context,
int scale)
{
enum rtx_code code = GET_CODE (x);
- enum reg_class class;
+ enum reg_class cls;
if (context == 1)
- class = INDEX_REG_CLASS;
+ cls = INDEX_REG_CLASS;
else
- class = base_reg_class (mode, outer_code, index_code);
+ cls = base_reg_class (mode, outer_code, index_code);
switch (code)
{
@@ -2101,10 +2101,10 @@ record_address_regs (enum machine_mode mode, rtx x, int context,
struct costs *pp = &costs[REGNO (x)];
int i;
- pp->mem_cost += (MEMORY_MOVE_COST (Pmode, class, 1) * scale) / 2;
+ pp->mem_cost += (MEMORY_MOVE_COST (Pmode, cls, 1) * scale) / 2;
for (i = 0; i < N_REG_CLASSES; i++)
- pp->cost[i] += (may_move_in_cost[Pmode][i][(int) class] * scale) / 2;
+ pp->cost[i] += (may_move_in_cost[Pmode][i][cls] * scale) / 2;
}
break;
@@ -2180,7 +2180,7 @@ allocate_reg_info (size_t num_regs, int new_p, int renumber_p)
VEC_safe_grow (reg_info_p, heap, reg_n_info, regno_allocated);
memset (VEC_address (reg_info_p, reg_n_info), 0,
sizeof (reg_info_p) * regno_allocated);
- renumber = xmalloc (size_renumber);
+ renumber = (short *) xmalloc (size_renumber);
reg_pref_buffer = XNEWVEC (struct reg_pref, regno_allocated);
}
else
@@ -2203,13 +2203,13 @@ allocate_reg_info (size_t num_regs, int new_p, int renumber_p)
{
free ((char *) renumber);
free ((char *) reg_pref);
- renumber = xmalloc (size_renumber);
+ renumber = (short *) xmalloc (size_renumber);
reg_pref_buffer = XNEWVEC (struct reg_pref, regno_allocated);
}
else
{
- renumber = xrealloc (renumber, size_renumber);
+ renumber = (short *) xrealloc (renumber, size_renumber);
reg_pref_buffer = (struct reg_pref *) xrealloc (reg_pref_buffer,
regno_allocated
* sizeof (struct reg_pref));
@@ -2218,7 +2218,7 @@ allocate_reg_info (size_t num_regs, int new_p, int renumber_p)
size_info = (regno_allocated - old_allocated) * sizeof (reg_info)
+ sizeof (struct reg_info_data) - sizeof (reg_info);
- reg_data = xcalloc (size_info, 1);
+ reg_data = (struct reg_info_data *) xcalloc (1, size_info);
reg_data->min_index = old_allocated;
reg_data->max_index = regno_allocated - 1;
reg_data->next = reg_info_head;
@@ -2568,15 +2568,15 @@ static htab_t subregs_of_mode;
static hashval_t
som_hash (const void *x)
{
- const struct subregs_of_mode_node *a = x;
+ const struct subregs_of_mode_node *a = (const struct subregs_of_mode_node *) x;
return a->block;
}
static int
som_eq (const void *x, const void *y)
{
- const struct subregs_of_mode_node *a = x;
- const struct subregs_of_mode_node *b = y;
+ const struct subregs_of_mode_node *a = (const struct subregs_of_mode_node *) x;
+ const struct subregs_of_mode_node *b = (const struct subregs_of_mode_node *) y;
return a->block == b->block;
}
@@ -2609,7 +2609,7 @@ record_subregs_of_mode (rtx subreg)
dummy.block = regno & -8;
slot = htab_find_slot_with_hash (subregs_of_mode, &dummy,
dummy.block, INSERT);
- node = *slot;
+ node = (struct subregs_of_mode_node *) *slot;
if (node == NULL)
{
node = XCNEW (struct subregs_of_mode_node);
@@ -2628,12 +2628,12 @@ cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from,
unsigned int regno)
{
struct subregs_of_mode_node dummy, *node;
- enum machine_mode to;
+ int to;
unsigned char mask;
unsigned int i;
dummy.block = regno & -8;
- node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
+ node = (struct subregs_of_mode_node *) htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
if (node == NULL)
return;
@@ -2642,7 +2642,7 @@ cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from,
if (node->modes[to] & mask)
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (!TEST_HARD_REG_BIT (*used, i)
- && REG_CANNOT_CHANGE_MODE_P (i, from, to))
+ && REG_CANNOT_CHANGE_MODE_P (i, (enum machine_mode) from, (enum machine_mode) to))
SET_HARD_REG_BIT (*used, i);
}
@@ -2650,22 +2650,22 @@ cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from,
mode. */
bool
-invalid_mode_change_p (unsigned int regno, enum reg_class class,
+invalid_mode_change_p (unsigned int regno, enum reg_class kind,
enum machine_mode from)
{
struct subregs_of_mode_node dummy, *node;
- enum machine_mode to;
+ int to;
unsigned char mask;
dummy.block = regno & -8;
- node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
+ node = (struct subregs_of_mode_node *) htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
if (node == NULL)
return false;
mask = 1 << (regno & 7);
for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
if (node->modes[to] & mask)
- if (CANNOT_CHANGE_MODE_CLASS (from, to, class))
+ if (CANNOT_CHANGE_MODE_CLASS (from, (enum machine_mode) to, kind))
return true;
return false;
diff --git a/gcc/regmove.c b/gcc/regmove.c
index 84c811a1d64..119e3635c5e 100644
--- a/gcc/regmove.c
+++ b/gcc/regmove.c
@@ -62,9 +62,11 @@ static void optimize_reg_copy_3 (rtx, rtx, rtx);
static void copy_src_to_dest (rtx, rtx, rtx, int);
static int *regmove_bb_head;
+enum match_use { READ, WRITE, READWRITE };
+
struct match {
int with[MAX_RECOG_OPERANDS];
- enum { READ, WRITE, READWRITE } use[MAX_RECOG_OPERANDS];
+ enum match_use use[MAX_RECOG_OPERANDS];
int commutative[MAX_RECOG_OPERANDS];
int early_clobber[MAX_RECOG_OPERANDS];
};
@@ -78,14 +80,13 @@ static int find_matches (rtx, struct match *);
static void replace_in_call_usage (rtx *, unsigned int, rtx, rtx);
static int fixup_match_1 (rtx, rtx, rtx, rtx, rtx, int, int, int);
static int stable_and_no_regs_but_for_p (rtx, rtx, rtx);
-static int regclass_compatible_p (int, int);
static int replacement_quality (rtx);
static int fixup_match_2 (rtx, rtx, rtx, rtx);
/* Return nonzero if registers with CLASS1 and CLASS2 can be merged without
causing too much register allocation problems. */
static int
-regclass_compatible_p (int class0, int class1)
+regclass_compatible_p (enum reg_class class0, enum reg_class class1)
{
return (class0 == class1
|| (reg_class_subset_p (class0, class1)
@@ -141,7 +142,7 @@ try_auto_increment (rtx insn, rtx inc_insn, rtx inc_insn_set, rtx reg,
changed. */
rtx note = find_reg_note (insn, REG_DEAD, reg);
if (note)
- PUT_MODE (note, REG_UNUSED);
+ PUT_MODE (note, (enum machine_mode) REG_UNUSED);
REG_NOTES (insn)
= gen_rtx_EXPR_LIST (REG_INC,
@@ -867,7 +868,7 @@ reg_is_remote_constant_p (rtx reg, rtx insn)
if (!reg_set_in_bb)
{
max_reg_computed = max = max_reg_num ();
- reg_set_in_bb = xcalloc (max, sizeof (*reg_set_in_bb));
+ reg_set_in_bb = XCNEWVEC(basic_block, max);
FOR_EACH_BB (bb)
for (p = BB_HEAD (bb); p != NEXT_INSN (BB_END (bb));
@@ -1505,12 +1506,12 @@ regmove_optimize (rtx f, int nregs)
FOR_EACH_BB (bb)
{
rtx end = BB_END (bb);
- rtx new = end;
- rtx next = NEXT_INSN (new);
+ rtx fresh = (rtx) end;
+ rtx next = NEXT_INSN (fresh);
while (next != 0 && INSN_UID (next) >= old_max_uid
&& (bb->next_bb == EXIT_BLOCK_PTR || BB_HEAD (bb->next_bb) != next))
- new = next, next = NEXT_INSN (new);
- BB_END (bb) = new;
+ fresh = next, next = NEXT_INSN (fresh);
+ BB_END (bb) = fresh;
}
done:
@@ -2177,14 +2178,14 @@ single_set_for_csa (rtx insn)
for (i = 1; i < XVECLEN (tmp, 0); ++i)
{
- rtx this = XVECEXP (tmp, 0, i);
+ rtx it = XVECEXP (tmp, 0, i);
/* The special case is allowing a no-op set. */
- if (GET_CODE (this) == SET
- && SET_SRC (this) == SET_DEST (this))
+ if (GET_CODE (it) == SET
+ && SET_SRC (it) == SET_DEST (it))
;
- else if (GET_CODE (this) != CLOBBER
- && GET_CODE (this) != USE)
+ else if (GET_CODE (it) != CLOBBER
+ && GET_CODE (it) != USE)
return NULL_RTX;
}
diff --git a/gcc/regrename.c b/gcc/regrename.c
index c55f9c4baeb..62bc32e8494 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -89,7 +89,6 @@ static void scan_rtx (rtx, rtx *, enum reg_class, enum scan_actions,
static struct du_chain *build_def_use (basic_block);
static void dump_def_use_chain (struct du_chain *);
static void note_sets (rtx, rtx, void *);
-static void clear_dead_regs (HARD_REG_SET *, enum machine_mode, rtx);
static void merge_overlapping_regs (basic_block, HARD_REG_SET *,
struct du_chain *);
@@ -121,7 +120,7 @@ note_sets (rtx x, rtx set ATTRIBUTE_UNUSED, void *data)
in the list NOTES. */
static void
-clear_dead_regs (HARD_REG_SET *pset, enum machine_mode kind, rtx notes)
+clear_dead_regs (HARD_REG_SET *pset, enum reg_note kind, rtx notes)
{
rtx note;
for (note = notes; note; note = XEXP (note, 1))
@@ -196,7 +195,7 @@ regrename_optimize (void)
memset (tick, 0, sizeof tick);
gcc_obstack_init (&rename_obstack);
- first_obj = obstack_alloc (&rename_obstack, 0);
+ first_obj = (char *) obstack_alloc (&rename_obstack, 0);
FOR_EACH_BB (bb)
{
@@ -234,13 +233,13 @@ regrename_optimize (void)
{
int new_reg, best_new_reg;
int n_uses;
- struct du_chain *this = all_chains;
+ struct du_chain *it = all_chains;
struct du_chain *tmp, *last;
HARD_REG_SET this_unavailable;
- int reg = REGNO (*this->loc);
+ int reg = REGNO (*it->loc);
int i;
- all_chains = this->next_chain;
+ all_chains = it->next_chain;
best_new_reg = reg;
@@ -268,7 +267,7 @@ regrename_optimize (void)
count number of uses, and narrow the set of registers we can
use for renaming. */
n_uses = 0;
- for (last = this; last->next_use; last = last->next_use)
+ for (last = it; last->next_use; last = last->next_use)
{
n_uses++;
IOR_COMPL_HARD_REG_SET (this_unavailable,
@@ -280,16 +279,16 @@ regrename_optimize (void)
IOR_COMPL_HARD_REG_SET (this_unavailable,
reg_class_contents[last->cl]);
- if (this->need_caller_save_reg)
+ if (it->need_caller_save_reg)
IOR_HARD_REG_SET (this_unavailable, call_used_reg_set);
- merge_overlapping_regs (bb, &this_unavailable, this);
+ merge_overlapping_regs (bb, &this_unavailable, it);
/* Now potential_regs is a reasonable approximation, let's
have a closer look at each register still in there. */
for (new_reg = 0; new_reg < FIRST_PSEUDO_REGISTER; new_reg++)
{
- int nregs = hard_regno_nregs[new_reg][GET_MODE (*this->loc)];
+ int nregs = hard_regno_nregs[new_reg][GET_MODE (*it->loc)];
for (i = nregs - 1; i >= 0; --i)
if (TEST_HARD_REG_BIT (this_unavailable, new_reg + i)
@@ -314,7 +313,7 @@ regrename_optimize (void)
/* See whether it accepts all modes that occur in
definition and uses. */
- for (tmp = this; tmp; tmp = tmp->next_use)
+ for (tmp = it; tmp; tmp = tmp->next_use)
if (! HARD_REGNO_MODE_OK (new_reg, GET_MODE (*tmp->loc))
|| (tmp->need_caller_save_reg
&& ! (HARD_REGNO_CALL_PART_CLOBBERED
@@ -345,7 +344,7 @@ regrename_optimize (void)
continue;
}
- do_replace (this, best_new_reg);
+ do_replace (it, best_new_reg);
tick[best_new_reg] = ++this_tick;
regs_ever_live[best_new_reg] = 1;
@@ -400,16 +399,16 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
{
if (type == OP_OUT)
{
- struct du_chain *this
- = obstack_alloc (&rename_obstack, sizeof (struct du_chain));
- this->next_use = 0;
- this->next_chain = open_chains;
- this->loc = loc;
- this->insn = insn;
- this->cl = cl;
- this->need_caller_save_reg = 0;
- this->earlyclobber = earlyclobber;
- open_chains = this;
+ struct du_chain *it
+ = (struct du_chain *) obstack_alloc (&rename_obstack, sizeof (struct du_chain));
+ it->next_use = 0;
+ it->next_chain = open_chains;
+ it->loc = loc;
+ it->insn = insn;
+ it->cl = cl;
+ it->need_caller_save_reg = 0;
+ it->earlyclobber = earlyclobber;
+ open_chains = it;
}
return;
}
@@ -419,7 +418,7 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
for (p = &open_chains; *p;)
{
- struct du_chain *this = *p;
+ struct du_chain *it = *p;
/* Check if the chain has been terminated if it has then skip to
the next chain.
@@ -428,18 +427,18 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
the chain in Step 3, but are trying to hide in-out operands
from terminate_write in Step 5. */
- if (*this->loc == cc0_rtx)
- p = &this->next_chain;
+ if (*it->loc == cc0_rtx)
+ p = &it->next_chain;
else
{
- int regno = REGNO (*this->loc);
- int nregs = hard_regno_nregs[regno][GET_MODE (*this->loc)];
+ int regno = REGNO (*it->loc);
+ int nregs = hard_regno_nregs[regno][GET_MODE (*it->loc)];
int exact_match = (regno == this_regno && nregs == this_nregs);
if (regno + nregs <= this_regno
|| this_regno + this_nregs <= regno)
{
- p = &this->next_chain;
+ p = &it->next_chain;
continue;
}
@@ -453,23 +452,23 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
be replaced with, terminate the chain. */
if (cl != NO_REGS)
{
- this = obstack_alloc (&rename_obstack, sizeof (struct du_chain));
- this->next_use = 0;
- this->next_chain = (*p)->next_chain;
- this->loc = loc;
- this->insn = insn;
- this->cl = cl;
- this->need_caller_save_reg = 0;
+ struct du_chain *it = (struct du_chain *) obstack_alloc (&rename_obstack, sizeof (struct du_chain));
+ it->next_use = 0;
+ it->next_chain = (*p)->next_chain;
+ it->loc = loc;
+ it->insn = insn;
+ it->cl = cl;
+ it->need_caller_save_reg = 0;
while (*p)
p = &(*p)->next_use;
- *p = this;
+ *p = it;
return;
}
}
if (action != terminate_overlapping_read || ! exact_match)
{
- struct du_chain *next = this->next_chain;
+ struct du_chain *next = it->next_chain;
/* Whether the terminated chain can be used for renaming
depends on the action and this being an exact match.
@@ -478,12 +477,12 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
if ((action == terminate_dead || action == terminate_write)
&& exact_match)
{
- this->next_chain = closed_chains;
- closed_chains = this;
+ it->next_chain = closed_chains;
+ closed_chains = it;
if (dump_file)
fprintf (dump_file,
"Closing chain %s at insn %d (%s)\n",
- reg_names[REGNO (*this->loc)], INSN_UID (insn),
+ reg_names[REGNO (*it->loc)], INSN_UID (insn),
scan_actions_name[(int) action]);
}
else
@@ -491,13 +490,13 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
if (dump_file)
fprintf (dump_file,
"Discarding chain %s at insn %d (%s)\n",
- reg_names[REGNO (*this->loc)], INSN_UID (insn),
+ reg_names[REGNO (*it->loc)], INSN_UID (insn),
scan_actions_name[(int) action]);
}
*p = next;
}
else
- p = &this->next_chain;
+ p = &it->next_chain;
}
}
}
@@ -998,15 +997,15 @@ dump_def_use_chain (struct du_chain *chains)
{
while (chains)
{
- struct du_chain *this = chains;
- int r = REGNO (*this->loc);
- int nregs = hard_regno_nregs[r][GET_MODE (*this->loc)];
+ struct du_chain *it = chains;
+ int r = REGNO (*it->loc);
+ int nregs = hard_regno_nregs[r][GET_MODE (*it->loc)];
fprintf (dump_file, "Register %s (%d):", reg_names[r], nregs);
- while (this)
+ while (it)
{
- fprintf (dump_file, " %d [%s]", INSN_UID (this->insn),
- reg_class_names[this->cl]);
- this = this->next_use;
+ fprintf (dump_file, " %d [%s]", INSN_UID (it->insn),
+ reg_class_names[it->cl]);
+ it = it->next_use;
}
fprintf (dump_file, "\n");
chains = chains->next_chain;
@@ -1186,7 +1185,7 @@ init_value_data (struct value_data *vd)
static void
kill_clobbered_value (rtx x, rtx set, void *data)
{
- struct value_data *vd = data;
+ struct value_data *vd = (struct value_data *) data;
if (GET_CODE (set) == CLOBBER)
kill_value (x, vd);
}
@@ -1197,7 +1196,7 @@ kill_clobbered_value (rtx x, rtx set, void *data)
static void
kill_set_value (rtx x, rtx set, void *data)
{
- struct value_data *vd = data;
+ struct value_data *vd = (struct value_data *) data;
if (GET_CODE (set) != CLOBBER)
{
kill_value (x, vd);
@@ -1214,7 +1213,7 @@ static int
kill_autoinc_value (rtx *px, void *data)
{
rtx x = *px;
- struct value_data *vd = data;
+ struct value_data *vd = (struct value_data *) data;
if (GET_RTX_CLASS (GET_CODE (x)) == RTX_AUTOINC)
{
@@ -1387,19 +1386,19 @@ find_oldest_value_reg (enum reg_class cl, rtx reg, struct value_data *vd)
for (i = vd->e[regno].oldest_regno; i != regno; i = vd->e[i].next_regno)
{
enum machine_mode oldmode = vd->e[i].mode;
- rtx new;
+ rtx n;
unsigned int last;
for (last = i; last < i + hard_regno_nregs[i][mode]; last++)
if (!TEST_HARD_REG_BIT (reg_class_contents[cl], last))
return NULL_RTX;
- new = maybe_mode_change (oldmode, vd->e[regno].mode, mode, i, regno);
- if (new)
+ n = maybe_mode_change (oldmode, vd->e[regno].mode, mode, i, regno);
+ if (n)
{
- ORIGINAL_REGNO (new) = ORIGINAL_REGNO (reg);
- REG_ATTRS (new) = REG_ATTRS (reg);
- return new;
+ ORIGINAL_REGNO (n) = ORIGINAL_REGNO (reg);
+ REG_ATTRS (n) = REG_ATTRS (reg);
+ return n;
}
}
@@ -1413,14 +1412,14 @@ static bool
replace_oldest_value_reg (rtx *loc, enum reg_class cl, rtx insn,
struct value_data *vd)
{
- rtx new = find_oldest_value_reg (cl, *loc, vd);
- if (new)
+ rtx n = find_oldest_value_reg (cl, *loc, vd);
+ if (n)
{
if (dump_file)
fprintf (dump_file, "insn %u: replaced reg %u with %u\n",
- INSN_UID (insn), REGNO (*loc), REGNO (new));
+ INSN_UID (insn), REGNO (*loc), REGNO (n));
- validate_change (insn, loc, new, 1);
+ validate_change (insn, loc, n, 1);
return true;
}
return false;
@@ -1659,7 +1658,7 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
unsigned int regno = REGNO (src);
enum machine_mode mode = GET_MODE (src);
unsigned int i;
- rtx new;
+ rtx n;
/* If we are accessing SRC in some mode other that what we
set it in, make sure that the replacement is valid. */
@@ -1674,13 +1673,13 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
register in the same class. */
if (REG_P (SET_DEST (set)))
{
- new = find_oldest_value_reg (REGNO_REG_CLASS (regno), src, vd);
- if (new && validate_change (insn, &SET_SRC (set), new, 0))
+ n = find_oldest_value_reg (REGNO_REG_CLASS (regno), src, vd);
+ if (n && validate_change (insn, &SET_SRC (set), n, 0))
{
if (dump_file)
fprintf (dump_file,
"insn %u: replaced reg %u with %u\n",
- INSN_UID (insn), regno, REGNO (new));
+ INSN_UID (insn), regno, REGNO (n));
changed = true;
goto did_replacement;
}
@@ -1690,18 +1689,18 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
for (i = vd->e[regno].oldest_regno; i != regno;
i = vd->e[i].next_regno)
{
- new = maybe_mode_change (vd->e[i].mode, vd->e[regno].mode,
+ n = maybe_mode_change (vd->e[i].mode, vd->e[regno].mode,
mode, i, regno);
- if (new != NULL_RTX)
+ if (n != NULL_RTX)
{
- if (validate_change (insn, &SET_SRC (set), new, 0))
+ if (validate_change (insn, &SET_SRC (set), n, 0))
{
- ORIGINAL_REGNO (new) = ORIGINAL_REGNO (src);
- REG_ATTRS (new) = REG_ATTRS (src);
+ ORIGINAL_REGNO (n) = ORIGINAL_REGNO (src);
+ REG_ATTRS (n) = REG_ATTRS (src);
if (dump_file)
fprintf (dump_file,
"insn %u: replaced reg %u with %u\n",
- INSN_UID (insn), regno, REGNO (new));
+ INSN_UID (insn), regno, REGNO (n));
changed = true;
goto did_replacement;
}
@@ -1754,13 +1753,13 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
if (replaced[i])
{
int j;
- rtx new;
+ rtx n;
- new = *recog_data.operand_loc[i];
- recog_data.operand[i] = new;
+ n = *recog_data.operand_loc[i];
+ recog_data.operand[i] = n;
for (j = 0; j < recog_data.n_dups; j++)
if (recog_data.dup_num[j] == i)
- validate_change (insn, recog_data.dup_loc[j], new, 1);
+ validate_change (insn, recog_data.dup_loc[j], n, 1);
any_replacements = true;
}
diff --git a/gcc/reload.c b/gcc/reload.c
index 1f1bc23020b..f54fb9b9c8d 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -316,7 +316,7 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
enum machine_mode reload_mode, enum reload_type type,
enum insn_code *picode, secondary_reload_info *prev_sri)
{
- enum reg_class class = NO_REGS;
+ enum reg_class rc = NO_REGS;
enum reg_class scratch_class;
enum machine_mode mode = reload_mode;
enum insn_code icode = CODE_FOR_nothing;
@@ -359,15 +359,15 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
sri.icode = CODE_FOR_nothing;
sri.prev_sri = prev_sri;
- class = targetm.secondary_reload (in_p, x, reload_class, reload_mode, &sri);
- icode = sri.icode;
+ rc = targetm.secondary_reload (in_p, x, reload_class, reload_mode, &sri);
+ icode = (enum insn_code) sri.icode;
/* If we don't need any secondary registers, done. */
- if (class == NO_REGS && icode == CODE_FOR_nothing)
+ if (rc == NO_REGS && icode == CODE_FOR_nothing)
return -1;
- if (class != NO_REGS)
- t_reload = push_secondary_reload (in_p, x, opnum, optional, class,
+ if (rc != NO_REGS)
+ t_reload = push_secondary_reload (in_p, x, opnum, optional, rc,
reload_mode, type, &t_icode, &sri);
/* If we will be using an insn, the secondary reload is for a
@@ -389,7 +389,7 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
an icode to reload from an intermediate tertiary reload register.
We should probably have a new field in struct reload to tag a
chain of scratch operand reloads onto. */
- gcc_assert (class == NO_REGS);
+ gcc_assert (rc == NO_REGS);
scratch_constraint = insn_data[(int) icode].operand[2].constraint;
gcc_assert (*scratch_constraint == '=');
@@ -401,7 +401,7 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
: REG_CLASS_FROM_CONSTRAINT ((unsigned char) letter,
scratch_constraint));
- class = scratch_class;
+ rc = scratch_class;
mode = insn_data[(int) icode].operand[2].mode;
}
@@ -419,21 +419,21 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
Allow this when a reload_in/out pattern is being used. I.e. assume
that the generated code handles this case. */
- gcc_assert (!in_p || class != reload_class || icode != CODE_FOR_nothing
+ gcc_assert (!in_p || rc != reload_class || icode != CODE_FOR_nothing
|| t_icode != CODE_FOR_nothing);
/* See if we can reuse an existing secondary reload. */
for (s_reload = 0; s_reload < n_reloads; s_reload++)
if (rld[s_reload].secondary_p
- && (reg_class_subset_p (class, rld[s_reload].class)
- || reg_class_subset_p (rld[s_reload].class, class))
+ && (reg_class_subset_p (rc, rld[s_reload].kind)
+ || reg_class_subset_p (rld[s_reload].kind, rc))
&& ((in_p && rld[s_reload].inmode == mode)
|| (! in_p && rld[s_reload].outmode == mode))
&& ((in_p && rld[s_reload].secondary_in_reload == t_reload)
|| (! in_p && rld[s_reload].secondary_out_reload == t_reload))
&& ((in_p && rld[s_reload].secondary_in_icode == t_icode)
|| (! in_p && rld[s_reload].secondary_out_icode == t_icode))
- && (SMALL_REGISTER_CLASS_P (class) || SMALL_REGISTER_CLASSES)
+ && (SMALL_REGISTER_CLASS_P (rc) || SMALL_REGISTER_CLASSES)
&& MERGABLE_RELOADS (secondary_type, rld[s_reload].when_needed,
opnum, rld[s_reload].opnum))
{
@@ -442,8 +442,8 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
if (! in_p)
rld[s_reload].outmode = mode;
- if (reg_class_subset_p (class, rld[s_reload].class))
- rld[s_reload].class = class;
+ if (reg_class_subset_p (rc, rld[s_reload].kind))
+ rld[s_reload].kind = rc;
rld[s_reload].opnum = MIN (rld[s_reload].opnum, opnum);
rld[s_reload].optional &= optional;
@@ -462,7 +462,7 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
way reloads are output. */
if (in_p && icode == CODE_FOR_nothing
- && SECONDARY_MEMORY_NEEDED (class, reload_class, mode))
+ && SECONDARY_MEMORY_NEEDED (rc, reload_class, mode))
{
get_secondary_mem (x, reload_mode, opnum, type);
@@ -474,7 +474,7 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
/* We need to make a new secondary reload for this register class. */
rld[s_reload].in = rld[s_reload].out = 0;
- rld[s_reload].class = class;
+ rld[s_reload].kind = rc;
rld[s_reload].inmode = in_p ? mode : VOIDmode;
rld[s_reload].outmode = ! in_p ? mode : VOIDmode;
@@ -498,7 +498,7 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
#ifdef SECONDARY_MEMORY_NEEDED
if (! in_p && icode == CODE_FOR_nothing
- && SECONDARY_MEMORY_NEEDED (reload_class, class, mode))
+ && SECONDARY_MEMORY_NEEDED (reload_class, rc, mode))
get_secondary_mem (x, mode, opnum, type);
#endif
}
@@ -511,7 +511,7 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
register and a scratch register is needed, we return the class of the
intermediate register. */
enum reg_class
-secondary_reload_class (bool in_p, enum reg_class class,
+secondary_reload_class (bool in_p, enum reg_class reload_class,
enum machine_mode mode, rtx x)
{
enum insn_code icode;
@@ -519,13 +519,13 @@ secondary_reload_class (bool in_p, enum reg_class class,
sri.icode = CODE_FOR_nothing;
sri.prev_sri = NULL;
- class = targetm.secondary_reload (in_p, x, class, mode, &sri);
- icode = sri.icode;
+ reload_class = targetm.secondary_reload (in_p, x, reload_class, mode, &sri);
+ icode = (enum insn_code) sri.icode;
/* If there are no secondary reloads at all, we return NO_REGS.
If an intermediate register is needed, we return its class. */
- if (icode == CODE_FOR_nothing || class != NO_REGS)
- return class;
+ if (icode == CODE_FOR_nothing || reload_class != NO_REGS)
+ return reload_class;
/* No intermediate register is needed, but we have a special reload
pattern, which we assume for now needs a scratch register. */
@@ -542,7 +542,7 @@ scratch_reload_class (enum insn_code icode)
{
const char *scratch_constraint;
char scratch_letter;
- enum reg_class class;
+ enum reg_class rc;
gcc_assert (insn_data[(int) icode].n_operands == 3);
scratch_constraint = insn_data[(int) icode].operand[2].constraint;
@@ -553,10 +553,10 @@ scratch_reload_class (enum insn_code icode)
scratch_letter = *scratch_constraint;
if (scratch_letter == 'r')
return GENERAL_REGS;
- class = REG_CLASS_FROM_CONSTRAINT ((unsigned char) scratch_letter,
+ rc = REG_CLASS_FROM_CONSTRAINT ((unsigned char) scratch_letter,
scratch_constraint);
- gcc_assert (class != NO_REGS);
- return class;
+ gcc_assert (rc != NO_REGS);
+ return rc;
}
#ifdef SECONDARY_MEMORY_NEEDED
@@ -655,40 +655,40 @@ find_valid_class (enum machine_mode outer ATTRIBUTE_UNUSED,
unsigned int dest_regno ATTRIBUTE_UNUSED)
{
int best_cost = -1;
- int class;
+ int cls;
int regno;
enum reg_class best_class = NO_REGS;
enum reg_class dest_class ATTRIBUTE_UNUSED = REGNO_REG_CLASS (dest_regno);
unsigned int best_size = 0;
int cost;
- for (class = 1; class < N_REG_CLASSES; class++)
+ for (cls = 1; cls < N_REG_CLASSES; cls++)
{
- int bad = 0;
- int good = 0;
+ bool bad = false;
+ bool good = false;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER - n && ! bad; regno++)
- if (TEST_HARD_REG_BIT (reg_class_contents[class], regno))
+ if (TEST_HARD_REG_BIT (reg_class_contents[cls], regno))
{
if (HARD_REGNO_MODE_OK (regno, inner))
{
- good = 1;
- if (! TEST_HARD_REG_BIT (reg_class_contents[class], regno + n)
+ good = true;
+ if (! TEST_HARD_REG_BIT (reg_class_contents[cls], regno + n)
|| ! HARD_REGNO_MODE_OK (regno + n, outer))
- bad = 1;
+ bad = true;
}
}
if (bad || !good)
continue;
- cost = REGISTER_MOVE_COST (outer, class, dest_class);
+ cost = REGISTER_MOVE_COST (outer, (enum reg_class) cls, dest_class);
- if ((reg_class_size[class] > best_size
+ if ((reg_class_size[cls] > best_size
&& (best_cost < 0 || best_cost >= cost))
|| best_cost > cost)
{
- best_class = class;
- best_size = reg_class_size[class];
- best_cost = REGISTER_MOVE_COST (outer, class, dest_class);
+ best_class = (enum reg_class) cls;
+ best_size = reg_class_size[cls];
+ best_cost = REGISTER_MOVE_COST (outer, (enum reg_class) cls, dest_class);
}
}
@@ -706,7 +706,7 @@ find_valid_class (enum machine_mode outer ATTRIBUTE_UNUSED,
DONT_SHARE is nonzero if we can't share any input-only reload for IN. */
static int
-find_reusable_reload (rtx *p_in, rtx out, enum reg_class class,
+find_reusable_reload (rtx *p_in, rtx out, enum reg_class rc,
enum reload_type type, int opnum, int dont_share)
{
rtx in = *p_in;
@@ -727,18 +727,18 @@ find_reusable_reload (rtx *p_in, rtx out, enum reg_class class,
than we otherwise would. */
for (i = 0; i < n_reloads; i++)
- if ((reg_class_subset_p (class, rld[i].class)
- || reg_class_subset_p (rld[i].class, class))
+ if ((reg_class_subset_p (rc, rld[i].kind)
+ || reg_class_subset_p (rld[i].kind, rc))
/* If the existing reload has a register, it must fit our class. */
&& (rld[i].reg_rtx == 0
- || TEST_HARD_REG_BIT (reg_class_contents[(int) class],
+ || TEST_HARD_REG_BIT (reg_class_contents[rc],
true_regnum (rld[i].reg_rtx)))
&& ((in != 0 && MATCHES (rld[i].in, in) && ! dont_share
&& (out == 0 || rld[i].out == 0 || MATCHES (rld[i].out, out)))
|| (out != 0 && MATCHES (rld[i].out, out)
&& (in == 0 || rld[i].in == 0 || MATCHES (rld[i].in, in))))
&& (rld[i].out == 0 || ! earlyclobber_operand_p (rld[i].out))
- && (SMALL_REGISTER_CLASS_P (class) || SMALL_REGISTER_CLASSES)
+ && (SMALL_REGISTER_CLASS_P (rc) || SMALL_REGISTER_CLASSES)
&& MERGABLE_RELOADS (type, rld[i].when_needed, opnum, rld[i].opnum))
return i;
@@ -748,12 +748,12 @@ find_reusable_reload (rtx *p_in, rtx out, enum reg_class class,
the preincrementation as happening before any ref in this insn
to that register. */
for (i = 0; i < n_reloads; i++)
- if ((reg_class_subset_p (class, rld[i].class)
- || reg_class_subset_p (rld[i].class, class))
+ if ((reg_class_subset_p (rc, rld[i].kind)
+ || reg_class_subset_p (rld[i].kind, rc))
/* If the existing reload has a register, it must fit our
class. */
&& (rld[i].reg_rtx == 0
- || TEST_HARD_REG_BIT (reg_class_contents[(int) class],
+ || TEST_HARD_REG_BIT (reg_class_contents[rc],
true_regnum (rld[i].reg_rtx)))
&& out == 0 && rld[i].out == 0 && rld[i].in != 0
&& ((REG_P (in)
@@ -763,7 +763,7 @@ find_reusable_reload (rtx *p_in, rtx out, enum reg_class class,
&& GET_RTX_CLASS (GET_CODE (in)) == RTX_AUTOINC
&& MATCHES (XEXP (in, 0), rld[i].in)))
&& (rld[i].out == 0 || ! earlyclobber_operand_p (rld[i].out))
- && (SMALL_REGISTER_CLASS_P (class) || SMALL_REGISTER_CLASSES)
+ && (SMALL_REGISTER_CLASS_P (rc) || SMALL_REGISTER_CLASSES)
&& MERGABLE_RELOADS (type, rld[i].when_needed,
opnum, rld[i].opnum))
{
@@ -899,7 +899,7 @@ can_reload_into (rtx in, int regno, enum machine_mode mode)
int
push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
- enum reg_class class, enum machine_mode inmode,
+ enum reg_class rc, enum machine_mode inmode,
enum machine_mode outmode, int strict_low, int optional,
int opnum, enum reload_type type)
{
@@ -994,7 +994,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
if (in != 0 && GET_CODE (in) == SUBREG
&& (subreg_lowpart_p (in) || strict_low)
#ifdef CANNOT_CHANGE_MODE_CLASS
- && !CANNOT_CHANGE_MODE_CLASS (GET_MODE (SUBREG_REG (in)), inmode, class)
+ && !CANNOT_CHANGE_MODE_CLASS (GET_MODE (SUBREG_REG (in)), inmode, rc)
#endif
&& (CONSTANT_P (SUBREG_REG (in))
|| GET_CODE (SUBREG_REG (in)) == PLUS
@@ -1034,8 +1034,8 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
!= (int) hard_regno_nregs[REGNO (SUBREG_REG (in))]
[GET_MODE (SUBREG_REG (in))]))
|| ! HARD_REGNO_MODE_OK (subreg_regno (in), inmode)))
- || (secondary_reload_class (1, class, inmode, in) != NO_REGS
- && (secondary_reload_class (1, class, GET_MODE (SUBREG_REG (in)),
+ || (secondary_reload_class (1, rc, inmode, in) != NO_REGS
+ && (secondary_reload_class (1, rc, GET_MODE (SUBREG_REG (in)),
SUBREG_REG (in))
== NO_REGS))
#ifdef CANNOT_CHANGE_MODE_CLASS
@@ -1070,7 +1070,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
if (in != 0 && reload_inner_reg_of_subreg (in, inmode, 0))
{
- enum reg_class in_class = class;
+ enum reg_class in_class = rc;
if (REG_P (SUBREG_REG (in)))
in_class
@@ -1100,7 +1100,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
if (out != 0 && GET_CODE (out) == SUBREG
&& (subreg_lowpart_p (out) || strict_low)
#ifdef CANNOT_CHANGE_MODE_CLASS
- && !CANNOT_CHANGE_MODE_CLASS (GET_MODE (SUBREG_REG (out)), outmode, class)
+ && !CANNOT_CHANGE_MODE_CLASS (GET_MODE (SUBREG_REG (out)), outmode, rc)
#endif
&& (CONSTANT_P (SUBREG_REG (out))
|| strict_low
@@ -1127,8 +1127,8 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
!= (int) hard_regno_nregs[REGNO (SUBREG_REG (out))]
[GET_MODE (SUBREG_REG (out))]))
|| ! HARD_REGNO_MODE_OK (subreg_regno (out), outmode)))
- || (secondary_reload_class (0, class, outmode, out) != NO_REGS
- && (secondary_reload_class (0, class, GET_MODE (SUBREG_REG (out)),
+ || (secondary_reload_class (0, rc, outmode, out) != NO_REGS
+ && (secondary_reload_class (0, rc, GET_MODE (SUBREG_REG (out)),
SUBREG_REG (out))
== NO_REGS))
#ifdef CANNOT_CHANGE_MODE_CLASS
@@ -1202,10 +1202,10 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
/* Narrow down the class of register wanted if that is
desirable on this machine for efficiency. */
{
- enum reg_class preferred_class = class;
+ enum reg_class preferred_class = rc;
if (in != 0)
- preferred_class = PREFERRED_RELOAD_CLASS (in, class);
+ preferred_class = PREFERRED_RELOAD_CLASS (in, rc);
/* Output reloads may need analogous treatment, different in detail. */
#ifdef PREFERRED_OUTPUT_RELOAD_CLASS
@@ -1216,7 +1216,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
/* Discard what the target said if we cannot do it. */
if (preferred_class != NO_REGS
|| (optional && type == RELOAD_FOR_OUTPUT))
- class = preferred_class;
+ rc = preferred_class;
}
/* Make sure we use a class that can handle the actual pseudo
@@ -1225,14 +1225,14 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
can handle SImode, QImode needs a smaller class. */
#ifdef LIMIT_RELOAD_CLASS
if (in_subreg_loc)
- class = LIMIT_RELOAD_CLASS (inmode, class);
+ rc = LIMIT_RELOAD_CLASS (inmode, rc);
else if (in != 0 && GET_CODE (in) == SUBREG)
- class = LIMIT_RELOAD_CLASS (GET_MODE (SUBREG_REG (in)), class);
+ rc = LIMIT_RELOAD_CLASS (GET_MODE (SUBREG_REG (in)), rc);
if (out_subreg_loc)
- class = LIMIT_RELOAD_CLASS (outmode, class);
+ rc = LIMIT_RELOAD_CLASS (outmode, rc);
if (out != 0 && GET_CODE (out) == SUBREG)
- class = LIMIT_RELOAD_CLASS (GET_MODE (SUBREG_REG (out)), class);
+ rc = LIMIT_RELOAD_CLASS (GET_MODE (SUBREG_REG (out)), rc);
#endif
/* Verify that this class is at least possible for the mode that
@@ -1256,13 +1256,13 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
}
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (HARD_REGNO_MODE_OK (i, mode)
- && TEST_HARD_REG_BIT (reg_class_contents[(int) class], i))
+ && TEST_HARD_REG_BIT (reg_class_contents[rc], i))
{
int nregs = hard_regno_nregs[i][mode];
int j;
for (j = 1; j < nregs; j++)
- if (! TEST_HARD_REG_BIT (reg_class_contents[(int) class], i + j))
+ if (! TEST_HARD_REG_BIT (reg_class_contents[rc], i + j))
break;
if (j == nregs)
break;
@@ -1290,10 +1290,10 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
/* Optional output reloads are always OK even if we have no register class,
since the function of these reloads is only to have spill_reg_store etc.
set, so that the storing insn can be deleted later. */
- gcc_assert (class != NO_REGS
+ gcc_assert (rc != NO_REGS
|| (optional != 0 && type == RELOAD_FOR_OUTPUT));
- i = find_reusable_reload (&in, out, class, type, opnum, dont_share);
+ i = find_reusable_reload (&in, out, rc, type, opnum, dont_share);
if (i == n_reloads)
{
@@ -1303,11 +1303,11 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
if (in != 0)
secondary_in_reload
- = push_secondary_reload (1, in, opnum, optional, class, inmode, type,
+ = push_secondary_reload (1, in, opnum, optional, rc, inmode, type,
&secondary_in_icode, NULL);
if (out != 0 && GET_CODE (out) != SCRATCH)
secondary_out_reload
- = push_secondary_reload (0, out, opnum, optional, class, outmode,
+ = push_secondary_reload (0, out, opnum, optional, rc, outmode,
type, &secondary_out_icode, NULL);
/* We found no existing reload suitable for re-use.
@@ -1320,14 +1320,14 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
|| (GET_CODE (in) == SUBREG && REG_P (SUBREG_REG (in))))
&& reg_or_subregno (in) < FIRST_PSEUDO_REGISTER
&& SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (reg_or_subregno (in)),
- class, inmode))
+ rc, inmode))
get_secondary_mem (in, inmode, opnum, type);
#endif
i = n_reloads;
rld[i].in = in;
rld[i].out = out;
- rld[i].class = class;
+ rld[i].kind = rc;
rld[i].inmode = inmode;
rld[i].outmode = outmode;
rld[i].reg_rtx = 0;
@@ -1351,7 +1351,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
&& (REG_P (out)
|| (GET_CODE (out) == SUBREG && REG_P (SUBREG_REG (out))))
&& reg_or_subregno (out) < FIRST_PSEUDO_REGISTER
- && SECONDARY_MEMORY_NEEDED (class,
+ && SECONDARY_MEMORY_NEEDED (rc,
REGNO_REG_CLASS (reg_or_subregno (out)),
outmode))
get_secondary_mem (out, outmode, opnum, type);
@@ -1411,8 +1411,8 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
rld[i].out = out;
rld[i].out_reg = outloc ? *outloc : 0;
}
- if (reg_class_subset_p (class, rld[i].class))
- rld[i].class = class;
+ if (reg_class_subset_p (rc, rld[i].kind))
+ rld[i].kind = rc;
rld[i].optional &= optional;
if (MERGE_TO_OTHER (type, rld[i].when_needed,
opnum, rld[i].opnum))
@@ -1484,7 +1484,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
{
rld[i].reg_rtx = find_dummy_reload (in, out, inloc, outloc,
inmode, outmode,
- rld[i].class, i,
+ rld[i].kind, i,
earlyclobber_operand_p (out));
/* If the outgoing register already contains the same value
@@ -1493,7 +1493,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
value for the incoming operand (same as outgoing one). */
if (rld[i].reg_rtx == out
&& (REG_P (in) || CONSTANT_P (in))
- && 0 != find_equiv_reg (in, this_insn, 0, REGNO (out),
+ && 0 != find_equiv_reg (in, this_insn, NO_REGS, REGNO (out),
static_reload_reg_p, i, inmode))
rld[i].in = out;
}
@@ -1564,7 +1564,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
for (offs = 0; offs < nregs; offs++)
if (fixed_regs[regno + offs]
- || ! TEST_HARD_REG_BIT (reg_class_contents[(int) class],
+ || ! TEST_HARD_REG_BIT (reg_class_contents[rc],
regno + offs))
break;
@@ -1734,8 +1734,8 @@ combine_reloads (void)
&& rld[i].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
&& rld[i].when_needed != RELOAD_FOR_OUTADDR_ADDRESS
&& rld[i].when_needed != RELOAD_OTHER
- && (CLASS_MAX_NREGS (rld[i].class, rld[i].inmode)
- == CLASS_MAX_NREGS (rld[output_reload].class,
+ && (CLASS_MAX_NREGS (rld[i].kind, rld[i].inmode)
+ == CLASS_MAX_NREGS (rld[output_reload].kind,
rld[output_reload].outmode))
&& rld[i].inc == 0
&& rld[i].reg_rtx == 0
@@ -1748,11 +1748,11 @@ combine_reloads (void)
secondary_memlocs_elim[(int) rld[output_reload].outmode][rld[output_reload].opnum]))
#endif
&& (SMALL_REGISTER_CLASSES
- ? (rld[i].class == rld[output_reload].class)
- : (reg_class_subset_p (rld[i].class,
- rld[output_reload].class)
- || reg_class_subset_p (rld[output_reload].class,
- rld[i].class)))
+ ? (rld[i].kind == rld[output_reload].kind)
+ : (reg_class_subset_p (rld[i].kind,
+ rld[output_reload].kind)
+ || reg_class_subset_p (rld[output_reload].kind,
+ rld[i].kind)))
&& (MATCHES (rld[i].in, rld[output_reload].out)
/* Args reversed because the first arg seems to be
the one that we imagine being modified
@@ -1770,7 +1770,7 @@ combine_reloads (void)
rld[output_reload].out))))
&& ! reload_inner_reg_of_subreg (rld[i].in, rld[i].inmode,
rld[i].when_needed != RELOAD_FOR_INPUT)
- && (reg_class_size[(int) rld[i].class]
+ && (reg_class_size[(int) rld[i].kind]
|| SMALL_REGISTER_CLASSES)
/* We will allow making things slightly worse by combining an
input and an output, but no worse than that. */
@@ -1803,9 +1803,9 @@ combine_reloads (void)
= secondary_memlocs_elim[(int) rld[output_reload].outmode][rld[output_reload].opnum];
#endif
/* If required, minimize the register class. */
- if (reg_class_subset_p (rld[output_reload].class,
- rld[i].class))
- rld[i].class = rld[output_reload].class;
+ if (reg_class_subset_p (rld[output_reload].kind,
+ rld[i].kind))
+ rld[i].kind = rld[output_reload].kind;
/* Transfer all replacements from the old reload to the combined. */
for (j = 0; j < n_replacements; j++)
@@ -1839,7 +1839,7 @@ combine_reloads (void)
rld[output_reload].out)
&& REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
&& HARD_REGNO_MODE_OK (REGNO (XEXP (note, 0)), rld[output_reload].outmode)
- && TEST_HARD_REG_BIT (reg_class_contents[(int) rld[output_reload].class],
+ && TEST_HARD_REG_BIT (reg_class_contents[(int) rld[output_reload].kind],
REGNO (XEXP (note, 0)))
&& (hard_regno_nregs[REGNO (XEXP (note, 0))][rld[output_reload].outmode]
<= hard_regno_nregs[REGNO (XEXP (note, 0))][GET_MODE (XEXP (note, 0))])
@@ -1847,11 +1847,11 @@ combine_reloads (void)
won't want this register. */
&& ((secondary_out = rld[output_reload].secondary_out_reload) == -1
|| (! (TEST_HARD_REG_BIT
- (reg_class_contents[(int) rld[secondary_out].class],
+ (reg_class_contents[(int) rld[secondary_out].kind],
REGNO (XEXP (note, 0))))
&& ((secondary_out = rld[secondary_out].secondary_out_reload) == -1
|| ! (TEST_HARD_REG_BIT
- (reg_class_contents[(int) rld[secondary_out].class],
+ (reg_class_contents[(int) rld[secondary_out].kind],
REGNO (XEXP (note, 0)))))))
&& ! fixed_regs[REGNO (XEXP (note, 0))])
{
@@ -1885,7 +1885,7 @@ combine_reloads (void)
static rtx
find_dummy_reload (rtx real_in, rtx real_out, rtx *inloc, rtx *outloc,
enum machine_mode inmode, enum machine_mode outmode,
- enum reg_class class, int for_real, int earlyclobber)
+ enum reg_class rc, int for_real, int earlyclobber)
{
rtx in = real_in;
rtx out = real_out;
@@ -1928,9 +1928,9 @@ find_dummy_reload (rtx real_in, rtx real_out, rtx *inloc, rtx *outloc,
/* Narrow down the reg class, the same way push_reload will;
otherwise we might find a dummy now, but push_reload won't. */
{
- enum reg_class preferred_class = PREFERRED_RELOAD_CLASS (in, class);
+ enum reg_class preferred_class = PREFERRED_RELOAD_CLASS (in, rc);
if (preferred_class != NO_REGS)
- class = preferred_class;
+ rc = preferred_class;
}
/* See if OUT will do. */
@@ -1961,7 +1961,7 @@ find_dummy_reload (rtx real_in, rtx real_out, rtx *inloc, rtx *outloc,
unsigned int i;
for (i = 0; i < nwords; i++)
- if (! TEST_HARD_REG_BIT (reg_class_contents[(int) class],
+ if (! TEST_HARD_REG_BIT (reg_class_contents[rc],
regno + i))
break;
@@ -2021,7 +2021,7 @@ find_dummy_reload (rtx real_in, rtx real_out, rtx *inloc, rtx *outloc,
unsigned int i;
for (i = 0; i < nwords; i++)
- if (! TEST_HARD_REG_BIT (reg_class_contents[(int) class],
+ if (! TEST_HARD_REG_BIT (reg_class_contents[rc],
regno + i))
break;
@@ -2534,7 +2534,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
enum reload_usage { RELOAD_READ, RELOAD_READ_WRITE, RELOAD_WRITE } modified[MAX_RECOG_OPERANDS];
int no_input_reloads = 0, no_output_reloads = 0;
int n_alternatives;
- int this_alternative[MAX_RECOG_OPERANDS];
+ enum reg_class this_alternative[MAX_RECOG_OPERANDS];
char this_alternative_match_win[MAX_RECOG_OPERANDS];
char this_alternative_win[MAX_RECOG_OPERANDS];
char this_alternative_offmemok[MAX_RECOG_OPERANDS];
@@ -3015,7 +3015,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
force_reload = 1;
}
- this_alternative[i] = (int) NO_REGS;
+ this_alternative[i] = NO_REGS;
this_alternative_win[i] = 0;
this_alternative_match_win[i] = 0;
this_alternative_offmemok[i] = 0;
@@ -3102,7 +3102,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
this combination, because we can't reload it. */
if (this_alternative_offmemok[m]
&& MEM_P (recog_data.operand[m])
- && this_alternative[m] == (int) NO_REGS
+ && this_alternative[m] == NO_REGS
&& ! this_alternative_win[m])
bad = 1;
@@ -3118,7 +3118,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
if (this_alternative_win[m])
losers++;
this_alternative_win[m] = 0;
- if (this_alternative[m] == (int) NO_REGS)
+ if (this_alternative[m] == NO_REGS)
bad = 1;
/* But count the pair only once in the total badness of
this alternative, if the pair can be a dummy reload.
@@ -3168,7 +3168,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
/* All necessary reloads for an address_operand
were handled in find_reloads_address. */
this_alternative[i]
- = (int) base_reg_class (VOIDmode, ADDRESS, SCRATCH);
+ = base_reg_class (VOIDmode, ADDRESS, SCRATCH);
win = 1;
badop = 0;
break;
@@ -3327,7 +3327,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
case 'r':
this_alternative[i]
- = (int) reg_class_subunion[this_alternative[i]][(int) GENERAL_REGS];
+ = reg_class_subunion[this_alternative[i]][(int) GENERAL_REGS];
goto reg;
default:
@@ -3374,7 +3374,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
/* If we didn't already win, we can reload
the address into a base register. */
this_alternative[i]
- = (int) base_reg_class (VOIDmode, ADDRESS, SCRATCH);
+ = base_reg_class (VOIDmode, ADDRESS, SCRATCH);
badop = 0;
break;
}
@@ -3386,7 +3386,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
}
this_alternative[i]
- = (int) (reg_class_subunion
+ = (reg_class_subunion
[this_alternative[i]]
[(int) REG_CLASS_FROM_CONSTRAINT (c, p)]);
reg:
@@ -3405,7 +3405,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
/* If this operand could be handled with a reg,
and some reg is allowed, then this operand can be handled. */
- if (winreg && this_alternative[i] != (int) NO_REGS)
+ if (winreg && this_alternative[i] != NO_REGS)
badop = 0;
/* Record which operands fit this alternative. */
@@ -3424,7 +3424,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
bad = 1;
/* Alternative loses if it has no regs for a reg operand. */
if (REG_P (operand)
- && this_alternative[i] == (int) NO_REGS
+ && this_alternative[i] == NO_REGS
&& this_alternative_matches[i] < 0)
bad = 1;
@@ -3438,13 +3438,13 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
force_const_mem. */
if (CONST_POOL_OK_P (operand)
&& ((PREFERRED_RELOAD_CLASS (operand,
- (enum reg_class) this_alternative[i])
+ this_alternative[i])
== NO_REGS)
|| no_input_reloads)
&& operand_mode[i] != VOIDmode)
{
const_to_mem = 1;
- if (this_alternative[i] != (int) NO_REGS)
+ if (this_alternative[i] != NO_REGS)
losers++;
}
@@ -3524,7 +3524,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
because we might otherwise exhaust the class. */
if (! win && ! did_match
- && this_alternative[i] != (int) NO_REGS
+ && this_alternative[i] != NO_REGS
&& GET_MODE_SIZE (operand_mode[i]) <= UNITS_PER_WORD
&& reg_class_size [(int) preferred_class[i]] > 0
&& ! SMALL_REGISTER_CLASS_P (preferred_class[i]))
@@ -3538,7 +3538,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
common case anyway. */
if (reg_class_subset_p (preferred_class[i],
this_alternative[i]))
- this_alternative[i] = (int) preferred_class[i];
+ this_alternative[i] = preferred_class[i];
else
reject += (2 + 2 * pref_or_nothing[i]);
}
@@ -4153,7 +4153,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
&& rld[i].out == 0)
{
rld[i].reg_rtx
- = find_equiv_reg (rld[i].in, insn, rld[i].class, -1,
+ = find_equiv_reg (rld[i].in, insn, rld[i].kind, -1,
static_reload_reg_p, 0, rld[i].inmode);
/* Prevent generation of insn to load the value
because the one we found already has the value. */
@@ -4422,7 +4422,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
if (i != j && rld[j].in != 0 && rld[j].out == 0
&& rld[j].when_needed == rld[i].when_needed
&& MATCHES (rld[i].in, rld[j].in)
- && rld[i].class == rld[j].class
+ && rld[i].kind == rld[j].kind
&& !rld[i].nocombine && !rld[j].nocombine
&& rld[i].reg_rtx == rld[j].reg_rtx)
{
@@ -4451,7 +4451,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
> GET_MODE_SIZE (rld[i].inmode)))
? rld[i].outmode : rld[i].inmode;
- rld[i].nregs = CLASS_MAX_NREGS (rld[i].class, rld[i].mode);
+ rld[i].nregs = CLASS_MAX_NREGS (rld[i].kind, rld[i].mode);
}
/* Special case a simple move with an input reload and a
@@ -4466,14 +4466,14 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
unsigned int regno = REGNO (dest);
if (regno < FIRST_PSEUDO_REGISTER
- && TEST_HARD_REG_BIT (reg_class_contents[rld[i].class], regno)
+ && TEST_HARD_REG_BIT (reg_class_contents[rld[i].kind], regno)
&& HARD_REGNO_MODE_OK (regno, rld[i].mode))
{
int nr = hard_regno_nregs[regno][rld[i].mode];
int ok = 1, nri;
for (nri = 1; nri < nr; nri ++)
- if (! TEST_HARD_REG_BIT (reg_class_contents[rld[i].class], regno + nri))
+ if (! TEST_HARD_REG_BIT (reg_class_contents[rld[i].kind], regno + nri))
ok = 0;
if (ok)
@@ -4683,7 +4683,7 @@ make_memloc (rtx ad, int regno)
/* We must rerun eliminate_regs, in case the elimination
offsets have changed. */
rtx tem
- = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0, NULL_RTX), 0);
+ = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], VOIDmode, NULL_RTX), 0);
/* If TEM might contain a pseudo, we must copy it to avoid
modifying it when we do the substitution for the reload. */
@@ -5899,14 +5899,14 @@ find_reloads_address_1 (enum machine_mode mode, rtx x, int context,
is larger than the class size, then reload the whole SUBREG. */
else
{
- enum reg_class class = context_reg_class;
- if ((unsigned) CLASS_MAX_NREGS (class, GET_MODE (SUBREG_REG (x)))
- > reg_class_size[class])
+ enum reg_class rc = context_reg_class;
+ if ((unsigned) CLASS_MAX_NREGS (rc, GET_MODE (SUBREG_REG (x)))
+ > reg_class_size[rc])
{
x = find_reloads_subreg_address (x, 0, opnum,
ADDR_TYPE (type),
ind_levels, insn);
- push_reload (x, NULL_RTX, loc, (rtx*) 0, class,
+ push_reload (x, NULL_RTX, loc, (rtx*) 0, rc,
GET_MODE (x), VOIDmode, 0, 0, opnum, type);
return 1;
}
@@ -5952,13 +5952,13 @@ find_reloads_address_1 (enum machine_mode mode, rtx x, int context,
supports. */
static void
-find_reloads_address_part (rtx x, rtx *loc, enum reg_class class,
+find_reloads_address_part (rtx x, rtx *loc, enum reg_class rc,
enum machine_mode mode, int opnum,
enum reload_type type, int ind_levels)
{
if (CONSTANT_P (x)
&& (! LEGITIMATE_CONSTANT_P (x)
- || PREFERRED_RELOAD_CLASS (x, class) == NO_REGS))
+ || PREFERRED_RELOAD_CLASS (x, rc) == NO_REGS))
{
rtx tem;
@@ -5970,7 +5970,7 @@ find_reloads_address_part (rtx x, rtx *loc, enum reg_class class,
else if (GET_CODE (x) == PLUS
&& CONSTANT_P (XEXP (x, 1))
&& (! LEGITIMATE_CONSTANT_P (XEXP (x, 1))
- || PREFERRED_RELOAD_CLASS (XEXP (x, 1), class) == NO_REGS))
+ || PREFERRED_RELOAD_CLASS (XEXP (x, 1), rc) == NO_REGS))
{
rtx tem;
@@ -5980,7 +5980,7 @@ find_reloads_address_part (rtx x, rtx *loc, enum reg_class class,
opnum, type, ind_levels, 0);
}
- push_reload (x, NULL_RTX, loc, (rtx*) 0, class,
+ push_reload (x, NULL_RTX, loc, (rtx*) 0, rc,
mode, VOIDmode, 0, 0, opnum, type);
}
@@ -6580,7 +6580,7 @@ refers_to_mem_for_reload_p (rtx x)
as if it were a constant except that sp is required to be unchanging. */
rtx
-find_equiv_reg (rtx goal, rtx insn, enum reg_class class, int other,
+find_equiv_reg (rtx goal, rtx insn, enum reg_class rc, int other,
short *reload_reg_p, int goalreg, enum machine_mode mode)
{
rtx p = insn;
@@ -6731,7 +6731,7 @@ find_equiv_reg (rtx goal, rtx insn, enum reg_class class, int other,
int i;
for (i = hard_regno_nregs[valueno][mode] - 1; i >= 0; i--)
- if (! TEST_HARD_REG_BIT (reg_class_contents[(int) class],
+ if (! TEST_HARD_REG_BIT (reg_class_contents[rc],
valueno + i))
break;
if (i >= 0)
@@ -7226,7 +7226,7 @@ debug_reload_to_stream (FILE *f)
fprintf (f, "\n\t");
}
- fprintf (f, "%s, ", reg_class_names[(int) rld[r].class]);
+ fprintf (f, "%s, ", reg_class_names[rld[r].kind]);
fprintf (f, "%s (opnum = %d)",
reload_when_needed_name[(int) rld[r].when_needed],
diff --git a/gcc/reload.h b/gcc/reload.h
index 6de5e8471bf..ac929fa932a 100644
--- a/gcc/reload.h
+++ b/gcc/reload.h
@@ -84,7 +84,7 @@ struct reload
rtx out;
/* The class of registers to reload into. */
- enum reg_class class;
+ enum reg_class kind;
/* The mode this operand should have when reloaded, on input. */
enum machine_mode inmode;
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 4244b298308..cc5534e17aa 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -497,7 +497,7 @@ init_reload (void)
/* Initialize obstack for our rtl allocation. */
gcc_obstack_init (&reload_obstack);
- reload_startobj = obstack_alloc (&reload_obstack, 0);
+ reload_startobj = (char *) obstack_alloc (&reload_obstack, 0);
INIT_REG_SET (&spilled_pseudos);
INIT_REG_SET (&pseudos_counted);
@@ -514,7 +514,7 @@ new_insn_chain (void)
if (unused_insn_chains == 0)
{
- c = obstack_alloc (&reload_obstack, sizeof (struct insn_chain));
+ c = (struct insn_chain *) obstack_alloc (&reload_obstack, sizeof (struct insn_chain));
INIT_REG_SET (&c->live_throughout);
INIT_REG_SET (&c->dead_or_set);
}
@@ -659,7 +659,7 @@ reload (rtx first, int global)
failure = 0;
- reload_firstobj = obstack_alloc (&reload_obstack, 0);
+ reload_firstobj = (char *) obstack_alloc (&reload_obstack, 0);
/* Make sure that the last insn in the chain
is not something that needs reloading. */
@@ -930,7 +930,7 @@ reload (rtx first, int global)
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
if (reg_renumber[i] < 0 && reg_equiv_memory_loc[i])
{
- rtx x = eliminate_regs (reg_equiv_memory_loc[i], 0, NULL_RTX);
+ rtx x = eliminate_regs (reg_equiv_memory_loc[i], VOIDmode, NULL_RTX);
if (strict_memory_address_p (GET_MODE (regno_reg_rtx[i]),
XEXP (x, 0)))
@@ -969,7 +969,7 @@ reload (rtx first, int global)
{
save_call_clobbered_regs ();
/* That might have allocated new insn_chain structures. */
- reload_firstobj = obstack_alloc (&reload_obstack, 0);
+ reload_firstobj = (char *) obstack_alloc (&reload_obstack, 0);
}
calculate_needs_all_insns (global);
@@ -1151,7 +1151,7 @@ reload (rtx first, int global)
/* We must set reload_completed now since the cleanup_subreg_operands call
below will re-recognize each insn and reload may have generated insns
which are only valid during and after reload. */
- reload_completed = 1;
+ reload_completed = true;
/* Make a pass over all the insns and delete all USEs which we inserted
only to tag a REG_EQUAL note on them. Remove all REG_DEAD and REG_UNUSED
@@ -1442,10 +1442,10 @@ static void
copy_reloads (struct insn_chain *chain)
{
chain->n_reloads = n_reloads;
- chain->rld = obstack_alloc (&reload_obstack,
+ chain->rld = (struct reload *) obstack_alloc (&reload_obstack,
n_reloads * sizeof (struct reload));
memcpy (chain->rld, rld, n_reloads * sizeof (struct reload));
- reload_insn_firstobj = obstack_alloc (&reload_obstack, 0);
+ reload_insn_firstobj = (char *) obstack_alloc (&reload_obstack, 0);
}
/* Walk the chain of insns, and determine for each whether it needs reloads
@@ -1459,7 +1459,7 @@ calculate_needs_all_insns (int global)
something_needs_elimination = 0;
- reload_insn_firstobj = obstack_alloc (&reload_obstack, 0);
+ reload_insn_firstobj = (char *) obstack_alloc (&reload_obstack, 0);
for (chain = reload_insn_chain; chain != 0; chain = next)
{
rtx insn = chain->insn;
@@ -1580,8 +1580,8 @@ reload_reg_class_lower (const void *r1p, const void *r2p)
return t;
/* Count all solitary classes before non-solitary ones. */
- t = ((reg_class_size[(int) rld[r2].class] == 1)
- - (reg_class_size[(int) rld[r1].class] == 1));
+ t = ((reg_class_size[(int) rld[r2].kind] == 1)
+ - (reg_class_size[(int) rld[r1].kind] == 1));
if (t != 0)
return t;
@@ -1591,7 +1591,7 @@ reload_reg_class_lower (const void *r1p, const void *r2p)
return t;
/* Consider reloads in order of increasing reg-class number. */
- t = (int) rld[r1].class - (int) rld[r2].class;
+ t = (int) rld[r1].kind - (int) rld[r2].kind;
if (t != 0)
return t;
@@ -1720,7 +1720,7 @@ find_reg (struct insn_chain *chain, int order)
COPY_HARD_REG_SET (not_usable, bad_spill_regs);
IOR_HARD_REG_SET (not_usable, bad_spill_regs_global);
- IOR_COMPL_HARD_REG_SET (not_usable, reg_class_contents[rl->class]);
+ IOR_COMPL_HARD_REG_SET (not_usable, reg_class_contents[rl->kind]);
CLEAR_HARD_REG_SET (used_by_other_reload);
for (k = 0; k < order; k++)
@@ -1861,7 +1861,7 @@ find_reload_regs (struct insn_chain *chain)
{
if (dump_file)
fprintf(dump_file, "reload failure for reload %d\n", r);
- spill_failure (chain->insn, rld[r].class);
+ spill_failure (chain->insn, rld[r].kind);
failure = 1;
return;
}
@@ -1919,16 +1919,16 @@ delete_caller_save_insns (void)
INSN should be one of the insns which needed this particular spill reg. */
static void
-spill_failure (rtx insn, enum reg_class class)
+spill_failure (rtx insn, enum reg_class kind)
{
if (asm_noperands (PATTERN (insn)) >= 0)
error_for_asm (insn, "can't find a register in class %qs while "
"reloading %<asm%>",
- reg_class_names[class]);
+ reg_class_names[kind]);
else
{
error ("unable to find a register to spill in class %qs",
- reg_class_names[class]);
+ reg_class_names[kind]);
if (dump_file)
{
@@ -2315,7 +2315,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
enum rtx_code code = GET_CODE (x);
struct elim_table *ep;
int regno;
- rtx new;
+ rtx tmp;
int i, j;
const char *fmt;
int copied = 0;
@@ -2443,15 +2443,15 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
&& reg_equiv_constant[REGNO (new0)] != 0)
new0 = reg_equiv_constant[REGNO (new0)];
- new = form_sum (new0, new1);
+ tmp = form_sum (new0, new1);
/* As above, if we are not inside a MEM we do not want to
turn a PLUS into something else. We might try to do so here
for an addition of 0 if we aren't optimizing. */
- if (! mem_mode && GET_CODE (new) != PLUS)
- return gen_rtx_PLUS (GET_MODE (x), new, const0_rtx);
+ if (! mem_mode && GET_CODE (tmp) != PLUS)
+ return gen_rtx_PLUS (GET_MODE (x), tmp, const0_rtx);
else
- return new;
+ return tmp;
}
}
return x;
@@ -2508,8 +2508,8 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
/* If we have something in XEXP (x, 0), the usual case, eliminate it. */
if (XEXP (x, 0))
{
- new = eliminate_regs_1 (XEXP (x, 0), mem_mode, insn, true);
- if (new != XEXP (x, 0))
+ tmp = eliminate_regs_1 (XEXP (x, 0), mem_mode, insn, true);
+ if (tmp != XEXP (x, 0))
{
/* If this is a REG_DEAD note, it is not valid anymore.
Using the eliminated version could result in creating a
@@ -2519,7 +2519,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
? eliminate_regs_1 (XEXP (x, 1), mem_mode, insn, true)
: NULL_RTX);
- x = gen_rtx_EXPR_LIST (REG_NOTE_KIND (x), new, XEXP (x, 1));
+ x = gen_rtx_EXPR_LIST (REG_NOTE_KIND (x), tmp, XEXP (x, 1));
}
}
@@ -2531,10 +2531,10 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
strictly needed, but it simplifies the code. */
if (XEXP (x, 1))
{
- new = eliminate_regs_1 (XEXP (x, 1), mem_mode, insn, true);
- if (new != XEXP (x, 1))
+ tmp = eliminate_regs_1 (XEXP (x, 1), mem_mode, insn, true);
+ if (tmp != XEXP (x, 1))
return
- gen_rtx_fmt_ee (GET_CODE (x), GET_MODE (x), XEXP (x, 0), new);
+ gen_rtx_fmt_ee (GET_CODE (x), GET_MODE (x), XEXP (x, 0), tmp);
}
return x;
@@ -2555,9 +2555,9 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
case CTZ:
case POPCOUNT:
case PARITY:
- new = eliminate_regs_1 (XEXP (x, 0), mem_mode, insn, false);
- if (new != XEXP (x, 0))
- return gen_rtx_fmt_e (code, GET_MODE (x), new);
+ tmp = eliminate_regs_1 (XEXP (x, 0), mem_mode, insn, false);
+ if (tmp != XEXP (x, 0))
+ return gen_rtx_fmt_e (code, GET_MODE (x), tmp);
return x;
case SUBREG:
@@ -2573,17 +2573,17 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
&& reg_equiv_memory_loc != 0
&& reg_equiv_memory_loc[REGNO (SUBREG_REG (x))] != 0)
{
- new = SUBREG_REG (x);
+ tmp = SUBREG_REG (x);
}
else
- new = eliminate_regs_1 (SUBREG_REG (x), mem_mode, insn, false);
+ tmp = eliminate_regs_1 (SUBREG_REG (x), mem_mode, insn, false);
- if (new != SUBREG_REG (x))
+ if (tmp != SUBREG_REG (x))
{
int x_size = GET_MODE_SIZE (GET_MODE (x));
- int new_size = GET_MODE_SIZE (GET_MODE (new));
+ int new_size = GET_MODE_SIZE (GET_MODE (tmp));
- if (MEM_P (new)
+ if (MEM_P (tmp)
&& ((x_size < new_size
#ifdef WORD_REGISTER_OPERATIONS
/* On these machines, combine can create rtl of the form
@@ -2599,9 +2599,9 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
)
|| x_size == new_size)
)
- return adjust_address_nv (new, GET_MODE (x), SUBREG_BYTE (x));
+ return adjust_address_nv (tmp, GET_MODE (x), SUBREG_BYTE (x));
else
- return gen_rtx_SUBREG (GET_MODE (x), new, SUBREG_BYTE (x));
+ return gen_rtx_SUBREG (GET_MODE (x), tmp, SUBREG_BYTE (x));
}
return x;
@@ -2617,9 +2617,9 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
case USE:
/* Handle insn_list USE that a call to a pure function may generate. */
- new = eliminate_regs_1 (XEXP (x, 0), 0, insn, false);
- if (new != XEXP (x, 0))
- return gen_rtx_USE (GET_MODE (x), new);
+ tmp = eliminate_regs_1 (XEXP (x, 0), VOIDmode, insn, false);
+ if (tmp != XEXP (x, 0))
+ return gen_rtx_USE (GET_MODE (x), tmp);
return x;
case CLOBBER:
@@ -2638,21 +2638,21 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
{
if (*fmt == 'e')
{
- new = eliminate_regs_1 (XEXP (x, i), mem_mode, insn, false);
- if (new != XEXP (x, i) && ! copied)
+ tmp = eliminate_regs_1 (XEXP (x, i), mem_mode, insn, false);
+ if (tmp != XEXP (x, i) && ! copied)
{
x = shallow_copy_rtx (x);
copied = 1;
}
- XEXP (x, i) = new;
+ XEXP (x, i) = tmp;
}
else if (*fmt == 'E')
{
int copied_vec = 0;
for (j = 0; j < XVECLEN (x, i); j++)
{
- new = eliminate_regs_1 (XVECEXP (x, i, j), mem_mode, insn, false);
- if (new != XVECEXP (x, i, j) && ! copied_vec)
+ tmp = eliminate_regs_1 (XVECEXP (x, i, j), mem_mode, insn, false);
+ if (tmp != XVECEXP (x, i, j) && ! copied_vec)
{
rtvec new_v = gen_rtvec_v (XVECLEN (x, i),
XVEC (x, i)->elem);
@@ -2664,7 +2664,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
XVEC (x, i) = new_v;
copied_vec = 1;
}
- XVECEXP (x, i, j) = new;
+ XVECEXP (x, i, j) = tmp;
}
}
}
@@ -2844,8 +2844,8 @@ elimination_effects (rtx x, enum machine_mode mem_mode)
}
}
- elimination_effects (SET_DEST (x), 0);
- elimination_effects (SET_SRC (x), 0);
+ elimination_effects (SET_DEST (x), VOIDmode);
+ elimination_effects (SET_SRC (x), VOIDmode);
return;
case MEM:
@@ -3149,7 +3149,7 @@ eliminate_regs_in_insn (rtx insn, int replace)
}
/* Determine the effects of this insn on elimination offsets. */
- elimination_effects (old_body, 0);
+ elimination_effects (old_body, VOIDmode);
/* Eliminate all eliminable registers occurring in operands that
can be handled by reload. */
@@ -3190,7 +3190,7 @@ eliminate_regs_in_insn (rtx insn, int replace)
in_plus = true;
substed_operand[i]
- = eliminate_regs_1 (recog_data.operand[i], 0,
+ = eliminate_regs_1 (recog_data.operand[i], VOIDmode,
replace ? insn : NULL_RTX,
is_set_src || in_plus);
if (substed_operand[i] != orig_operand[i])
@@ -3321,7 +3321,7 @@ eliminate_regs_in_insn (rtx insn, int replace)
the pre-passes. */
if (val && REG_NOTES (insn) != 0)
REG_NOTES (insn)
- = eliminate_regs_1 (REG_NOTES (insn), 0, REG_NOTES (insn), true);
+ = eliminate_regs_1 (REG_NOTES (insn), VOIDmode, REG_NOTES (insn), true);
return val;
}
@@ -3580,7 +3580,7 @@ init_elim_table (void)
#endif
if (!reg_eliminate)
- reg_eliminate = xcalloc (sizeof (struct elim_table), NUM_ELIMINABLE_REGS);
+ reg_eliminate = XCNEWVEC (struct elim_table, NUM_ELIMINABLE_REGS);
/* Does this function require a frame pointer? */
@@ -5298,7 +5298,7 @@ allocate_reload_reg (struct insn_chain *chain ATTRIBUTE_UNUSED, int r,
for (count = 0; count < n_spills; count++)
{
- int class = (int) rld[r].class;
+ int kind = rld[r].kind;
int regnum;
i++;
@@ -5315,7 +5315,7 @@ allocate_reload_reg (struct insn_chain *chain ATTRIBUTE_UNUSED, int r,
&& free_for_value_p (regnum, rld[r].mode, rld[r].opnum,
rld[r].when_needed, rld[r].in,
rld[r].out, r, 1)))
- && TEST_HARD_REG_BIT (reg_class_contents[class], regnum)
+ && TEST_HARD_REG_BIT (reg_class_contents[kind], regnum)
&& HARD_REGNO_MODE_OK (regnum, rld[r].mode)
/* Look first for regs to share, then for unshared. But
don't share regs used for inherited reloads; they are
@@ -5345,7 +5345,7 @@ allocate_reload_reg (struct insn_chain *chain ATTRIBUTE_UNUSED, int r,
while (nr > 1)
{
int regno = regnum + nr - 1;
- if (!(TEST_HARD_REG_BIT (reg_class_contents[class], regno)
+ if (!(TEST_HARD_REG_BIT (reg_class_contents[kind], regno)
&& spill_reg_order[regno] >= 0
&& reload_reg_free_p (regno, rld[r].opnum,
rld[r].when_needed)))
@@ -5464,7 +5464,7 @@ choose_reload_regs (struct insn_chain *chain)
{
max_group_size = MAX (rld[j].nregs, max_group_size);
group_class
- = reg_class_superunion[(int) rld[j].class][(int) group_class];
+ = reg_class_superunion[rld[j].kind][group_class];
}
save_reload_reg_rtx[j] = rld[j].reg_rtx;
@@ -5600,7 +5600,7 @@ choose_reload_regs (struct insn_chain *chain)
if (regno >= 0 && reg_last_reload_reg[regno] != 0)
{
- enum reg_class class = rld[r].class, last_class;
+ enum reg_class kind = rld[r].kind, last_class;
rtx last_reg = reg_last_reload_reg[regno];
enum machine_mode need_mode;
@@ -5628,18 +5628,18 @@ choose_reload_regs (struct insn_chain *chain)
&& reg_reloaded_contents[i] == regno
&& TEST_HARD_REG_BIT (reg_reloaded_valid, i)
&& HARD_REGNO_MODE_OK (i, rld[r].mode)
- && (TEST_HARD_REG_BIT (reg_class_contents[(int) class], i)
+ && (TEST_HARD_REG_BIT (reg_class_contents[kind], i)
/* Even if we can't use this register as a reload
register, we might use it for reload_override_in,
if copying it to the desired class is cheap
enough. */
- || ((REGISTER_MOVE_COST (mode, last_class, class)
- < MEMORY_MOVE_COST (mode, class, 1))
- && (secondary_reload_class (1, class, mode,
+ || ((REGISTER_MOVE_COST (mode, last_class, kind)
+ < MEMORY_MOVE_COST (mode, kind, 1))
+ && (secondary_reload_class (1, kind, mode,
last_reg)
== NO_REGS)
#ifdef SECONDARY_MEMORY_NEEDED
- && ! SECONDARY_MEMORY_NEEDED (last_class, class,
+ && ! SECONDARY_MEMORY_NEEDED (last_class, kind,
mode)
#endif
))
@@ -5671,7 +5671,7 @@ choose_reload_regs (struct insn_chain *chain)
bad_for_class = 0;
for (k = 0; k < nr; k++)
- bad_for_class |= ! TEST_HARD_REG_BIT (reg_class_contents[(int) rld[r].class],
+ bad_for_class |= ! TEST_HARD_REG_BIT (reg_class_contents[rld[r].kind],
i+k);
/* We found a register that contains the
@@ -5753,7 +5753,7 @@ choose_reload_regs (struct insn_chain *chain)
|| REG_P (rld[r].in)
|| MEM_P (rld[r].in))
&& (rld[r].nregs == max_group_size
- || ! reg_classes_intersect_p (rld[r].class, group_class)))
+ || ! reg_classes_intersect_p (rld[r].kind, group_class)))
search_equiv = rld[r].in;
/* If this is an output reload from a simple move insn, look
if an equivalence for the input is available. */
@@ -5770,7 +5770,7 @@ choose_reload_regs (struct insn_chain *chain)
if (search_equiv)
{
rtx equiv
- = find_equiv_reg (search_equiv, insn, rld[r].class,
+ = find_equiv_reg (search_equiv, insn, rld[r].kind,
-1, NULL, 0, rld[r].mode);
int regno = 0;
@@ -5811,7 +5811,7 @@ choose_reload_regs (struct insn_chain *chain)
{
regs_used |= TEST_HARD_REG_BIT (reload_reg_used_at_all,
i);
- bad_for_class |= ! TEST_HARD_REG_BIT (reg_class_contents[(int) rld[r].class],
+ bad_for_class |= ! TEST_HARD_REG_BIT (reg_class_contents[rld[r].kind],
i);
}
@@ -5949,9 +5949,9 @@ choose_reload_regs (struct insn_chain *chain)
|| rld[s].optional)
continue;
- if ((rld[s].class != rld[r].class
- && reg_classes_intersect_p (rld[r].class,
- rld[s].class))
+ if ((rld[s].kind != rld[r].kind
+ && reg_classes_intersect_p (rld[r].kind,
+ rld[s].kind))
|| rld[s].nregs < rld[r].nregs)
break;
}
@@ -6661,7 +6661,7 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
sri.icode = CODE_FOR_nothing;
sri.prev_sri = NULL;
- new_class = targetm.secondary_reload (1, real_oldequiv, rl->class,
+ new_class = targetm.secondary_reload (1, real_oldequiv, rl->kind,
mode, &sri);
if (new_class == NO_REGS && sri.icode == CODE_FOR_nothing)
@@ -6669,8 +6669,8 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
else if (new_class == NO_REGS)
{
if (reload_adjust_reg_for_icode (&second_reload_reg,
- third_reload_reg, sri.icode))
- icode = sri.icode, third_reload_reg = 0;
+ third_reload_reg, (enum insn_code) sri.icode))
+ icode = (enum insn_code) sri.icode, third_reload_reg = 0;
else
oldequiv = old, real_oldequiv = real_old;
}
@@ -6688,7 +6688,7 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
if (reload_adjust_reg_for_temp (&second_reload_reg,
third_reload_reg,
new_class, mode))
- third_reload_reg = 0, tertiary_icode = sri2.icode;
+ third_reload_reg = 0, tertiary_icode = (enum insn_code) sri2.icode;
else
oldequiv = old, real_oldequiv = real_old;
}
@@ -6699,10 +6699,10 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
if (reload_adjust_reg_for_temp (&intermediate, NULL,
new_class, mode)
&& reload_adjust_reg_for_icode (&third_reload_reg, NULL,
- sri2.icode))
+ (enum insn_code) sri2.icode))
{
second_reload_reg = intermediate;
- tertiary_icode = sri2.icode;
+ tertiary_icode = (enum insn_code) sri2.icode;
}
else
oldequiv = old, real_oldequiv = real_old;
@@ -6717,7 +6717,7 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
new_t_class, mode))
{
second_reload_reg = intermediate;
- tertiary_icode = sri2.icode;
+ tertiary_icode = (enum insn_code) sri2.icode;
}
else
oldequiv = old, real_oldequiv = real_old;
@@ -6863,7 +6863,7 @@ emit_output_reload_insns (struct insn_chain *chain, struct reload *rl,
&& reg_equiv_mem[REGNO (old)] != 0)
real_old = reg_equiv_mem[REGNO (old)];
- if (secondary_reload_class (0, rl->class, mode, real_old) != NO_REGS)
+ if (secondary_reload_class (0, rl->kind, mode, real_old) != NO_REGS)
{
rtx second_reloadreg = reloadreg;
reloadreg = rld[secondary_reload].reg_rtx;
@@ -7926,7 +7926,7 @@ delete_output_reload (rtx insn, int j, int last_reload_reg)
n_occurrences = count_occurrences (PATTERN (insn), reg, 0);
if (substed)
n_occurrences += count_occurrences (PATTERN (insn),
- eliminate_regs (substed, 0,
+ eliminate_regs (substed, VOIDmode,
NULL_RTX), 0);
for (i1 = reg_equiv_alt_mem_list [REGNO (reg)]; i1; i1 = XEXP (i1, 1))
{
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 8c097dca412..c1c44532f70 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -174,7 +174,7 @@ static int max_uid;
static int stop_search_p (rtx, int);
static int resource_conflicts_p (struct resources *, struct resources *);
static int insn_references_resource_p (rtx, struct resources *, int);
-static int insn_sets_resource_p (rtx, struct resources *, int);
+static int insn_sets_resource_p (rtx, struct resources *, enum mark_resource_type);
static rtx find_end_label (void);
static rtx emit_delay_sequence (rtx, rtx, int);
static rtx add_to_delay_list (rtx, rtx);
@@ -312,7 +312,7 @@ insn_references_resource_p (rtx insn, struct resources *res,
static int
insn_sets_resource_p (rtx insn, struct resources *res,
- int include_delayed_effects)
+ enum mark_resource_type include_delayed_effects)
{
struct resources insn_sets;
@@ -590,7 +590,7 @@ add_to_delay_list (rtx insn, rtx delay_list)
if (delay_list == 0)
{
clear_hashed_info_for_insn (insn);
- return gen_rtx_INSN_LIST (VOIDmode, insn, NULL_RTX);
+ return gen_rtx_INSN_LIST (REG_DEP_TRUE, insn, NULL_RTX);
}
/* Otherwise this must be an INSN_LIST. Add INSN to the end of the
@@ -1262,8 +1262,8 @@ steal_delay_list_from_target (rtx insn, rtx condition, rtx seq,
int flags;
if (insn_references_resource_p (trial, sets, 0)
- || insn_sets_resource_p (trial, needed, 0)
- || insn_sets_resource_p (trial, sets, 0)
+ || insn_sets_resource_p (trial, needed, MARK_SRC_DEST)
+ || insn_sets_resource_p (trial, sets, MARK_SRC_DEST)
#ifdef HAVE_cc0
/* If TRIAL sets CC0, we can't copy it, so we can't steal this
delay list. */
@@ -1286,7 +1286,7 @@ steal_delay_list_from_target (rtx insn, rtx condition, rtx seq,
if (! must_annul
&& ((condition == const_true_rtx
- || (! insn_sets_resource_p (trial, other_needed, 0)
+ || (! insn_sets_resource_p (trial, other_needed, MARK_SRC_DEST)
&& ! may_trap_or_fault_p (PATTERN (trial)))))
? eligible_for_delay (insn, total_slots_filled, trial, flags)
: (must_annul || (delay_list == NULL && new_delay_list == NULL))
@@ -1362,8 +1362,8 @@ steal_delay_list_from_fallthrough (rtx insn, rtx condition, rtx seq,
/* If TRIAL sets CC0, stealing it will move it too far from the use
of CC0. */
if (insn_references_resource_p (trial, sets, 0)
- || insn_sets_resource_p (trial, needed, 0)
- || insn_sets_resource_p (trial, sets, 0)
+ || insn_sets_resource_p (trial, needed, MARK_SRC_DEST)
+ || insn_sets_resource_p (trial, sets, MARK_SRC_DEST)
#ifdef HAVE_cc0
|| sets_cc0_p (PATTERN (trial))
#endif
@@ -1380,7 +1380,7 @@ steal_delay_list_from_fallthrough (rtx insn, rtx condition, rtx seq,
if (! must_annul
&& ((condition == const_true_rtx
- || (! insn_sets_resource_p (trial, other_needed, 0)
+ || (! insn_sets_resource_p (trial, other_needed, MARK_SRC_DEST)
&& ! may_trap_or_fault_p (PATTERN (trial)))))
? eligible_for_delay (insn, *pslots_filled, trial, flags)
: (must_annul || delay_list == NULL) && (must_annul = 1,
@@ -1461,8 +1461,8 @@ try_merge_delay_insns (rtx insn, rtx thread)
&& ! sets_cc0_p (pat)
#endif
&& ! insn_references_resource_p (trial, &set, 1)
- && ! insn_sets_resource_p (trial, &set, 1)
- && ! insn_sets_resource_p (trial, &needed, 1)
+ && ! insn_sets_resource_p (trial, &set, MARK_SRC_DEST_CALL)
+ && ! insn_sets_resource_p (trial, &needed, MARK_SRC_DEST_CALL)
&& (trial = try_split (pat, trial, 0)) != 0
/* Update next_trial, in case try_split succeeded. */
&& (next_trial = next_nonnote_insn (trial))
@@ -1484,7 +1484,7 @@ try_merge_delay_insns (rtx insn, rtx thread)
INSN_FROM_TARGET_P (next_to_match) = 0;
}
else
- merged_insns = gen_rtx_INSN_LIST (VOIDmode, trial, merged_insns);
+ merged_insns = gen_rtx_INSN_LIST (REG_DEP_TRUE, trial, merged_insns);
if (++slot_number == num_slots)
break;
@@ -1515,8 +1515,8 @@ try_merge_delay_insns (rtx insn, rtx thread)
rtx dtrial = XVECEXP (pat, 0, i);
if (! insn_references_resource_p (dtrial, &set, 1)
- && ! insn_sets_resource_p (dtrial, &set, 1)
- && ! insn_sets_resource_p (dtrial, &needed, 1)
+ && ! insn_sets_resource_p (dtrial, &set, MARK_SRC_DEST_CALL)
+ && ! insn_sets_resource_p (dtrial, &needed, MARK_SRC_DEST_CALL)
#ifdef HAVE_cc0
&& ! sets_cc0_p (PATTERN (dtrial))
#endif
@@ -1525,16 +1525,16 @@ try_merge_delay_insns (rtx insn, rtx thread)
{
if (! annul_p)
{
- rtx new;
+ rtx tmp;
update_block (dtrial, thread);
- new = delete_from_delay_slot (dtrial);
+ tmp = delete_from_delay_slot (dtrial);
if (INSN_DELETED_P (thread))
- thread = new;
+ thread = tmp;
INSN_FROM_TARGET_P (next_to_match) = 0;
}
else
- merged_insns = gen_rtx_INSN_LIST (SImode, dtrial,
+ merged_insns = gen_rtx_INSN_LIST (REG_SAVE_NOTE, dtrial,
merged_insns);
if (++slot_number == num_slots)
@@ -1561,14 +1561,14 @@ try_merge_delay_insns (rtx insn, rtx thread)
{
for (; merged_insns; merged_insns = XEXP (merged_insns, 1))
{
- if (GET_MODE (merged_insns) == SImode)
+ if (GET_MODE (merged_insns) == REG_SAVE_NOTE)
{
- rtx new;
+ rtx tmp;
update_block (XEXP (merged_insns, 0), thread);
- new = delete_from_delay_slot (XEXP (merged_insns, 0));
+ tmp = delete_from_delay_slot (XEXP (merged_insns, 0));
if (INSN_DELETED_P (thread))
- thread = new;
+ thread = tmp;
}
else
{
@@ -1695,8 +1695,8 @@ redundant_insn (rtx insn, rtx target, rtx delay_list)
#endif
/* The insn requiring the delay may not set anything needed or set by
INSN. */
- || insn_sets_resource_p (target_main, &needed, 1)
- || insn_sets_resource_p (target_main, &set, 1))
+ || insn_sets_resource_p (target_main, &needed, MARK_SRC_DEST_CALL)
+ || insn_sets_resource_p (target_main, &set, MARK_SRC_DEST_CALL))
return 0;
/* Insns we pass may not set either NEEDED or SET, so merge them for
@@ -1710,14 +1710,14 @@ redundant_insn (rtx insn, rtx target, rtx delay_list)
while (delay_list)
{
- if (insn_sets_resource_p (XEXP (delay_list, 0), &needed, 1))
+ if (insn_sets_resource_p (XEXP (delay_list, 0), &needed, MARK_SRC_DEST_CALL))
return 0;
delay_list = XEXP (delay_list, 1);
}
if (NONJUMP_INSN_P (target) && GET_CODE (PATTERN (target)) == SEQUENCE)
for (i = 1; i < XVECLEN (PATTERN (target), 0); i++)
- if (insn_sets_resource_p (XVECEXP (PATTERN (target), 0, i), &needed, 1))
+ if (insn_sets_resource_p (XVECEXP (PATTERN (target), 0, i), &needed, MARK_SRC_DEST_CALL))
return 0;
/* Scan backwards until we reach a label or an insn that uses something
@@ -1776,13 +1776,13 @@ redundant_insn (rtx insn, rtx target, rtx delay_list)
we must stop if it sets anything needed or set by INSN. */
if ((! INSN_ANNULLED_BRANCH_P (XVECEXP (pat, 0, 0))
|| ! INSN_FROM_TARGET_P (candidate))
- && insn_sets_resource_p (candidate, &needed, 1))
+ && insn_sets_resource_p (candidate, &needed, MARK_SRC_DEST_CALL))
return 0;
}
/* If the insn requiring the delay slot conflicts with INSN, we
must stop. */
- if (insn_sets_resource_p (XVECEXP (pat, 0, 0), &needed, 1))
+ if (insn_sets_resource_p (XVECEXP (pat, 0, 0), &needed, MARK_SRC_DEST_CALL))
return 0;
}
else
@@ -1793,7 +1793,7 @@ redundant_insn (rtx insn, rtx target, rtx delay_list)
return trial;
/* Can't go any further if TRIAL conflicts with INSN. */
- if (insn_sets_resource_p (trial, &needed, 1))
+ if (insn_sets_resource_p (trial, &needed, MARK_SRC_DEST_CALL))
return 0;
}
}
@@ -2126,8 +2126,8 @@ fill_simple_delay_slots (int non_jumps_p)
/* Check for resource conflict first, to avoid unnecessary
splitting. */
if (! insn_references_resource_p (trial, &set, 1)
- && ! insn_sets_resource_p (trial, &set, 1)
- && ! insn_sets_resource_p (trial, &needed, 1)
+ && ! insn_sets_resource_p (trial, &set, MARK_SRC_DEST_CALL)
+ && ! insn_sets_resource_p (trial, &needed, MARK_SRC_DEST_CALL)
#ifdef HAVE_cc0
/* Can't separate set of cc0 from its use. */
&& ! (reg_mentioned_p (cc0_rtx, pat) && ! sets_cc0_p (pat))
@@ -2144,7 +2144,7 @@ fill_simple_delay_slots (int non_jumps_p)
tail, of the list. */
update_reg_dead_notes (trial, insn);
- delay_list = gen_rtx_INSN_LIST (VOIDmode,
+ delay_list = gen_rtx_INSN_LIST (REG_DEP_TRUE,
trial, delay_list);
update_block (trial, trial);
delete_related_insns (trial);
@@ -2268,8 +2268,8 @@ fill_simple_delay_slots (int non_jumps_p)
split. */
if (GET_CODE (pat) != SEQUENCE
&& ! insn_references_resource_p (trial, &set, 1)
- && ! insn_sets_resource_p (trial, &set, 1)
- && ! insn_sets_resource_p (trial, &needed, 1)
+ && ! insn_sets_resource_p (trial, &set, MARK_SRC_DEST_CALL)
+ && ! insn_sets_resource_p (trial, &needed, MARK_SRC_DEST_CALL)
#ifdef HAVE_cc0
&& ! (reg_mentioned_p (cc0_rtx, pat) && ! sets_cc0_p (pat))
#endif
@@ -2321,8 +2321,8 @@ fill_simple_delay_slots (int non_jumps_p)
&& GET_CODE (PATTERN (next_trial)) == SEQUENCE)
&& !JUMP_P (next_trial)
&& ! insn_references_resource_p (next_trial, &set, 1)
- && ! insn_sets_resource_p (next_trial, &set, 1)
- && ! insn_sets_resource_p (next_trial, &needed, 1)
+ && ! insn_sets_resource_p (next_trial, &set, MARK_SRC_DEST_CALL)
+ && ! insn_sets_resource_p (next_trial, &needed, MARK_SRC_DEST_CALL)
#ifdef HAVE_cc0
&& ! reg_mentioned_p (cc0_rtx, PATTERN (next_trial))
#endif
@@ -2430,8 +2430,8 @@ fill_simple_delay_slots (int non_jumps_p)
continue;
if (! insn_references_resource_p (trial, &set, 1)
- && ! insn_sets_resource_p (trial, &needed, 1)
- && ! insn_sets_resource_p (trial, &set, 1)
+ && ! insn_sets_resource_p (trial, &needed, MARK_SRC_DEST_CALL)
+ && ! insn_sets_resource_p (trial, &set, MARK_SRC_DEST_CALL)
#ifdef HAVE_cc0
/* Don't want to mess with cc0 here. */
&& ! reg_mentioned_p (cc0_rtx, pat)
@@ -2445,7 +2445,7 @@ fill_simple_delay_slots (int non_jumps_p)
insns we find on the head of the list. */
current_function_epilogue_delay_list
- = gen_rtx_INSN_LIST (VOIDmode, trial,
+ = gen_rtx_INSN_LIST (REG_DEP_TRUE, trial,
current_function_epilogue_delay_list);
mark_end_of_function_resources (trial, 1);
update_block (trial, trial);
@@ -2563,8 +2563,8 @@ fill_slots_from_thread (rtx insn, rtx condition, rtx thread,
/* If TRIAL conflicts with the insns ahead of it, we lose. Also,
don't separate or copy insns that set and use CC0. */
if (! insn_references_resource_p (trial, &set, 1)
- && ! insn_sets_resource_p (trial, &set, 1)
- && ! insn_sets_resource_p (trial, &needed, 1)
+ && ! insn_sets_resource_p (trial, &set, MARK_SRC_DEST_CALL)
+ && ! insn_sets_resource_p (trial, &needed, MARK_SRC_DEST_CALL)
#ifdef HAVE_cc0
&& ! (reg_mentioned_p (cc0_rtx, pat)
&& (! own_thread || ! sets_cc0_p (pat)))
@@ -2605,7 +2605,7 @@ fill_slots_from_thread (rtx insn, rtx condition, rtx thread,
go into an annulled delay slot. */
if (!must_annul
&& (condition == const_true_rtx
- || (! insn_sets_resource_p (trial, &opposite_needed, 1)
+ || (! insn_sets_resource_p (trial, &opposite_needed, MARK_SRC_DEST_CALL)
&& ! may_trap_or_fault_p (pat))))
{
old_trial = trial;
@@ -2694,8 +2694,8 @@ fill_slots_from_thread (rtx insn, rtx condition, rtx thread,
may be branching to a location that has a
redundant insn. Skip any if so. */
while (new_thread && ! own_thread
- && ! insn_sets_resource_p (new_thread, &set, 1)
- && ! insn_sets_resource_p (new_thread, &needed, 1)
+ && ! insn_sets_resource_p (new_thread, &set, MARK_SRC_DEST_CALL)
+ && ! insn_sets_resource_p (new_thread, &needed, MARK_SRC_DEST_CALL)
&& ! insn_references_resource_p (new_thread,
&set, 1)
&& (prior_insn
@@ -3555,7 +3555,7 @@ dbr_schedule (rtx first)
epilogue_insn = insn;
}
- uid_to_ruid = xmalloc ((max_uid + 1) * sizeof (int));
+ uid_to_ruid = XNEWVEC (int, max_uid + 1);
for (i = 0, insn = first; insn; i++, insn = NEXT_INSN (insn))
uid_to_ruid[INSN_UID (insn)] = i;
@@ -3563,7 +3563,7 @@ dbr_schedule (rtx first)
if (unfilled_firstobj == 0)
{
gcc_obstack_init (&unfilled_slots_obstack);
- unfilled_firstobj = obstack_alloc (&unfilled_slots_obstack, 0);
+ unfilled_firstobj = (rtx *)obstack_alloc (&unfilled_slots_obstack, 0);
}
for (insn = next_active_insn (first); insn; insn = next_active_insn (insn))
@@ -3638,7 +3638,7 @@ dbr_schedule (rtx first)
obstack_free (&unfilled_slots_obstack, unfilled_firstobj);
/* It is not clear why the line below is needed, but it does seem to be. */
- unfilled_firstobj = obstack_alloc (&unfilled_slots_obstack, 0);
+ unfilled_firstobj = (rtx *)obstack_alloc (&unfilled_slots_obstack, 0);
if (dump_file)
{
diff --git a/gcc/rtl-factoring.c b/gcc/rtl-factoring.c
index 8113306e0e8..d3e10178576 100644
--- a/gcc/rtl-factoring.c
+++ b/gcc/rtl-factoring.c
@@ -321,14 +321,14 @@ compute_rtx_cost (rtx insn)
tmp_bucket.hash = compute_hash (insn);
/* Select the hash group. */
- bucket = htab_find (hash_buckets, &tmp_bucket);
+ bucket = (p_hash_bucket) htab_find (hash_buckets, &tmp_bucket);
if (bucket)
{
tmp_elem.insn = insn;
/* Select the insn. */
- elem = htab_find (bucket->seq_candidates, &tmp_elem);
+ elem = (p_hash_elem) htab_find (bucket->seq_candidates, &tmp_elem);
/* If INSN is parsed the cost will be the cached length. */
if (elem)
@@ -1279,7 +1279,7 @@ fill_hash_bucket (void)
tmp_bucket.hash = compute_hash (insn);
/* Select the hash group. */
- bucket = htab_find (hash_buckets, &tmp_bucket);
+ bucket = (p_hash_bucket) htab_find (hash_buckets, &tmp_bucket);
if (!bucket)
{
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 6c76f9d19df..c2f1dd2c97a 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1751,7 +1751,7 @@ void free_INSN_LIST_list (rtx *);
void free_EXPR_LIST_node (rtx);
void free_INSN_LIST_node (rtx);
rtx alloc_INSN_LIST (rtx, rtx);
-rtx alloc_EXPR_LIST (int, rtx, rtx);
+rtx alloc_EXPR_LIST (enum reg_note, rtx, rtx);
void free_DEPS_LIST_list (rtx *);
rtx alloc_DEPS_LIST (rtx, rtx, int);
void remove_free_DEPS_LIST_elem (rtx, rtx *);
@@ -1888,6 +1888,9 @@ extern rtx gen_rtx_REG (enum machine_mode, unsigned);
extern rtx gen_rtx_SUBREG (enum machine_mode, rtx, int);
extern rtx gen_rtx_MEM (enum machine_mode, rtx);
+extern rtx gen_rtx_EXPR_LIST (enum reg_note, rtx, rtx);
+extern rtx gen_rtx_INSN_LIST (enum reg_note, rtx, rtx);
+
#define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (N))
/* Virtual registers are used during RTL generation to refer to locations into
@@ -1957,17 +1960,14 @@ extern rtx gen_rtx_MEM (enum machine_mode, rtx);
extern rtx output_constant_def (tree, int);
extern rtx lookup_constant_def (tree);
-/* Nonzero after the second flow pass has completed.
- Set to 1 or 0 by toplev.c */
-extern int flow2_completed;
-
-/* Nonzero after end of reload pass.
- Set to 1 or 0 by reload1.c. */
+/* True after the second flow pass has completed. */
+extern bool flow2_completed;
-extern int reload_completed;
+/* True after end of reload pass. Set by reload1.c. */
+extern bool reload_completed;
-/* Nonzero after thread_prologue_and_epilogue_insns has run. */
-extern int epilogue_completed;
+/* True after thread_prologue_and_epilogue_insns has run. */
+extern bool epilogue_completed;
/* Set to 1 while reload_as_needed is operating.
Required by some machines to handle any generated moves differently. */
@@ -1988,9 +1988,9 @@ extern int regstack_completed;
the same indirect address eventually. */
extern int cse_not_expected;
-/* Set to nonzero before life analysis to indicate that it is unsafe to
+/* Set to true before life analysis to indicate that it is unsafe to
generate any new pseudo registers. */
-extern int no_new_pseudos;
+extern bool no_new_pseudos;
/* Translates rtx code to tree code, for those codes needed by
REAL_ARITHMETIC. The function returns an int because the caller may not
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 53e6d83d1b8..d8ec0221c1a 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -2344,32 +2344,32 @@ replace_rtx (rtx x, rtx from, rtx to)
if (GET_CODE (x) == SUBREG)
{
- rtx new = replace_rtx (SUBREG_REG (x), from, to);
+ rtx tmp = replace_rtx (SUBREG_REG (x), from, to);
- if (GET_CODE (new) == CONST_INT)
+ if (GET_CODE (tmp) == CONST_INT)
{
- x = simplify_subreg (GET_MODE (x), new,
+ x = simplify_subreg (GET_MODE (x), tmp,
GET_MODE (SUBREG_REG (x)),
SUBREG_BYTE (x));
gcc_assert (x);
}
else
- SUBREG_REG (x) = new;
+ SUBREG_REG (x) = tmp;
return x;
}
else if (GET_CODE (x) == ZERO_EXTEND)
{
- rtx new = replace_rtx (XEXP (x, 0), from, to);
+ rtx tmp = replace_rtx (XEXP (x, 0), from, to);
- if (GET_CODE (new) == CONST_INT)
+ if (GET_CODE (tmp) == CONST_INT)
{
x = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x),
- new, GET_MODE (XEXP (x, 0)));
+ tmp, GET_MODE (XEXP (x, 0)));
gcc_assert (x);
}
else
- XEXP (x, 0) = new;
+ XEXP (x, 0) = tmp;
return x;
}
@@ -3114,7 +3114,7 @@ struct parms_set_data
static void
parms_set (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
{
- struct parms_set_data *d = data;
+ struct parms_set_data *d = (struct parms_set_data *) data;
if (REG_P (x) && REGNO (x) < FIRST_PSEUDO_REGISTER
&& TEST_HARD_REG_BIT (d->regs, REGNO (x)))
{
@@ -3506,12 +3506,12 @@ nonzero_bits1 (rtx x, enum machine_mode mode, rtx known_x,
{
unsigned HOST_WIDE_INT nonzero_for_hook = nonzero;
- rtx new = rtl_hooks.reg_nonzero_bits (x, mode, known_x,
+ rtx tmp = rtl_hooks.reg_nonzero_bits (x, mode, known_x,
known_mode, known_ret,
&nonzero_for_hook);
- if (new)
- nonzero_for_hook &= cached_nonzero_bits (new, mode, known_x,
+ if (tmp)
+ nonzero_for_hook &= cached_nonzero_bits (tmp, mode, known_x,
known_mode, known_ret);
return nonzero_for_hook;
@@ -3991,12 +3991,12 @@ num_sign_bit_copies1 (rtx x, enum machine_mode mode, rtx known_x,
{
unsigned int copies_for_hook = 1, copies = 1;
- rtx new = rtl_hooks.reg_num_sign_bit_copies (x, mode, known_x,
+ rtx tmp = rtl_hooks.reg_num_sign_bit_copies (x, mode, known_x,
known_mode, known_ret,
&copies_for_hook);
- if (new)
- copies = cached_num_sign_bit_copies (new, mode, known_x,
+ if (tmp)
+ copies = cached_num_sign_bit_copies (tmp, mode, known_x,
known_mode, known_ret);
if (copies > 1 || copies_for_hook > 1)
diff --git a/gcc/rtlhooks.c b/gcc/rtlhooks.c
index ece7198f9a2..e9ff71d3867 100644
--- a/gcc/rtlhooks.c
+++ b/gcc/rtlhooks.c
@@ -144,7 +144,7 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x)
{
/* This is the only other case we handle. */
int offset = 0;
- rtx new;
+ rtx n;
if (WORDS_BIG_ENDIAN)
offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD)
@@ -155,11 +155,11 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x)
offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode))
- MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x))));
- new = adjust_address_nv (x, mode, offset);
- if (! memory_address_p (mode, XEXP (new, 0)))
+ n = adjust_address_nv (x, mode, offset);
+ if (! memory_address_p (mode, XEXP (n, 0)))
return 0;
- return new;
+ return n;
}
else if (mode != GET_MODE (x) && GET_MODE (x) != VOIDmode)
return gen_lowpart_SUBREG (mode, x);
diff --git a/gcc/sbitmap.c b/gcc/sbitmap.c
index 5ef7f08d2c5..745ab90eee4 100644
--- a/gcc/sbitmap.c
+++ b/gcc/sbitmap.c
@@ -42,7 +42,7 @@ sbitmap_alloc (unsigned int n_elms)
bytes = size * sizeof (SBITMAP_ELT_TYPE);
amt = (sizeof (struct simple_bitmap_def)
+ bytes - sizeof (SBITMAP_ELT_TYPE));
- bmap = xmalloc (amt);
+ bmap = (sbitmap) xmalloc (amt);
bmap->n_bits = n_elms;
bmap->size = size;
bmap->bytes = bytes;
@@ -65,7 +65,7 @@ sbitmap_resize (sbitmap bmap, unsigned int n_elms, int def)
{
amt = (sizeof (struct simple_bitmap_def)
+ bytes - sizeof (SBITMAP_ELT_TYPE));
- bmap = xrealloc (bmap, amt);
+ bmap = (sbitmap) xrealloc (bmap, amt);
}
if (n_elms > bmap->n_bits)
@@ -157,7 +157,7 @@ sbitmap_vector_alloc (unsigned int n_vecs, unsigned int n_elms)
}
amt = vector_bytes + (n_vecs * elm_bytes);
- bitmap_vector = xmalloc (amt);
+ bitmap_vector = (sbitmap *) xmalloc (amt);
for (i = 0, offset = vector_bytes; i < n_vecs; i++, offset += elm_bytes)
{
diff --git a/gcc/scan.c b/gcc/scan.c
index d5d7beefc35..74c0d1c6d4f 100644
--- a/gcc/scan.c
+++ b/gcc/scan.c
@@ -35,7 +35,7 @@ make_sstring_space (sstring *str, int count)
if (new_size <= cur_size)
return;
- str->base = xrealloc (str->base, new_size);
+ str->base = (char *)xrealloc (str->base, new_size);
str->ptr = str->base + cur_size;
str->limit = str->base + new_size;
}
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index 0cde4f2e94f..9e2bc302f66 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -252,7 +252,7 @@ maybe_add_or_update_back_dep_1 (rtx insn, rtx elem, enum reg_note dep_type,
/* INSN has an internal dependence, which we can't overcome. */
HAS_INTERNAL_DEP (insn) = 1;
#endif
- return 0;
+ return DEP_NONE;
}
return add_or_update_back_dep_1 (insn, elem, dep_type,
@@ -683,7 +683,7 @@ add_insn_mem_dependence (struct deps *deps, rtx *insn_list, rtx *mem_list,
mem = shallow_copy_rtx (mem);
XEXP (mem, 0) = cselib_subst_to_values (XEXP (mem, 0));
}
- link = alloc_EXPR_LIST (VOIDmode, canon_rtx (mem), *mem_list);
+ link = alloc_EXPR_LIST (REG_DEP_TRUE, canon_rtx (mem), *mem_list);
*mem_list = link;
deps->pending_lists_length++;
@@ -1682,15 +1682,15 @@ compute_forward_dependences (rtx head, rtx tail)
if (current_sched_info->flags & DO_SPECULATION)
{
- rtx new = 0, link, next;
+ rtx tmp = 0, link, next;
for (link = LOG_LINKS (insn); link; link = next)
{
next = XEXP (link, 1);
- adjust_add_sorted_back_dep (insn, link, &new);
+ adjust_add_sorted_back_dep (insn, link, &tmp);
}
- LOG_LINKS (insn) = new;
+ LOG_LINKS (insn) = tmp;
}
for (link = LOG_LINKS (insn); link; link = XEXP (link, 1))
diff --git a/gcc/sched-ebb.c b/gcc/sched-ebb.c
index b2e82b59182..4946973cee3 100644
--- a/gcc/sched-ebb.c
+++ b/gcc/sched-ebb.c
@@ -332,7 +332,7 @@ earliest_block_with_similiar_load (basic_block last_block, rtx load_insn)
/* insn2 not guaranteed to be a 1 base reg load. */
continue;
- for (bb = last_block; bb; bb = bb->aux)
+ for (bb = last_block; bb; bb = (basic_block) bb->aux)
if (insn2_block == bb)
break;
@@ -354,7 +354,6 @@ static void
add_deps_for_risky_insns (rtx head, rtx tail)
{
rtx insn, prev;
- int class;
rtx last_jump = NULL_RTX;
rtx next_tail = NEXT_INSN (tail);
basic_block last_block = NULL, bb;
@@ -369,9 +368,9 @@ add_deps_for_risky_insns (rtx head, rtx tail)
}
else if (INSN_P (insn) && last_jump != NULL_RTX)
{
- class = haifa_classify_insn (insn);
+ int cls = haifa_classify_insn (insn);
prev = last_jump;
- switch (class)
+ switch (cls)
{
case PFREE_CANDIDATE:
if (flag_schedule_speculative_load)
@@ -379,7 +378,7 @@ add_deps_for_risky_insns (rtx head, rtx tail)
bb = earliest_block_with_similiar_load (last_block, insn);
if (bb)
{
- bb = bb->aux;
+ bb = (basic_block) bb->aux;
if (!bb)
break;
prev = BB_END (bb);
@@ -424,7 +423,7 @@ add_deps_for_risky_insns (rtx head, rtx tail)
/* Maintain the invariant that bb->aux is clear after use. */
while (last_block)
{
- bb = last_block->aux;
+ bb = (basic_block) last_block->aux;
last_block->aux = NULL;
last_block = bb;
}
diff --git a/gcc/sched-int.h b/gcc/sched-int.h
index d2c6c62c969..904f03c93bd 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -43,6 +43,17 @@ typedef int ds_t;
typedef int dw_t;
/* Describe state of dependencies used during sched_analyze phase. */
+struct deps_reg
+{
+ rtx uses;
+ rtx sets;
+ rtx clobbers;
+ int uses_length;
+ int clobbers_length;
+};
+
+enum post_call_type { not_post_call, post_call, post_call_initial };
+
struct deps
{
/* The *_insns and *_mems are paired lists. Each pending memory operation
@@ -100,7 +111,7 @@ struct deps
/* Used to keep post-call pseudo/hard reg movements together with
the call. */
- enum { not_post_call, post_call, post_call_initial } in_post_call_group_p;
+ enum post_call_type in_post_call_group_p;
/* Set to the tail insn of the outermost libcall block.
@@ -116,14 +127,7 @@ struct deps
N within the current basic block; or zero, if there is no
such insn. Needed for new registers which may be introduced
by splitting insns. */
- struct deps_reg
- {
- rtx uses;
- rtx sets;
- rtx clobbers;
- int uses_length;
- int clobbers_length;
- } *reg_last;
+ struct deps_reg *reg_last;
/* Element N is set for each register that has any nonzero element
in reg_last[N].{uses,sets,clobbers}. */
@@ -487,6 +491,7 @@ enum SPEC_TYPES_OFFSETS {
is already present and nothing has been changed; a dependence type
has been changed; brand new dependence has been created. */
enum DEPS_ADJUST_RESULT {
+ DEP_NONE = 0,
DEP_PRESENT = 1,
DEP_CHANGED = 2,
DEP_CREATED = 3
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index 4c9c0dec2c2..81a97c04761 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -691,7 +691,7 @@ find_rgns (void)
extend_regions_p = PARAM_VALUE (PARAM_MAX_SCHED_EXTEND_REGIONS_ITERS) > 0;
if (extend_regions_p)
{
- degree1 = xmalloc (last_basic_block * sizeof (int));
+ degree1 = XNEWVEC(int, last_basic_block);
extended_rgn_header = sbitmap_alloc (last_basic_block);
sbitmap_zero (extended_rgn_header);
}
@@ -981,7 +981,7 @@ gather_region_statistics (int **rsp)
if (nr_blocks > a_sz)
{
- a = xrealloc (a, nr_blocks * sizeof (*a));
+ a = (int *) xrealloc (a, nr_blocks * sizeof (*a));
do
a[a_sz++] = 0;
while (a_sz != nr_blocks);
@@ -1038,9 +1038,9 @@ extend_rgns (int *degree, int *idxp, sbitmap header, int *loop_hdr)
max_iter = PARAM_VALUE (PARAM_MAX_SCHED_EXTEND_REGIONS_ITERS);
- max_hdr = xmalloc (last_basic_block * sizeof (*max_hdr));
+ max_hdr = XNEWVEC (int, last_basic_block);
- order = xmalloc (last_basic_block * sizeof (*order));
+ order = XNEWVEC (int, last_basic_block);
post_order_compute (order, false);
for (i = nblocks - 1; i >= 0; i--)
@@ -2383,10 +2383,10 @@ static struct deps *bb_deps;
static rtx
concat_INSN_LIST (rtx copy, rtx old)
{
- rtx new = old;
+ rtx tmp = old;
for (; copy ; copy = XEXP (copy, 1))
- new = alloc_INSN_LIST (XEXP (copy, 0), new);
- return new;
+ tmp = alloc_INSN_LIST (XEXP (copy, 0), tmp);
+ return tmp;
}
static void
@@ -2399,7 +2399,7 @@ concat_insn_mem_list (rtx copy_insns, rtx copy_mems, rtx *old_insns_p,
while (copy_insns)
{
new_insns = alloc_INSN_LIST (XEXP (copy_insns, 0), new_insns);
- new_mems = alloc_EXPR_LIST (VOIDmode, XEXP (copy_mems, 0), new_mems);
+ new_mems = alloc_EXPR_LIST (REG_DEP_TRUE, XEXP (copy_mems, 0), new_mems);
copy_insns = XEXP (copy_insns, 1);
copy_mems = XEXP (copy_mems, 1);
}
@@ -2654,7 +2654,7 @@ schedule_region (int rgn)
current_blocks = RGN_BLOCKS (rgn);
/* See comments in add_block1, for what reasons we allocate +1 element. */
- ebb_head = xrealloc (ebb_head, (current_nr_blocks + 1) * sizeof (*ebb_head));
+ ebb_head = (int *) xrealloc (ebb_head, (current_nr_blocks + 1) * sizeof (*ebb_head));
for (bb = 0; bb <= current_nr_blocks; bb++)
ebb_head[bb] = current_blocks + bb;
@@ -3051,7 +3051,7 @@ schedule_insns (void)
if (sched_verbose)
{
- if (reload_completed == 0 && flag_schedule_interblock)
+ if (!reload_completed && flag_schedule_interblock)
{
fprintf (sched_dump,
"\n;; Procedure interblock/speculative motions == %d/%d \n",
@@ -3129,7 +3129,7 @@ add_block1 (basic_block bb, basic_block after)
if (CHECK_DEAD_NOTES)
{
sbitmap blocks = sbitmap_alloc (last_basic_block);
- deaths_in_region = xrealloc (deaths_in_region, nr_regions *
+ deaths_in_region = (int *) xrealloc (deaths_in_region, nr_regions *
sizeof (*deaths_in_region));
check_dead_notes1 (nr_regions - 1, blocks);
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 1868a812566..2f992927173 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -1688,7 +1688,7 @@ sdbout_init (const char *input_file_name ATTRIBUTE_UNUSED)
#else /* SDB_DEBUGGING_INFO */
/* This should never be used, but its address is needed for comparisons. */
-const struct gcc_debug_hooks sdb_debug_hooks;
+struct gcc_debug_hooks sdb_debug_hooks;
#endif /* SDB_DEBUGGING_INFO */
diff --git a/gcc/see.c b/gcc/see.c
index d20cdf4be28..f247e08dd72 100644
--- a/gcc/see.c
+++ b/gcc/see.c
@@ -725,11 +725,11 @@ see_get_extension_data (rtx extension, enum machine_mode *source_mode)
/* Parallel pattern for extension not supported for the moment. */
if (GET_CODE (PATTERN (extension)) == PARALLEL)
- return NOT_RELEVANT;
+ return UNKNOWN;
set = single_set (extension);
if (!set)
- return NOT_RELEVANT;
+ return UNKNOWN;
rhs = SET_SRC (set);
lhs = SET_DEST (set);
@@ -810,8 +810,8 @@ see_gen_normalized_extension (rtx reg, enum rtx_code extension_code,
static int
eq_descriptor_pre_extension (const void *p1, const void *p2)
{
- const struct see_pre_extension_expr *extension1 = p1;
- const struct see_pre_extension_expr *extension2 = p2;
+ const struct see_pre_extension_expr *extension1 = (const struct see_pre_extension_expr *) p1;
+ const struct see_pre_extension_expr *extension2 = (const struct see_pre_extension_expr *) p2;
rtx set1 = single_set (extension1->se_insn);
rtx set2 = single_set (extension2->se_insn);
rtx rhs1, rhs2;
@@ -831,7 +831,7 @@ eq_descriptor_pre_extension (const void *p1, const void *p2)
static hashval_t
hash_descriptor_pre_extension (const void *p)
{
- const struct see_pre_extension_expr *extension = p;
+ const struct see_pre_extension_expr *extension = (const struct see_pre_extension_expr *) p;
rtx set = single_set (extension->se_insn);
rtx rhs;
@@ -849,7 +849,7 @@ hash_descriptor_pre_extension (const void *p)
static void
hash_del_pre_extension (void *p)
{
- struct see_pre_extension_expr *extension = p;
+ struct see_pre_extension_expr *extension = (struct see_pre_extension_expr *) p;
struct see_occr *curr_occr = extension->antic_occr;
struct see_occr *next_occr = NULL;
@@ -887,8 +887,8 @@ hash_del_pre_extension (void *p)
static int
eq_descriptor_properties (const void *p1, const void *p2)
{
- const struct see_register_properties *curr_prop1 = p1;
- const struct see_register_properties *curr_prop2 = p2;
+ const struct see_register_properties *curr_prop1 = (const struct see_register_properties *) p1;
+ const struct see_register_properties *curr_prop2 = (const struct see_register_properties *) p2;
return curr_prop1->regno == curr_prop2->regno;
}
@@ -900,7 +900,7 @@ eq_descriptor_properties (const void *p1, const void *p2)
static hashval_t
hash_descriptor_properties (const void *p)
{
- const struct see_register_properties *curr_prop = p;
+ const struct see_register_properties *curr_prop = (const struct see_register_properties *) p;
return curr_prop->regno;
}
@@ -909,7 +909,7 @@ hash_descriptor_properties (const void *p)
static void
hash_del_properties (void *p)
{
- struct see_register_properties *curr_prop = p;
+ struct see_register_properties *curr_prop = (struct see_register_properties *) p;
free (curr_prop);
}
@@ -1034,7 +1034,7 @@ see_seek_pre_extension_expr (rtx extension, enum extension_type type)
/* This is the first time this extension instruction is encountered. Store
it in the hash. */
{
- (*slot_pre_exp) = xmalloc (sizeof (struct see_pre_extension_expr));
+ (*slot_pre_exp) = XNEW (struct see_pre_extension_expr);
(*slot_pre_exp)->se_insn = extension;
(*slot_pre_exp)->bitmap_index =
(htab_elements (see_pre_extension_hash) - 1);
@@ -1347,16 +1347,16 @@ see_initialize_data_structures (void)
defs_num = DF_DEFS_SIZE (df);
/* Allocate web entries array for the union-find data structure. */
- def_entry = xcalloc (defs_num, sizeof (struct web_entry));
- use_entry = xcalloc (uses_num, sizeof (struct web_entry));
+ def_entry = XCNEWVEC(struct web_entry, defs_num);
+ use_entry = XCNEWVEC(struct web_entry, uses_num);
/* Allocate an array of splay trees.
One splay tree for each basic block. */
- see_bb_splay_ar = xcalloc (last_bb, sizeof (splay_tree));
+ see_bb_splay_ar = XCNEWVEC(splay_tree, last_bb);
/* Allocate an array of hashes.
One hash for each basic block. */
- see_bb_hash_ar = xcalloc (last_bb, sizeof (htab_t));
+ see_bb_hash_ar = XCNEWVEC(htab_t, last_bb);
/* Allocate the extension hash. It will hold the extensions that we want
to PRE. */
@@ -1473,7 +1473,7 @@ see_want_to_be_merged_with_extension (rtx ref, rtx extension,
static int
see_print_register_properties (void **slot, void *b ATTRIBUTE_UNUSED)
{
- struct see_register_properties *prop = *slot;
+ struct see_register_properties *prop = (struct see_register_properties *) *slot;
gcc_assert (prop);
fprintf (dump_file, "Property found for register %d\n", prop->regno);
@@ -1490,7 +1490,7 @@ see_print_register_properties (void **slot, void *b ATTRIBUTE_UNUSED)
static int
see_print_pre_extension_expr (void **slot, void *b ATTRIBUTE_UNUSED)
{
- struct see_pre_extension_expr *pre_extension = *slot;
+ struct see_pre_extension_expr *pre_extension = (struct see_pre_extension_expr *) *slot;
gcc_assert (pre_extension
&& pre_extension->se_insn
@@ -1515,7 +1515,7 @@ see_print_pre_extension_expr (void **slot, void *b ATTRIBUTE_UNUSED)
static int
see_delete_merged_def_extension (void **slot, void *b ATTRIBUTE_UNUSED)
{
- rtx def_se = *slot;
+ rtx def_se = (rtx) *slot;
if (dump_file)
{
@@ -1543,7 +1543,7 @@ see_delete_merged_def_extension (void **slot, void *b ATTRIBUTE_UNUSED)
static int
see_delete_unmerged_def_extension (void **slot, void *b ATTRIBUTE_UNUSED)
{
- rtx def_se = *slot;
+ rtx def_se = (rtx) *slot;
if (dump_file)
{
@@ -1566,7 +1566,7 @@ see_delete_unmerged_def_extension (void **slot, void *b ATTRIBUTE_UNUSED)
static int
see_emit_use_extension (void **slot, void *b)
{
- rtx use_se = *slot;
+ rtx use_se = (rtx) *slot;
struct see_ref_s *curr_ref_s = (struct see_ref_s *) b;
if (INSN_DELETED_P (use_se))
@@ -1732,7 +1732,7 @@ see_pre_insert_extensions (struct see_pre_extension_expr **index_map)
static int
see_pre_delete_extension (void **slot, void *b ATTRIBUTE_UNUSED)
{
- struct see_pre_extension_expr *expr = *slot;
+ struct see_pre_extension_expr *expr = (struct see_pre_extension_expr *) *slot;
struct see_occr *occr;
int indx = expr->bitmap_index;
@@ -1763,7 +1763,7 @@ see_pre_delete_extension (void **slot, void *b ATTRIBUTE_UNUSED)
static int
see_map_extension (void **slot, void *b)
{
- struct see_pre_extension_expr *expr = *slot;
+ struct see_pre_extension_expr *expr = (struct see_pre_extension_expr *) *slot;
struct see_pre_extension_expr **index_map =
(struct see_pre_extension_expr **) b;
@@ -1787,8 +1787,7 @@ see_commit_changes (void)
bool did_insert = false;
int i;
- index_map = xcalloc (pre_extension_num,
- sizeof (struct see_pre_extension_expr *));
+ index_map = XCNEWVEC (struct see_pre_extension_expr *, pre_extension_num);
if (dump_file)
fprintf (dump_file,
@@ -1842,7 +1841,7 @@ see_commit_changes (void)
static int
see_analyze_merged_def_local_prop (void **slot, void *b)
{
- rtx def_se = *slot;
+ rtx def_se = (rtx) *slot;
struct see_ref_s *curr_ref_s = (struct see_ref_s *) b;
rtx ref = curr_ref_s->insn;
struct see_pre_extension_expr *extension_expr;
@@ -1880,7 +1879,7 @@ see_analyze_merged_def_local_prop (void **slot, void *b)
/* Set the available bit. */
SET_BIT (comp[bb_num], indx);
/* Record the available occurrence. */
- curr_occr = xmalloc (sizeof (struct see_occr));
+ curr_occr = XNEW (struct see_occr);
curr_occr->next = NULL;
curr_occr->insn = def_se;
curr_occr->block_num = bb_num;
@@ -1910,7 +1909,7 @@ see_analyze_merged_def_local_prop (void **slot, void *b)
static int
see_analyze_unmerged_def_local_prop (void **slot, void *b)
{
- rtx def_se = *slot;
+ rtx def_se = (rtx) *slot;
struct see_ref_s *curr_ref_s = (struct see_ref_s *) b;
rtx ref = curr_ref_s->insn;
struct see_pre_extension_expr *extension_expr;
@@ -1958,7 +1957,7 @@ static int
see_analyze_use_local_prop (void **slot, void *b)
{
struct see_ref_s *curr_ref_s = (struct see_ref_s *) b;
- rtx use_se = *slot;
+ rtx use_se = (rtx) *slot;
rtx ref = curr_ref_s->insn;
rtx dest_extension_reg = see_get_extension_reg (use_se, 1);
struct see_pre_extension_expr *extension_expr;
@@ -1990,7 +1989,7 @@ see_analyze_use_local_prop (void **slot, void *b)
/* Set the anticipatable bit. */
SET_BIT (antloc[bb_num], indx);
/* Record the anticipatable occurrence. */
- curr_occr = xmalloc (sizeof (struct see_occr));
+ curr_occr = XNEW (struct see_occr);
curr_occr->next = NULL;
curr_occr->insn = use_se;
curr_occr->block_num = bb_num;
@@ -2008,7 +2007,7 @@ see_analyze_use_local_prop (void **slot, void *b)
/* Set the available bit. */
SET_BIT (comp[bb_num], indx);
/* Record the available occurrence. */
- curr_occr = xmalloc (sizeof (struct see_occr));
+ curr_occr = XNEW (struct see_occr);
curr_occr->next = NULL;
curr_occr->insn = use_se;
curr_occr->block_num = bb_num;
@@ -2032,7 +2031,7 @@ see_analyze_use_local_prop (void **slot, void *b)
/* Reset the killed bit. */
RESET_BIT (ae_kill[bb_num], indx);
/* Record the available occurrence. */
- curr_occr = xmalloc (sizeof (struct see_occr));
+ curr_occr = XNEW (struct see_occr);
curr_occr->next = NULL;
curr_occr->insn = use_se;
curr_occr->block_num = bb_num;
@@ -2155,7 +2154,7 @@ see_execute_LCM (void)
static int
see_set_prop_merged_def (void **slot, void *b)
{
- rtx def_se = *slot;
+ rtx def_se = (rtx) *slot;
struct see_ref_s *curr_ref_s = (struct see_ref_s *) b;
rtx insn = curr_ref_s->insn;
rtx dest_extension_reg = see_get_extension_reg (def_se, 1);
@@ -2194,7 +2193,7 @@ see_set_prop_merged_def (void **slot, void *b)
else
{
/* Property doesn't exist yet. */
- curr_prop = xmalloc (sizeof (struct see_register_properties));
+ curr_prop = XNEW (struct see_register_properties);
curr_prop->regno = REGNO (dest_extension_reg);
curr_prop->last_def = ref_luid;
curr_prop->first_se_before_any_def = -1;
@@ -2226,7 +2225,7 @@ see_set_prop_merged_def (void **slot, void *b)
static int
see_set_prop_unmerged_def (void **slot, void *b)
{
- rtx def_se = *slot;
+ rtx def_se = (rtx) *slot;
struct see_ref_s *curr_ref_s = (struct see_ref_s *) b;
rtx insn = curr_ref_s->insn;
rtx dest_extension_reg = see_get_extension_reg (def_se, 1);
@@ -2265,7 +2264,7 @@ see_set_prop_unmerged_def (void **slot, void *b)
else
{
/* Property doesn't exist yet. */
- curr_prop = xmalloc (sizeof (struct see_register_properties));
+ curr_prop = XNEW (struct see_register_properties);
curr_prop->regno = REGNO (dest_extension_reg);
curr_prop->last_def = ref_luid;
curr_prop->first_se_before_any_def = -1;
@@ -2299,7 +2298,7 @@ see_set_prop_unmerged_def (void **slot, void *b)
static int
see_set_prop_unmerged_use (void **slot, void *b)
{
- rtx use_se = *slot;
+ rtx use_se = (rtx) *slot;
struct see_ref_s *curr_ref_s = (struct see_ref_s *) b;
rtx insn = curr_ref_s->insn;
rtx dest_extension_reg = see_get_extension_reg (use_se, 1);
@@ -2359,7 +2358,7 @@ see_set_prop_unmerged_use (void **slot, void *b)
else
{
/* Property doesn't exist yet. Create a new one. */
- curr_prop = xmalloc (sizeof (struct see_register_properties));
+ curr_prop = XNEW (struct see_register_properties);
curr_prop->regno = REGNO (dest_extension_reg);
curr_prop->last_def = -1;
curr_prop->first_se_before_any_def = ref_luid;
@@ -2389,7 +2388,7 @@ see_set_prop_unmerged_use (void **slot, void *b)
static int
see_print_one_extension (void **slot, void *b ATTRIBUTE_UNUSED)
{
- rtx def_se = *slot;
+ rtx def_se = (rtx) *slot;
gcc_assert (def_se && INSN_P (def_se));
print_rtl_single (dump_file, def_se);
@@ -2581,7 +2580,7 @@ static int
see_merge_one_use_extension (void **slot, void *b)
{
struct see_ref_s *curr_ref_s = (struct see_ref_s *) b;
- rtx use_se = *slot;
+ rtx use_se = (rtx) *slot;
rtx ref = (curr_ref_s->merged_insn) ? curr_ref_s->merged_insn :
curr_ref_s->insn;
rtx merged_ref_next = (curr_ref_s->merged_insn) ?
@@ -2722,7 +2721,7 @@ static int
see_merge_one_def_extension (void **slot, void *b)
{
struct see_ref_s *curr_ref_s = (struct see_ref_s *) b;
- rtx def_se = *slot;
+ rtx def_se = (rtx) *slot;
/* If the original insn was already merged with an extension before,
take the merged one. */
rtx ref = (curr_ref_s->merged_insn) ? curr_ref_s->merged_insn :
@@ -3105,7 +3104,7 @@ see_store_reference_and_extension (rtx ref_insn, rtx se_insn,
tree. */
if (!stn)
{
- ref_s = xmalloc (sizeof (struct see_ref_s));
+ ref_s = XNEW (struct see_ref_s);
ref_s->luid = DF_INSN_LUID (df, ref_insn);
ref_s->insn = ref_insn;
ref_s->merged_insn = NULL;
@@ -3368,7 +3367,7 @@ see_update_uses_relevancy (void)
fprintf (dump_file, "RELEVANT USE \n");
}
- curr_entry_extra_info = xmalloc (sizeof (struct see_entry_extra_info));
+ curr_entry_extra_info = XNEW (struct see_entry_extra_info);
curr_entry_extra_info->relevancy = et;
curr_entry_extra_info->local_relevancy = et;
use_entry[i].extra_info = curr_entry_extra_info;
@@ -3473,7 +3472,7 @@ see_analyze_one_def (rtx insn, enum machine_mode *source_mode,
if (next_insn
&& INSN_P (next_insn)
&& (see_get_extension_data (next_insn, &next_source_mode) !=
- NOT_RELEVANT))
+ UNKNOWN))
{
rtx curr_dest_register = see_get_extension_reg (insn, 1);
rtx next_source_register = see_get_extension_reg (next_insn, 0);
@@ -3569,7 +3568,7 @@ see_update_defs_relevancy (void)
et = see_analyze_one_def (insn, &source_mode, &source_mode_unsigned);
- curr_entry_extra_info = xmalloc (sizeof (struct see_entry_extra_info));
+ curr_entry_extra_info = XNEW (struct see_entry_extra_info);
curr_entry_extra_info->relevancy = et;
curr_entry_extra_info->local_relevancy = et;
if (et != EXTENDED_DEF)
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index fee07f9b5b8..797f24cf8e6 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -3190,8 +3190,8 @@ struct simplify_plus_minus_op_data
static int
simplify_plus_minus_op_data_cmp (const void *p1, const void *p2)
{
- const struct simplify_plus_minus_op_data *d1 = p1;
- const struct simplify_plus_minus_op_data *d2 = p2;
+ const struct simplify_plus_minus_op_data *d1 = (const struct simplify_plus_minus_op_data *) p1;
+ const struct simplify_plus_minus_op_data *d2 = (const struct simplify_plus_minus_op_data *) p2;
int result;
result = (commutative_operand_precedence (d2->op)
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 193745314ad..50656d07006 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -160,7 +160,7 @@ force_label_rtx (tree label)
else
p = cfun;
- p->expr->x_forced_labels = gen_rtx_EXPR_LIST (VOIDmode, ref,
+ p->expr->x_forced_labels = gen_rtx_EXPR_LIST (REG_DEP_TRUE, ref,
p->expr->x_forced_labels);
return ref;
}
@@ -216,12 +216,12 @@ expand_label (tree label)
{
expand_nl_goto_receiver ();
nonlocal_goto_handler_labels
- = gen_rtx_EXPR_LIST (VOIDmode, label_r,
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, label_r,
nonlocal_goto_handler_labels);
}
if (FORCED_LABEL (label))
- forced_labels = gen_rtx_EXPR_LIST (VOIDmode, label_r, forced_labels);
+ forced_labels = gen_rtx_EXPR_LIST (REG_DEP_TRUE, label_r, forced_labels);
if (DECL_NONLOCAL (label) || FORCED_LABEL (label))
maybe_set_first_label_num (label_r);
@@ -333,7 +333,7 @@ parse_output_constraint (const char **constraint_p, int operand_num,
*p, operand_num);
/* Make a copy of the constraint. */
- buf = alloca (c_len + 1);
+ buf = (char *) alloca (c_len + 1);
strcpy (buf, constraint);
/* Swap the first character and the `=' or `+'. */
buf[p - constraint] = buf[0];
@@ -565,7 +565,7 @@ decl_overlaps_hard_reg_set_p (tree *declp, int *walk_subtrees ATTRIBUTE_UNUSED,
void *data)
{
tree decl = *declp;
- const HARD_REG_SET *regs = data;
+ const HARD_REG_SET *regs = (const HARD_REG_SET *) data;
if (TREE_CODE (decl) == VAR_DECL)
{
@@ -656,13 +656,13 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
tree t;
int i;
/* Vector of RTX's of evaluated output operands. */
- rtx *output_rtx = alloca (noutputs * sizeof (rtx));
- int *inout_opnum = alloca (noutputs * sizeof (int));
- rtx *real_output_rtx = alloca (noutputs * sizeof (rtx));
+ rtx *output_rtx = (rtx *) alloca (noutputs * sizeof (rtx));
+ int *inout_opnum = (int *) alloca (noutputs * sizeof (int));
+ rtx *real_output_rtx = (rtx *) alloca (noutputs * sizeof (rtx));
enum machine_mode *inout_mode
- = alloca (noutputs * sizeof (enum machine_mode));
+ = (enum machine_mode *) alloca (noutputs * sizeof (enum machine_mode));
const char **constraints
- = alloca ((noutputs + ninputs) * sizeof (const char *));
+ = (const char **) alloca ((noutputs + ninputs) * sizeof (const char *));
int old_generating_concat_p = generating_concat_p;
/* An ASM with no outputs needs to be treated as volatile, for now. */
@@ -1357,7 +1357,7 @@ expand_expr_stmt (tree exp)
rtx value;
tree type;
- value = expand_expr (exp, const0_rtx, VOIDmode, 0);
+ value = expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
type = TREE_TYPE (exp);
/* If all we do is reference a volatile value in memory,
@@ -1611,7 +1611,7 @@ expand_return (tree retval)
int n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
unsigned int bitsize
= MIN (TYPE_ALIGN (TREE_TYPE (retval_rhs)), BITS_PER_WORD);
- rtx *result_pseudos = alloca (sizeof (rtx) * n_regs);
+ rtx *result_pseudos = (rtx *) alloca (sizeof (rtx) * n_regs);
rtx result_reg, src = NULL_RTX, dst = NULL_RTX;
rtx result_val = expand_normal (retval_rhs);
enum machine_mode tmpmode, result_reg_mode;
@@ -1718,7 +1718,7 @@ expand_return (tree retval)
tree nt = build_qualified_type (ot, TYPE_QUALS (ot) | TYPE_QUAL_CONST);
val = assign_temp (nt, 0, 0, 1);
- val = expand_expr (retval_rhs, val, GET_MODE (val), 0);
+ val = expand_expr (retval_rhs, val, GET_MODE (val), EXPAND_NORMAL);
val = force_not_mem (val);
/* Return the calculated value. */
expand_value_return (val);
@@ -1726,7 +1726,7 @@ expand_return (tree retval)
else
{
/* No hard reg used; calculate value into hard return reg. */
- expand_expr (retval, const0_rtx, VOIDmode, 0);
+ expand_expr (retval, const0_rtx, VOIDmode, EXPAND_NORMAL);
expand_value_return (result_rtl);
}
}
@@ -2124,7 +2124,7 @@ add_case_node (struct case_node *head, tree type, tree low, tree high,
/* Add this label to the chain. Make sure to drop overflow flags. */
- r = ggc_alloc (sizeof (struct case_node));
+ r = (struct case_node *) ggc_alloc (sizeof (struct case_node));
r->low = build_int_cst_wide (TREE_TYPE (low), TREE_INT_CST_LOW (low),
TREE_INT_CST_HIGH (low));
r->high = build_int_cst_wide (TREE_TYPE (high), TREE_INT_CST_LOW (high),
@@ -2186,8 +2186,8 @@ bool lshift_cheap_p (void)
static int
case_bit_test_cmp (const void *p1, const void *p2)
{
- const struct case_bit_test *d1 = p1;
- const struct case_bit_test *d2 = p2;
+ const struct case_bit_test *d1 = (const struct case_bit_test *) p1;
+ const struct case_bit_test *d2 = (const struct case_bit_test *) p2;
if (d2->bits != d1->bits)
return d2->bits - d1->bits;
@@ -2537,7 +2537,7 @@ expand_case (tree exp)
/* Get table of labels to jump to, in order of case index. */
ncases = tree_low_cst (range, 0) + 1;
- labelvec = alloca (ncases * sizeof (rtx));
+ labelvec = (rtx *) alloca (ncases * sizeof (rtx));
memset (labelvec, 0, ncases * sizeof (rtx));
for (n = case_list; n; n = n->right)
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index d1e18a243d0..8f4697ce5c9 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -169,7 +169,7 @@ variable_size (tree size)
than MAX_FIXED_MODE_SIZE will not be used. */
enum machine_mode
-mode_for_size (unsigned int size, enum mode_class class, int limit)
+mode_for_size (unsigned int size, enum mode_class cls, int limit)
{
enum machine_mode mode;
@@ -177,7 +177,7 @@ mode_for_size (unsigned int size, enum mode_class class, int limit)
return BLKmode;
/* Get the first mode which has this size, in the specified class. */
- for (mode = GET_CLASS_NARROWEST_MODE (class); mode != VOIDmode;
+ for (mode = GET_CLASS_NARROWEST_MODE (cls); mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if (GET_MODE_PRECISION (mode) == size)
return mode;
@@ -188,7 +188,7 @@ mode_for_size (unsigned int size, enum mode_class class, int limit)
/* Similar, except passed a tree node. */
enum machine_mode
-mode_for_size_tree (tree size, enum mode_class class, int limit)
+mode_for_size_tree (tree size, enum mode_class cls, int limit)
{
unsigned HOST_WIDE_INT uhwi;
unsigned int ui;
@@ -199,20 +199,20 @@ mode_for_size_tree (tree size, enum mode_class class, int limit)
ui = uhwi;
if (uhwi != ui)
return BLKmode;
- return mode_for_size (ui, class, limit);
+ return mode_for_size (ui, cls, limit);
}
/* Similar, but never return BLKmode; return the narrowest mode that
contains at least the requested number of value bits. */
enum machine_mode
-smallest_mode_for_size (unsigned int size, enum mode_class class)
+smallest_mode_for_size (unsigned int size, enum mode_class cls)
{
enum machine_mode mode;
/* Get the first mode which has at least this size, in the
specified class. */
- for (mode = GET_CLASS_NARROWEST_MODE (class); mode != VOIDmode;
+ for (mode = GET_CLASS_NARROWEST_MODE (cls); mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if (GET_MODE_PRECISION (mode) >= size)
return mode;
@@ -517,7 +517,7 @@ set_lang_adjust_rli (void (*f) (record_layout_info))
record_layout_info
start_record_layout (tree t)
{
- record_layout_info rli = xmalloc (sizeof (struct record_layout_info_s));
+ record_layout_info rli = XNEW (struct record_layout_info_s);
rli->t = t;
diff --git a/gcc/stringpool.c b/gcc/stringpool.c
index b3cfcc45a09..089d1804415 100644
--- a/gcc/stringpool.c
+++ b/gcc/stringpool.c
@@ -225,10 +225,10 @@ static GTY(()) struct string_pool_data * spd;
void
gt_pch_save_stringpool (void)
{
- spd = ggc_alloc (sizeof (*spd));
+ spd = (struct string_pool_data *) ggc_alloc (sizeof (*spd));
spd->nslots = ident_hash->nslots;
spd->nelements = ident_hash->nelements;
- spd->entries = ggc_alloc (sizeof (spd->entries[0]) * spd->nslots);
+ spd->entries = (struct ht_identifier **) ggc_alloc (sizeof (spd->entries[0]) * spd->nslots);
memcpy (spd->entries, ident_hash->entries,
spd->nslots * sizeof (spd->entries[0]));
}
diff --git a/gcc/stub-objc.c b/gcc/stub-objc.c
index 0cd6017fd1a..65b9adf52e4 100644
--- a/gcc/stub-objc.c
+++ b/gcc/stub-objc.c
@@ -197,7 +197,7 @@ objc_finish_method_definition (tree ARG_UNUSED (fndecl))
tree
objc_build_keyword_decl (tree ARG_UNUSED (selector),
- tree ARG_UNUSED (typename),
+ tree ARG_UNUSED (type_name),
tree ARG_UNUSED (identifier))
{
return 0;
diff --git a/gcc/system.h b/gcc/system.h
index 4d191e7009d..461d0ad4452 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -449,10 +449,14 @@ extern int snprintf (char *, size_t, const char *, ...);
extern int vsnprintf(char *, size_t, const char *, va_list);
#endif
-/* 1 if we have C99 designated initializers. */
+/* 1 if we have C99 designated initializers.
+
+ ??? C99 designated initializers are not supported by most C++
+ compilers, including G++. -- gdr, 2005-05-18 */
#if !defined(HAVE_DESIGNATED_INITIALIZERS)
#define HAVE_DESIGNATED_INITIALIZERS \
- ((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
+ ((!defined(__cplusplus) && (GCC_VERSION >= 2007)) \
+ || (__STDC_VERSION__ >= 199901L))
#endif
#if HAVE_SYS_STAT_H
diff --git a/gcc/target.h b/gcc/target.h
index c18fd62b0e6..e8ee8cf9de0 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -68,6 +68,13 @@ typedef struct secondary_reload_info
int t_icode; /* Actually an enum insn_code - see above. */
} secondary_reload_info;
+struct asm_int_op
+{
+ const char *hi;
+ const char *si;
+ const char *di;
+ const char *ti;
+};
struct gcc_target
{
@@ -79,13 +86,7 @@ struct gcc_target
/* Assembler instructions for creating various kinds of integer object. */
const char *byte_op;
- struct asm_int_op
- {
- const char *hi;
- const char *si;
- const char *di;
- const char *ti;
- } aligned_op, unaligned_op;
+ struct asm_int_op aligned_op, unaligned_op;
/* Try to output the assembler code for an integer object whose
value is given by X. SIZE is the size of the object in bytes and
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index a12d6b557ba..aed70dddb94 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -499,7 +499,7 @@ default_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
enum machine_mode reload_mode ATTRIBUTE_UNUSED,
secondary_reload_info *sri)
{
- enum reg_class class = NO_REGS;
+ enum reg_class rc = NO_REGS;
if (sri->prev_sri && sri->prev_sri->t_icode != CODE_FOR_nothing)
{
@@ -508,13 +508,13 @@ default_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
}
#ifdef SECONDARY_INPUT_RELOAD_CLASS
if (in_p)
- class = SECONDARY_INPUT_RELOAD_CLASS (reload_class, reload_mode, x);
+ rc = SECONDARY_INPUT_RELOAD_CLASS (reload_class, reload_mode, x);
#endif
#ifdef SECONDARY_OUTPUT_RELOAD_CLASS
if (! in_p)
- class = SECONDARY_OUTPUT_RELOAD_CLASS (reload_class, reload_mode, x);
+ rc = SECONDARY_OUTPUT_RELOAD_CLASS (reload_class, reload_mode, x);
#endif
- if (class != NO_REGS)
+ if (rc != NO_REGS)
{
enum insn_code icode = (in_p ? reload_in_optab[(int) reload_mode]
: reload_out_optab[(int) reload_mode]);
@@ -566,19 +566,19 @@ default_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
if (reg_class_subset_p (reload_class, insn_class))
{
- gcc_assert (scratch_class == class);
- class = NO_REGS;
+ gcc_assert (scratch_class == rc);
+ rc = NO_REGS;
}
else
- class = insn_class;
+ rc = insn_class;
}
- if (class == NO_REGS)
+ if (rc == NO_REGS)
sri->icode = icode;
else
sri->t_icode = icode;
}
- return class;
+ return rc;
}
diff --git a/gcc/tlink.c b/gcc/tlink.c
index 1689ddbe242..7f86ff8fa46 100644
--- a/gcc/tlink.c
+++ b/gcc/tlink.c
@@ -128,7 +128,7 @@ symbol_hash_lookup (const char *string, int create)
*e = v = XCNEW (struct symbol_hash_entry);
v->key = xstrdup (string);
}
- return *e;
+ return (struct symbol_hash_entry *) *e;
}
static htab_t file_table;
@@ -148,7 +148,7 @@ file_hash_lookup (const char *string)
*e = v = XCNEW (struct file_hash_entry);
v->key = xstrdup (string);
}
- return *e;
+ return (struct file_hash_entry *) *e;
}
static htab_t demangled_table;
@@ -170,7 +170,7 @@ demangled_hash_lookup (const char *string, int create)
*e = v = XCNEW (struct demangled_hash_entry);
v->key = xstrdup (string);
}
- return *e;
+ return (struct demangled_hash_entry *) *e;
}
/* Stack code. */
@@ -194,7 +194,7 @@ struct file_stack_entry *file_stack;
static void
symbol_push (symbol *p)
{
- struct symbol_stack_entry *ep = obstack_alloc
+ struct symbol_stack_entry *ep = (struct symbol_stack_entry *) obstack_alloc
(&symbol_stack_obstack, sizeof (struct symbol_stack_entry));
ep->value = p;
ep->next = symbol_stack;
@@ -222,7 +222,7 @@ file_push (file *p)
if (p->tweaking)
return;
- ep = obstack_alloc
+ ep = (struct file_stack_entry *) obstack_alloc
(&file_stack_obstack, sizeof (struct file_stack_entry));
ep->value = p;
ep->next = file_stack;
@@ -299,7 +299,7 @@ frob_extension (const char *s, const char *ext)
p = s + strlen (s);
obstack_grow (&temporary_obstack, s, p - s);
- return obstack_copy0 (&temporary_obstack, ext, strlen (ext));
+ return (char *) obstack_copy0 (&temporary_obstack, ext, strlen (ext));
}
static char *
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 53fcdfe580c..f4b0eedce5d 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -155,7 +155,7 @@ location_t input_location;
struct line_maps line_table;
/* Nonzero if it is unsafe to create any new pseudo registers. */
-int no_new_pseudos;
+bool no_new_pseudos;
/* Stack of currently pending input files. */
@@ -203,8 +203,8 @@ static const struct gcc_debug_hooks *default_debug_hooks;
/* Other flags saying which kinds of debugging dump have been requested. */
-int rtl_dump_and_exit;
-int flag_print_asm_name;
+bool rtl_dump_and_exit;
+bool flag_print_asm_name;
enum graph_dump_types graph_dump_format;
/* Name for output file of assembly code, specified with -o. */
@@ -238,11 +238,11 @@ const char * current_function_func_begin_label;
/* Temporarily suppress certain warnings.
This is set while reading code from a system header file. */
-int in_system_header = 0;
+bool in_system_header = false;
/* Nonzero means to collect statistics which might be expensive
and to print them when we are done. */
-int flag_detailed_statistics = 0;
+bool flag_detailed_statistics = false;
/* A random sequence of characters, unless overridden by user. */
const char *flag_random_seed;
@@ -1112,17 +1112,17 @@ decode_d_option (const char *arg)
flag_debug_asm = 1;
break;
case 'p':
- flag_print_asm_name = 1;
+ flag_print_asm_name = true;
break;
case 'P':
flag_dump_rtl_in_asm = 1;
- flag_print_asm_name = 1;
+ flag_print_asm_name = true;
break;
case 'v':
graph_dump_format = vcg;
break;
case 'x':
- rtl_dump_and_exit = 1;
+ rtl_dump_and_exit = true;
break;
case 'y':
set_yydebug = 1;
diff --git a/gcc/tracer.c b/gcc/tracer.c
index c7bd2bd1d6c..6ca9a665ca8 100644
--- a/gcc/tracer.c
+++ b/gcc/tracer.c
@@ -240,7 +240,7 @@ tail_duplicate (void)
while (traced_insns < cover_insns && nduplicated < max_dup_insns
&& !fibheap_empty (heap))
{
- basic_block bb = fibheap_extract_min (heap);
+ basic_block bb = (basic_block) fibheap_extract_min (heap);
int n, pos;
if (!bb)
@@ -330,7 +330,7 @@ layout_superblocks (void)
edge_iterator ei;
edge e, best = NULL;
while (end->aux)
- end = end->aux;
+ end = (basic_block) end->aux;
FOR_EACH_EDGE (e, ei, end->succs)
if (e->dest != EXIT_BLOCK_PTR
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 46ee1b1cf17..460664978e1 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -2833,7 +2833,7 @@ bsi_insert_before (block_stmt_iterator *i, tree t, enum bsi_iterator_update m)
{
set_bb_for_stmt (t, i->bb);
update_modified_stmts (t);
- tsi_link_before (&i->tsi, t, m);
+ tsi_link_before (&i->tsi, t, (enum tsi_iterator_update) m);
}
@@ -2846,7 +2846,7 @@ bsi_insert_after (block_stmt_iterator *i, tree t, enum bsi_iterator_update m)
{
set_bb_for_stmt (t, i->bb);
update_modified_stmts (t);
- tsi_link_after (&i->tsi, t, m);
+ tsi_link_after (&i->tsi, t, (enum tsi_iterator_update) m);
}
@@ -4603,7 +4603,7 @@ move_stmt_r (tree *tp, int *walk_subtrees, void *data)
{
struct tree_map in, *out;
in.from = t;
- out = htab_find_with_hash (p->new_label_map, &in, DECL_UID (t));
+ out = (struct tree_map *) htab_find_with_hash (p->new_label_map, &in, DECL_UID (t));
if (out)
*tp = t = out->to;
}
@@ -4792,7 +4792,7 @@ new_label_mapper (tree decl, void *data)
gcc_assert (TREE_CODE (decl) == LABEL_DECL);
- m = xmalloc (sizeof (struct tree_map));
+ m = XNEW (struct tree_map);
m->hash = DECL_UID (decl);
m->from = decl;
m->to = create_artificial_label ();
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index f841844f88e..6b271ff5c5f 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -67,7 +67,7 @@ cvc_lookup (unsigned int uid)
{
struct int_tree_map *h, in;
in.uid = uid;
- h = htab_find_with_hash (complex_variable_components, &in, uid);
+ h = (struct int_tree_map *) htab_find_with_hash (complex_variable_components, &in, uid);
return h ? h->to : NULL;
}
@@ -135,7 +135,7 @@ find_lattice_value (tree t)
r = some_nonzerop (real);
i = some_nonzerop (imag);
- ret = r*ONLY_REAL + i*ONLY_IMAG;
+ ret = (complex_lattice_t) (r*ONLY_REAL + i*ONLY_IMAG);
/* ??? On occasion we could do better than mapping 0+0i to real, but we
certainly don't want to leave it UNINITIALIZED, which eventually gets
@@ -297,7 +297,7 @@ complex_visit_stmt (tree stmt, edge *taken_edge_p ATTRIBUTE_UNUSED,
/* We've set up the lattice values such that IOR neatly
models addition. */
- new_l = op1_l | op2_l;
+ new_l = (complex_lattice_t) (op1_l | op2_l);
break;
case MULT_EXPR:
@@ -324,10 +324,10 @@ complex_visit_stmt (tree stmt, edge *taken_edge_p ATTRIBUTE_UNUSED,
numbers are of opposite kind, the result is imaginary,
otherwise the result is real. The add/subtract translates
the real/imag from/to 0/1; the ^ performs the comparison. */
- new_l = ((op1_l - ONLY_REAL) ^ (op2_l - ONLY_REAL)) + ONLY_REAL;
+ new_l = (complex_lattice_t) (((op1_l - ONLY_REAL) ^ (op2_l - ONLY_REAL)) + ONLY_REAL);
/* Don't allow the lattice value to flip-flop indefinitely. */
- new_l |= old_l;
+ new_l = (complex_lattice_t) (new_l | old_l);
}
break;
@@ -368,7 +368,7 @@ complex_visit_phi (tree phi)
/* We've set up the lattice values such that IOR neatly models PHI meet. */
new_l = UNINITIALIZED;
for (i = PHI_NUM_ARGS (phi) - 1; i >= 0; --i)
- new_l |= find_lattice_value (PHI_ARG_DEF (phi, i));
+ new_l = (complex_lattice_t) (new_l | find_lattice_value (PHI_ARG_DEF (phi, i)));
ver = SSA_NAME_VERSION (lhs);
old_l = VEC_index (complex_lattice_t, complex_lattice_values, ver);
@@ -899,9 +899,9 @@ expand_complex_libcall (block_stmt_iterator *bsi, tree ar, tree ai,
mode = TYPE_MODE (type);
gcc_assert (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT);
if (code == MULT_EXPR)
- bcode = BUILT_IN_COMPLEX_MUL_MIN + mode - MIN_MODE_COMPLEX_FLOAT;
+ bcode = (enum built_in_function) (BUILT_IN_COMPLEX_MUL_MIN + mode - MIN_MODE_COMPLEX_FLOAT);
else if (code == RDIV_EXPR)
- bcode = BUILT_IN_COMPLEX_DIV_MIN + mode - MIN_MODE_COMPLEX_FLOAT;
+ bcode = (enum built_in_function) (BUILT_IN_COMPLEX_DIV_MIN + mode - MIN_MODE_COMPLEX_FLOAT);
else
gcc_unreachable ();
fn = built_in_decls[bcode];
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 2e47a25ac90..98f7da51ce5 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -677,7 +677,7 @@ print_direction_vector (FILE *outf,
for (eq = 0; eq < length; eq++)
{
- enum data_dependence_direction dir = dirv[eq];
+ enum data_dependence_direction dir = (enum data_dependence_direction) dirv[eq];
switch (dir)
{
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index 5ade6455d96..524bb211d56 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -162,7 +162,7 @@ create_function_ann (tree t)
gcc_assert (TREE_CODE (t) == FUNCTION_DECL);
gcc_assert (!t->common.ann || t->common.ann->common.type == FUNCTION_ANN);
- ann = ggc_alloc (sizeof (*ann));
+ ann = (function_ann_t) ggc_alloc (sizeof (*ann));
memset ((void *) ann, 0, sizeof (*ann));
ann->common.type = FUNCTION_ANN;
diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c
index d97dc83af13..b748616f3fe 100644
--- a/gcc/tree-dump.c
+++ b/gcc/tree-dump.c
@@ -796,28 +796,28 @@ dump_register (const char *suffix, const char *swtch, const char *glob,
static int next_dump = FIRST_AUTO_NUMBERED_DUMP;
int num = next_dump++;
- size_t this = extra_dump_files_in_use++;
+ size_t it = extra_dump_files_in_use++;
- if (this >= extra_dump_files_alloced)
+ if (it >= extra_dump_files_alloced)
{
if (extra_dump_files_alloced == 0)
extra_dump_files_alloced = 32;
else
extra_dump_files_alloced *= 2;
- extra_dump_files = xrealloc (extra_dump_files,
+ extra_dump_files = (struct dump_file_info *) xrealloc (extra_dump_files,
sizeof (struct dump_file_info)
* extra_dump_files_alloced);
}
- memset (&extra_dump_files[this], 0, sizeof (struct dump_file_info));
- extra_dump_files[this].suffix = suffix;
- extra_dump_files[this].swtch = swtch;
- extra_dump_files[this].glob = glob;
- extra_dump_files[this].flags = flags;
- extra_dump_files[this].num = num;
- extra_dump_files[this].letter = letter;
+ memset (&extra_dump_files[it], 0, sizeof (struct dump_file_info));
+ extra_dump_files[it].suffix = suffix;
+ extra_dump_files[it].swtch = swtch;
+ extra_dump_files[it].glob = glob;
+ extra_dump_files[it].flags = flags;
+ extra_dump_files[it].num = num;
+ extra_dump_files[it].letter = letter;
- return this + TDI_end;
+ return it + TDI_end;
}
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index e3341b1bcb8..0f322e2dd61 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -298,6 +298,13 @@ struct leh_state
struct leh_tf_state *tf;
};
+struct goto_queue_node {
+ tree stmt;
+ tree repl_stmt;
+ tree cont_stmt;
+ int index;
+};
+
struct leh_tf_state
{
/* Pointer to the TRY_FINALLY node under discussion. The try_finally_expr
@@ -315,12 +322,7 @@ struct leh_tf_state
/* The GOTO_QUEUE is is an array of GOTO_EXPR and RETURN_EXPR statements
that are seen to escape this TRY_FINALLY_EXPR node. */
- struct goto_queue_node {
- tree stmt;
- tree repl_stmt;
- tree cont_stmt;
- int index;
- } *goto_queue;
+ struct goto_queue_node *goto_queue;
size_t goto_queue_size;
size_t goto_queue_active;
@@ -385,13 +387,13 @@ static void
replace_goto_queue_cond_clause (tree *tp, struct leh_tf_state *tf,
tree_stmt_iterator *tsi)
{
- tree new, one, label;
+ tree fresh, one, label;
- new = find_goto_replacement (tf, *tp);
- if (!new)
+ fresh = find_goto_replacement (tf, *tp);
+ if (!fresh)
return;
- one = expr_only (new);
+ one = expr_only (fresh);
if (one && TREE_CODE (one) == GOTO_EXPR)
{
*tp = one;
@@ -402,7 +404,7 @@ replace_goto_queue_cond_clause (tree *tp, struct leh_tf_state *tf,
*tp = build_and_jump (&LABEL_EXPR_LABEL (label));
tsi_link_after (tsi, label, TSI_CONTINUE_LINKING);
- tsi_link_after (tsi, new, TSI_CONTINUE_LINKING);
+ tsi_link_after (tsi, fresh, TSI_CONTINUE_LINKING);
}
/* The real work of replace_goto_queue. Returns with TSI updated to
@@ -627,7 +629,7 @@ do_return_redirection (struct goto_queue_node *q, tree finlab, tree mod,
case MODIFY_EXPR:
{
tree result = TREE_OPERAND (ret_expr, 0);
- tree new, old = TREE_OPERAND (ret_expr, 1);
+ tree fresh, old = TREE_OPERAND (ret_expr, 1);
if (!*return_value_p)
{
@@ -638,21 +640,21 @@ do_return_redirection (struct goto_queue_node *q, tree finlab, tree mod,
worry about magic return semantics, so we need to use a
temporary to hold the value until we're actually ready
to return. */
- new = result;
+ fresh = result;
else
- new = create_tmp_var (TREE_TYPE (old), "rettmp");
- *return_value_p = new;
+ fresh = create_tmp_var (TREE_TYPE (old), "rettmp");
+ *return_value_p = fresh;
}
else
- new = *return_value_p;
+ fresh = *return_value_p;
- x = build2 (MODIFY_EXPR, TREE_TYPE (new), new, old);
+ x = build2 (MODIFY_EXPR, TREE_TYPE (fresh), fresh, old);
append_to_statement_list (x, &q->repl_stmt);
- if (new == result)
+ if (fresh == result)
x = result;
else
- x = build2 (MODIFY_EXPR, TREE_TYPE (result), result, new);
+ x = build2 (MODIFY_EXPR, TREE_TYPE (result), result, fresh);
q->cont_stmt = build1 (RETURN_EXPR, void_type_node, x);
}
@@ -1455,14 +1457,14 @@ lower_catch (struct leh_state *state, tree *tp)
for (i = tsi_start (TREE_OPERAND (*tp, 1)); !tsi_end_p (i); )
{
struct eh_region *catch_region;
- tree catch, x, eh_label;
+ tree catch_tree, x, eh_label;
- catch = tsi_stmt (i);
- catch_region = gen_eh_region_catch (try_region, CATCH_TYPES (catch));
+ catch_tree = tsi_stmt (i);
+ catch_region = gen_eh_region_catch (try_region, CATCH_TYPES (catch_tree));
this_state.cur_region = catch_region;
this_state.prev_try = state->prev_try;
- lower_eh_constructs_1 (&this_state, &CATCH_BODY (catch));
+ lower_eh_constructs_1 (&this_state, &CATCH_BODY (catch_tree));
eh_label = create_artificial_label ();
set_eh_region_tree_label (catch_region, eh_label);
@@ -1470,16 +1472,16 @@ lower_catch (struct leh_state *state, tree *tp)
x = build1 (LABEL_EXPR, void_type_node, eh_label);
tsi_link_before (&i, x, TSI_SAME_STMT);
- if (block_may_fallthru (CATCH_BODY (catch)))
+ if (block_may_fallthru (CATCH_BODY (catch_tree)))
{
if (!out_label)
out_label = create_artificial_label ();
x = build1 (GOTO_EXPR, void_type_node, out_label);
- append_to_statement_list (x, &CATCH_BODY (catch));
+ append_to_statement_list (x, &CATCH_BODY (catch_tree));
}
- tsi_link_before (&i, CATCH_BODY (catch), TSI_SAME_STMT);
+ tsi_link_before (&i, CATCH_BODY (catch_tree), TSI_SAME_STMT);
tsi_delink (&i);
}
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 3a50741aff5..72699e9aba3 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -171,7 +171,7 @@ tree_if_conversion (struct loop *loop, bool for_vectorizer)
bb = ifc_bbs [i];
/* Update condition using predicate list. */
- cond = bb->aux;
+ cond = (tree) bb->aux;
/* Process all statements in this basic block.
Remove conditional expression, if any, and annotate
@@ -587,7 +587,7 @@ if_convertible_loop_p (struct loop *loop, bool for_vectorizer ATTRIBUTE_UNUSED)
static void
add_to_predicate_list (basic_block bb, tree new_cond)
{
- tree cond = bb->aux;
+ tree cond = (tree) bb->aux;
if (cond)
cond = fold_build2 (TRUTH_OR_EXPR, boolean_type_node,
@@ -697,7 +697,7 @@ find_phi_replacement_condition (struct loop *loop,
See PR23115. */
/* Select condition that is not TRUTH_NOT_EXPR. */
- tmp_cond = first_bb->aux;
+ tmp_cond = (tree) first_bb->aux;
if (TREE_CODE (tmp_cond) == TRUTH_NOT_EXPR)
{
basic_block tmp_bb;
@@ -711,7 +711,7 @@ find_phi_replacement_condition (struct loop *loop,
if (first_bb == loop->header
|| dominated_by_p (CDI_DOMINATORS, second_bb, first_bb))
{
- tmp_cond = second_bb->aux;
+ tmp_cond = (tree) second_bb->aux;
if (TREE_CODE (tmp_cond) == TRUTH_NOT_EXPR)
{
/* Select non loop header condition but do not switch basic blocks. */
@@ -721,12 +721,12 @@ find_phi_replacement_condition (struct loop *loop,
{
/* Select non loop header condition. */
first_bb = second_bb;
- *cond = first_bb->aux;
+ *cond = (tree) first_bb->aux;
}
}
else
/* FIRST_BB is not loop header */
- *cond = first_bb->aux;
+ *cond = (tree) first_bb->aux;
/* Create temp. for the condition. Vectorizer prefers to have gimple
value as condition. Various targets use different means to communicate
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 61b1dab954d..06e42c5ebbb 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -197,7 +197,7 @@ static tree
remap_type_1 (tree type, copy_body_data *id)
{
splay_tree_node node;
- tree new, t;
+ tree tmp, t;
if (type == NULL)
return type;
@@ -219,24 +219,24 @@ remap_type_1 (tree type, copy_body_data *id)
reference type. */
if (TREE_CODE (type) == POINTER_TYPE)
{
- new = build_pointer_type_for_mode (remap_type (TREE_TYPE (type), id),
+ tmp = build_pointer_type_for_mode (remap_type (TREE_TYPE (type), id),
TYPE_MODE (type),
TYPE_REF_CAN_ALIAS_ALL (type));
- insert_decl_map (id, type, new);
- return new;
+ insert_decl_map (id, type, tmp);
+ return tmp;
}
else if (TREE_CODE (type) == REFERENCE_TYPE)
{
- new = build_reference_type_for_mode (remap_type (TREE_TYPE (type), id),
+ tmp = build_reference_type_for_mode (remap_type (TREE_TYPE (type), id),
TYPE_MODE (type),
TYPE_REF_CAN_ALIAS_ALL (type));
- insert_decl_map (id, type, new);
- return new;
+ insert_decl_map (id, type, tmp);
+ return tmp;
}
else
- new = copy_node (type);
+ tmp = copy_node (type);
- insert_decl_map (id, type, new);
+ insert_decl_map (id, type, tmp);
/* This is a new type, not a copy of an old type. Need to reassociate
variants. We can handle everything except the main variant lazily. */
@@ -244,46 +244,46 @@ remap_type_1 (tree type, copy_body_data *id)
if (type != t)
{
t = remap_type (t, id);
- TYPE_MAIN_VARIANT (new) = t;
- TYPE_NEXT_VARIANT (new) = TYPE_MAIN_VARIANT (t);
- TYPE_NEXT_VARIANT (t) = new;
+ TYPE_MAIN_VARIANT (tmp) = t;
+ TYPE_NEXT_VARIANT (tmp) = TYPE_MAIN_VARIANT (t);
+ TYPE_NEXT_VARIANT (t) = tmp;
}
else
{
- TYPE_MAIN_VARIANT (new) = new;
- TYPE_NEXT_VARIANT (new) = NULL;
+ TYPE_MAIN_VARIANT (tmp) = tmp;
+ TYPE_NEXT_VARIANT (tmp) = NULL;
}
if (TYPE_STUB_DECL (type))
- TYPE_STUB_DECL (new) = remap_decl (TYPE_STUB_DECL (type), id);
+ TYPE_STUB_DECL (tmp) = remap_decl (TYPE_STUB_DECL (type), id);
/* Lazily create pointer and reference types. */
- TYPE_POINTER_TO (new) = NULL;
- TYPE_REFERENCE_TO (new) = NULL;
+ TYPE_POINTER_TO (tmp) = NULL;
+ TYPE_REFERENCE_TO (tmp) = NULL;
- switch (TREE_CODE (new))
+ switch (TREE_CODE (tmp))
{
case INTEGER_TYPE:
case REAL_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- t = TYPE_MIN_VALUE (new);
+ t = TYPE_MIN_VALUE (tmp);
if (t && TREE_CODE (t) != INTEGER_CST)
- walk_tree (&TYPE_MIN_VALUE (new), copy_body_r, id, NULL);
+ walk_tree (&TYPE_MIN_VALUE (tmp), copy_body_r, id, NULL);
- t = TYPE_MAX_VALUE (new);
+ t = TYPE_MAX_VALUE (tmp);
if (t && TREE_CODE (t) != INTEGER_CST)
- walk_tree (&TYPE_MAX_VALUE (new), copy_body_r, id, NULL);
- return new;
+ walk_tree (&TYPE_MAX_VALUE (tmp), copy_body_r, id, NULL);
+ return tmp;
case FUNCTION_TYPE:
- TREE_TYPE (new) = remap_type (TREE_TYPE (new), id);
- walk_tree (&TYPE_ARG_TYPES (new), copy_body_r, id, NULL);
- return new;
+ TREE_TYPE (tmp) = remap_type (TREE_TYPE (tmp), id);
+ walk_tree (&TYPE_ARG_TYPES (tmp), copy_body_r, id, NULL);
+ return tmp;
case ARRAY_TYPE:
- TREE_TYPE (new) = remap_type (TREE_TYPE (new), id);
- TYPE_DOMAIN (new) = remap_type (TYPE_DOMAIN (new), id);
+ TREE_TYPE (tmp) = remap_type (TREE_TYPE (tmp), id);
+ TYPE_DOMAIN (tmp) = remap_type (TYPE_DOMAIN (tmp), id);
break;
case RECORD_TYPE:
@@ -292,14 +292,14 @@ remap_type_1 (tree type, copy_body_data *id)
{
tree f, nf = NULL;
- for (f = TYPE_FIELDS (new); f ; f = TREE_CHAIN (f))
+ for (f = TYPE_FIELDS (tmp); f ; f = TREE_CHAIN (f))
{
t = remap_decl (f, id);
- DECL_CONTEXT (t) = new;
+ DECL_CONTEXT (t) = tmp;
TREE_CHAIN (t) = nf;
nf = t;
}
- TYPE_FIELDS (new) = nreverse (nf);
+ TYPE_FIELDS (tmp) = nreverse (nf);
}
break;
@@ -309,10 +309,10 @@ remap_type_1 (tree type, copy_body_data *id)
gcc_unreachable ();
}
- walk_tree (&TYPE_SIZE (new), copy_body_r, id, NULL);
- walk_tree (&TYPE_SIZE_UNIT (new), copy_body_r, id, NULL);
+ walk_tree (&TYPE_SIZE (tmp), copy_body_r, id, NULL);
+ walk_tree (&TYPE_SIZE_UNIT (tmp), copy_body_r, id, NULL);
- return new;
+ return tmp;
}
tree
@@ -414,28 +414,28 @@ static tree
remap_blocks (tree block, copy_body_data *id)
{
tree t;
- tree new = block;
+ tree tmp = block;
if (!block)
return NULL;
- remap_block (&new, id);
- gcc_assert (new != block);
+ remap_block (&tmp, id);
+ gcc_assert (tmp != block);
for (t = BLOCK_SUBBLOCKS (block); t ; t = BLOCK_CHAIN (t))
- add_lexical_block (new, remap_blocks (t, id));
- return new;
+ add_lexical_block (tmp, remap_blocks (t, id));
+ return tmp;
}
static void
copy_statement_list (tree *tp)
{
tree_stmt_iterator oi, ni;
- tree new;
+ tree tmp;
- new = alloc_stmt_list ();
- ni = tsi_start (new);
+ tmp = alloc_stmt_list ();
+ ni = tsi_start (tmp);
oi = tsi_start (*tp);
- *tp = new;
+ *tp = tmp;
for (; !tsi_end_p (oi); tsi_next (&oi))
tsi_link_after (&ni, tsi_stmt (oi), TSI_NEW_STMT);
@@ -590,7 +590,7 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data)
n = splay_tree_lookup (id->decl_map, (splay_tree_key) decl);
if (n)
{
- tree new;
+ tree tmp;
tree old;
/* If we happen to get an ADDR_EXPR in n->value, strip
it manually here as we'll eventually get ADDR_EXPRs
@@ -599,16 +599,16 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data)
but we absolutely rely on that. As fold_indirect_ref
does other useful transformations, try that first, though. */
tree type = TREE_TYPE (TREE_TYPE ((tree)n->value));
- new = unshare_expr ((tree)n->value);
+ tmp = unshare_expr ((tree)n->value);
old = *tp;
- *tp = fold_indirect_ref_1 (type, new);
+ *tp = fold_indirect_ref_1 (type, tmp);
if (! *tp)
{
- if (TREE_CODE (new) == ADDR_EXPR)
- *tp = TREE_OPERAND (new, 0);
+ if (TREE_CODE (tmp) == ADDR_EXPR)
+ *tp = TREE_OPERAND (tmp, 0);
else
{
- *tp = build1 (INDIRECT_REF, type, new);
+ *tp = build1 (INDIRECT_REF, type, tmp);
TREE_THIS_VOLATILE (*tp) = TREE_THIS_VOLATILE (old);
}
}
@@ -799,7 +799,7 @@ copy_edges_for_bb (basic_block bb, int count_scale)
FOR_EACH_EDGE (old_edge, ei, bb->succs)
if (!(old_edge->flags & EDGE_EH))
{
- edge new;
+ edge tmp;
flags = old_edge->flags;
@@ -807,9 +807,9 @@ copy_edges_for_bb (basic_block bb, int count_scale)
if (old_edge->dest->index == EXIT_BLOCK && !old_edge->flags
&& old_edge->dest->aux != EXIT_BLOCK_PTR)
flags |= EDGE_FALLTHRU;
- new = make_edge (new_bb, (basic_block) old_edge->dest->aux, flags);
- new->count = old_edge->count * count_scale / REG_BR_PROB_BASE;
- new->probability = old_edge->probability;
+ tmp = make_edge (new_bb, (basic_block) old_edge->dest->aux, flags);
+ tmp->count = old_edge->count * count_scale / REG_BR_PROB_BASE;
+ tmp->probability = old_edge->probability;
}
if (bb->index == ENTRY_BLOCK || bb->index == EXIT_BLOCK)
@@ -2323,16 +2323,16 @@ copy_tree_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
/* Because the chain gets clobbered when we make a copy, we save it
here. */
tree chain = TREE_CHAIN (*tp);
- tree new;
+ tree copy;
/* Copy the node. */
- new = copy_node (*tp);
+ copy = copy_node (*tp);
/* Propagate mudflap marked-ness. */
if (flag_mudflap && mf_marked_p (*tp))
- mf_mark (new);
+ mf_mark (copy);
- *tp = new;
+ *tp = copy;
/* Now, restore the chain, if appropriate. That will cause
walk_tree to walk into the chain as well. */
@@ -2350,17 +2350,17 @@ copy_tree_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
{
/* CONSTRUCTOR nodes need special handling because
we need to duplicate the vector of elements. */
- tree new;
+ tree copy;
- new = copy_node (*tp);
+ copy = copy_node (*tp);
/* Propagate mudflap marked-ness. */
if (flag_mudflap && mf_marked_p (*tp))
- mf_mark (new);
+ mf_mark (copy);
- CONSTRUCTOR_ELTS (new) = VEC_copy (constructor_elt, gc,
+ CONSTRUCTOR_ELTS (copy) = VEC_copy (constructor_elt, gc,
CONSTRUCTOR_ELTS (*tp));
- *tp = new;
+ *tp = copy;
}
else if (TREE_CODE_CLASS (code) == tcc_type)
*walk_subtrees = 0;
@@ -2706,10 +2706,10 @@ copy_arguments_for_versioning (tree orig_parm, copy_body_data * id)
arg_copy = &orig_parm;
for (parg = arg_copy; *parg; parg = &TREE_CHAIN (*parg))
{
- tree new = remap_decl (*parg, id);
- lang_hooks.dup_lang_specific_decl (new);
- TREE_CHAIN (new) = TREE_CHAIN (*parg);
- *parg = new;
+ tree tmp = remap_decl (*parg, id);
+ lang_hooks.dup_lang_specific_decl (tmp);
+ TREE_CHAIN (tmp) = TREE_CHAIN (*parg);
+ *parg = tmp;
}
return orig_parm;
}
@@ -2723,10 +2723,10 @@ copy_static_chain (tree static_chain, copy_body_data * id)
chain_copy = &static_chain;
for (pvar = chain_copy; *pvar; pvar = &TREE_CHAIN (*pvar))
{
- tree new = remap_decl (*pvar, id);
- lang_hooks.dup_lang_specific_decl (new);
- TREE_CHAIN (new) = TREE_CHAIN (*pvar);
- *pvar = new;
+ tree tmp = remap_decl (*pvar, id);
+ lang_hooks.dup_lang_specific_decl (tmp);
+ TREE_CHAIN (tmp) = TREE_CHAIN (*pvar);
+ *pvar = tmp;
}
return static_chain;
}
@@ -2827,7 +2827,7 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map,
if (tree_map)
for (i = 0; i < VARRAY_ACTIVE_SIZE (tree_map); i++)
{
- replace_info = VARRAY_GENERIC_PTR (tree_map, i);
+ replace_info = (struct ipa_replace_map *) VARRAY_GENERIC_PTR (tree_map, i);
if (replace_info->replace_p)
insert_decl_map (&id, replace_info->old_tree,
replace_info->new_tree);
diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h
index 818329c6db1..a746e364e87 100644
--- a/gcc/tree-inline.h
+++ b/gcc/tree-inline.h
@@ -25,6 +25,11 @@ Boston, MA 02110-1301, USA. */
#include "varray.h"
#include "splay-tree.h"
+enum copy_body_cge_which {
+ CB_CGE_DUPLICATE,
+ CB_CGE_MOVE,
+ CB_CGE_MOVE_CLONES
+};
/* Data required for function body duplication. */
@@ -70,11 +75,7 @@ typedef struct copy_body_data
/* Indicate the desired behavior wrt call graph edges. We can either
duplicate the edge (inlining, cloning), move the edge (versioning,
parallelization), or move the edges of the clones (saving). */
- enum copy_body_cge_which {
- CB_CGE_DUPLICATE,
- CB_CGE_MOVE,
- CB_CGE_MOVE_CLONES
- } transform_call_graph_edges;
+ enum copy_body_cge_which transform_call_graph_edges;
/* True if a new CFG should be created. False for inlining, true for
everything else. */
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 14a50b62c62..990ca1b5f9d 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -124,11 +124,11 @@ static bitmap names_to_release;
/* For each block, the phi nodes that need to be rewritten are stored into
these vectors. */
-typedef VEC(tree, heap) *tree_vec;
-DEF_VEC_P (tree_vec);
-DEF_VEC_ALLOC_P (tree_vec, heap);
+typedef VEC(tree, heap) *tree_v;
+DEF_VEC_P (tree_v);
+DEF_VEC_ALLOC_P (tree_v, heap);
-static VEC(tree_vec, heap) *phis_to_rewrite;
+static VEC(tree_v, heap) *phis_to_rewrite;
/* The bitmap of non-NULL elements of PHIS_TO_REWRITE. */
@@ -287,7 +287,7 @@ get_ssa_name_ann (tree name)
info = VEC_index (ssa_name_info_p, info_for_ssa_name, ver);
if (info->age < current_info_for_ssa_name_age)
{
- info->need_phi_state = 0;
+ info->need_phi_state = NEED_PHI_STATE_UNKNOWN;
info->current_def = NULL_TREE;
info->age = current_info_for_ssa_name_age;
}
@@ -596,12 +596,12 @@ repl_map_free (void *p)
/* Return the names replaced by NEW (i.e., REPL_TBL[NEW].SET). */
static inline bitmap
-names_replaced_by (tree new)
+names_replaced_by (tree n)
{
struct repl_map_d m;
void **slot;
- m.name = new;
+ m.name = n;
slot = htab_find_slot (repl_tbl, (void *) &m, NO_INSERT);
/* If N was not registered in the replacement table, return NULL. */
@@ -615,17 +615,17 @@ names_replaced_by (tree new)
/* Add OLD to REPL_TBL[NEW].SET. */
static inline void
-add_to_repl_tbl (tree new, tree old)
+add_to_repl_tbl (tree n, tree old)
{
struct repl_map_d m, *mp;
void **slot;
- m.name = new;
+ m.name = n;
slot = htab_find_slot (repl_tbl, (void *) &m, INSERT);
if (*slot == NULL)
{
mp = XNEW (struct repl_map_d);
- mp->name = new;
+ mp->name = n;
mp->set = BITMAP_ALLOC (NULL);
*slot = (void *) mp;
}
@@ -642,12 +642,12 @@ add_to_repl_tbl (tree new, tree old)
already formed SSA web. */
static void
-add_new_name_mapping (tree new, tree old)
+add_new_name_mapping (tree n, tree old)
{
timevar_push (TV_TREE_SSA_INCREMENTAL);
/* OLD and NEW must be different SSA names for the same symbol. */
- gcc_assert (new != old && SSA_NAME_VAR (new) == SSA_NAME_VAR (old));
+ gcc_assert (n != old && SSA_NAME_VAR (n) == SSA_NAME_VAR (old));
/* We may need to grow NEW_SSA_NAMES and OLD_SSA_NAMES because our
caller may have created new names since the set was created. */
@@ -660,7 +660,7 @@ add_new_name_mapping (tree new, tree old)
/* If this mapping is for virtual names, we will need to update
virtual operands. */
- if (!is_gimple_reg (new))
+ if (!is_gimple_reg (n))
{
tree sym;
size_t uid;
@@ -673,7 +673,7 @@ add_new_name_mapping (tree new, tree old)
will make more sense to rename the symbols from scratch.
Otherwise, the insertion of PHI nodes for each of the old
names in these mappings will be very slow. */
- sym = SSA_NAME_VAR (new);
+ sym = SSA_NAME_VAR (n);
uid = DECL_UID (sym);
update_ssa_stats.num_virtual_mappings++;
if (!bitmap_bit_p (update_ssa_stats.virtual_symbols, uid))
@@ -684,16 +684,16 @@ add_new_name_mapping (tree new, tree old)
}
/* Update the REPL_TBL table. */
- add_to_repl_tbl (new, old);
+ add_to_repl_tbl (n, old);
/* If OLD had already been registered as a new name, then all the
names that OLD replaces should also be replaced by NEW. */
if (is_new_name (old))
- bitmap_ior_into (names_replaced_by (new), names_replaced_by (old));
+ bitmap_ior_into (names_replaced_by (n), names_replaced_by (old));
/* Register NEW and OLD in NEW_SSA_NAMES and OLD_SSA_NAMES,
respectively. */
- SET_BIT (new_ssa_names, SSA_NAME_VERSION (new));
+ SET_BIT (new_ssa_names, SSA_NAME_VERSION (n));
SET_BIT (old_ssa_names, SSA_NAME_VERSION (old));
/* Update mapping counter to use in the virtual mapping heuristic. */
@@ -797,8 +797,8 @@ struct dom_dfsnum
static int
cmp_dfsnum (const void *a, const void *b)
{
- const struct dom_dfsnum *da = a;
- const struct dom_dfsnum *db = b;
+ const struct dom_dfsnum *da = (const struct dom_dfsnum *)a;
+ const struct dom_dfsnum *db = (const struct dom_dfsnum *)b;
return (int) da->dfs_num - (int) db->dfs_num;
}
@@ -1091,7 +1091,7 @@ get_default_def_for (tree sym)
static void
mark_phi_for_rewrite (basic_block bb, tree phi)
{
- tree_vec phis;
+ tree_v phis;
unsigned i, idx = bb->index;
if (REWRITE_THIS_STMT (phi))
@@ -1102,16 +1102,16 @@ mark_phi_for_rewrite (basic_block bb, tree phi)
return;
bitmap_set_bit (blocks_with_phis_to_rewrite, idx);
- VEC_reserve (tree_vec, heap, phis_to_rewrite, last_basic_block + 1);
- for (i = VEC_length (tree_vec, phis_to_rewrite); i <= idx; i++)
- VEC_quick_push (tree_vec, phis_to_rewrite, NULL);
+ VEC_reserve (tree_v, heap, phis_to_rewrite, last_basic_block + 1);
+ for (i = VEC_length (tree_v, phis_to_rewrite); i <= idx; i++)
+ VEC_quick_push (tree_v, phis_to_rewrite, NULL);
- phis = VEC_index (tree_vec, phis_to_rewrite, idx);
+ phis = VEC_index (tree_v, phis_to_rewrite, idx);
if (!phis)
phis = VEC_alloc (tree, heap, 10);
VEC_safe_push (tree, heap, phis, phi);
- VEC_replace (tree_vec, phis_to_rewrite, idx, phis);
+ VEC_replace (tree_v, phis_to_rewrite, idx, phis);
}
/* Insert PHI nodes for variable VAR using the iterated dominance
@@ -1858,12 +1858,12 @@ rewrite_update_phi_arguments (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
FOR_EACH_EDGE (e, ei, bb->succs)
{
tree phi;
- tree_vec phis;
+ tree_v phis;
if (!bitmap_bit_p (blocks_with_phis_to_rewrite, e->dest->index))
continue;
- phis = VEC_index (tree_vec, phis_to_rewrite, e->dest->index);
+ phis = VEC_index (tree_v, phis_to_rewrite, e->dest->index);
for (i = 0; VEC_iterate (tree, phis, i, phi); i++)
{
tree arg;
@@ -2602,12 +2602,12 @@ create_new_def_for (tree old_name, tree stmt, def_operand_p def)
update_ssa. */
void
-register_new_name_mapping (tree new, tree old)
+register_new_name_mapping (tree n, tree old)
{
if (need_to_initialize_update_ssa_p)
init_update_ssa ();
- add_new_name_mapping (new, old);
+ add_new_name_mapping (n, old);
}
@@ -2961,7 +2961,7 @@ update_ssa (unsigned update_flags)
blocks_with_phis_to_rewrite = BITMAP_ALLOC (NULL);
if (!phis_to_rewrite)
- phis_to_rewrite = VEC_alloc (tree_vec, heap, last_basic_block);
+ phis_to_rewrite = VEC_alloc (tree_v, heap, last_basic_block);
blocks_to_update = BITMAP_ALLOC (NULL);
/* Ensure that the dominance information is up-to-date. */
@@ -3144,10 +3144,10 @@ update_ssa (unsigned update_flags)
done:
EXECUTE_IF_SET_IN_BITMAP (blocks_with_phis_to_rewrite, 0, i, bi)
{
- tree_vec phis = VEC_index (tree_vec, phis_to_rewrite, i);
+ tree_v phis = VEC_index (tree_v, phis_to_rewrite, i);
VEC_free (tree, heap, phis);
- VEC_replace (tree_vec, phis_to_rewrite, i, NULL);
+ VEC_replace (tree_v, phis_to_rewrite, i, NULL);
}
BITMAP_FREE (blocks_with_phis_to_rewrite);
BITMAP_FREE (blocks_to_update);
diff --git a/gcc/tree-iterator.c b/gcc/tree-iterator.c
index 77e2345e4c2..52a24bb69b3 100644
--- a/gcc/tree-iterator.c
+++ b/gcc/tree-iterator.c
@@ -90,7 +90,7 @@ tsi_link_before (tree_stmt_iterator *i, tree t, enum tsi_iterator_update mode)
}
else
{
- head = ggc_alloc (sizeof (*head));
+ head = (struct tree_statement_list_node *) ggc_alloc (sizeof (*head));
head->prev = NULL;
head->next = NULL;
head->stmt = t;
@@ -166,7 +166,7 @@ tsi_link_after (tree_stmt_iterator *i, tree t, enum tsi_iterator_update mode)
}
else
{
- head = ggc_alloc (sizeof (*head));
+ head = (struct tree_statement_list_node *) ggc_alloc (sizeof (*head));
head->prev = NULL;
head->next = NULL;
head->stmt = t;
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index 7467dca84e6..2093018f460 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -80,7 +80,7 @@
struct var_map_elt GTY(())
{
tree old;
- tree new;
+ tree fresh;
};
struct nesting_info GTY ((chain_next ("%h.next")))
@@ -306,14 +306,14 @@ lookup_field_for_decl (struct nesting_info *info, tree decl,
elt = GGC_NEW (struct var_map_elt);
elt->old = decl;
- elt->new = field;
+ elt->fresh = field;
*slot = elt;
if (TREE_CODE (decl) == PARM_DECL)
info->any_parm_remapped = true;
}
else
- field = elt ? elt->new : NULL;
+ field = elt ? elt->fresh : NULL;
return field;
}
@@ -492,13 +492,13 @@ lookup_tramp_for_decl (struct nesting_info *info, tree decl,
elt = GGC_NEW (struct var_map_elt);
elt->old = decl;
- elt->new = field;
+ elt->fresh = field;
*slot = elt;
info->any_tramp_created = true;
}
else
- field = elt ? elt->new : NULL;
+ field = elt ? elt->fresh : NULL;
return field;
}
@@ -827,10 +827,10 @@ get_nonlocal_debug_decl (struct nesting_info *info, tree decl)
dummy.old = decl;
slot = htab_find_slot (info->var_map, &dummy, INSERT);
- elt = *slot;
+ elt = (struct var_map_elt *) *slot;
if (elt)
- return elt->new;
+ return elt->fresh;
target_context = decl_function_context (decl);
@@ -874,9 +874,9 @@ get_nonlocal_debug_decl (struct nesting_info *info, tree decl)
SET_DECL_VALUE_EXPR (new_decl, x);
DECL_HAS_VALUE_EXPR_P (new_decl) = 1;
- elt = ggc_alloc (sizeof (*elt));
+ elt = (struct var_map_elt *) ggc_alloc (sizeof (*elt));
elt->old = decl;
- elt->new = new_decl;
+ elt->fresh = new_decl;
*slot = elt;
TREE_CHAIN (new_decl) = info->debug_var_chain;
@@ -899,7 +899,7 @@ static tree
convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info;
+ struct nesting_info *info = (struct nesting_info *) wi->info;
tree t = *tp;
tree save_local_var_chain;
bitmap save_suppress;
@@ -991,7 +991,7 @@ convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data)
where we only accept variables (and min_invariant, presumably),
then compute the address into a temporary. */
if (save_val_only)
- *tp = tsi_gimplify_val (wi->info, t, &wi->tsi);
+ *tp = tsi_gimplify_val ((struct nesting_info *) wi->info, t, &wi->tsi);
}
}
break;
@@ -1088,7 +1088,7 @@ convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data)
static bool
convert_nonlocal_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
{
- struct nesting_info *info = wi->info;
+ struct nesting_info *info = (struct nesting_info *) wi->info;
bool need_chain = false;
tree clause, decl;
int dummy;
@@ -1158,10 +1158,10 @@ get_local_debug_decl (struct nesting_info *info, tree decl, tree field)
dummy.old = decl;
slot = htab_find_slot (info->var_map, &dummy, INSERT);
- elt = *slot;
+ elt = (struct var_map_elt *) *slot;
if (elt)
- return elt->new;
+ return elt->fresh;
/* Make sure frame_decl gets created. */
(void) get_frame_type (info);
@@ -1182,9 +1182,9 @@ get_local_debug_decl (struct nesting_info *info, tree decl, tree field)
SET_DECL_VALUE_EXPR (new_decl, x);
DECL_HAS_VALUE_EXPR_P (new_decl) = 1;
- elt = ggc_alloc (sizeof (*elt));
+ elt = (struct var_map_elt *) ggc_alloc (sizeof (*elt));
elt->old = decl;
- elt->new = new_decl;
+ elt->fresh = new_decl;
*slot = elt;
TREE_CHAIN (new_decl) = info->debug_var_chain;
@@ -1206,7 +1206,7 @@ static tree
convert_local_reference (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info;
+ struct nesting_info *info = (struct nesting_info *) wi->info;
tree t = *tp, field, x;
bool save_val_only;
tree save_local_var_chain;
@@ -1276,7 +1276,7 @@ convert_local_reference (tree *tp, int *walk_subtrees, void *data)
/* If we are in a context where we only accept values, then
compute the address into a temporary. */
if (save_val_only)
- *tp = tsi_gimplify_val (wi->info, t, &wi->tsi);
+ *tp = tsi_gimplify_val ((struct nesting_info *) wi->info, t, &wi->tsi);
}
break;
@@ -1374,7 +1374,7 @@ convert_local_reference (tree *tp, int *walk_subtrees, void *data)
static bool
convert_local_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
{
- struct nesting_info *info = wi->info;
+ struct nesting_info *info = (struct nesting_info *) wi->info;
bool need_frame = false;
tree clause, decl;
int dummy;
@@ -1443,7 +1443,7 @@ static tree
convert_nl_goto_reference (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info, *i;
+ struct nesting_info *info = (struct nesting_info *) wi->info, *i;
tree t = *tp, label, new_label, target_context, x, arg, field;
struct var_map_elt *elt, dummy;
void **slot;
@@ -1478,11 +1478,11 @@ convert_nl_goto_reference (tree *tp, int *walk_subtrees, void *data)
elt = GGC_NEW (struct var_map_elt);
elt->old = label;
- elt->new = new_label;
+ elt->fresh = new_label;
*slot = elt;
}
else
- new_label = elt->new;
+ new_label = elt->fresh;
/* Build: __builtin_nl_goto(new_label, &chain->nl_goto_field). */
field = get_nl_goto_field (i);
@@ -1511,7 +1511,7 @@ static tree
convert_nl_goto_receiver (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info;
+ struct nesting_info *info = (struct nesting_info *) wi->info;
tree t = *tp, label, new_label, x;
struct var_map_elt *elt, dummy;
tree_stmt_iterator tmp_tsi;
@@ -1525,7 +1525,7 @@ convert_nl_goto_receiver (tree *tp, int *walk_subtrees, void *data)
elt = (struct var_map_elt *) htab_find (info->var_map, &dummy);
if (!elt)
return NULL_TREE;
- new_label = elt->new;
+ new_label = elt->fresh;
/* If there's any possibility that the previous statement falls through,
then we must branch around the new non-local label. */
@@ -1550,7 +1550,7 @@ static tree
convert_tramp_reference (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info, *i;
+ struct nesting_info *info = (struct nesting_info *) wi->info, *i;
tree t = *tp, decl, target_context, x, arg;
*walk_subtrees = 0;
@@ -1625,7 +1625,7 @@ static tree
convert_call_expr (tree *tp, int *walk_subtrees, void *data)
{
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct nesting_info *info = wi->info;
+ struct nesting_info *info = (struct nesting_info *) wi->info;
tree t = *tp, decl, target_context;
char save_static_chain_added;
int i;
diff --git a/gcc/tree-phinodes.c b/gcc/tree-phinodes.c
index 98b011f89e6..84a3d4d7e92 100644
--- a/gcc/tree-phinodes.c
+++ b/gcc/tree-phinodes.c
@@ -153,7 +153,7 @@ allocate_phi_node (int len)
}
else
{
- phi = ggc_alloc (size);
+ phi = (tree) ggc_alloc (size);
#ifdef GATHER_STATISTICS
phi_nodes_created++;
tree_node_counts[(int) phi_kind]++;
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index 5ce495b501f..e811907f738 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -503,7 +503,7 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
case BOOLEAN_TYPE:
{
unsigned int quals = TYPE_QUALS (node);
- enum tree_code_class class;
+ enum tree_code_class tcc;
if (quals & TYPE_QUAL_CONST)
pp_string (buffer, "const ");
@@ -512,16 +512,16 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
else if (quals & TYPE_QUAL_RESTRICT)
pp_string (buffer, "restrict ");
- class = TREE_CODE_CLASS (TREE_CODE (node));
+ tcc = TREE_CODE_CLASS (TREE_CODE (node));
- if (class == tcc_declaration)
+ if (tcc == tcc_declaration)
{
if (DECL_NAME (node))
dump_decl_name (buffer, node, flags);
else
pp_string (buffer, "<unnamed type decl>");
}
- else if (class == tcc_type)
+ else if (tcc == tcc_type)
{
if (TYPE_NAME (node))
{
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 80c4ca744e0..6f85744478b 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -455,7 +455,7 @@ sra_hash_tree (tree t)
static hashval_t
sra_elt_hash (const void *x)
{
- const struct sra_elt *e = x;
+ const struct sra_elt *e = (const struct sra_elt *) x;
const struct sra_elt *p;
hashval_t h;
@@ -476,8 +476,8 @@ sra_elt_hash (const void *x)
static int
sra_elt_eq (const void *x, const void *y)
{
- const struct sra_elt *a = x;
- const struct sra_elt *b = y;
+ const struct sra_elt *a = (const struct sra_elt *) x;
+ const struct sra_elt *b = (const struct sra_elt *) y;
tree ae, be;
if (a->parent != b->parent)
@@ -544,7 +544,7 @@ lookup_element (struct sra_elt *parent, tree child, tree type,
elt = *slot;
if (!elt && insert == INSERT)
{
- *slot = elt = obstack_alloc (&sra_obstack, sizeof (*elt));
+ *slot = elt = (struct sra_elt *) obstack_alloc (&sra_obstack, sizeof (*elt));
memset (elt, 0, sizeof (*elt));
elt->parent = parent;
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 8c31a861a8b..e570bcf3768 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -2267,14 +2267,14 @@ ccp_fold_builtin (tree stmt, tree fn)
case BUILT_IN_STRLEN:
if (val[0])
{
- tree new = fold_convert (TREE_TYPE (fn), val[0]);
+ tree tmp = fold_convert (TREE_TYPE (fn), val[0]);
/* If the result is not a valid gimple value, or not a cast
of a valid gimple value, then we can not use the result. */
- if (is_gimple_val (new)
- || (is_gimple_cast (new)
- && is_gimple_val (TREE_OPERAND (new, 0))))
- return new;
+ if (is_gimple_val (tmp)
+ || (is_gimple_cast (tmp)
+ && is_gimple_val (TREE_OPERAND (tmp, 0))))
+ return tmp;
}
break;
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index f1b67b5bf2a..1543d430232 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -181,19 +181,19 @@ may_propagate_copy_into_asm (tree dest)
they both share the same memory tags. */
void
-merge_alias_info (tree orig, tree new)
+merge_alias_info (tree orig, tree fresh)
{
- tree new_sym = SSA_NAME_VAR (new);
+ tree new_sym = SSA_NAME_VAR (fresh);
tree orig_sym = SSA_NAME_VAR (orig);
var_ann_t new_ann = var_ann (new_sym);
var_ann_t orig_ann = var_ann (orig_sym);
gcc_assert (POINTER_TYPE_P (TREE_TYPE (orig)));
- gcc_assert (POINTER_TYPE_P (TREE_TYPE (new)));
+ gcc_assert (POINTER_TYPE_P (TREE_TYPE (fresh)));
#if defined ENABLE_CHECKING
gcc_assert (lang_hooks.types_compatible_p (TREE_TYPE (orig),
- TREE_TYPE (new)));
+ TREE_TYPE (fresh)));
/* If the pointed-to alias sets are different, these two pointers
would never have the same memory tag. In this case, NEW should
@@ -229,10 +229,10 @@ merge_alias_info (tree orig, tree new)
Since we cannot distinguish one case from another in this
function, we can only make sure that if P_i and Q_j have
flow-sensitive information, they should be compatible. */
- if (SSA_NAME_PTR_INFO (orig) && SSA_NAME_PTR_INFO (new))
+ if (SSA_NAME_PTR_INFO (orig) && SSA_NAME_PTR_INFO (fresh))
{
struct ptr_info_def *orig_ptr_info = SSA_NAME_PTR_INFO (orig);
- struct ptr_info_def *new_ptr_info = SSA_NAME_PTR_INFO (new);
+ struct ptr_info_def *new_ptr_info = SSA_NAME_PTR_INFO (fresh);
/* Note that pointer NEW and ORIG may actually have different
pointed-to variables (e.g., PR 18291 represented in
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 085a5d60482..df25c66c02a 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -569,7 +569,7 @@ dom_thread_across_edge (struct dom_walk_data *walk_data, edge e)
walk_data->global_data = dummy_cond;
}
- thread_across_edge (walk_data->global_data, e, false,
+ thread_across_edge ((tree) walk_data->global_data, e, false,
&const_and_copies_stack,
simplify_stmt_for_jump_threading);
}
@@ -1238,7 +1238,7 @@ cprop_into_successor_phis (basic_block bb)
indx = e->dest_idx;
for ( ; phi; phi = PHI_CHAIN (phi))
{
- tree new;
+ tree fresh;
use_operand_p orig_p;
tree orig;
@@ -1251,13 +1251,13 @@ cprop_into_successor_phis (basic_block bb)
/* If we have *ORIG_P in our constant/copy table, then replace
ORIG_P with its value in our constant/copy table. */
- new = SSA_NAME_VALUE (orig);
- if (new
- && new != orig
- && (TREE_CODE (new) == SSA_NAME
- || is_gimple_min_invariant (new))
- && may_propagate_copy (orig, new))
- propagate_value (orig_p, new);
+ fresh = SSA_NAME_VALUE (orig);
+ if (fresh
+ && fresh != orig
+ && (TREE_CODE (fresh) == SSA_NAME
+ || is_gimple_min_invariant (fresh))
+ && may_propagate_copy (orig, fresh))
+ propagate_value (orig_p, fresh);
}
}
}
@@ -1591,7 +1591,7 @@ record_equivalences_from_stmt (tree stmt,
&& !is_gimple_reg (lhs))
{
tree rhs = TREE_OPERAND (stmt, 1);
- tree new;
+ tree fresh;
/* FIXME: If the LHS of the assignment is a bitfield and the RHS
is a constant, we need to adjust the constant to fit into the
@@ -1617,13 +1617,13 @@ record_equivalences_from_stmt (tree stmt,
if (rhs)
{
/* Build a new statement with the RHS and LHS exchanged. */
- new = build2 (MODIFY_EXPR, TREE_TYPE (stmt), rhs, lhs);
+ fresh = build2 (MODIFY_EXPR, TREE_TYPE (stmt), rhs, lhs);
- create_ssa_artficial_load_stmt (new, stmt);
+ create_ssa_artficial_load_stmt (fresh, stmt);
/* Finally enter the statement into the available expression
table. */
- lookup_avail_expr (new, true);
+ lookup_avail_expr (fresh, true);
}
}
}
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index fe6701594b6..669a44ea0a6 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -141,7 +141,7 @@ dse_initialize_block_local_data (struct dom_walk_data *walk_data,
bool recycled)
{
struct dse_block_local_data *bd
- = VEC_last (void_p, walk_data->block_data_stack);
+ = (struct dse_block_local_data *) VEC_last (void_p, walk_data->block_data_stack);
/* If we are given a recycled block local data structure, ensure any
bitmap associated with the block is cleared. */
@@ -163,7 +163,7 @@ static tree
memory_ssa_name_same (tree *expr_p, int *walk_subtrees ATTRIBUTE_UNUSED,
void *data)
{
- struct address_walk_data *walk_data = data;
+ struct address_walk_data *walk_data = (struct address_walk_data *) data;
tree expr = *expr_p;
tree def_stmt;
basic_block def_bb;
@@ -227,8 +227,8 @@ dse_optimize_stmt (struct dom_walk_data *walk_data,
block_stmt_iterator bsi)
{
struct dse_block_local_data *bd
- = VEC_last (void_p, walk_data->block_data_stack);
- struct dse_global_data *dse_gd = walk_data->global_data;
+ = (struct dse_block_local_data *) VEC_last (void_p, walk_data->block_data_stack);
+ struct dse_global_data *dse_gd = (struct dse_global_data *) walk_data->global_data;
tree stmt = bsi_stmt (bsi);
stmt_ann_t ann = stmt_ann (stmt);
@@ -366,8 +366,8 @@ static void
dse_record_phis (struct dom_walk_data *walk_data, basic_block bb)
{
struct dse_block_local_data *bd
- = VEC_last (void_p, walk_data->block_data_stack);
- struct dse_global_data *dse_gd = walk_data->global_data;
+ = (struct dse_block_local_data *) VEC_last (void_p, walk_data->block_data_stack);
+ struct dse_global_data *dse_gd = (struct dse_global_data *) walk_data->global_data;
tree phi;
for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
@@ -382,8 +382,8 @@ dse_finalize_block (struct dom_walk_data *walk_data,
basic_block bb ATTRIBUTE_UNUSED)
{
struct dse_block_local_data *bd
- = VEC_last (void_p, walk_data->block_data_stack);
- struct dse_global_data *dse_gd = walk_data->global_data;
+ = (struct dse_block_local_data *) VEC_last (void_p, walk_data->block_data_stack);
+ struct dse_global_data *dse_gd = (struct dse_global_data *) walk_data->global_data;
bitmap stores = dse_gd->stores;
unsigned int i;
bitmap_iterator bi;
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index e2c5ed48e70..529ea7c3764 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -457,7 +457,7 @@ find_equivalent_equality_comparison (tree cond)
{
tree def_rhs_inner = TREE_OPERAND (def_rhs, 0);
tree def_rhs_inner_type = TREE_TYPE (def_rhs_inner);
- tree new;
+ tree tmp;
if (TYPE_PRECISION (def_rhs_inner_type)
> TYPE_PRECISION (TREE_TYPE (def_rhs)))
@@ -480,11 +480,11 @@ find_equivalent_equality_comparison (tree cond)
If that is true, the build and return new equivalent
condition which uses the source of the typecast and the
new constant (which has only changed its type). */
- new = fold_build1 (TREE_CODE (def_rhs), def_rhs_inner_type, op1);
- STRIP_USELESS_TYPE_CONVERSION (new);
- if (is_gimple_val (new) && tree_int_cst_equal (new, op1))
+ tmp = fold_build1 (TREE_CODE (def_rhs), def_rhs_inner_type, op1);
+ STRIP_USELESS_TYPE_CONVERSION (tmp);
+ if (is_gimple_val (tmp) && tree_int_cst_equal (tmp, op1))
return build2 (TREE_CODE (cond), TREE_TYPE (cond),
- def_rhs_inner, new);
+ def_rhs_inner, tmp);
}
}
return NULL;
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index db9f42f6987..182c75f0097 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -330,7 +330,7 @@ outermost_invariant_loop (tree def, struct loop *loop)
static struct loop *
outermost_invariant_loop_expr (tree expr, struct loop *loop)
{
- enum tree_code_class class = TREE_CODE_CLASS (TREE_CODE (expr));
+ enum tree_code_class tcc = TREE_CODE_CLASS (TREE_CODE (expr));
unsigned i, nops;
struct loop *max_loop = superloop_at_depth (loop, 1), *aloop;
@@ -339,10 +339,10 @@ outermost_invariant_loop_expr (tree expr, struct loop *loop)
|| is_gimple_min_invariant (expr))
return outermost_invariant_loop (expr, loop);
- if (class != tcc_unary
- && class != tcc_binary
- && class != tcc_expression
- && class != tcc_comparison)
+ if (tcc != tcc_unary
+ && tcc != tcc_binary
+ && tcc != tcc_expression
+ && tcc != tcc_comparison)
return NULL;
nops = TREE_CODE_LENGTH (TREE_CODE (expr));
@@ -789,7 +789,7 @@ move_computations (void)
static bool
may_move_till (tree ref, tree *index, void *data)
{
- struct loop *loop = data, *max_loop;
+ struct loop *loop = (struct loop *) data, *max_loop;
/* If REF is an array reference, check also that the step and the lower
bound is invariant in LOOP. */
@@ -820,7 +820,7 @@ may_move_till (tree ref, tree *index, void *data)
static void
force_move_till_expr (tree expr, struct loop *orig_loop, struct loop *loop)
{
- enum tree_code_class class = TREE_CODE_CLASS (TREE_CODE (expr));
+ enum tree_code_class tcc = TREE_CODE_CLASS (TREE_CODE (expr));
unsigned i, nops;
if (TREE_CODE (expr) == SSA_NAME)
@@ -833,10 +833,10 @@ force_move_till_expr (tree expr, struct loop *orig_loop, struct loop *loop)
return;
}
- if (class != tcc_unary
- && class != tcc_binary
- && class != tcc_expression
- && class != tcc_comparison)
+ if (tcc != tcc_unary
+ && tcc != tcc_binary
+ && tcc != tcc_expression
+ && tcc != tcc_comparison)
return;
nops = TREE_CODE_LENGTH (TREE_CODE (expr));
@@ -858,7 +858,7 @@ static bool
force_move_till (tree ref, tree *index, void *data)
{
tree stmt;
- struct fmt_data *fmt_data = data;
+ struct fmt_data *fmt_data = (struct fmt_data *) data;
if (TREE_CODE (ref) == ARRAY_REF)
{
@@ -1181,7 +1181,7 @@ loop_suitable_for_sm (struct loop *loop ATTRIBUTE_UNUSED, edge *exits,
static hashval_t
memref_hash (const void *obj)
{
- const struct mem_ref *mem = obj;
+ const struct mem_ref *mem = (struct mem_ref *) obj;
return mem->hash;
}
@@ -1192,7 +1192,7 @@ memref_hash (const void *obj)
static int
memref_eq (const void *obj1, const void *obj2)
{
- const struct mem_ref *mem1 = obj1;
+ const struct mem_ref *mem1 = (const struct mem_ref *) obj1;
return operand_equal_p (mem1->mem, (tree) obj2, 0);
}
@@ -1255,7 +1255,7 @@ gather_mem_refs_stmt (struct loop *loop, htab_t mem_refs,
slot = htab_find_slot_with_hash (mem_refs, *mem, hash, INSERT);
if (*slot)
- ref = *slot;
+ ref = (struct mem_ref *) *slot;
else
{
ref = XNEW (struct mem_ref);
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 08746200f9e..55dd8ab0c3b 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -682,13 +682,13 @@ bool
contains_abnormal_ssa_name_p (tree expr)
{
enum tree_code code;
- enum tree_code_class class;
+ enum tree_code_class cls;
if (!expr)
return false;
code = TREE_CODE (expr);
- class = TREE_CODE_CLASS (code);
+ cls = TREE_CODE_CLASS (code);
if (code == SSA_NAME)
return SSA_NAME_OCCURS_IN_ABNORMAL_PHI (expr) != 0;
@@ -702,7 +702,7 @@ contains_abnormal_ssa_name_p (tree expr)
idx_contains_abnormal_ssa_name_p,
NULL);
- switch (class)
+ switch (cls)
{
case tcc_binary:
case tcc_comparison:
@@ -741,7 +741,7 @@ struct nfe_cache_elt
static hashval_t
nfe_hash (const void *e)
{
- const struct nfe_cache_elt *elt = e;
+ const struct nfe_cache_elt *elt = (struct nfe_cache_elt *) e;
return htab_hash_pointer (elt->exit);
}
@@ -751,7 +751,7 @@ nfe_hash (const void *e)
static int
nfe_eq (const void *e1, const void *e2)
{
- const struct nfe_cache_elt *elt1 = e1;
+ const struct nfe_cache_elt *elt1 = (struct nfe_cache_elt *) e1;
return elt1->exit == e2;
}
@@ -772,7 +772,7 @@ niter_for_exit (struct ivopts_data *data, edge exit)
if (!*slot)
{
- nfe_desc = xmalloc (sizeof (struct nfe_cache_elt));
+ nfe_desc = XNEW (struct nfe_cache_elt);
nfe_desc->exit = exit;
/* Try to determine number of iterations. We must know it
@@ -789,7 +789,7 @@ niter_for_exit (struct ivopts_data *data, edge exit)
nfe_desc->niter = NULL_TREE;
}
else
- nfe_desc = *slot;
+ nfe_desc = (struct nfe_cache_elt *) *slot;
return nfe_desc->niter;
}
@@ -1339,7 +1339,7 @@ struct ifs_ivopts_data
static bool
idx_find_step (tree base, tree *idx, void *data)
{
- struct ifs_ivopts_data *dta = data;
+ struct ifs_ivopts_data *dta = (struct ifs_ivopts_data *) data;
struct iv *iv;
tree step, iv_base, iv_step, lbound, off;
struct loop *loop = dta->ivopts_data->current_loop;
@@ -1424,11 +1424,11 @@ static bool
idx_record_use (tree base, tree *idx,
void *data)
{
- find_interesting_uses_op (data, *idx);
+ find_interesting_uses_op ((struct ivopts_data *) data, *idx);
if (TREE_CODE (base) == ARRAY_REF)
{
- find_interesting_uses_op (data, array_ref_element_size (base));
- find_interesting_uses_op (data, array_ref_low_bound (base));
+ find_interesting_uses_op ((struct ivopts_data *) data, array_ref_element_size (base));
+ find_interesting_uses_op ((struct ivopts_data *) data, array_ref_low_bound (base));
}
return true;
}
@@ -1950,7 +1950,7 @@ static struct ivopts_data *fd_ivopts_data;
static tree
find_depends (tree *expr_p, int *ws ATTRIBUTE_UNUSED, void *data)
{
- bitmap *depends_on = data;
+ bitmap *depends_on = (bitmap *) data;
struct version_info *info;
if (TREE_CODE (*expr_p) != SSA_NAME)
@@ -2452,7 +2452,7 @@ prepare_decl_rtl (tree *expr_p, int *ws, void *data)
{
tree obj = NULL_TREE;
rtx x = NULL_RTX;
- int *regno = data;
+ int *regno = (int *) data;
switch (TREE_CODE (*expr_p))
{
@@ -3261,7 +3261,7 @@ struct mbc_entry
static hashval_t
mbc_entry_hash (const void *entry)
{
- const struct mbc_entry *e = entry;
+ const struct mbc_entry *e = (const struct mbc_entry *) entry;
return 57 * (hashval_t) e->mode + (hashval_t) (e->cst % 877);
}
@@ -3271,8 +3271,8 @@ mbc_entry_hash (const void *entry)
static int
mbc_entry_eq (const void *entry1, const void *entry2)
{
- const struct mbc_entry *e1 = entry1;
- const struct mbc_entry *e2 = entry2;
+ const struct mbc_entry *e1 = (struct mbc_entry *) entry1;
+ const struct mbc_entry *e2 = (struct mbc_entry *) entry2;
return (e1->mode == e2->mode
&& e1->cst == e2->cst);
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index e079dda2068..44dd2485ad5 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -574,7 +574,12 @@ number_of_iterations_cond (tree type, affine_iv *iv0, enum tree_code code,
if (code == GE_EXPR || code == GT_EXPR
|| (code == NE_EXPR && zero_p (iv0->step)))
{
- SWAP (iv0, iv1);
+ affine_iv *tmp;
+
+ tmp = iv0;
+ iv0 = iv1;
+ iv1 = tmp;
+
code = swap_tree_comparison (code);
}
@@ -672,7 +677,7 @@ number_of_iterations_cond (tree type, affine_iv *iv0, enum tree_code code,
/* Substitute NEW for OLD in EXPR and fold the result. */
static tree
-simplify_replace_tree (tree expr, tree old, tree new)
+simplify_replace_tree (tree expr, tree old, tree out)
{
unsigned i, n;
tree ret = NULL_TREE, e, se;
@@ -682,7 +687,7 @@ simplify_replace_tree (tree expr, tree old, tree new)
if (expr == old
|| operand_equal_p (expr, old, 0))
- return unshare_expr (new);
+ return unshare_expr (out);
if (!EXPR_P (expr))
return expr;
@@ -691,7 +696,7 @@ simplify_replace_tree (tree expr, tree old, tree new)
for (i = 0; i < n; i++)
{
e = TREE_OPERAND (expr, i);
- se = simplify_replace_tree (e, old, new);
+ se = simplify_replace_tree (e, old, out);
if (e == se)
continue;
@@ -1658,7 +1663,7 @@ derive_constant_upper_bound (tree val, tree additional)
void
record_estimate (struct loop *loop, tree bound, tree additional, tree at_stmt)
{
- struct nb_iter_bound *elt = xmalloc (sizeof (struct nb_iter_bound));
+ struct nb_iter_bound *elt = XNEW (struct nb_iter_bound);
double_int i_bound = derive_constant_upper_bound (bound, additional);
tree c_bound = double_int_to_tree (unsigned_type_for (TREE_TYPE (bound)),
i_bound);
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index f9fe2d30c8a..8702816f2a7 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -246,7 +246,7 @@ find_or_create_group (struct mem_ref_group **groups, tree base,
break;
}
- group = xcalloc (1, sizeof (struct mem_ref_group));
+ group = XCNEW(struct mem_ref_group);
group->base = base;
group->step = step;
group->refs = NULL;
@@ -283,7 +283,7 @@ record_ref (struct mem_ref_group *group, tree stmt, tree mem,
return;
}
- (*aref) = xcalloc (1, sizeof (struct mem_ref));
+ (*aref) = XCNEW(struct mem_ref);
(*aref)->stmt = stmt;
(*aref)->mem = mem;
(*aref)->delta = delta;
@@ -334,7 +334,7 @@ struct ar_data
static bool
idx_analyze_ref (tree base, tree *index, void *data)
{
- struct ar_data *ar_data = data;
+ struct ar_data *ar_data = (struct ar_data *) data;
tree ibase, step, stepsize;
HOST_WIDE_INT istep, idelta = 0, imult = 1;
affine_iv iv;
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index 1ff06285de8..a85b6574216 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -151,7 +151,8 @@ occ_new (basic_block bb, struct occurrence *children)
{
struct occurrence *occ;
- occ = bb->aux = pool_alloc (occ_pool);
+ bb->aux = pool_alloc (occ_pool);
+ occ = (struct occurrence *) bb->aux;
memset (occ, 0, sizeof (struct occurrence));
occ->bb = bb;
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 4fa876de39c..f77197c5ed2 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -140,7 +140,7 @@ static mustdef_optype_p free_mustdefs = NULL;
if (ret) \
free_##TYPE##s = ret->next; \
else \
- ret = ssa_operand_alloc (sizeof (*ret)); \
+ ret = (TYPE##_optype_p) ssa_operand_alloc (sizeof (*ret)); \
(OP) = ret; \
} while (0)
@@ -387,11 +387,11 @@ set_virtual_use_link (use_operand_p ptr, tree stmt)
static inline void
add_def_op (tree *op, def_optype_p *last)
{
- def_optype_p new;
+ def_optype_p tmp;
- ALLOC_OPTYPE (new, def);
- DEF_OP_PTR (new) = op;
- APPEND_OP_AFTER (new, *last);
+ ALLOC_OPTYPE (tmp, def);
+ DEF_OP_PTR (tmp) = op;
+ APPEND_OP_AFTER (tmp, *last);
}
/* Adds OP to the list of uses of statement STMT after LAST, and moves
@@ -400,11 +400,11 @@ add_def_op (tree *op, def_optype_p *last)
static inline void
add_use_op (tree stmt, tree *op, use_optype_p *last)
{
- use_optype_p new;
+ use_optype_p tmp;
- ALLOC_OPTYPE (new, use);
- INITIALIZE_USE (USE_OP_PTR (new), op, stmt);
- APPEND_OP_AFTER (new, *last);
+ ALLOC_OPTYPE (tmp, use);
+ INITIALIZE_USE (USE_OP_PTR (tmp), op, stmt);
+ APPEND_OP_AFTER (tmp, *last);
}
/* Adds OP to the list of vuses of statement STMT after LAST, and moves
@@ -413,12 +413,12 @@ add_use_op (tree stmt, tree *op, use_optype_p *last)
static inline void
add_vuse_op (tree stmt, tree op, vuse_optype_p *last)
{
- vuse_optype_p new;
+ vuse_optype_p tmp;
- ALLOC_OPTYPE (new, vuse);
- VUSE_OP (new) = op;
- INITIALIZE_USE (VUSE_OP_PTR (new), &VUSE_OP (new), stmt);
- APPEND_OP_AFTER (new, *last);
+ ALLOC_OPTYPE (tmp, vuse);
+ VUSE_OP (tmp) = op;
+ INITIALIZE_USE (VUSE_OP_PTR (tmp), &VUSE_OP (tmp), stmt);
+ APPEND_OP_AFTER (tmp, *last);
}
/* Adds OP to the list of maydefs of statement STMT after LAST, and moves
@@ -427,13 +427,13 @@ add_vuse_op (tree stmt, tree op, vuse_optype_p *last)
static inline void
add_maydef_op (tree stmt, tree op, maydef_optype_p *last)
{
- maydef_optype_p new;
+ maydef_optype_p tmp;
- ALLOC_OPTYPE (new, maydef);
- MAYDEF_RESULT (new) = op;
- MAYDEF_OP (new) = op;
- INITIALIZE_USE (MAYDEF_OP_PTR (new), &MAYDEF_OP (new), stmt);
- APPEND_OP_AFTER (new, *last);
+ ALLOC_OPTYPE (tmp, maydef);
+ MAYDEF_RESULT (tmp) = op;
+ MAYDEF_OP (tmp) = op;
+ INITIALIZE_USE (MAYDEF_OP_PTR (tmp), &MAYDEF_OP (tmp), stmt);
+ APPEND_OP_AFTER (tmp, *last);
}
/* Adds OP to the list of mustdefs of statement STMT after LAST, and moves
@@ -442,13 +442,13 @@ add_maydef_op (tree stmt, tree op, maydef_optype_p *last)
static inline void
add_mustdef_op (tree stmt, tree op, mustdef_optype_p *last)
{
- mustdef_optype_p new;
+ mustdef_optype_p tmp;
- ALLOC_OPTYPE (new, mustdef);
- MUSTDEF_RESULT (new) = op;
- MUSTDEF_KILL (new) = op;
- INITIALIZE_USE (MUSTDEF_KILL_PTR (new), &MUSTDEF_KILL (new), stmt);
- APPEND_OP_AFTER (new, *last);
+ ALLOC_OPTYPE (tmp, mustdef);
+ MUSTDEF_RESULT (tmp) = op;
+ MUSTDEF_KILL (tmp) = op;
+ INITIALIZE_USE (MUSTDEF_KILL_PTR (tmp), &MUSTDEF_KILL (tmp), stmt);
+ APPEND_OP_AFTER (tmp, *last);
}
/* Takes elements from build_defs and turns them into def operands of STMT.
@@ -1836,7 +1836,7 @@ static void
get_expr_operands (tree stmt, tree *expr_p, int flags)
{
enum tree_code code;
- enum tree_code_class class;
+ enum tree_code_class tcc;
tree expr = *expr_p;
stmt_ann_t s_ann = stmt_ann (stmt);
@@ -1844,7 +1844,7 @@ get_expr_operands (tree stmt, tree *expr_p, int flags)
return;
code = TREE_CODE (expr);
- class = TREE_CODE_CLASS (code);
+ tcc = TREE_CODE_CLASS (code);
switch (code)
{
@@ -2069,11 +2069,11 @@ get_expr_operands (tree stmt, tree *expr_p, int flags)
return;
default:
- if (class == tcc_unary)
+ if (tcc == tcc_unary)
goto do_unary;
- if (class == tcc_binary || class == tcc_comparison)
+ if (tcc == tcc_binary || tcc == tcc_comparison)
goto do_binary;
- if (class == tcc_constant || class == tcc_type)
+ if (tcc == tcc_constant || tcc == tcc_type)
return;
}
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index edad768d864..3af52785bc9 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -322,14 +322,14 @@ empty_block_p (basic_block bb)
static void
replace_phi_edge_with_variable (basic_block cond_block,
- edge e, tree phi, tree new)
+ edge e, tree phi, tree fresh)
{
basic_block bb = bb_for_stmt (phi);
basic_block block_to_remove;
block_stmt_iterator bsi;
/* Change the PHI argument to new. */
- SET_USE (PHI_ARG_DEF_PTR (phi, e->dest_idx), new);
+ SET_USE (PHI_ARG_DEF_PTR (phi, e->dest_idx), fresh);
/* Remove the empty basic block. */
if (EDGE_SUCC (cond_block, 0)->dest == bb)
@@ -377,7 +377,7 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
{
tree result;
tree old_result = NULL;
- tree new, cond;
+ tree fresh, cond;
block_stmt_iterator bsi;
edge true_edge, false_edge;
tree new_var = NULL;
@@ -470,7 +470,7 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
|| (e1 == true_edge && integer_onep (arg1))
|| (e1 == false_edge && integer_zerop (arg1)))
{
- new = build2 (MODIFY_EXPR, TREE_TYPE (new_var1), new_var1, cond);
+ fresh = build2 (MODIFY_EXPR, TREE_TYPE (new_var1), new_var1, cond);
}
else
{
@@ -514,19 +514,19 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
tmp = create_tmp_var (TREE_TYPE (op0), NULL);
add_referenced_var (tmp);
cond_tmp = make_ssa_name (tmp, NULL);
- new = build2 (MODIFY_EXPR, TREE_TYPE (cond_tmp), cond_tmp, op0);
- SSA_NAME_DEF_STMT (cond_tmp) = new;
+ fresh = build2 (MODIFY_EXPR, TREE_TYPE (cond_tmp), cond_tmp, op0);
+ SSA_NAME_DEF_STMT (cond_tmp) = fresh;
- bsi_insert_after (&bsi, new, BSI_NEW_STMT);
+ bsi_insert_after (&bsi, fresh, BSI_NEW_STMT);
cond = fold_convert (TREE_TYPE (result), cond_tmp);
}
- new = build2 (MODIFY_EXPR, TREE_TYPE (new_var1), new_var1, cond);
+ fresh = build2 (MODIFY_EXPR, TREE_TYPE (new_var1), new_var1, cond);
}
- bsi_insert_after (&bsi, new, BSI_NEW_STMT);
+ bsi_insert_after (&bsi, fresh, BSI_NEW_STMT);
- SSA_NAME_DEF_STMT (new_var1) = new;
+ SSA_NAME_DEF_STMT (new_var1) = fresh;
replace_phi_edge_with_variable (cond_bb, e1, phi, new_var1);
@@ -624,7 +624,7 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb,
tree arg0, tree arg1)
{
tree result, type;
- tree cond, new;
+ tree cond, fresh;
edge true_edge, false_edge;
enum tree_code cmp, minmax, ass_code;
tree smaller, larger, arg_true, arg_false;
@@ -853,11 +853,11 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb,
/* Emit the statement to compute min/max. */
result = duplicate_ssa_name (PHI_RESULT (phi), NULL);
- new = build2 (MODIFY_EXPR, type, result,
+ fresh = build2 (MODIFY_EXPR, type, result,
build2 (minmax, type, arg0, arg1));
- SSA_NAME_DEF_STMT (result) = new;
+ SSA_NAME_DEF_STMT (result) = fresh;
bsi = bsi_last (cond_bb);
- bsi_insert_before (&bsi, new, BSI_NEW_STMT);
+ bsi_insert_before (&bsi, fresh, BSI_NEW_STMT);
replace_phi_edge_with_variable (cond_bb, e1, phi, result);
return true;
@@ -875,7 +875,7 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb,
tree phi, tree arg0, tree arg1)
{
tree result;
- tree new, cond;
+ tree fresh, cond;
block_stmt_iterator bsi;
edge true_edge, false_edge;
tree assign;
@@ -966,23 +966,23 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb,
lhs = result;
/* Build the modify expression with abs expression. */
- new = build2 (MODIFY_EXPR, TREE_TYPE (lhs),
+ fresh = build2 (MODIFY_EXPR, TREE_TYPE (lhs),
lhs, build1 (ABS_EXPR, TREE_TYPE (lhs), rhs));
- SSA_NAME_DEF_STMT (lhs) = new;
+ SSA_NAME_DEF_STMT (lhs) = fresh;
bsi = bsi_last (cond_bb);
- bsi_insert_before (&bsi, new, BSI_NEW_STMT);
+ bsi_insert_before (&bsi, fresh, BSI_NEW_STMT);
if (negate)
{
/* Get the right BSI. We want to insert after the recently
added ABS_EXPR statement (which we know is the first statement
in the block. */
- new = build2 (MODIFY_EXPR, TREE_TYPE (result),
+ fresh = build2 (MODIFY_EXPR, TREE_TYPE (result),
result, build1 (NEGATE_EXPR, TREE_TYPE (lhs), lhs));
- SSA_NAME_DEF_STMT (result) = new;
+ SSA_NAME_DEF_STMT (result) = fresh;
- bsi_insert_after (&bsi, new, BSI_NEW_STMT);
+ bsi_insert_after (&bsi, fresh, BSI_NEW_STMT);
}
replace_phi_edge_with_variable (cond_bb, e1, phi, result);
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index ba32b3cfed4..b05f7bac270 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -1256,7 +1256,7 @@ phi_translate (tree expr, value_set_t set, basic_block pred,
{
tree t;
- newexpr = pool_alloc (reference_node_pool);
+ newexpr = (tree) pool_alloc (reference_node_pool);
memcpy (newexpr, expr, tree_size (expr));
TREE_OPERAND (newexpr, 0) = get_value_handle (newop0);
if (TREE_CODE (expr) == ARRAY_REF)
@@ -1956,7 +1956,7 @@ compute_rvuse_and_antic_safe (void)
bool changed = true;
unsigned int *first_store_uid;
- first_store_uid = xcalloc (n_basic_blocks, sizeof (unsigned int));
+ first_store_uid = XCNEWVEC (unsigned int, n_basic_blocks);
compute_vuse_representatives ();
@@ -3168,7 +3168,7 @@ poolify_tree (tree node)
{
case INDIRECT_REF:
{
- tree temp = pool_alloc (reference_node_pool);
+ tree temp = (tree) pool_alloc (reference_node_pool);
memcpy (temp, node, tree_size (node));
TREE_OPERAND (temp, 0) = poolify_tree (TREE_OPERAND (temp, 0));
return temp;
@@ -3176,7 +3176,7 @@ poolify_tree (tree node)
break;
case MODIFY_EXPR:
{
- tree temp = pool_alloc (modify_expr_node_pool);
+ tree temp = (tree) pool_alloc (modify_expr_node_pool);
memcpy (temp, node, tree_size (node));
TREE_OPERAND (temp, 0) = poolify_tree (TREE_OPERAND (temp, 0));
TREE_OPERAND (temp, 1) = poolify_tree (TREE_OPERAND (temp, 1));
@@ -3251,7 +3251,7 @@ insert_fake_stores (void)
def_operand_p defp;
tree lhs = TREE_OPERAND (stmt, 0);
tree rhs = TREE_OPERAND (stmt, 1);
- tree new;
+ tree tmp;
bool notokay = false;
FOR_EACH_SSA_DEF_OPERAND (defp, stmt, iter, SSA_OP_VIRTUAL_DEFS)
@@ -3273,16 +3273,16 @@ insert_fake_stores (void)
get_var_ann (storetemp);
}
- new = poolify_modify_expr (TREE_TYPE (stmt), storetemp, lhs);
+ tmp = poolify_modify_expr (TREE_TYPE (stmt), storetemp, lhs);
- lhs = make_ssa_name (storetemp, new);
- TREE_OPERAND (new, 0) = lhs;
- create_ssa_artficial_load_stmt (new, stmt);
+ lhs = make_ssa_name (storetemp, tmp);
+ TREE_OPERAND (tmp, 0) = lhs;
+ create_ssa_artficial_load_stmt (tmp, stmt);
- NECESSARY (new) = 0;
- VEC_safe_push (tree, heap, inserted_exprs, new);
- VEC_safe_push (tree, heap, need_creation, new);
- bsi_insert_after (&bsi, new, BSI_NEW_STMT);
+ NECESSARY (tmp) = 0;
+ VEC_safe_push (tree, heap, inserted_exprs, tmp);
+ VEC_safe_push (tree, heap, need_creation, tmp);
+ bsi_insert_after (&bsi, tmp, BSI_NEW_STMT);
}
}
}
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 477d8c8e407..994c5a94871 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -206,7 +206,7 @@ static void
insert_operand_rank (tree e, unsigned int rank)
{
void **slot;
- operand_entry_t new_pair = pool_alloc (operand_entry_pool);
+ operand_entry_t new_pair = (operand_entry_t) pool_alloc (operand_entry_pool);
new_pair->op = e;
new_pair->rank = rank;
@@ -364,7 +364,7 @@ sort_by_operand_rank (const void *pa, const void *pb)
static void
add_to_ops_vec (VEC(operand_entry_t, heap) **ops, tree op)
{
- operand_entry_t oe = pool_alloc (operand_entry_pool);
+ operand_entry_t oe = (operand_entry_t) pool_alloc (operand_entry_pool);
oe->op = op;
oe->rank = get_rank (op);
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c
index 4db67c524ce..f1260e30486 100644
--- a/gcc/tree-ssa-sink.c
+++ b/gcc/tree-ssa-sink.c
@@ -526,7 +526,7 @@ execute_sink_code (void)
connect_infinite_loops_to_exit ();
memset (&sink_stats, 0, sizeof (sink_stats));
- calculate_dominance_info (CDI_DOMINATORS | CDI_POST_DOMINATORS);
+ calculate_dominance_info ((enum cdi_direction) (CDI_DOMINATORS | CDI_POST_DOMINATORS));
sink_code_in_bb (EXIT_BLOCK_PTR);
if (dump_file && (dump_flags & TDF_STATS))
fprintf (dump_file, "Sunk statements:%d\n", sink_stats.sunk);
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 1c4a46e75ee..c8d3f189c9f 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -340,7 +340,7 @@ heapvar_lookup (tree from)
struct tree_map *h, in;
in.from = from;
- h = htab_find_with_hash (heapvar_for_stmt, &in, htab_hash_pointer (from));
+ h = (struct tree_map *) htab_find_with_hash (heapvar_for_stmt, &in, htab_hash_pointer (from));
if (h)
return h->to;
return NULL_TREE;
@@ -355,7 +355,7 @@ heapvar_insert (tree from, tree to)
struct tree_map *h;
void **loc;
- h = ggc_alloc (sizeof (struct tree_map));
+ h = (struct tree_map *) ggc_alloc (sizeof (struct tree_map));
h->hash = htab_hash_pointer (from);
h->from = from;
h->to = to;
@@ -369,7 +369,7 @@ heapvar_insert (tree from, tree to)
static varinfo_t
new_var_info (tree t, unsigned int id, const char *name, unsigned int node)
{
- varinfo_t ret = pool_alloc (variable_info_pool);
+ varinfo_t ret = (varinfo_t) pool_alloc (variable_info_pool);
ret->id = id;
ret->name = name;
@@ -454,7 +454,7 @@ static alloc_pool constraint_edge_pool;
static constraint_edge_t
new_constraint_edge (unsigned int dest)
{
- constraint_edge_t ret = pool_alloc (constraint_edge_pool);
+ constraint_edge_t ret = (constraint_edge_t) pool_alloc (constraint_edge_pool);
ret->dest = dest;
ret->weights = NULL;
return ret;
@@ -494,7 +494,7 @@ static constraint_t
new_constraint (const struct constraint_expr lhs,
const struct constraint_expr rhs)
{
- constraint_t ret = pool_alloc (constraint_pool);
+ constraint_t ret = (constraint_t) pool_alloc (constraint_pool);
ret->lhs = lhs;
ret->rhs = rhs;
return ret;
@@ -2185,7 +2185,7 @@ lookup_id_for_tree (tree t, unsigned int *id)
struct tree_id finder;
finder.t = t;
- pair = htab_find (id_for_tree, &finder);
+ pair = (tree_id_t) htab_find (id_for_tree, &finder);
if (pair == NULL)
return false;
*id = pair->id;
@@ -2236,7 +2236,7 @@ get_id_for_tree (tree t)
struct tree_id finder;
finder.t = t;
- pair = htab_find (id_for_tree, &finder);
+ pair = (tree_id_t) htab_find (id_for_tree, &finder);
if (pair == NULL)
return create_variable_info_for (t, alias_get_name (t));
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 0697ae4648e..b93b1c0c3b5 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -514,7 +514,7 @@ prune_undesirable_thread_requests (basic_block bb)
/* If the incoming edge threads to the loop exit, then it
is clearly safe. */
- e2 = e->aux;
+ e2 = (edge) e->aux;
if (e2 && (e2->flags & EDGE_LOOP_EXIT))
continue;
@@ -554,7 +554,7 @@ prune_undesirable_thread_requests (basic_block bb)
if (e->flags & EDGE_DFS_BACK)
continue;
- e2 = e->aux;
+ e2 = (edge) e->aux;
/* If this incoming edge was not threaded, then there is
nothing to do. */
@@ -767,9 +767,9 @@ thread_block (basic_block bb)
}
else
{
- edge e2 = e->aux;
+ edge e2 = (edge) e->aux;
update_bb_profile_for_threading (e->dest, EDGE_FREQUENCY (e),
- e->count, e->aux);
+ e->count, (edge) e->aux);
/* Insert the outgoing edge into the hash table if it is not
already in the hash table. */
@@ -783,7 +783,7 @@ thread_block (basic_block bb)
DO_NOT_DUPLICATE attribute. */
if (all)
{
- edge e = EDGE_PRED (bb, 0)->aux;
+ edge e = (edge) EDGE_PRED (bb, 0)->aux;
lookup_redirection_data (e, NULL, NO_INSERT)->do_not_duplicate = true;
}
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 5077808947b..55fcf6af931 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -268,7 +268,7 @@ duplicate_ssa_name_ptr_info (tree name, struct ptr_info_def *ptr_info)
if (!ptr_info)
return;
- new_ptr_info = ggc_alloc (sizeof (struct ptr_info_def));
+ new_ptr_info = (struct ptr_info_def *) ggc_alloc (sizeof (struct ptr_info_def));
*new_ptr_info = *ptr_info;
if (ptr_info->pt_vars)
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 9ac11b07bd3..fe594f6019a 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -487,7 +487,7 @@ vect_pattern_recog_1 (
}
else
{
- enum tree_code vec_mode;
+ enum machine_mode vec_mode;
enum insn_code icode;
optab optab;
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index 14d3cc5e2d0..84e4d1a82fe 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -908,7 +908,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
}
else
{
- enum tree_code shift_code = 0;
+ enum tree_code shift_code = ERROR_MARK;
bool have_whole_vector_shift = true;
int bit_offset;
int element_bitsize = tree_low_cst (bitsize, 1);
@@ -1141,7 +1141,7 @@ vectorizable_reduction (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
tree operation;
- enum tree_code code, orig_code, epilog_reduc_code = 0;
+ enum tree_code code, orig_code, epilog_reduc_code = ERROR_MARK;
enum machine_mode vec_mode;
int op_type;
optab optab, reduc_optab;
@@ -1313,13 +1313,13 @@ vectorizable_reduction (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "no optab for reduction.");
- epilog_reduc_code = NUM_TREE_CODES;
+ epilog_reduc_code = (enum tree_code) NUM_TREE_CODES;
}
if (reduc_optab->handlers[(int) vec_mode].insn_code == CODE_FOR_nothing)
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "reduc op not supported by target.");
- epilog_reduc_code = NUM_TREE_CODES;
+ epilog_reduc_code = (enum tree_code) NUM_TREE_CODES;
}
if (!vec_stmt) /* transformation not required. */
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index d6dc4e35a7d..de711e3fa92 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -1276,9 +1276,9 @@ vect_set_verbosity_level (const char *val)
vl = atoi (val);
if (vl < MAX_VERBOSITY_LEVEL)
- vect_verbosity_level = vl;
+ vect_verbosity_level = (enum verbosity_levels) vl;
else
- vect_verbosity_level = MAX_VERBOSITY_LEVEL - 1;
+ vect_verbosity_level = (enum verbosity_levels) (MAX_VERBOSITY_LEVEL - 1);
}
@@ -1597,7 +1597,7 @@ enum dr_alignment_support
vect_supportable_dr_alignment (struct data_reference *dr)
{
tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (DR_STMT (dr)));
- enum machine_mode mode = (int) TYPE_MODE (vectype);
+ enum machine_mode mode = TYPE_MODE (vectype);
if (aligned_access_p (dr))
return dr_aligned;
@@ -2083,7 +2083,7 @@ vectorize_loops (struct loops *loops)
if (!loop)
continue;
- loop_vinfo = loop->aux;
+ loop_vinfo = (loop_vec_info) loop->aux;
destroy_loop_vec_info (loop_vinfo);
loop->aux = NULL;
}
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 8e67e8a3d2b..0059443ab3c 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -4268,9 +4268,9 @@ simplify_cond_using_ranges (tree stmt)
able to simplify this conditional. */
if (vr->type == VR_RANGE)
{
- tree new = test_for_singularity (cond_code, op0, op1, vr);
+ tree tmp = test_for_singularity (cond_code, op0, op1, vr);
- if (new)
+ if (tmp)
{
if (dump_file)
{
@@ -4280,7 +4280,7 @@ simplify_cond_using_ranges (tree stmt)
}
COND_EXPR_COND (stmt)
- = build2 (EQ_EXPR, boolean_type_node, op0, new);
+ = build2 (EQ_EXPR, boolean_type_node, op0, tmp);
update_stmt (stmt);
if (dump_file)
@@ -4296,9 +4296,9 @@ simplify_cond_using_ranges (tree stmt)
with integral types here, so no need to worry about
issues with inverting FP comparisons. */
cond_code = invert_tree_comparison (cond_code, false);
- new = test_for_singularity (cond_code, op0, op1, vr);
+ tmp = test_for_singularity (cond_code, op0, op1, vr);
- if (new)
+ if (tmp)
{
if (dump_file)
{
@@ -4308,7 +4308,7 @@ simplify_cond_using_ranges (tree stmt)
}
COND_EXPR_COND (stmt)
- = build2 (NE_EXPR, boolean_type_node, op0, new);
+ = build2 (NE_EXPR, boolean_type_node, op0, tmp);
update_stmt (stmt);
if (dump_file)
diff --git a/gcc/tree.c b/gcc/tree.c
index 916d058b382..1e11bce261c 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -522,9 +522,9 @@ make_node_stat (enum tree_code code MEM_STAT_DECL)
#endif
if (code == IDENTIFIER_NODE)
- t = ggc_alloc_zone_pass_stat (length, &tree_id_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_id_zone);
else
- t = ggc_alloc_zone_pass_stat (length, &tree_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
memset (t, 0, length);
@@ -612,7 +612,7 @@ copy_node_stat (tree node MEM_STAT_DECL)
gcc_assert (code != STATEMENT_LIST);
length = tree_size (node);
- t = ggc_alloc_zone_pass_stat (length, &tree_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
memcpy (t, node, length);
TREE_CHAIN (t) = 0;
@@ -887,7 +887,7 @@ build_int_cst_wide (tree type, unsigned HOST_WIDE_INT low, HOST_WIDE_INT hi)
TREE_TYPE (int_cst_node) = type;
slot = htab_find_slot (int_cst_hash_table, int_cst_node, INSERT);
- t = *slot;
+ t = (tree) *slot;
if (!t)
{
/* Insert this one into the hash table. */
@@ -1067,7 +1067,7 @@ build_real (tree type, REAL_VALUE_TYPE d)
Consider doing it via real_convert now. */
v = make_node (REAL_CST);
- dp = ggc_alloc (sizeof (REAL_VALUE_TYPE));
+ dp = (REAL_VALUE_TYPE *) ggc_alloc (sizeof (REAL_VALUE_TYPE));
memcpy (dp, &d, sizeof (REAL_VALUE_TYPE));
TREE_TYPE (v) = type;
@@ -1215,7 +1215,7 @@ make_tree_binfo_stat (unsigned base_binfos MEM_STAT_DECL)
tree_node_sizes[(int) binfo_kind] += length;
#endif
- t = ggc_alloc_zone_pass_stat (length, &tree_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
memset (t, 0, offsetof (struct tree_binfo, base_binfos));
@@ -1240,7 +1240,7 @@ make_tree_vec_stat (int len MEM_STAT_DECL)
tree_node_sizes[(int) vec_kind] += length;
#endif
- t = ggc_alloc_zone_pass_stat (length, &tree_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
memset (t, 0, length);
@@ -1706,7 +1706,7 @@ tree_cons_stat (tree purpose, tree value, tree chain MEM_STAT_DECL)
{
tree node;
- node = ggc_alloc_zone_pass_stat (sizeof (struct tree_list), &tree_zone);
+ node = (tree) ggc_alloc_zone_pass_stat (sizeof (struct tree_list), &tree_zone);
memset (node, 0, sizeof (struct tree_common));
@@ -2331,7 +2331,7 @@ substitute_in_expr (tree exp, tree f, tree r)
{
enum tree_code code = TREE_CODE (exp);
tree op0, op1, op2, op3;
- tree new;
+ tree res;
tree inner;
/* We handle TREE_LIST and COMPONENT_REF separately. */
@@ -2364,7 +2364,7 @@ substitute_in_expr (tree exp, tree f, tree r)
if (op0 == TREE_OPERAND (exp, 0))
return exp;
- new = fold_build3 (COMPONENT_REF, TREE_TYPE (exp),
+ res = fold_build3 (COMPONENT_REF, TREE_TYPE (exp),
op0, TREE_OPERAND (exp, 1), NULL_TREE);
}
else
@@ -2390,7 +2390,7 @@ substitute_in_expr (tree exp, tree f, tree r)
if (op0 == TREE_OPERAND (exp, 0))
return exp;
- new = fold_build1 (code, TREE_TYPE (exp), op0);
+ res = fold_build1 (code, TREE_TYPE (exp), op0);
break;
case 2:
@@ -2400,7 +2400,7 @@ substitute_in_expr (tree exp, tree f, tree r)
if (op0 == TREE_OPERAND (exp, 0) && op1 == TREE_OPERAND (exp, 1))
return exp;
- new = fold_build2 (code, TREE_TYPE (exp), op0, op1);
+ res = fold_build2 (code, TREE_TYPE (exp), op0, op1);
break;
case 3:
@@ -2412,7 +2412,7 @@ substitute_in_expr (tree exp, tree f, tree r)
&& op2 == TREE_OPERAND (exp, 2))
return exp;
- new = fold_build3 (code, TREE_TYPE (exp), op0, op1, op2);
+ res = fold_build3 (code, TREE_TYPE (exp), op0, op1, op2);
break;
case 4:
@@ -2426,7 +2426,7 @@ substitute_in_expr (tree exp, tree f, tree r)
&& op3 == TREE_OPERAND (exp, 3))
return exp;
- new = fold (build4 (code, TREE_TYPE (exp), op0, op1, op2, op3));
+ res = fold (build4 (code, TREE_TYPE (exp), op0, op1, op2, op3));
break;
default:
@@ -2438,8 +2438,8 @@ substitute_in_expr (tree exp, tree f, tree r)
gcc_unreachable ();
}
- TREE_READONLY (new) = TREE_READONLY (exp);
- return new;
+ TREE_READONLY (res) = TREE_READONLY (exp);
+ return res;
}
/* Similar, but look for a PLACEHOLDER_EXPR in EXP and find a replacement
@@ -2876,7 +2876,7 @@ build1_stat (enum tree_code code, tree type, tree node MEM_STAT_DECL)
gcc_assert (TREE_CODE_LENGTH (code) == 1);
- t = ggc_alloc_zone_pass_stat (length, &tree_zone);
+ t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
memset (t, 0, sizeof (struct tree_common));
@@ -3263,7 +3263,7 @@ annotate_with_file_line (tree node, const char *file, int line)
return;
}
- SET_EXPR_LOCUS (node, ggc_alloc (sizeof (location_t)));
+ SET_EXPR_LOCUS (node, (location_t *) ggc_alloc (sizeof (location_t)));
EXPR_LINENO (node) = line;
EXPR_FILENAME (node) = file;
last_annotated_node = EXPR_LOCUS (node);
@@ -3622,7 +3622,7 @@ merge_decl_attributes (tree olddecl, tree newdecl)
The second instance of `foo' nullifies the dllimport. */
tree
-merge_dllimport_decl_attributes (tree old, tree new)
+merge_dllimport_decl_attributes (tree old, tree n)
{
tree a;
int delete_dllimport_p = 1;
@@ -3633,16 +3633,16 @@ merge_dllimport_decl_attributes (tree old, tree new)
is not dllimport'd. We also remove a `new' dllimport if the old list
contains dllexport: dllexport always overrides dllimport, regardless
of the order of declaration. */
- if (!VAR_OR_FUNCTION_DECL_P (new))
+ if (!VAR_OR_FUNCTION_DECL_P (n))
delete_dllimport_p = 0;
- else if (DECL_DLLIMPORT_P (new)
+ else if (DECL_DLLIMPORT_P (n)
&& lookup_attribute ("dllexport", DECL_ATTRIBUTES (old)))
{
- DECL_DLLIMPORT_P (new) = 0;
+ DECL_DLLIMPORT_P (n) = 0;
warning (OPT_Wattributes, "%q+D already declared with dllexport attribute: "
- "dllimport ignored", new);
+ "dllimport ignored", n);
}
- else if (DECL_DLLIMPORT_P (old) && !DECL_DLLIMPORT_P (new))
+ else if (DECL_DLLIMPORT_P (old) && !DECL_DLLIMPORT_P (n))
{
/* Warn about overriding a symbol that has already been used. eg:
extern int __attribute__ ((dllimport)) foo;
@@ -3652,7 +3652,7 @@ merge_dllimport_decl_attributes (tree old, tree new)
if (TREE_USED (old))
{
warning (0, "%q+D redeclared without dllimport attribute "
- "after being referenced with dll linkage", new);
+ "after being referenced with dll linkage", n);
/* If we have used a variable's address with dllimport linkage,
keep the old DECL_DLLIMPORT_P flag: the ADDR_EXPR using the
decl may already have had TREE_INVARIANT and TREE_CONSTANT
@@ -3660,20 +3660,20 @@ merge_dllimport_decl_attributes (tree old, tree new)
We still remove the attribute so that assembler code refers
to '&foo rather than '_imp__foo'. */
if (TREE_CODE (old) == VAR_DECL && TREE_ADDRESSABLE (old))
- DECL_DLLIMPORT_P (new) = 1;
+ DECL_DLLIMPORT_P (n) = 1;
}
/* Let an inline definition silently override the external reference,
but otherwise warn about attribute inconsistency. */
- else if (TREE_CODE (new) == VAR_DECL
- || !DECL_DECLARED_INLINE_P (new))
+ else if (TREE_CODE (n) == VAR_DECL
+ || !DECL_DECLARED_INLINE_P (n))
warning (OPT_Wattributes, "%q+D redeclared without dllimport attribute: "
- "previous dllimport ignored", new);
+ "previous dllimport ignored", n);
}
else
delete_dllimport_p = 0;
- a = merge_attributes (DECL_ATTRIBUTES (old), DECL_ATTRIBUTES (new));
+ a = merge_attributes (DECL_ATTRIBUTES (old), DECL_ATTRIBUTES (n));
if (delete_dllimport_p)
{
@@ -3904,7 +3904,8 @@ build_variant_type_copy (tree type)
int
tree_map_eq (const void *va, const void *vb)
{
- const struct tree_map *a = va, *b = vb;
+ const struct tree_map *a = (const struct tree_map *) va;
+ const struct tree_map *b = (const struct tree_map *) vb;
return (a->from == b->from);
}
@@ -3933,7 +3934,8 @@ tree_map_marked_p (const void *p)
static int
tree_int_map_eq (const void *va, const void *vb)
{
- const struct tree_int_map *a = va, *b = vb;
+ const struct tree_int_map *a = (const struct tree_int_map *) va;
+ const struct tree_int_map *b = (const struct tree_int_map *) vb;
return (a->from == b->from);
}
@@ -3964,7 +3966,7 @@ decl_init_priority_lookup (tree from)
struct tree_int_map *h, in;
in.from = from;
- h = htab_find_with_hash (init_priority_for_decl,
+ h = (struct tree_int_map *) htab_find_with_hash (init_priority_for_decl,
&in, htab_hash_pointer (from));
if (h)
return h->to;
@@ -3979,7 +3981,7 @@ decl_init_priority_insert (tree from, unsigned short to)
struct tree_int_map *h;
void **loc;
- h = ggc_alloc (sizeof (struct tree_int_map));
+ h = (struct tree_int_map *) ggc_alloc (sizeof (struct tree_int_map));
h->from = from;
h->to = to;
loc = htab_find_slot_with_hash (init_priority_for_decl, h,
@@ -3996,7 +3998,7 @@ decl_restrict_base_lookup (tree from)
struct tree_map in;
in.from = from;
- h = htab_find_with_hash (restrict_base_for_decl, &in,
+ h = (struct tree_map *) htab_find_with_hash (restrict_base_for_decl, &in,
htab_hash_pointer (from));
return h ? h->to : NULL_TREE;
}
@@ -4009,7 +4011,7 @@ decl_restrict_base_insert (tree from, tree to)
struct tree_map *h;
void **loc;
- h = ggc_alloc (sizeof (struct tree_map));
+ h = (struct tree_map *) ggc_alloc (sizeof (struct tree_map));
h->hash = htab_hash_pointer (from);
h->from = from;
h->to = to;
@@ -4061,7 +4063,7 @@ decl_debug_expr_lookup (tree from)
struct tree_map *h, in;
in.from = from;
- h = htab_find_with_hash (debug_expr_for_decl, &in, htab_hash_pointer (from));
+ h = (struct tree_map *) htab_find_with_hash (debug_expr_for_decl, &in, htab_hash_pointer (from));
if (h)
return h->to;
return NULL_TREE;
@@ -4075,7 +4077,7 @@ decl_debug_expr_insert (tree from, tree to)
struct tree_map *h;
void **loc;
- h = ggc_alloc (sizeof (struct tree_map));
+ h = (struct tree_map *) ggc_alloc (sizeof (struct tree_map));
h->hash = htab_hash_pointer (from);
h->from = from;
h->to = to;
@@ -4091,7 +4093,7 @@ decl_value_expr_lookup (tree from)
struct tree_map *h, in;
in.from = from;
- h = htab_find_with_hash (value_expr_for_decl, &in, htab_hash_pointer (from));
+ h = (struct tree_map *) htab_find_with_hash (value_expr_for_decl, &in, htab_hash_pointer (from));
if (h)
return h->to;
return NULL_TREE;
@@ -4105,7 +4107,7 @@ decl_value_expr_insert (tree from, tree to)
struct tree_map *h;
void **loc;
- h = ggc_alloc (sizeof (struct tree_map));
+ h = (struct tree_map *) ggc_alloc (sizeof (struct tree_map));
h->hash = htab_hash_pointer (from);
h->from = from;
h->to = to;
@@ -4140,7 +4142,8 @@ type_hash_list (tree list, hashval_t hashcode)
static int
type_hash_eq (const void *va, const void *vb)
{
- const struct type_hash *a = va, *b = vb;
+ const struct type_hash *a = (const struct type_hash *) va;
+ const struct type_hash *b = (const struct type_hash *) vb;
/* First test the things that are the same for all types. */
if (a->hash != b->hash
@@ -4249,7 +4252,7 @@ type_hash_lookup (hashval_t hashcode, tree type)
in.hash = hashcode;
in.type = type;
- h = htab_find_with_hash (type_hash_table, &in, hashcode);
+ h = (struct type_hash *) htab_find_with_hash (type_hash_table, &in, hashcode);
if (h)
return h->type;
return NULL_TREE;
@@ -4264,7 +4267,7 @@ type_hash_add (hashval_t hashcode, tree type)
struct type_hash *h;
void **loc;
- h = ggc_alloc (sizeof (struct type_hash));
+ h = (struct type_hash *) ggc_alloc (sizeof (struct type_hash));
h->hash = hashcode;
h->type = type;
loc = htab_find_slot_with_hash (type_hash_table, h, hashcode, INSERT);
@@ -4833,7 +4836,7 @@ iterative_hash_expr (tree t, hashval_t val)
{
int i;
enum tree_code code;
- char class;
+ enum tree_code_class tcc;
if (t == NULL_TREE)
return iterative_hash_pointer (t, val);
@@ -4897,16 +4900,16 @@ iterative_hash_expr (tree t, hashval_t val)
}
/* else FALL THROUGH */
default:
- class = TREE_CODE_CLASS (code);
+ tcc = TREE_CODE_CLASS (code);
- if (class == tcc_declaration)
+ if (tcc == tcc_declaration)
{
/* DECL's have a unique ID */
val = iterative_hash_host_wide_int (DECL_UID (t), val);
}
else
{
- gcc_assert (IS_EXPR_CODE_CLASS (class));
+ gcc_assert (IS_EXPR_CODE_CLASS (tcc));
val = iterative_hash_object (code, val);
@@ -6063,7 +6066,7 @@ get_file_function_name_long (const char *type)
if (! file)
file = input_filename;
- q = alloca (strlen (p) + 10);
+ q = (char *) alloca (strlen (p) + 10);
sprintf (q, "%s_%08X", p, crc32_string (0, file));
p = q;
@@ -6083,7 +6086,7 @@ get_file_function_name_long (const char *type)
file = input_filename;
len = strlen (file);
- q = alloca (9 * 2 + len + 1);
+ q = (char *) alloca (9 * 2 + len + 1);
memcpy (q, file, len + 1);
clean_symbol_name (q);
@@ -6093,7 +6096,7 @@ get_file_function_name_long (const char *type)
p = q;
}
- buf = alloca (sizeof (FILE_FUNCTION_FORMAT) + strlen (p) + strlen (type));
+ buf = (char *) alloca (sizeof (FILE_FUNCTION_FORMAT) + strlen (p) + strlen (type));
/* Set up the name of the file-level functions we may need.
Use a global object (which is already required to be unique over
@@ -6142,7 +6145,7 @@ tree_check_failed (const tree node, const char *file,
{
va_start (args, function);
length += strlen ("expected ");
- buffer = alloca (length);
+ buffer = (char *) alloca (length);
length = 0;
while ((code = va_arg (args, int)))
{
@@ -6181,7 +6184,7 @@ tree_not_check_failed (const tree node, const char *file,
length += 4 + strlen (tree_code_name[code]);
va_end (args);
va_start (args, function);
- buffer = alloca (length);
+ buffer = (char *) alloca (length);
length = 0;
while ((code = va_arg (args, int)))
{
@@ -6224,16 +6227,16 @@ tree_range_check_failed (const tree node, const char *file, int line,
{
char *buffer;
unsigned length = 0;
- enum tree_code c;
+ int c;
- for (c = c1; c <= c2; ++c)
+ for (c = c1; c <= (int) c2; ++c)
length += 4 + strlen (tree_code_name[c]);
length += strlen ("expected ");
- buffer = alloca (length);
+ buffer = (char *) alloca (length);
length = 0;
- for (c = c1; c <= c2; ++c)
+ for (c = c1; c <= (int) c2; ++c)
{
const char *prefix = length ? " or " : "expected ";
@@ -6285,16 +6288,16 @@ omp_clause_range_check_failed (const tree node, const char *file, int line,
{
char *buffer;
unsigned length = 0;
- enum omp_clause_code c;
+ int c;
- for (c = c1; c <= c2; ++c)
+ for (c = c1; c <= (int) c2; ++c)
length += 4 + strlen (omp_clause_code_name[c]);
length += strlen ("expected ");
- buffer = alloca (length);
+ buffer = (char *) alloca (length);
length = 0;
- for (c = c1; c <= c2; ++c)
+ for (c = c1; c <= (int) c2; ++c)
{
const char *prefix = length ? " or " : "expected ";
@@ -6769,7 +6772,7 @@ build_common_builtin_nodes (void)
complex. Further, we can do slightly better with folding these
beasties if the real and complex parts of the arguments are separate. */
{
- enum machine_mode mode;
+ int mode;
for (mode = MIN_MODE_COMPLEX_FLOAT; mode <= MAX_MODE_COMPLEX_FLOAT; ++mode)
{
@@ -6778,7 +6781,7 @@ build_common_builtin_nodes (void)
enum built_in_function mcode, dcode;
tree type, inner_type;
- type = lang_hooks.types.type_for_mode (mode, 0);
+ type = lang_hooks.types.type_for_mode ((enum machine_mode) mode, 0);
if (type == NULL)
continue;
inner_type = TREE_TYPE (type);
@@ -6789,8 +6792,8 @@ build_common_builtin_nodes (void)
tmp = tree_cons (NULL_TREE, inner_type, tmp);
ftype = build_function_type (type, tmp);
- mcode = BUILT_IN_COMPLEX_MUL_MIN + mode - MIN_MODE_COMPLEX_FLOAT;
- dcode = BUILT_IN_COMPLEX_DIV_MIN + mode - MIN_MODE_COMPLEX_FLOAT;
+ mcode = (enum built_in_function) (BUILT_IN_COMPLEX_MUL_MIN + mode - MIN_MODE_COMPLEX_FLOAT);
+ dcode = (enum built_in_function) (BUILT_IN_COMPLEX_DIV_MIN + mode - MIN_MODE_COMPLEX_FLOAT);
for (p = GET_MODE_NAME (mode), q = mode_name_buf; *p; p++, q++)
*q = TOLOWER (*p);
@@ -6976,7 +6979,7 @@ build_omp_clause (enum omp_clause_code code)
length = omp_clause_num_ops[code];
size = (sizeof (struct tree_omp_clause) + (length - 1) * sizeof (tree));
- t = ggc_alloc (size);
+ t = (tree) ggc_alloc (size);
memset (t, 0, size);
TREE_SET_CODE (t, OMP_CLAUSE);
OMP_CLAUSE_SET_CODE (t, code);
diff --git a/gcc/tree.h b/gcc/tree.h
index e6a861ca24a..c2a7f826141 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "statistics.h"
#include "vec.h"
+#ifndef TREE_CODE_DEFINED
/* Codes of tree nodes */
#define DEFTREECODE(SYM, STRING, TYPE, NARGS) SYM,
@@ -40,6 +41,7 @@ enum tree_code {
};
#undef DEFTREECODE
+#endif
extern unsigned char tree_contains_struct[256][64];
#define CODE_CONTAINS_STRUCT(CODE, STRUCT) (tree_contains_struct[(CODE)][(STRUCT)])
@@ -215,6 +217,8 @@ extern const char *const built_in_class_names[4];
#define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) ENUM,
enum built_in_function
{
+ BUILT_IN_NONE,
+
#include "builtins.def"
/* Complex division routines in libgcc. These are done via builtins
diff --git a/gcc/treelang/Make-lang.in b/gcc/treelang/Make-lang.in
index 00d9ac88a31..83c2e0013f7 100644
--- a/gcc/treelang/Make-lang.in
+++ b/gcc/treelang/Make-lang.in
@@ -84,6 +84,7 @@ tree1$(exeext): treelang/tree1.o treelang/treetree.o treelang/tree-convert.o \
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
treelang/tree1.o treelang/treetree.o treelang/tree-convert.o \
treelang/lex.o treelang/parse.o \
+ tree-mudflap.o \
$(BACKEND) $(LIBS) attribs.o
# Create the compiler driver treelang.
diff --git a/gcc/treelang/lex.l b/gcc/treelang/lex.l
index a372f984c80..9612bc20ca1 100644
--- a/gcc/treelang/lex.l
+++ b/gcc/treelang/lex.l
@@ -263,7 +263,7 @@ void
update_yylval (int a)
{
struct prod_token_parm_item * tok;
- tok = yylval;
+ tok = (struct prod_token_parm_item *) yylval;
tok->category = token_category;
tok->type = a;
diff --git a/gcc/treelang/parse.y b/gcc/treelang/parse.y
index 740237c8b98..ff6e551fc27 100644
--- a/gcc/treelang/parse.y
+++ b/gcc/treelang/parse.y
@@ -181,11 +181,11 @@ variable_def:
storage typename NAME init_opt SEMICOLON {
struct prod_token_parm_item *tok;
struct prod_token_parm_item *prod;
- tok = $3;
+ tok = (struct prod_token_parm_item *) $3;
prod = make_production (PROD_VARIABLE_NAME, tok);
SYMBOL_TABLE_NAME (prod) = tok;
- EXPRESSION_TYPE (prod) = $2;
- VAR_INIT (prod) = $4;
+ EXPRESSION_TYPE (prod) = (struct prod_token_parm_item *) $2;
+ VAR_INIT (prod) = (struct prod_token_parm_item *) $4;
NUMERIC_TYPE (prod) =
NUMERIC_TYPE (( (struct prod_token_parm_item *)EXPRESSION_TYPE (prod)));
ensure_not_void (NUMERIC_TYPE (prod), tok);
@@ -193,7 +193,7 @@ storage typename NAME init_opt SEMICOLON {
{
YYERROR;
}
- STORAGE_CLASS_TOKEN (prod) = $1;
+ STORAGE_CLASS_TOKEN (prod) = (struct prod_token_parm_item *) $1;
set_storage (prod);
if (VAR_INIT (prod))
@@ -234,10 +234,10 @@ typename NAME {
struct prod_token_parm_item *tok;
struct prod_token_parm_item *prod;
struct prod_token_parm_item *prod2;
- tok = $2;
+ tok = (struct prod_token_parm_item *) $2;
prod = make_production (PROD_VARIABLE_NAME, tok);
- SYMBOL_TABLE_NAME (prod) = $2;
- EXPRESSION_TYPE (prod) = $1;
+ SYMBOL_TABLE_NAME (prod) = (struct prod_token_parm_item *) $2;
+ EXPRESSION_TYPE (prod) = (struct prod_token_parm_item *) $1;
NUMERIC_TYPE (prod) =
NUMERIC_TYPE (( (struct prod_token_parm_item *)EXPRESSION_TYPE (prod)));
ensure_not_void (NUMERIC_TYPE (prod), tok);
@@ -261,15 +261,15 @@ storage typename NAME LEFT_PARENTHESIS parameters_opt RIGHT_PARENTHESIS SEMICOLO
struct prod_token_parm_item *this_parms;
struct prod_token_parm_item *this_parm;
struct prod_token_parm_item *this_parm_var;
- tok = $3;
- prod = make_production (PROD_FUNCTION_NAME, $3);
- SYMBOL_TABLE_NAME (prod) = $3;
- EXPRESSION_TYPE (prod) = $2;
+ tok = (struct prod_token_parm_item *) $3;
+ prod = make_production (PROD_FUNCTION_NAME, (struct prod_token_parm_item *)$3);
+ SYMBOL_TABLE_NAME (prod) = (struct prod_token_parm_item *)$3;
+ EXPRESSION_TYPE (prod) = (struct prod_token_parm_item *)$2;
NUMERIC_TYPE (prod) =
NUMERIC_TYPE (( (struct prod_token_parm_item *)EXPRESSION_TYPE (prod)));
- PARAMETERS (prod) = reverse_prod_list ($5);
+ PARAMETERS (prod) = reverse_prod_list ((struct prod_token_parm_item *)$5);
insert_tree_name (prod);
- STORAGE_CLASS_TOKEN (prod) = $1;
+ STORAGE_CLASS_TOKEN (prod) = (struct prod_token_parm_item *)$1;
set_storage (prod);
switch (STORAGE_CLASS (prod))
{
@@ -300,7 +300,7 @@ storage typename NAME LEFT_PARENTHESIS parameters_opt RIGHT_PARENTHESIS SEMICOLO
gcc_assert (this_parm_var->category == production_category);
gcc_assert (this_parm_var->tp.pro.main_token);
- this_parms = my_malloc (sizeof (struct prod_token_parm_item));
+ this_parms = (struct prod_token_parm_item *)my_malloc (sizeof (struct prod_token_parm_item));
this_parms->tp.par.variable_name =
this_parm_var->tp.pro.main_token->tp.tok.chars;
@@ -347,7 +347,7 @@ NAME LEFT_BRACE {
struct prod_token_parm_item *proto;
struct prod_token_parm_item search_prod;
struct prod_token_parm_item *tok;
- tok = $1;
+ tok = (struct prod_token_parm_item *)$1;
SYMBOL_TABLE_NAME ((&search_prod)) = tok;
search_prod.category = token_category;
current_function = proto = lookup_tree_name (&search_prod);
@@ -365,7 +365,7 @@ NAME LEFT_BRACE {
variable_defs_opt statements_opt RIGHT_BRACE {
struct prod_token_parm_item *tok;
- tok = $1;
+ tok = (struct prod_token_parm_item *)$1;
tree_code_create_function_wrapup (tok->tp.tok.location);
current_function = NULL;
}
@@ -402,7 +402,7 @@ typename:
INT {
struct prod_token_parm_item *tok;
struct prod_token_parm_item *prod;
- tok = $1;
+ tok = (struct prod_token_parm_item *)$1;
prod = make_production (PROD_TYPE_NAME, tok);
NUMERIC_TYPE (prod) = SIGNED_INT;
prod->tp.pro.code = tree_code_get_type (NUMERIC_TYPE (prod));
@@ -411,7 +411,7 @@ INT {
|UNSIGNED INT {
struct prod_token_parm_item *tok;
struct prod_token_parm_item *prod;
- tok = $1;
+ tok = (struct prod_token_parm_item *)$1;
prod = make_production (PROD_TYPE_NAME, tok);
NUMERIC_TYPE (prod) = UNSIGNED_INT;
prod->tp.pro.code = tree_code_get_type (NUMERIC_TYPE (prod));
@@ -420,7 +420,7 @@ INT {
|CHAR {
struct prod_token_parm_item *tok;
struct prod_token_parm_item *prod;
- tok = $1;
+ tok = (struct prod_token_parm_item *)$1;
prod = make_production (PROD_TYPE_NAME, tok);
NUMERIC_TYPE (prod) = SIGNED_CHAR;
prod->tp.pro.code = tree_code_get_type (NUMERIC_TYPE (prod));
@@ -429,7 +429,7 @@ INT {
|UNSIGNED CHAR {
struct prod_token_parm_item *tok;
struct prod_token_parm_item *prod;
- tok = $1;
+ tok = (struct prod_token_parm_item *)$1;
prod = make_production (PROD_TYPE_NAME, tok);
NUMERIC_TYPE (prod) = UNSIGNED_CHAR;
prod->tp.pro.code = tree_code_get_type (NUMERIC_TYPE (prod));
@@ -438,7 +438,7 @@ INT {
|VOID {
struct prod_token_parm_item *tok;
struct prod_token_parm_item *prod;
- tok = $1;
+ tok = (struct prod_token_parm_item *)$1;
prod = make_production (PROD_TYPE_NAME, tok);
NUMERIC_TYPE (prod) = VOID_TYPE;
prod->tp.pro.code = tree_code_get_type (NUMERIC_TYPE (prod));
@@ -462,8 +462,8 @@ parameter {
}
|parameters COMMA parameter {
struct prod_token_parm_item *prod1;
- prod1 = $3;
- prod1->tp.pro.next = $1; /* Insert in reverse order. */
+ prod1 = (struct prod_token_parm_item *)$3;
+ prod1->tp.pro.next = (struct prod_token_parm_item *)$1; /* Insert in reverse order. */
$$ = prod1;
}
;
@@ -480,7 +480,7 @@ statement {
statement:
expression SEMICOLON {
struct prod_token_parm_item *exp;
- exp = $1;
+ exp = (struct prod_token_parm_item *)$1;
tree_code_output_expression_statement (exp->tp.pro.code,
exp->tp.pro.main_token->tp.tok.location);
}
@@ -496,8 +496,8 @@ if_statement:
IF LEFT_PARENTHESIS expression RIGHT_PARENTHESIS {
struct prod_token_parm_item *tok;
struct prod_token_parm_item *exp;
- tok = $1;
- exp = $3;
+ tok = (struct prod_token_parm_item *)$1;
+ exp = (struct prod_token_parm_item *)$3;
ensure_not_void (NUMERIC_TYPE (exp), exp->tp.pro.main_token);
tree_code_if_start (exp->tp.pro.code, tok->tp.tok.location);
}
@@ -506,12 +506,12 @@ LEFT_BRACE variable_defs_opt statements_opt RIGHT_BRACE {
}
ELSE {
struct prod_token_parm_item *tok;
- tok = $1;
+ tok = (struct prod_token_parm_item *)$1;
tree_code_if_else (tok->tp.tok.location);
}
LEFT_BRACE variable_defs_opt statements_opt RIGHT_BRACE {
struct prod_token_parm_item *tok;
- tok = $1;
+ tok = (struct prod_token_parm_item *)$1;
tree_code_if_end (tok->tp.tok.location);
}
;
@@ -520,8 +520,8 @@ LEFT_BRACE variable_defs_opt statements_opt RIGHT_BRACE {
return:
tl_RETURN expression_opt {
struct prod_token_parm_item *type_prod;
- struct prod_token_parm_item *ret_tok = $1;
- struct prod_token_parm_item *exp = $2;
+ struct prod_token_parm_item *ret_tok = (struct prod_token_parm_item *)$1;
+ struct prod_token_parm_item *exp = (struct prod_token_parm_item *)$2;
type_prod = EXPRESSION_TYPE (current_function);
if (NUMERIC_TYPE (type_prod) == VOID_TYPE)
@@ -558,7 +558,7 @@ expression_opt:
}
|expression {
struct prod_token_parm_item *exp;
- exp = $1;
+ exp = (struct prod_token_parm_item *)$1;
gcc_assert (exp->tp.pro.code);
$$ = $1;
@@ -567,33 +567,33 @@ expression_opt:
expression:
INTEGER {
- $$ = make_integer_constant ($1);
+ $$ = make_integer_constant ((struct prod_token_parm_item *)$1);
}
|variable_ref {
$$ = $1;
}
|expression tl_PLUS expression {
- struct prod_token_parm_item *tok = $2;
- struct prod_token_parm_item *op1 = $1;
- struct prod_token_parm_item *op2 = $3;
+ struct prod_token_parm_item *tok = (struct prod_token_parm_item *)$2;
+ struct prod_token_parm_item *op1 = (struct prod_token_parm_item *)$1;
+ struct prod_token_parm_item *op2 = (struct prod_token_parm_item *)$3;
int type_code = get_common_type (op1, op2);
if (!type_code)
YYERROR;
$$ = make_plus_expression (tok, op1, op2, type_code, EXP_PLUS);
}
|expression tl_MINUS expression %prec tl_PLUS {
- struct prod_token_parm_item *tok = $2;
- struct prod_token_parm_item *op1 = $1;
- struct prod_token_parm_item *op2 = $3;
+ struct prod_token_parm_item *tok = (struct prod_token_parm_item *)$2;
+ struct prod_token_parm_item *op1 = (struct prod_token_parm_item *)$1;
+ struct prod_token_parm_item *op2 = (struct prod_token_parm_item *)$3;
int type_code = get_common_type (op1, op2);
if (!type_code)
YYERROR;
$$ = make_plus_expression (tok, op1, op2, type_code, EXP_MINUS);
}
|expression EQUALS expression {
- struct prod_token_parm_item *tok = $2;
- struct prod_token_parm_item *op1 = $1;
- struct prod_token_parm_item *op2 = $3;
+ struct prod_token_parm_item *tok = (struct prod_token_parm_item *)$2;
+ struct prod_token_parm_item *op1 = (struct prod_token_parm_item *)$1;
+ struct prod_token_parm_item *op2 = (struct prod_token_parm_item *)$3;
int type_code = NUMERIC_TYPE (op1);
if (!type_code)
YYERROR;
@@ -601,9 +601,9 @@ INTEGER {
(tok, op1, op2, type_code, EXP_EQUALS);
}
|variable_ref ASSIGN expression {
- struct prod_token_parm_item *tok = $2;
- struct prod_token_parm_item *op1 = $1;
- struct prod_token_parm_item *op2 = $3;
+ struct prod_token_parm_item *tok = (struct prod_token_parm_item *)$2;
+ struct prod_token_parm_item *op1 = (struct prod_token_parm_item *)$1;
+ struct prod_token_parm_item *op2 = (struct prod_token_parm_item *)$3;
int type_code = NUMERIC_TYPE (op1);
if (!type_code)
YYERROR;
@@ -629,10 +629,10 @@ NAME LEFT_PARENTHESIS expressions_with_commas_opt RIGHT_PARENTHESIS {
tree parms;
tree type;
- tok = $1;
+ tok = (struct prod_token_parm_item *)$1;
prod = make_production (PROD_FUNCTION_INVOCATION, tok);
SYMBOL_TABLE_NAME (prod) = tok;
- PARAMETERS (prod) = reverse_prod_list ($3);
+ PARAMETERS (prod) = reverse_prod_list ((struct prod_token_parm_item *)$3);
SYMBOL_TABLE_NAME ((&search_prod)) = tok;
search_prod.category = token_category;
proto = lookup_tree_name (&search_prod);
@@ -694,15 +694,15 @@ $$ = 0
expressions_with_commas:
expression {
struct prod_token_parm_item *exp;
- exp = $1;
+ exp = (struct prod_token_parm_item *)$1;
ensure_not_void (NUMERIC_TYPE (exp), exp->tp.pro.main_token);
$$ = $1;
}
|expressions_with_commas COMMA expression {
struct prod_token_parm_item *exp;
- exp = $3;
+ exp = (struct prod_token_parm_item *)$3;
ensure_not_void (NUMERIC_TYPE (exp), exp->tp.pro.main_token);
- exp->tp.pro.next = $1; /* Reverse order. */
+ exp->tp.pro.next = (struct prod_token_parm_item *)$1; /* Reverse order. */
$$ = exp;
}
;
@@ -715,7 +715,7 @@ NAME {
struct prod_token_parm_item *tok;
tree type;
- tok = $1;
+ tok = (struct prod_token_parm_item *)$1;
SYMBOL_TABLE_NAME ((&search_prod)) = tok;
search_prod.category = token_category;
symbol_table_entry = lookup_tree_name (&search_prod);
@@ -731,7 +731,7 @@ NAME {
type = tree_code_get_type (NUMERIC_TYPE (prod));
if (!NUMERIC_TYPE (prod))
YYERROR;
- OP1 (prod) = $1;
+ OP1 (prod) = (struct prod_token_parm_item *)$1;
prod->tp.pro.code =
tree_code_get_expression (EXP_REFERENCE, type,
@@ -758,7 +758,7 @@ ASSIGN init_element {
init_element:
INTEGER {
- $$ = make_integer_constant ($1);
+ $$ = make_integer_constant ((struct prod_token_parm_item *)$1);
}
;
@@ -773,7 +773,7 @@ print_token (FILE *file, unsigned int type ATTRIBUTE_UNUSED, YYSTYPE value)
struct prod_token_parm_item *tok;
unsigned int ix;
- tok = value;
+ tok = (struct prod_token_parm_item *)value;
fprintf (file, "%d \"", LOCATION_LINE (tok->tp.tok.location));
for (ix = 0; ix < tok->tp.tok.length; ix++)
fprintf (file, "%c", tok->tp.tok.chars[ix]);
@@ -787,7 +787,7 @@ yyerror (const char *error_message)
{
struct prod_token_parm_item *tok;
- tok = yylval;
+ tok = (struct prod_token_parm_item *)yylval;
if (tok)
error ("%H%s", &tok->tp.tok.location, error_message);
else
diff --git a/gcc/treelang/tree1.c b/gcc/treelang/tree1.c
index cec2baf717d..54578d34f5e 100644
--- a/gcc/treelang/tree1.c
+++ b/gcc/treelang/tree1.c
@@ -231,7 +231,7 @@ my_malloc (size_t size)
struct prod_token_parm_item*
lookup_tree_name (struct prod_token_parm_item *prod)
{
- struct prod_token_parm_item *this;
+ struct prod_token_parm_item *it;
struct prod_token_parm_item *this_tok;
struct prod_token_parm_item *tok;
@@ -240,10 +240,10 @@ lookup_tree_name (struct prod_token_parm_item *prod)
tok = SYMBOL_TABLE_NAME (prod);
sanity_check (tok);
- for (this = symbol_table; this; this = this->tp.pro.next)
+ for (it = symbol_table; it; it = it->tp.pro.next)
{
- sanity_check (this);
- this_tok = this->tp.pro.main_token;
+ sanity_check (it);
+ this_tok = it->tp.pro.main_token;
sanity_check (this_tok);
if (tok->tp.tok.length != this_tok->tp.tok.length)
continue;
@@ -254,8 +254,8 @@ lookup_tree_name (struct prod_token_parm_item *prod)
if (option_parser_trace)
fprintf (stderr, "Found symbol %s (%i:%i) as %i \n",
tok->tp.tok.chars, LOCATION_LINE (tok->tp.tok.location),
- tok->tp.tok.charno, NUMERIC_TYPE (this));
- return this;
+ tok->tp.tok.charno, NUMERIC_TYPE (it));
+ return it;
}
if (option_parser_trace)
@@ -291,7 +291,7 @@ struct prod_token_parm_item *
make_production (int type, struct prod_token_parm_item *main_tok)
{
struct prod_token_parm_item *prod;
- prod = my_malloc (sizeof (struct prod_token_parm_item));
+ prod = (struct prod_token_parm_item *) my_malloc (sizeof (struct prod_token_parm_item));
prod->category = production_category;
prod->type = type;
prod->tp.pro.main_token = main_tok;
diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c
index 98c3694f3a9..42695f00d82 100644
--- a/gcc/treelang/treetree.c
+++ b/gcc/treelang/treetree.c
@@ -138,8 +138,9 @@ static tree pushdecl (tree decl);
static tree* getstmtlist (void);
/* Langhooks. */
-static tree builtin_function (const char *name, tree type, int function_code,
- enum built_in_class class,
+static tree builtin_function (const char *name, tree type,
+ enum built_in_function function_code,
+ enum built_in_class cls,
const char *library_name,
tree attrs);
extern const struct attribute_spec treelang_attribute_table[];
@@ -654,34 +655,34 @@ tree_code_get_expression (unsigned int exp_type,
location_t loc)
{
tree ret1;
- int operator;
+ enum tree_code op;
switch (exp_type)
{
case EXP_ASSIGN:
gcc_assert (op1 && op2);
- operator = MODIFY_EXPR;
- ret1 = fold_build2 (operator, void_type_node, op1,
+ op = MODIFY_EXPR;
+ ret1 = fold_build2 (op, void_type_node, op1,
fold_convert (TREE_TYPE (op1), op2));
break;
case EXP_PLUS:
- operator = PLUS_EXPR;
+ op = PLUS_EXPR;
goto binary_expression;
case EXP_MINUS:
- operator = MINUS_EXPR;
+ op = MINUS_EXPR;
goto binary_expression;
case EXP_EQUALS:
- operator = EQ_EXPR;
+ op = EQ_EXPR;
goto binary_expression;
/* Expand a binary expression. Ensure the operands are the right type. */
binary_expression:
gcc_assert (op1 && op2);
- ret1 = fold_build2 (operator, type,
+ ret1 = fold_build2 (op, type,
fold_convert (type, op1),
fold_convert (type, op2));
break;
@@ -1237,8 +1238,8 @@ const struct attribute_spec treelang_attribute_table[] =
*/
static tree
-builtin_function (const char *name, tree type, int function_code,
- enum built_in_class class, const char *library_name,
+builtin_function (const char *name, tree type, enum built_in_function function_code,
+ enum built_in_class cls, const char *library_name,
tree attrs)
{
tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
@@ -1247,7 +1248,7 @@ builtin_function (const char *name, tree type, int function_code,
if (library_name)
SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name));
pushdecl (decl);
- DECL_BUILT_IN_CLASS (decl) = class;
+ DECL_BUILT_IN_CLASS (decl) = cls;
DECL_FUNCTION_CODE (decl) = function_code;
/* Possibly apply some default attributes to this built-in function. */
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index 6c64e3cbe27..c435dbd700b 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -117,7 +117,7 @@ tree_value_profile_transformations (void)
{
tree stmt = bsi_stmt (bsi);
stmt_ann_t ann = get_stmt_ann (stmt);
- histogram_value th = ann->histograms;
+ histogram_value th = (histogram_value) ann->histograms;
if (!th)
continue;
@@ -286,7 +286,7 @@ tree_divmod_fixed_value_transform (tree stmt)
if (!ann->histograms)
return false;
- for (histogram = ann->histograms; histogram; histogram = histogram->hvalue.next)
+ for (histogram = (histogram_value) ann->histograms; histogram; histogram = histogram->hvalue.next)
if (histogram->type == HIST_TYPE_SINGLE_VALUE)
break;
@@ -453,7 +453,7 @@ tree_mod_pow2_value_transform (tree stmt)
if (!ann->histograms)
return false;
- for (histogram = ann->histograms; histogram; histogram = histogram->hvalue.next)
+ for (histogram = (histogram_value) ann->histograms; histogram; histogram = histogram->hvalue.next)
if (histogram->type == HIST_TYPE_POW2)
break;
@@ -636,7 +636,7 @@ tree_mod_subtract_transform (tree stmt)
if (!ann->histograms)
return false;
- for (histogram = ann->histograms; histogram; histogram = histogram->hvalue.next)
+ for (histogram = (histogram_value) ann->histograms; histogram; histogram = histogram->hvalue.next)
if (histogram->type == HIST_TYPE_INTERVAL)
break;
@@ -734,7 +734,7 @@ tree_divmod_values_to_profile (tree stmt, histogram_values *values)
{
/* Check for the case where the divisor is the same value most
of the time. */
- hist = ggc_alloc (sizeof (*hist));
+ hist = (histogram_value) ggc_alloc (sizeof (*hist));
hist->hvalue.value = divisor;
hist->hvalue.stmt = stmt;
hist->type = HIST_TYPE_SINGLE_VALUE;
@@ -747,13 +747,13 @@ tree_divmod_values_to_profile (tree stmt, histogram_values *values)
&& TYPE_UNSIGNED (type))
{
/* Check for a special case where the divisor is power of 2. */
- hist = ggc_alloc (sizeof (*hist));
+ hist = (histogram_value) ggc_alloc (sizeof (*hist));
hist->hvalue.value = divisor;
hist->hvalue.stmt = stmt;
hist->type = HIST_TYPE_POW2;
VEC_quick_push (histogram_value, *values, hist);
- hist = ggc_alloc (sizeof (*hist));
+ hist = (histogram_value) ggc_alloc (sizeof (*hist));
hist->hvalue.stmt = stmt;
hist->hvalue.value
= build2 (TRUNC_DIV_EXPR, type, op0, divisor);
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 815facae182..05984c2148b 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -677,7 +677,7 @@ attrs_list_insert (attrs *listp, tree decl, HOST_WIDE_INT offset, rtx loc)
{
attrs list;
- list = pool_alloc (attrs_pool);
+ list = (attrs) pool_alloc (attrs_pool);
list->loc = loc;
list->decl = decl;
list->offset = offset;
@@ -695,7 +695,7 @@ attrs_list_copy (attrs *dstp, attrs src)
attrs_list_clear (dstp);
for (; src; src = src->next)
{
- n = pool_alloc (attrs_pool);
+ n = (attrs) pool_alloc (attrs_pool);
n->loc = src->loc;
n->decl = src->decl;
n->offset = src->offset;
@@ -733,7 +733,7 @@ unshare_variable (dataflow_set *set, variable var)
variable new_var;
int i;
- new_var = pool_alloc (var_pool);
+ new_var = (variable) pool_alloc (var_pool);
new_var->decl = var->decl;
new_var->refcount = 1;
var->refcount--;
@@ -750,7 +750,7 @@ unshare_variable (dataflow_set *set, variable var)
{
location_chain new_lc;
- new_lc = pool_alloc (loc_chain_pool);
+ new_lc = (location_chain) pool_alloc (loc_chain_pool);
new_lc->next = NULL;
new_lc->loc = node->loc;
@@ -1029,8 +1029,8 @@ struct variable_union_info
static int
variable_union_info_cmp_pos (const void *n1, const void *n2)
{
- const struct variable_union_info *i1 = n1;
- const struct variable_union_info *i2 = n2;
+ const struct variable_union_info *i1 = (const struct variable_union_info *) n1;
+ const struct variable_union_info *i2 = (const struct variable_union_info *) n2;
if (i1->pos != i2->pos)
return i1->pos - i2->pos;
@@ -1192,7 +1192,7 @@ variable_union (void **slot, void *data)
location_chain new_node;
/* Copy the location from SRC. */
- new_node = pool_alloc (loc_chain_pool);
+ new_node = (location_chain) pool_alloc (loc_chain_pool);
new_node->loc = node->loc;
vui[n].lc = new_node;
vui[n].pos_src = ii;
@@ -1238,7 +1238,7 @@ variable_union (void **slot, void *data)
{
location_chain new_lc;
- new_lc = pool_alloc (loc_chain_pool);
+ new_lc = (location_chain) pool_alloc (loc_chain_pool);
new_lc->next = NULL;
new_lc->loc = node->loc;
@@ -1350,7 +1350,7 @@ dataflow_set_different_1 (void **slot, void *data)
variable var1, var2;
var1 = *(variable *) slot;
- var2 = htab_find_with_hash (htab, var1->decl,
+ var2 = (variable) htab_find_with_hash (htab, var1->decl,
VARIABLE_HASH_VAL (var1->decl));
if (!var2)
{
@@ -1382,7 +1382,7 @@ dataflow_set_different_2 (void **slot, void *data)
variable var1, var2;
var1 = *(variable *) slot;
- var2 = htab_find_with_hash (htab, var1->decl,
+ var2 = (variable) htab_find_with_hash (htab, var1->decl,
VARIABLE_HASH_VAL (var1->decl));
if (!var2)
{
@@ -1841,7 +1841,7 @@ vt_find_locations (void)
while (!fibheap_empty (worklist))
{
- bb = fibheap_extract_min (worklist);
+ bb = (basic_block) fibheap_extract_min (worklist);
RESET_BIT (in_worklist, bb->index);
if (!TEST_BIT (visited, bb->index))
{
@@ -2009,7 +2009,7 @@ variable_was_changed (variable var, htab_t htab)
variable empty_var;
void **old;
- empty_var = pool_alloc (var_pool);
+ empty_var = (variable) pool_alloc (var_pool);
empty_var->decl = var->decl;
empty_var->refcount = 1;
empty_var->n_var_parts = 0;
@@ -2089,7 +2089,7 @@ set_variable_part (dataflow_set *set, rtx loc, tree decl, HOST_WIDE_INT offset)
if (!*slot)
{
/* Create new variable information. */
- var = pool_alloc (var_pool);
+ var = (variable) pool_alloc (var_pool);
var->decl = decl;
var->refcount = 1;
var->n_var_parts = 1;
@@ -2169,7 +2169,7 @@ set_variable_part (dataflow_set *set, rtx loc, tree decl, HOST_WIDE_INT offset)
}
/* Add the location to the beginning. */
- node = pool_alloc (loc_chain_pool);
+ node = (location_chain) pool_alloc (loc_chain_pool);
node->loc = loc;
node->next = var->var_part[pos].loc_chain;
var->var_part[pos].loc_chain = node;
@@ -2455,7 +2455,7 @@ emit_note_insn_var_location (void **varp, void *data)
else if (n_var_parts == 1)
{
rtx expr_list
- = gen_rtx_EXPR_LIST (VOIDmode, loc[0], GEN_INT (offsets[0]));
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, loc[0], GEN_INT (offsets[0]));
NOTE_VAR_LOCATION (note) = gen_rtx_VAR_LOCATION (VOIDmode, var->decl,
expr_list);
@@ -2466,7 +2466,7 @@ emit_note_insn_var_location (void **varp, void *data)
for (i = 0; i < n_var_parts; i++)
loc[i]
- = gen_rtx_EXPR_LIST (VOIDmode, loc[i], GEN_INT (offsets[i]));
+ = gen_rtx_EXPR_LIST (REG_DEP_TRUE, loc[i], GEN_INT (offsets[i]));
parallel = gen_rtx_PARALLEL (VOIDmode,
gen_rtvec_v (n_var_parts, loc));
@@ -2512,7 +2512,7 @@ emit_notes_for_differences_1 (void **slot, void *data)
variable old_var, new_var;
old_var = *(variable *) slot;
- new_var = htab_find_with_hash (new_vars, old_var->decl,
+ new_var = (variable) htab_find_with_hash (new_vars, old_var->decl,
VARIABLE_HASH_VAL (old_var->decl));
if (!new_var)
@@ -2520,7 +2520,7 @@ emit_notes_for_differences_1 (void **slot, void *data)
/* Variable has disappeared. */
variable empty_var;
- empty_var = pool_alloc (var_pool);
+ empty_var = (variable) pool_alloc (var_pool);
empty_var->decl = old_var->decl;
empty_var->refcount = 1;
empty_var->n_var_parts = 0;
@@ -2545,7 +2545,7 @@ emit_notes_for_differences_2 (void **slot, void *data)
variable old_var, new_var;
new_var = *(variable *) slot;
- old_var = htab_find_with_hash (old_vars, new_var->decl,
+ old_var = (variable) htab_find_with_hash (old_vars, new_var->decl,
VARIABLE_HASH_VAL (new_var->decl));
if (!old_var)
{
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 819add8afba..5aeb3e80c64 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -205,16 +205,16 @@ static GTY(()) struct rtx_constant_pool *shared_constant_pool;
static int
section_entry_eq (const void *p1, const void *p2)
{
- const section *old = p1;
- const char *new = p2;
+ const section *old = (const section *) p1;
+ const char *tmp = (const char *) p2;
- return strcmp (old->named.name, new) == 0;
+ return strcmp (old->named.name, tmp) == 0;
}
static hashval_t
section_entry_hash (const void *p)
{
- const section *old = p;
+ const section *old = (const section *) p;
return htab_hash_string (old->named.name);
}
@@ -233,16 +233,16 @@ hash_section (section *sect)
static int
object_block_entry_eq (const void *p1, const void *p2)
{
- const struct object_block *old = p1;
- const section *new = p2;
+ const struct object_block *old = (const struct object_block *) p1;
+ const section *tmp = (const section *) p2;
- return old->sect == new;
+ return old->sect == tmp;
}
static hashval_t
object_block_entry_hash (const void *p)
{
- const struct object_block *old = p;
+ const struct object_block *old = (const struct object_block *) p;
return hash_section (old->sect);
}
@@ -254,7 +254,7 @@ get_unnamed_section (unsigned int flags, void (*callback) (const void *),
{
section *sect;
- sect = ggc_alloc (sizeof (struct unnamed_section));
+ sect = (section *) ggc_alloc (sizeof (struct unnamed_section));
sect->unnamed.common.flags = flags | SECTION_UNNAMED;
sect->unnamed.callback = callback;
sect->unnamed.data = data;
@@ -271,7 +271,7 @@ get_noswitch_section (unsigned int flags, noswitch_section_callback callback)
{
section *sect;
- sect = ggc_alloc (sizeof (struct unnamed_section));
+ sect = (section *) ggc_alloc (sizeof (struct unnamed_section));
sect->noswitch.common.flags = flags | SECTION_NOSWITCH;
sect->noswitch.callback = callback;
@@ -292,7 +292,7 @@ get_section (const char *name, unsigned int flags, tree decl)
flags |= SECTION_NAMED;
if (*slot == NULL)
{
- sect = ggc_alloc (sizeof (struct named_section));
+ sect = (section *) ggc_alloc (sizeof (struct named_section));
sect->named.common.flags = flags;
sect->named.name = ggc_strdup (name);
sect->named.decl = decl;
@@ -362,7 +362,7 @@ create_block_symbol (const char *label, struct object_block *block,
/* Create the extended SYMBOL_REF. */
size = RTX_HDR_SIZE + sizeof (struct block_symbol);
- symbol = ggc_alloc_zone (size, &rtl_zone);
+ symbol = (rtx) ggc_alloc_zone (size, &rtl_zone);
/* Initialize the normal SYMBOL_REF fields. */
memset (symbol, 0, size);
@@ -392,7 +392,7 @@ initialize_cold_section_name (void)
dsn = DECL_SECTION_NAME (current_function_decl);
if (flag_function_sections && dsn)
{
- name = alloca (TREE_STRING_LENGTH (dsn) + 1);
+ name = (char *) alloca (TREE_STRING_LENGTH (dsn) + 1);
memcpy (name, TREE_STRING_POINTER (dsn), TREE_STRING_LENGTH (dsn) + 1);
stripped_name = targetm.strip_name_encoding (name);
@@ -605,7 +605,7 @@ default_function_rodata_section (tree decl)
if (DECL_ONE_ONLY (decl) && HAVE_COMDAT_GROUP)
{
size_t len = strlen (name) + 3;
- char* rname = alloca (len);
+ char* rname = (char *) alloca (len);
strcpy (rname, ".rodata");
strcat (rname, name + 5);
@@ -616,7 +616,7 @@ default_function_rodata_section (tree decl)
&& strncmp (name, ".gnu.linkonce.t.", 16) == 0)
{
size_t len = strlen (name) + 1;
- char *rname = alloca (len);
+ char *rname = (char *) alloca (len);
memcpy (rname, name, len);
rname[14] = 'r';
@@ -627,7 +627,7 @@ default_function_rodata_section (tree decl)
&& strncmp (name, ".text.", 6) == 0)
{
size_t len = strlen (name) + 1;
- char *rname = alloca (len + 2);
+ char *rname = (char *) alloca (len + 2);
memcpy (rname, ".rodata", 7);
memcpy (rname + 7, name + 5, len - 5);
@@ -750,7 +750,7 @@ strip_reg_name (const char *name)
void
set_user_assembler_name (tree decl, const char *name)
{
- char *starred = alloca (strlen (name) + 2);
+ char *starred = (char *) alloca (strlen (name) + 2);
starred[0] = '*';
strcpy (starred + 1, name);
change_decl_assembler_name (decl, get_identifier (starred));
@@ -2540,8 +2540,8 @@ const_hash_1 (const tree exp)
static int
const_desc_eq (const void *p1, const void *p2)
{
- const struct constant_descriptor_tree *c1 = p1;
- const struct constant_descriptor_tree *c2 = p2;
+ const struct constant_descriptor_tree *c1 = (const struct constant_descriptor_tree *) p1;
+ const struct constant_descriptor_tree *c2 = (const struct constant_descriptor_tree *) p2;
if (c1->hash != c2->hash)
return 0;
return compare_constant (c1->value, c2->value);
@@ -2811,7 +2811,7 @@ build_constant_desc (tree exp)
int labelno;
struct constant_descriptor_tree *desc;
- desc = ggc_alloc (sizeof (*desc));
+ desc = (struct constant_descriptor_tree *) ggc_alloc (sizeof (*desc));
desc->value = copy_constant (exp);
/* Propagate marked-ness to copied constant. */
@@ -2879,7 +2879,7 @@ output_constant_def (tree exp, int defer)
key.hash = const_hash_1 (exp);
loc = htab_find_slot_with_hash (const_desc_htab, &key, key.hash, INSERT);
- desc = *loc;
+ desc = (struct constant_descriptor_tree *) *loc;
if (desc == 0)
{
desc = build_constant_desc (exp);
@@ -2990,7 +2990,7 @@ lookup_constant_def (tree exp)
key.value = exp;
key.hash = const_hash_1 (exp);
- desc = htab_find_with_hash (const_desc_htab, &key, key.hash);
+ desc = (struct constant_descriptor_tree *) htab_find_with_hash (const_desc_htab, &key, key.hash);
return (desc ? desc->rtl : NULL_RTX);
}
@@ -3038,15 +3038,15 @@ struct constant_descriptor_rtx GTY((chain_next ("%h.next")))
static hashval_t
const_desc_rtx_hash (const void *ptr)
{
- const struct constant_descriptor_rtx *desc = ptr;
+ const struct constant_descriptor_rtx *desc = (const struct constant_descriptor_rtx *) ptr;
return desc->hash;
}
static int
const_desc_rtx_eq (const void *a, const void *b)
{
- const struct constant_descriptor_rtx *x = a;
- const struct constant_descriptor_rtx *y = b;
+ const struct constant_descriptor_rtx *x = (const struct constant_descriptor_rtx *) a;
+ const struct constant_descriptor_rtx *y = (const struct constant_descriptor_rtx *) b;
if (x->mode != y->mode)
return 0;
@@ -3123,7 +3123,7 @@ const_rtx_hash_1 (rtx *xp, void *data)
break;
}
- hp = data;
+ hp = (hashval_t *) data;
*hp = *hp * 509 + h;
return 0;
}
@@ -3146,7 +3146,7 @@ create_constant_pool (void)
{
struct rtx_constant_pool *pool;
- pool = ggc_alloc (sizeof (struct rtx_constant_pool));
+ pool = (struct rtx_constant_pool *) ggc_alloc (sizeof (struct rtx_constant_pool));
pool->const_rtx_htab = htab_create_ggc (31, const_desc_rtx_hash,
const_desc_rtx_eq, NULL);
pool->first = NULL;
@@ -3162,7 +3162,7 @@ init_varasm_status (struct function *f)
{
struct varasm_status *p;
- p = ggc_alloc (sizeof (struct varasm_status));
+ p = (struct varasm_status *) ggc_alloc (sizeof (struct varasm_status));
f->varasm = p;
p->pool = create_constant_pool ();
@@ -3210,14 +3210,14 @@ force_const_mem (enum machine_mode mode, rtx x)
tmp.mode = mode;
hash = const_rtx_hash (x);
slot = htab_find_slot_with_hash (pool->const_rtx_htab, &tmp, hash, INSERT);
- desc = *slot;
+ desc = (struct constant_descriptor_rtx *) *slot;
/* If the constant was already present, return its memory. */
if (desc)
return copy_rtx (desc->mem);
/* Otherwise, create a new descriptor. */
- desc = ggc_alloc (sizeof (*desc));
+ desc = (struct constant_descriptor_rtx *) ggc_alloc (sizeof (*desc));
*slot = desc;
/* Align the location counter as required by EXP's data type. */
@@ -4630,7 +4630,7 @@ weak_finish_1 (tree decl)
return;
#ifdef ASM_WEAKEN_DECL
- ASM_WEAKEN_DECL (asm_out_file, decl, name, NULL);
+ ASM_WEAKEN_DECL (asm_out_file, decl, name, false);
#else
#ifdef ASM_WEAKEN_LABEL
ASM_WEAKEN_LABEL (asm_out_file, name);
@@ -5689,7 +5689,7 @@ default_unique_section_1 (tree decl, int reloc, int shlib)
name = targetm.strip_name_encoding (name);
nlen = strlen (name);
- string = alloca (nlen + plen + 1);
+ string = (char *) alloca (nlen + plen + 1);
memcpy (string, prefix, plen);
memcpy (string + plen, name, nlen + 1);
@@ -5939,7 +5939,7 @@ void
default_internal_label (FILE *stream, const char *prefix,
unsigned long labelno)
{
- char *const buf = alloca (40 + strlen (prefix));
+ char *const buf = (char *) alloca (40 + strlen (prefix));
ASM_GENERATE_INTERNAL_LABEL (buf, prefix, labelno);
ASM_OUTPUT_INTERNAL_LABEL (stream, buf);
}
diff --git a/gcc/varray.c b/gcc/varray.c
index 9900f9e1be0..eb98d447d2d 100644
--- a/gcc/varray.c
+++ b/gcc/varray.c
@@ -127,9 +127,9 @@ varray_init (size_t num_elements, enum varray_data_enum element_kind,
desc->allocated += data_size + VARRAY_HDR_SIZE;
#endif
if (element[element_kind].uses_ggc)
- ptr = ggc_alloc_cleared (VARRAY_HDR_SIZE + data_size);
+ ptr = (varray_type) ggc_alloc_cleared (VARRAY_HDR_SIZE + data_size);
else
- ptr = xcalloc (VARRAY_HDR_SIZE + data_size, 1);
+ ptr = (varray_type) xcalloc (VARRAY_HDR_SIZE + data_size, 1);
ptr->num_elements = num_elements;
ptr->elements_used = 0;
@@ -160,9 +160,9 @@ varray_grow (varray_type va, size_t n)
if (element[va->type].uses_ggc)
- va = ggc_realloc (va, VARRAY_HDR_SIZE + data_size);
+ va = (varray_type) ggc_realloc (va, VARRAY_HDR_SIZE + data_size);
else
- va = xrealloc (va, VARRAY_HDR_SIZE + data_size);
+ va = (varray_type) xrealloc (va, VARRAY_HDR_SIZE + data_size);
va->num_elements = n;
if (n > old_elements)
memset (&va->data.vdt_c[old_data_size], 0, data_size - old_data_size);
diff --git a/gcc/vec.c b/gcc/vec.c
index 5d5687475ec..73931290254 100644
--- a/gcc/vec.c
+++ b/gcc/vec.c
@@ -106,8 +106,8 @@ void *
vec_gc_o_reserve (void *vec, int reserve, size_t vec_offset, size_t elt_size
MEM_STAT_DECL)
{
- struct vec_prefix *pfx = vec;
- unsigned alloc = alloc = calculate_allocation (pfx, reserve);
+ struct vec_prefix *pfx = (struct vec_prefix *)vec;
+ unsigned alloc = calculate_allocation (pfx, reserve);
if (!alloc)
return NULL;
@@ -136,7 +136,7 @@ void *
vec_heap_o_reserve (void *vec, int reserve, size_t vec_offset, size_t elt_size
MEM_STAT_DECL)
{
- struct vec_prefix *pfx = vec;
+ struct vec_prefix *pfx = (struct vec_prefix *) vec;
unsigned alloc = calculate_allocation (pfx, reserve);
if (!alloc)
diff --git a/gcc/vec.h b/gcc/vec.h
index 1f134528374..fb4fa68dc59 100644
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -531,12 +531,12 @@ static inline int VEC_OP (T,base,iterate) \
{ \
if (vec_ && ix_ < vec_->num) \
{ \
- *ptr = vec_->vec[ix_]; \
+ *ptr = (T) vec_->vec[ix_]; \
return 1; \
} \
else \
{ \
- *ptr = 0; \
+ *ptr = (T) 0; \
return 0; \
} \
} \
diff --git a/include/libiberty.h b/include/libiberty.h
index 1328d3eb14c..24dc386a9f1 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -603,7 +603,12 @@ extern int vsnprintf (char *, size_t, const char *, va_list) ATTRIBUTE_PRINTF(3,
#if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP
/* Compare version strings. */
-extern int strverscmp (const char *, const char *);
+#ifdef __cplusplus
+extern "C"
+#else
+extern
+#endif
+int strverscmp (const char *, const char *);
#endif
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c
index 6faac5756a3..50ead25fdda 100644
--- a/intl/bindtextdom.c
+++ b/intl/bindtextdom.c
@@ -57,7 +57,11 @@
/* @@ end of prolog @@ */
/* Contains the default location of the message catalogs. */
+#if defined __EMX__
+const char _nl_default_dirname[] = "";
+#else
extern const char _nl_default_dirname[];
+#endif
#ifdef _LIBC
extern const char _nl_default_dirname_internal[] attribute_hidden;
#else
@@ -98,10 +102,8 @@ static void set_binding_values PARAMS ((const char *domainname,
If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
modified nor returned. */
static void
-set_binding_values (domainname, dirnamep, codesetp)
- const char *domainname;
- const char **dirnamep;
- const char **codesetp;
+set_binding_values (const char *domainname,
+ const char **dirnamep, const char **codesetp)
{
struct binding *binding;
int modified;
@@ -348,9 +350,7 @@ set_binding_values (domainname, dirnamep, codesetp)
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
char *
-BINDTEXTDOMAIN (domainname, dirname)
- const char *domainname;
- const char *dirname;
+BINDTEXTDOMAIN (const char *domainname, const char *dirname)
{
set_binding_values (domainname, &dirname, NULL);
return (char *) dirname;
@@ -359,9 +359,7 @@ BINDTEXTDOMAIN (domainname, dirname)
/* Specify the character encoding in which the messages from the
DOMAINNAME message catalog will be returned. */
char *
-BIND_TEXTDOMAIN_CODESET (domainname, codeset)
- const char *domainname;
- const char *codeset;
+BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset)
{
set_binding_values (domainname, NULL, &codeset);
return (char *) codeset;
diff --git a/intl/dcgettext.c b/intl/dcgettext.c
index 338fd7c615f..d5f524da5f5 100644
--- a/intl/dcgettext.c
+++ b/intl/dcgettext.c
@@ -44,10 +44,7 @@
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
char *
-DCGETTEXT (domainname, msgid, category)
- const char *domainname;
- const char *msgid;
- int category;
+DCGETTEXT (const char *domainname, const char *msgid, int category)
{
return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
}
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index a8d4a14d273..463b3807a8a 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -250,9 +250,7 @@ static void *root;
/* Function to compare two entries in the table of known translations. */
static int transcmp PARAMS ((const void *p1, const void *p2));
static int
-transcmp (p1, p2)
- const void *p1;
- const void *p2;
+transcmp (const void *p1, const void *p2)
{
const struct known_translation_t *s1;
const struct known_translation_t *s2;
@@ -285,6 +283,7 @@ transcmp (p1, p2)
/* Name of the default domain used for gettext(3) prior any call to
textdomain(3). The default value for this is "messages". */
+extern const char _nl_default_default_domain[] attribute_hidden;
const char _nl_default_default_domain[] attribute_hidden = "messages";
/* Value used as the default domain for gettext(3). */
@@ -295,6 +294,7 @@ const char *_nl_current_default_domain attribute_hidden
#if defined __EMX__
extern const char _nl_default_dirname[];
#else
+extern const char _nl_default_dirname[];
const char _nl_default_dirname[] = LOCALEDIR;
INTVARDEF (_nl_default_dirname)
#endif
@@ -424,13 +424,8 @@ static int enable_secure;
CATEGORY locale and, if PLURAL is nonzero, search over string
depending on the plural form determined by N. */
char *
-DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- int plural;
- unsigned long int n;
- int category;
+DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
+ int plural, unsigned long int n, int category)
{
#ifndef HAVE_ALLOCA
struct block_list *block_list = NULL;
@@ -571,7 +566,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
+ domainname_len + 5);
ADD_BLOCK (block_list, xdomainname);
- stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
+ stpcpy ((char *) mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
domainname, domainname_len),
".mo");
@@ -658,7 +653,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
if (newp != NULL)
{
newp->domainname =
- mempcpy (newp->msgid, msgid1, msgid_len);
+ (char *) mempcpy (newp->msgid, msgid1, msgid_len);
memcpy (newp->domainname, domainname, domainname_len + 1);
newp->category = category;
newp->counter = _nl_msg_cat_cntr;
@@ -724,11 +719,8 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
char *
internal_function
-_nl_find_msg (domain_file, domainbinding, msgid, lengthp)
- struct loaded_l10nfile *domain_file;
- struct binding *domainbinding;
- const char *msgid;
- size_t *lengthp;
+_nl_find_msg (struct loaded_l10nfile *domain_file,
+ struct binding *domainbinding, const char *msgid, size_t *lengthp)
{
struct loaded_domain *domain;
nls_uint32 nstrings;
@@ -1035,11 +1027,8 @@ _nl_find_msg (domain_file, domainbinding, msgid, lengthp)
/* Look up a plural variant. */
static char *
internal_function
-plural_lookup (domain, n, translation, translation_len)
- struct loaded_l10nfile *domain;
- unsigned long int n;
- const char *translation;
- size_t translation_len;
+plural_lookup (struct loaded_l10nfile *domain, unsigned long int n,
+ const char *translation, size_t translation_len)
{
struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
unsigned long int index;
@@ -1076,8 +1065,7 @@ plural_lookup (domain, n, translation, translation_len)
/* Return string representation of locale CATEGORY. */
static const char *
internal_function
-category_to_name (category)
- int category;
+category_to_name (int category)
{
const char *retval;
@@ -1137,9 +1125,7 @@ category_to_name (category)
/* Guess value of current locale from value of the environment variables. */
static const char *
internal_function
-guess_category_value (category, categoryname)
- int category;
- const char *categoryname;
+guess_category_value (int category, const char *categoryname)
{
const char *language;
const char *retval;
@@ -1192,10 +1178,7 @@ stpcpy (dest, src)
#if !_LIBC && !HAVE_MEMPCPY
static void *
-mempcpy (dest, src, n)
- void *dest;
- const void *src;
- size_t n;
+mempcpy (void *dest, const void *src, size_t n)
{
return (void *) ((char *) memcpy (dest, src, n) + n);
}
diff --git a/intl/dcngettext.c b/intl/dcngettext.c
index d2fb0f9a996..4d74d0a5d7a 100644
--- a/intl/dcngettext.c
+++ b/intl/dcngettext.c
@@ -44,12 +44,8 @@
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
char *
-DCNGETTEXT (domainname, msgid1, msgid2, n, category)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
- int category;
+DCNGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
+ unsigned long int n, int category)
{
return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
}
diff --git a/intl/dgettext.c b/intl/dgettext.c
index e497dd9c920..99275cae955 100644
--- a/intl/dgettext.c
+++ b/intl/dgettext.c
@@ -47,9 +47,7 @@
/* Look up MSGID in the DOMAINNAME message catalog of the current
LC_MESSAGES locale. */
char *
-DGETTEXT (domainname, msgid)
- const char *domainname;
- const char *msgid;
+DGETTEXT (const char *domainname, const char *msgid)
{
return DCGETTEXT (domainname, msgid, LC_MESSAGES);
}
diff --git a/intl/dngettext.c b/intl/dngettext.c
index 8dee8008544..6ac3a8dffc8 100644
--- a/intl/dngettext.c
+++ b/intl/dngettext.c
@@ -47,11 +47,9 @@
/* Look up MSGID in the DOMAINNAME message catalog of the current
LC_MESSAGES locale and skip message according to the plural form. */
char *
-DNGETTEXT (domainname, msgid1, msgid2, n)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
+DNGETTEXT (const char *domainname,
+ const char *msgid1, const char *msgid2,
+ unsigned long int n)
{
return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
}
diff --git a/intl/eval-plural.h b/intl/eval-plural.h
index 5bf1dd16162..87265c5a41b 100644
--- a/intl/eval-plural.h
+++ b/intl/eval-plural.h
@@ -28,9 +28,7 @@ STATIC unsigned long int plural_eval PARAMS ((struct expression *pexp,
STATIC
unsigned long int
internal_function
-plural_eval (pexp, n)
- struct expression *pexp;
- unsigned long int n;
+plural_eval (struct expression *pexp, unsigned long int n)
{
switch (pexp->nargs)
{
diff --git a/intl/explodename.c b/intl/explodename.c
index c577c54f529..575d151469e 100644
--- a/intl/explodename.c
+++ b/intl/explodename.c
@@ -38,8 +38,7 @@
/* @@ end of prolog @@ */
char *
-_nl_find_language (name)
- const char *name;
+_nl_find_language (const char *name)
{
while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
&& name[0] != '+' && name[0] != ',')
@@ -50,17 +49,10 @@ _nl_find_language (name)
int
-_nl_explode_name (name, language, modifier, territory, codeset,
- normalized_codeset, special, sponsor, revision)
- char *name;
- const char **language;
- const char **modifier;
- const char **territory;
- const char **codeset;
- const char **normalized_codeset;
- const char **special;
- const char **sponsor;
- const char **revision;
+_nl_explode_name (char *name, const char **language, const char **modifier,
+ const char **territory, const char **codeset,
+ const char **normalized_codeset, const char **special,
+ const char **sponsor, const char **revision)
{
enum { undecided, xpg, cen } syntax;
char *cp;
diff --git a/intl/finddomain.c b/intl/finddomain.c
index e12a638d5c3..f1b53f57833 100644
--- a/intl/finddomain.c
+++ b/intl/finddomain.c
@@ -47,11 +47,8 @@ static struct loaded_l10nfile *_nl_loaded_domains;
established bindings. */
struct loaded_l10nfile *
internal_function
-_nl_find_domain (dirname, locale, domainname, domainbinding)
- const char *dirname;
- char *locale;
- const char *domainname;
- struct binding *domainbinding;
+_nl_find_domain (const char *dirname, char *locale,
+ const char *domainname, struct binding *domainbinding)
{
struct loaded_l10nfile *retval;
const char *language;
diff --git a/intl/gettext.c b/intl/gettext.c
index 57130f40a12..b08b6bbf949 100644
--- a/intl/gettext.c
+++ b/intl/gettext.c
@@ -52,8 +52,7 @@
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
char *
-GETTEXT (msgid)
- const char *msgid;
+GETTEXT (const char *msgid)
{
return DCGETTEXT (NULL, msgid, LC_MESSAGES);
}
diff --git a/intl/gettextP.h b/intl/gettextP.h
index 3ff2dd77a69..be0cd10ae27 100644
--- a/intl/gettextP.h
+++ b/intl/gettextP.h
@@ -67,9 +67,7 @@
# include <byteswap.h>
# define SWAP(i) bswap_32 (i)
#else
-static inline nls_uint32
-SWAP (i)
- nls_uint32 i;
+static inline nls_uint32 SWAP (nls_uint32 i)
{
return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
}
diff --git a/intl/gmo.h b/intl/gmo.h
index ccebb3aa6ad..4d07c5cfc56 100644
--- a/intl/gmo.h
+++ b/intl/gmo.h
@@ -123,6 +123,16 @@ struct sysdep_segment
nls_uint32 offset;
};
+/* Alternating sequence of static and system dependent segments.
+ The last segment is a static segment, including the trailing NUL. */
+struct segment_pair
+{
+ /* Size of static segment. */
+ nls_uint32 segsize;
+ /* Reference to system dependent string segment, or ~0 at the end. */
+ nls_uint32 sysdepref;
+};
+
/* Descriptor for system dependent string. */
struct sysdep_string
{
@@ -130,13 +140,7 @@ struct sysdep_string
nls_uint32 offset;
/* Alternating sequence of static and system dependent segments.
The last segment is a static segment, including the trailing NUL. */
- struct segment_pair
- {
- /* Size of static segment. */
- nls_uint32 segsize;
- /* Reference to system dependent string segment, or ~0 at the end. */
- nls_uint32 sysdepref;
- } segments[1];
+ struct segment_pair segments[1];
};
/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF,
diff --git a/intl/hash-string.h b/intl/hash-string.h
index 6eab80f96e3..2984b7ba49a 100644
--- a/intl/hash-string.h
+++ b/intl/hash-string.h
@@ -36,8 +36,7 @@
static unsigned long int hash_string PARAMS ((const char *__str_param));
static inline unsigned long int
-hash_string (str_param)
- const char *str_param;
+hash_string (const char *str_param)
{
unsigned long int hval, g;
const char *str = str_param;
diff --git a/intl/intl-compat.c b/intl/intl-compat.c
index 71a621a32be..ee32dc2f0f1 100644
--- a/intl/intl-compat.c
+++ b/intl/intl-compat.c
@@ -58,8 +58,7 @@
DLL_EXPORTED
char *
-gettext (msgid)
- const char *msgid;
+gettext (const char *msgid)
{
return libintl_gettext (msgid);
}
@@ -67,9 +66,7 @@ gettext (msgid)
DLL_EXPORTED
char *
-dgettext (domainname, msgid)
- const char *domainname;
- const char *msgid;
+dgettext (const char *domainname, const char *msgid)
{
return libintl_dgettext (domainname, msgid);
}
@@ -77,10 +74,7 @@ dgettext (domainname, msgid)
DLL_EXPORTED
char *
-dcgettext (domainname, msgid, category)
- const char *domainname;
- const char *msgid;
- int category;
+dcgettext (const char *domainname, const char *msgid, int category)
{
return libintl_dcgettext (domainname, msgid, category);
}
@@ -88,10 +82,7 @@ dcgettext (domainname, msgid, category)
DLL_EXPORTED
char *
-ngettext (msgid1, msgid2, n)
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
+ngettext (const char *msgid1, const char *msgid2, unsigned long int n)
{
return libintl_ngettext (msgid1, msgid2, n);
}
@@ -99,11 +90,8 @@ ngettext (msgid1, msgid2, n)
DLL_EXPORTED
char *
-dngettext (domainname, msgid1, msgid2, n)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
+dngettext (const char *domainname, const char *msgid1,
+ const char *msgid2, unsigned long int n)
{
return libintl_dngettext (domainname, msgid1, msgid2, n);
}
@@ -111,12 +99,9 @@ dngettext (domainname, msgid1, msgid2, n)
DLL_EXPORTED
char *
-dcngettext (domainname, msgid1, msgid2, n, category)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
- int category;
+dcngettext (const char *domainname,
+ const char *msgid1, const char *msgid2,
+ unsigned long int n, int category)
{
return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
}
@@ -124,8 +109,7 @@ dcngettext (domainname, msgid1, msgid2, n, category)
DLL_EXPORTED
char *
-textdomain (domainname)
- const char *domainname;
+textdomain (const char *domainname)
{
return libintl_textdomain (domainname);
}
@@ -133,9 +117,7 @@ textdomain (domainname)
DLL_EXPORTED
char *
-bindtextdomain (domainname, dirname)
- const char *domainname;
- const char *dirname;
+bindtextdomain (const char *domainname, const char *dirname)
{
return libintl_bindtextdomain (domainname, dirname);
}
@@ -143,9 +125,7 @@ bindtextdomain (domainname, dirname)
DLL_EXPORTED
char *
-bind_textdomain_codeset (domainname, codeset)
- const char *domainname;
- const char *codeset;
+bind_textdomain_codeset (const char *domainname, const char *codeset)
{
return libintl_bind_textdomain_codeset (domainname, codeset);
}
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
index e858a991aa2..cabb7359a38 100644
--- a/intl/l10nflist.c
+++ b/intl/l10nflist.c
@@ -87,9 +87,7 @@ static char *stpcpy PARAMS ((char *dest, const char *src));
static size_t argz_count__ PARAMS ((const char *argz, size_t len));
static size_t
-argz_count__ (argz, len)
- const char *argz;
- size_t len;
+argz_count__ (const char *argz, size_t len)
{
size_t count = 0;
while (len > 0)
@@ -115,10 +113,7 @@ argz_count__ (argz, len)
static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
static void
-argz_stringify__ (argz, len, sep)
- char *argz;
- size_t len;
- int sep;
+argz_stringify__ (char *argz, size_t len, int sep)
{
while (len > 0)
{
@@ -143,10 +138,7 @@ static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
const char *entry));
static char *
-argz_next__ (argz, argz_len, entry)
- char *argz;
- size_t argz_len;
- const char *entry;
+argz_next__ (char *argz, size_t argz_len, const char *entry)
{
if (entry)
{
@@ -170,8 +162,7 @@ argz_next__ (argz, argz_len, entry)
static int pop PARAMS ((int x));
static inline int
-pop (x)
- int x;
+pop (int x)
{
/* We assume that no more than 16 bits are used. */
x = ((x & ~0x5555) >> 1) + (x & 0x5555);
@@ -184,23 +175,12 @@ pop (x)
struct loaded_l10nfile *
-_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
- territory, codeset, normalized_codeset, modifier, special,
- sponsor, revision, filename, do_allocate)
- struct loaded_l10nfile **l10nfile_list;
- const char *dirlist;
- size_t dirlist_len;
- int mask;
- const char *language;
- const char *territory;
- const char *codeset;
- const char *normalized_codeset;
- const char *modifier;
- const char *special;
- const char *sponsor;
- const char *revision;
- const char *filename;
- int do_allocate;
+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
+ const char *dirlist, size_t dirlist_len, int mask,
+ const char *language, const char *territory, const char *codeset,
+ const char *normalized_codeset, const char *modifier,
+ const char *special, const char *sponsor, const char *revision,
+ const char *filename, int do_allocate)
{
char *abs_filename;
struct loaded_l10nfile **lastp;
@@ -393,9 +373,7 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
names. The return value is dynamically allocated and has to be
freed by the caller. */
const char *
-_nl_normalize_codeset (codeset, name_len)
- const char *codeset;
- size_t name_len;
+_nl_normalize_codeset (const char *codeset, size_t name_len)
{
int len = 0;
int only_digit = 1;
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index 536ee12621d..e3fca3d3fbe 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -504,8 +504,7 @@ int _nl_msg_cat_cntr;
/* Expand a system dependent string segment. Return NULL if unsupported. */
static const char *
-get_sysdep_segment_value (name)
- const char *name;
+get_sysdep_segment_value (const char *name)
{
/* Test for an ISO C 99 section 7.8.1 format string directive.
Syntax:
@@ -758,14 +757,24 @@ get_sysdep_segment_value (name)
return NULL;
}
+# if HAVE_ICONV
+/* MDCKI - we should really compile our own version of locale_charset
+ * if no one found on the host.
+ */
+# ifdef __cplusplus
+extern "C"
+# else
+extern
+# endif
+const char *locale_charset PARAMS ((void));
+# endif
+
/* Initialize the codeset dependent parts of an opened message catalog.
Return the header entry. */
const char *
internal_function
-_nl_init_domain_conv (domain_file, domain, domainbinding)
- struct loaded_l10nfile *domain_file;
- struct loaded_domain *domain;
- struct binding *domainbinding;
+_nl_init_domain_conv (struct loaded_l10nfile *domain_file,
+ struct loaded_domain *domain, struct binding *domainbinding)
{
/* Find out about the character set the file is encoded with.
This can be found (in textual form) in the entry "". If this
@@ -829,7 +838,6 @@ _nl_init_domain_conv (domain_file, domain, domainbinding)
outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
# else
# if HAVE_ICONV
- extern const char *locale_charset PARAMS ((void));
outcharset = locale_charset ();
# endif
# endif
@@ -881,8 +889,7 @@ _nl_init_domain_conv (domain_file, domain, domainbinding)
/* Frees the codeset dependent parts of an opened message catalog. */
void
internal_function
-_nl_free_domain_conv (domain)
- struct loaded_domain *domain;
+_nl_free_domain_conv (struct loaded_domain *domain)
{
if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
free (domain->conv_tab);
@@ -902,9 +909,8 @@ _nl_free_domain_conv (domain)
message catalog do nothing. */
void
internal_function
-_nl_load_domain (domain_file, domainbinding)
- struct loaded_l10nfile *domain_file;
- struct binding *domainbinding;
+_nl_load_domain (struct loaded_l10nfile *domain_file,
+ struct binding *domainbinding)
{
int fd;
size_t size;
@@ -1085,7 +1091,7 @@ _nl_load_domain (domain_file, domainbinding)
((char *) data
+ W (domain->must_swap, data->sysdep_segments_offset));
sysdep_segment_values =
- alloca (n_sysdep_segments * sizeof (const char *));
+ (const char **) alloca (n_sysdep_segments * sizeof (const char *));
for (i = 0; i < n_sysdep_segments; i++)
{
const char *name =
diff --git a/intl/localcharset.c b/intl/localcharset.c
index 8ece6e39f69..1217e522739 100644
--- a/intl/localcharset.c
+++ b/intl/localcharset.c
@@ -23,73 +23,80 @@
# include <config.h>
#endif
+#if !HAVE_ICONV
+
+/* Provide our variant only if we don't use the systems iconv library. This is
+ * consistant with the usage in loadmsgcat.c and prevents us from relying on
+ * link-time symbol resolution.
+ */
+
/* Specification. */
#include "localcharset.h"
-#if HAVE_STDDEF_H
-# include <stddef.h>
-#endif
+# if HAVE_STDDEF_H
+# include <stddef.h>
+# endif
-#include <stdio.h>
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+# include <stdio.h>
+# if HAVE_STRING_H
+# include <string.h>
+# else
+# include <strings.h>
+# endif
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
-#if defined _WIN32 || defined __WIN32__
-# undef WIN32 /* avoid warning on mingw32 */
-# define WIN32
-#endif
+# if defined _WIN32 || defined __WIN32__
+# undef WIN32 /* avoid warning on mingw32 */
+# define WIN32
+# endif
-#if defined __EMX__
+# if defined __EMX__
/* Assume EMX program runs on OS/2, even if compiled under DOS. */
-# define OS2
-#endif
+# define OS2
+# endif
-#if !defined WIN32
-# if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-# else
-# if HAVE_SETLOCALE
-# include <locale.h>
+# if !defined WIN32
+# if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+# else
+# if HAVE_SETLOCALE
+# include <locale.h>
+# endif
# endif
+# elif defined WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# endif
+# if defined OS2
+# define INCL_DOS
+# include <os2.h>
# endif
-#elif defined WIN32
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-#endif
-#if defined OS2
-# define INCL_DOS
-# include <os2.h>
-#endif
-#if ENABLE_RELOCATABLE
-# include "relocatable.h"
-#else
-# define relocate(pathname) (pathname)
-#endif
+# if ENABLE_RELOCATABLE
+# include "relocatable.h"
+# else
+# define relocate(pathname) (pathname)
+# endif
-#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+# if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
/* Win32, OS/2, DOS */
-# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-#endif
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# endif
-#ifndef DIRECTORY_SEPARATOR
-# define DIRECTORY_SEPARATOR '/'
-#endif
+# ifndef DIRECTORY_SEPARATOR
+# define DIRECTORY_SEPARATOR '/'
+# endif
-#ifndef ISSLASH
-# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
-#endif
+# ifndef ISSLASH
+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
+# endif
-#ifdef HAVE_GETC_UNLOCKED
-# undef getc
-# define getc getc_unlocked
-#endif
+# ifdef HAVE_GETC_UNLOCKED
+# undef getc
+# define getc getc_unlocked
+# endif
/* The following static variable is declared 'volatile' to avoid a
possible multithread problem in the function get_charset_aliases. If we
@@ -97,9 +104,9 @@
'charset_aliases' simultaneously, both will produce the same value,
and everything will be ok if the two assignments to 'charset_aliases'
are atomic. But I don't know what will happen if the two assignments mix. */
-#if __STDC__ != 1
-# define volatile /* empty */
-#endif
+# if __STDC__ != 1
+# define volatile /* empty */
+# endif
/* Pointer to the contents of the charset.alias file, if it has already been
read, else NULL. Its format is:
ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
@@ -114,7 +121,7 @@ get_charset_aliases ()
cp = charset_aliases;
if (cp == NULL)
{
-#if !(defined VMS || defined WIN32)
+# if !(defined VMS || defined WIN32)
FILE *fp;
const char *dir = relocate (LIBDIR);
const char *base = "charset.alias";
@@ -202,9 +209,9 @@ get_charset_aliases ()
if (file_name != NULL)
free (file_name);
-#else
+# else
-# if defined VMS
+# if defined VMS
/* To avoid the troubles of an extra file charset.alias_vms in the
sources of many GNU packages, simply inline the aliases here. */
/* The list of encodings is taken from the OpenVMS 7.3-1 documentation
@@ -227,9 +234,9 @@ get_charset_aliases ()
"DECHANZI" "\0" "GB2312" "\0"
/* Korean */
"DECKOREAN" "\0" "EUC-KR" "\0";
-# endif
+# endif
-# if defined WIN32
+# if defined WIN32
/* To avoid the troubles of installing a separate file in the same
directory as the DLL and of retrieving the DLL's directory at
runtime, simply inline the aliases here. */
@@ -249,8 +256,8 @@ get_charset_aliases ()
"CP28598" "\0" "ISO-8859-8" "\0"
"CP28599" "\0" "ISO-8859-9" "\0"
"CP28605" "\0" "ISO-8859-15" "\0";
+# endif
# endif
-#endif
charset_aliases = cp;
}
@@ -264,23 +271,23 @@ get_charset_aliases ()
If the canonical name cannot be determined, the result is a non-canonical
name. */
-#ifdef STATIC
+# ifdef STATIC
STATIC
-#endif
+# endif
const char *
locale_charset ()
{
const char *codeset;
const char *aliases;
-#if !(defined WIN32 || defined OS2)
+# if !(defined WIN32 || defined OS2)
-# if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET
/* Most systems support nl_langinfo (CODESET) nowadays. */
codeset = nl_langinfo (CODESET);
-# else
+# else
/* On old systems which lack it, use setlocale or getenv. */
const char *locale = NULL;
@@ -289,9 +296,9 @@ locale_charset ()
(like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
use setlocale here; it would return "C" when it doesn't support the
locale name the user has set. */
-# if HAVE_SETLOCALE && 0
+# if HAVE_SETLOCALE && 0
locale = setlocale (LC_CTYPE, NULL);
-# endif
+# endif
if (locale == NULL || locale[0] == '\0')
{
locale = getenv ("LC_ALL");
@@ -308,9 +315,9 @@ locale_charset ()
through the charset.alias file. */
codeset = locale;
-# endif
+# endif
-#elif defined WIN32
+# elif defined WIN32
static char buf[2 + 10 + 1];
@@ -318,7 +325,7 @@ locale_charset ()
sprintf (buf, "CP%u", GetACP ());
codeset = buf;
-#elif defined OS2
+# elif defined OS2
const char *locale;
static char buf[2 + 10 + 1];
@@ -371,7 +378,7 @@ locale_charset ()
}
}
-#endif
+# endif
if (codeset == NULL)
/* The canonical name cannot be determined. */
@@ -396,3 +403,4 @@ locale_charset ()
return codeset;
}
+#endif
diff --git a/intl/localealias.c b/intl/localealias.c
index 5af5b5b6af3..41bd28c162c 100644
--- a/intl/localealias.c
+++ b/intl/localealias.c
@@ -148,8 +148,7 @@ static int alias_compare PARAMS ((const struct alias_map *map1,
const char *
-_nl_expand_alias (name)
- const char *name;
+_nl_expand_alias (const char *name)
{
static const char *locale_alias_path;
struct alias_map *retval;
@@ -215,9 +214,7 @@ _nl_expand_alias (name)
static size_t
internal_function
-read_alias_file (fname, fname_len)
- const char *fname;
- int fname_len;
+read_alias_file (const char *fname, int fname_len)
{
FILE *fp;
char *full_fname;
@@ -333,11 +330,11 @@ read_alias_file (fname, fname_len)
string_space_max = new_size;
}
- map[nmap].alias = memcpy (&string_space[string_space_act],
+ map[nmap].alias = (const char *) memcpy (&string_space[string_space_act],
alias, alias_len);
string_space_act += alias_len;
- map[nmap].value = memcpy (&string_space[string_space_act],
+ map[nmap].value = (const char *) memcpy (&string_space[string_space_act],
value, value_len);
string_space_act += value_len;
@@ -387,9 +384,7 @@ extend_alias_table ()
static int
-alias_compare (map1, map2)
- const struct alias_map *map1;
- const struct alias_map *map2;
+alias_compare (const struct alias_map *map1, const struct alias_map *map2)
{
#if defined _LIBC || defined HAVE_STRCASECMP
return strcasecmp (map1->alias, map2->alias);
diff --git a/intl/localename.c b/intl/localename.c
index 28c4ca7aab6..737533867c9 100644
--- a/intl/localename.c
+++ b/intl/localename.c
@@ -381,9 +381,7 @@
The result must not be freed; it is statically allocated. */
const char *
-_nl_locale_name (category, categoryname)
- int category;
- const char *categoryname;
+_nl_locale_name (int category, const char *categoryname)
{
const char *retval;
diff --git a/intl/log.c b/intl/log.c
index 2ce2d02c586..bf1823e909b 100644
--- a/intl/log.c
+++ b/intl/log.c
@@ -28,9 +28,7 @@
/* Print an ASCII string with quotes and escape sequences where needed. */
static void
-print_escaped (stream, str)
- FILE *stream;
- const char *str;
+print_escaped (FILE *stream, const char *str)
{
putc ('"', stream);
for (; *str != '\0'; str++)
@@ -52,12 +50,9 @@ print_escaped (stream, str)
/* Add to the log file an entry denoting a failed translation. */
void
-_nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural)
- const char *logfilename;
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- int plural;
+_nl_log_untranslated (const char *logfilename, const char *domainname,
+ const char *msgid1, const char *msgid2,
+ int plural)
{
static char *last_logfilename = NULL;
static FILE *last_logfile = NULL;
diff --git a/intl/ngettext.c b/intl/ngettext.c
index 4a3186c03b5..3573f19dd89 100644
--- a/intl/ngettext.c
+++ b/intl/ngettext.c
@@ -54,10 +54,8 @@
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
char *
-NGETTEXT (msgid1, msgid2, n)
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
+NGETTEXT (const char *msgid1, const char *msgid2,
+ unsigned long int n)
{
return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
}
diff --git a/intl/plural-exp.c b/intl/plural-exp.c
index be96173e4d6..7030ae0fb47 100644
--- a/intl/plural-exp.c
+++ b/intl/plural-exp.c
@@ -96,10 +96,8 @@ init_germanic_plural ()
void
internal_function
-EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp)
- const char *nullentry;
- struct expression **pluralp;
- unsigned long int *npluralsp;
+EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
+ struct expression **pluralp, unsigned long int *npluralsp)
{
if (nullentry != NULL)
{
diff --git a/intl/plural-exp.h b/intl/plural-exp.h
index cedc0db6882..440287b3e9e 100644
--- a/intl/plural-exp.h
+++ b/intl/plural-exp.h
@@ -36,36 +36,37 @@
# define attribute_hidden
#endif
+enum eoperator
+{
+ /* Without arguments: */
+ var, /* The variable "n". */
+ num, /* Decimal number. */
+ /* Unary operators: */
+ lnot, /* Logical NOT. */
+ /* Binary operators: */
+ mult, /* Multiplication. */
+ divide, /* Division. */
+ module, /* Modulo operation. */
+ plus, /* Addition. */
+ minus, /* Subtraction. */
+ less_than, /* Comparison. */
+ greater_than, /* Comparison. */
+ less_or_equal, /* Comparison. */
+ greater_or_equal, /* Comparison. */
+ equal, /* Comparison for equality. */
+ not_equal, /* Comparison for inequality. */
+ land, /* Logical AND. */
+ lor, /* Logical OR. */
+ /* Ternary operators: */
+ qmop /* Question mark operator. */
+};
/* This is the representation of the expressions to determine the
plural form. */
struct expression
{
int nargs; /* Number of arguments. */
- enum operator
- {
- /* Without arguments: */
- var, /* The variable "n". */
- num, /* Decimal number. */
- /* Unary operators: */
- lnot, /* Logical NOT. */
- /* Binary operators: */
- mult, /* Multiplication. */
- divide, /* Division. */
- module, /* Modulo operation. */
- plus, /* Addition. */
- minus, /* Subtraction. */
- less_than, /* Comparison. */
- greater_than, /* Comparison. */
- less_or_equal, /* Comparison. */
- greater_or_equal, /* Comparison. */
- equal, /* Comparison for equality. */
- not_equal, /* Comparison for inequality. */
- land, /* Logical AND. */
- lor, /* Logical OR. */
- /* Ternary operators: */
- qmop /* Question mark operator. */
- } operation;
+ enum eoperator operation;
union
{
unsigned long int num; /* Number value for `num'. */
diff --git a/intl/plural.y b/intl/plural.y
index 3f75cf3dbbe..d6b5487a0d2 100644
--- a/intl/plural.y
+++ b/intl/plural.y
@@ -48,21 +48,21 @@
%union {
unsigned long int num;
- enum operator op;
+ enum eoperator op;
struct expression *exp;
}
%{
/* Prototypes for local functions. */
-static struct expression *new_exp PARAMS ((int nargs, enum operator op,
+static struct expression *new_exp PARAMS ((int nargs, enum eoperator op,
struct expression * const *args));
-static inline struct expression *new_exp_0 PARAMS ((enum operator op));
-static inline struct expression *new_exp_1 PARAMS ((enum operator op,
+static inline struct expression *new_exp_0 PARAMS ((enum eoperator op));
+static inline struct expression *new_exp_1 PARAMS ((enum eoperator op,
struct expression *right));
-static struct expression *new_exp_2 PARAMS ((enum operator op,
+static struct expression *new_exp_2 PARAMS ((enum eoperator op,
struct expression *left,
struct expression *right));
-static inline struct expression *new_exp_3 PARAMS ((enum operator op,
+static inline struct expression *new_exp_3 PARAMS ((enum eoperator op,
struct expression *bexp,
struct expression *tbranch,
struct expression *fbranch));
@@ -72,10 +72,7 @@ static void yyerror PARAMS ((const char *str));
/* Allocation of expressions. */
static struct expression *
-new_exp (nargs, op, args)
- int nargs;
- enum operator op;
- struct expression * const *args;
+new_exp (int nargs, enum eoperator op, struct expression * const *args)
{
int i;
struct expression *newp;
@@ -104,16 +101,13 @@ new_exp (nargs, op, args)
}
static inline struct expression *
-new_exp_0 (op)
- enum operator op;
+new_exp_0 (enum eoperator op)
{
return new_exp (0, op, NULL);
}
static inline struct expression *
-new_exp_1 (op, right)
- enum operator op;
- struct expression *right;
+new_exp_1 (enum eoperator op, struct expression *right)
{
struct expression *args[1];
@@ -122,10 +116,7 @@ new_exp_1 (op, right)
}
static struct expression *
-new_exp_2 (op, left, right)
- enum operator op;
- struct expression *left;
- struct expression *right;
+new_exp_2 (enum eoperator op, struct expression *left, struct expression *right)
{
struct expression *args[2];
@@ -135,11 +126,8 @@ new_exp_2 (op, left, right)
}
static inline struct expression *
-new_exp_3 (op, bexp, tbranch, fbranch)
- enum operator op;
- struct expression *bexp;
- struct expression *tbranch;
- struct expression *fbranch;
+new_exp_3 (enum eoperator op, struct expression *bexp,
+ struct expression *tbranch, struct expression *fbranch)
{
struct expression *args[3];
@@ -230,8 +218,7 @@ exp: exp '?' exp ':' exp
void
internal_function
-FREE_EXPRESSION (exp)
- struct expression *exp;
+FREE_EXPRESSION (struct expression *exp)
{
if (exp == NULL)
return;
@@ -257,9 +244,7 @@ FREE_EXPRESSION (exp)
static int
-yylex (lval, pexp)
- YYSTYPE *lval;
- const char **pexp;
+yylex (YYSTYPE *lval, const char **pexp)
{
const char *exp = *pexp;
int result;
@@ -402,8 +387,7 @@ yylex (lval, pexp)
static void
-yyerror (str)
- const char *str;
+yyerror (const char *str)
{
/* Do nothing. We don't print error messages here. */
}
diff --git a/intl/textdomain.c b/intl/textdomain.c
index a06d129f31f..50650cafc4f 100644
--- a/intl/textdomain.c
+++ b/intl/textdomain.c
@@ -77,8 +77,7 @@ __libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
char *
-TEXTDOMAIN (domainname)
- const char *domainname;
+TEXTDOMAIN (const char *domainname)
{
char *new_domain;
char *old_domain;
diff --git a/libiberty/argv.c b/libiberty/argv.c
index 11ca549a8ea..e76c1f825d2 100644
--- a/libiberty/argv.c
+++ b/libiberty/argv.c
@@ -312,9 +312,7 @@ operating system to free the memory when the program exits.
*/
void
-expandargv (argcp, argvp)
- int *argcp;
- char ***argvp;
+expandargv (int *argcp, char ***argvp)
{
/* The argument we are currently processing. */
int i = 0;
diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c
index 0bbb8ed9889..f28935d2ac8 100644
--- a/libiberty/floatformat.c
+++ b/libiberty/floatformat.c
@@ -40,6 +40,10 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#include "libiberty.h"
#include "floatformat.h"
+#ifdef __APPLE__
+#undef INFINITY
+#define INFINITY 1e38f
+#else
#ifndef INFINITY
#ifdef HUGE_VAL
#define INFINITY HUGE_VAL
@@ -47,6 +51,7 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define INFINITY (1.0 / 0.0)
#endif
#endif
+#endif
#ifndef NAN
#ifdef DBL_QNAN
diff --git a/libiberty/strncmp.c b/libiberty/strncmp.c
index 916c2f07a8a..2fdea25c04b 100644
--- a/libiberty/strncmp.c
+++ b/libiberty/strncmp.c
@@ -15,6 +15,7 @@ Compares the first @var{n} bytes of two strings, returning a value as
#include <ansidecl.h>
#include <stddef.h>
+#ifndef __APPLE__
int
strncmp(const char *s1, const char *s2, register size_t n)
{
@@ -31,3 +32,4 @@ strncmp(const char *s1, const char *s2, register size_t n)
}
return 0;
}
+#endif
diff --git a/libiberty/strverscmp.c b/libiberty/strverscmp.c
index 04e1e4ae99e..b1ec5eb5502 100644
--- a/libiberty/strverscmp.c
+++ b/libiberty/strverscmp.c
@@ -86,6 +86,13 @@ because filenames frequently hold indices/version numbers.
returning less than, equal to or greater than zero if S1 is less than,
equal to or greater than S2 (for more info, see the Glibc texinfo doc). */
+#ifdef __cplusplus
+extern "C"
+#else
+extern
+#endif
+int strverscmp (const char *, const char *);
+
int
strverscmp (const char *s1, const char *s2)
{
diff --git a/zlib/adler32.c b/zlib/adler32.c
index 2aec8514131..af346d85491 100644
--- a/zlib/adler32.c
+++ b/zlib/adler32.c
@@ -54,10 +54,7 @@
#endif
/* ========================================================================= */
-uLong ZEXPORT adler32(adler, buf, len)
- uLong adler;
- const Bytef *buf;
- uInt len;
+uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len)
{
unsigned long sum2;
unsigned n;
@@ -125,10 +122,7 @@ uLong ZEXPORT adler32(adler, buf, len)
}
/* ========================================================================= */
-uLong ZEXPORT adler32_combine(adler1, adler2, len2)
- uLong adler1;
- uLong adler2;
- z_off_t len2;
+uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2)
{
unsigned long sum1;
unsigned long sum2;
diff --git a/zlib/compress.c b/zlib/compress.c
index 08f276718fa..2ef4063dff3 100644
--- a/zlib/compress.c
+++ b/zlib/compress.c
@@ -19,12 +19,8 @@
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
Z_STREAM_ERROR if the level parameter is invalid.
*/
-int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
- uLong sourceLen;
- int level;
+int ZEXPORT compress2 (Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen, int level)
{
z_stream stream;
int err;
@@ -59,11 +55,8 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
/* ===========================================================================
*/
-int ZEXPORT compress (dest, destLen, source, sourceLen)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
- uLong sourceLen;
+int ZEXPORT compress (Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen)
{
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
}
@@ -72,8 +65,7 @@ int ZEXPORT compress (dest, destLen, source, sourceLen)
If the default memLevel or windowBits for deflateInit() is changed, then
this function needs to be updated.
*/
-uLong ZEXPORT compressBound (sourceLen)
- uLong sourceLen;
+uLong ZEXPORT compressBound (uLong sourceLen)
{
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
}
diff --git a/zlib/crc32.c b/zlib/crc32.c
index 0a85d9925e9..c7d405ca937 100644
--- a/zlib/crc32.c
+++ b/zlib/crc32.c
@@ -216,10 +216,8 @@ const unsigned long FAR * ZEXPORT get_crc_table()
#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
/* ========================================================================= */
-unsigned long ZEXPORT crc32(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- unsigned len;
+unsigned long ZEXPORT crc32(unsigned long crc,
+ const unsigned char FAR *buf, unsigned len)
{
if (buf == Z_NULL) return 0UL;
@@ -259,10 +257,8 @@ unsigned long ZEXPORT crc32(crc, buf, len)
#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
/* ========================================================================= */
-local unsigned long crc32_little(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- unsigned len;
+local unsigned long crc32_little(unsigned long crc,
+ const unsigned char FAR *buf, unsigned len)
{
register u4 c;
register const u4 FAR *buf4;
@@ -299,10 +295,8 @@ local unsigned long crc32_little(crc, buf, len)
#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
/* ========================================================================= */
-local unsigned long crc32_big(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- unsigned len;
+local unsigned long crc32_big(unsigned long crc,
+ const unsigned char FAR *buf, unsigned len)
{
register u4 c;
register const u4 FAR *buf4;
@@ -339,9 +333,7 @@ local unsigned long crc32_big(crc, buf, len)
#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */
/* ========================================================================= */
-local unsigned long gf2_matrix_times(mat, vec)
- unsigned long *mat;
- unsigned long vec;
+local unsigned long gf2_matrix_times(unsigned long *mat, unsigned long vec)
{
unsigned long sum;
@@ -356,9 +348,7 @@ local unsigned long gf2_matrix_times(mat, vec)
}
/* ========================================================================= */
-local void gf2_matrix_square(square, mat)
- unsigned long *square;
- unsigned long *mat;
+local void gf2_matrix_square(unsigned long *square, unsigned long *mat)
{
int n;
@@ -367,10 +357,7 @@ local void gf2_matrix_square(square, mat)
}
/* ========================================================================= */
-uLong ZEXPORT crc32_combine(crc1, crc2, len2)
- uLong crc1;
- uLong crc2;
- z_off_t len2;
+uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2)
{
int n;
unsigned long row;
diff --git a/zlib/deflate.c b/zlib/deflate.c
index 1febd40adb2..39f199be68c 100644
--- a/zlib/deflate.c
+++ b/zlib/deflate.c
@@ -201,11 +201,8 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
/* ========================================================================= */
-int ZEXPORT deflateInit_(strm, level, version, stream_size)
- z_streamp strm;
- int level;
- const char *version;
- int stream_size;
+int ZEXPORT deflateInit_(z_streamp strm, int level,
+ const char *version, int stream_size)
{
return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
Z_DEFAULT_STRATEGY, version, stream_size);
@@ -213,16 +210,9 @@ int ZEXPORT deflateInit_(strm, level, version, stream_size)
}
/* ========================================================================= */
-int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
- version, stream_size)
- z_streamp strm;
- int level;
- int method;
- int windowBits;
- int memLevel;
- int strategy;
- const char *version;
- int stream_size;
+int ZEXPORT deflateInit2_(z_streamp strm, int level,
+ int method, int windowBits, int memLevel,
+ int strategy, const char *version, int stream_size)
{
deflate_state *s;
int wrap = 1;
@@ -312,10 +302,8 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
}
/* ========================================================================= */
-int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
- z_streamp strm;
- const Bytef *dictionary;
- uInt dictLength;
+int ZEXPORT deflateSetDictionary (z_streamp strm,
+ const Bytef *dictionary, uInt dictLength)
{
deflate_state *s;
uInt length = dictLength;
@@ -354,8 +342,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
}
/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
- z_streamp strm;
+int ZEXPORT deflateReset (z_streamp strm)
{
deflate_state *s;
@@ -390,9 +377,7 @@ int ZEXPORT deflateReset (strm)
}
/* ========================================================================= */
-int ZEXPORT deflateSetHeader (strm, head)
- z_streamp strm;
- gz_headerp head;
+int ZEXPORT deflateSetHeader (z_streamp strm, gz_headerp head)
{
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
if (strm->state->wrap != 2) return Z_STREAM_ERROR;
@@ -401,10 +386,7 @@ int ZEXPORT deflateSetHeader (strm, head)
}
/* ========================================================================= */
-int ZEXPORT deflatePrime (strm, bits, value)
- z_streamp strm;
- int bits;
- int value;
+int ZEXPORT deflatePrime (z_streamp strm, int bits, int value)
{
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
strm->state->bi_valid = bits;
@@ -413,10 +395,7 @@ int ZEXPORT deflatePrime (strm, bits, value)
}
/* ========================================================================= */
-int ZEXPORT deflateParams(strm, level, strategy)
- z_streamp strm;
- int level;
- int strategy;
+int ZEXPORT deflateParams(z_streamp strm, int level, int strategy)
{
deflate_state *s;
compress_func func;
@@ -451,12 +430,8 @@ int ZEXPORT deflateParams(strm, level, strategy)
}
/* ========================================================================= */
-int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
- z_streamp strm;
- int good_length;
- int max_lazy;
- int nice_length;
- int max_chain;
+int ZEXPORT deflateTune(z_streamp strm, int good_length, int max_lazy,
+ int nice_length, int max_chain)
{
deflate_state *s;
@@ -486,9 +461,7 @@ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
* But even the conservative upper bound of about 14% expansion does not
* seem onerous for output buffer allocation.
*/
-uLong ZEXPORT deflateBound(strm, sourceLen)
- z_streamp strm;
- uLong sourceLen;
+uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen)
{
deflate_state *s;
uLong destLen;
@@ -515,9 +488,7 @@ uLong ZEXPORT deflateBound(strm, sourceLen)
* IN assertion: the stream state is correct and there is enough room in
* pending_buf.
*/
-local void putShortMSB (s, b)
- deflate_state *s;
- uInt b;
+local void putShortMSB (deflate_state *s, uInt b)
{
put_byte(s, (Byte)(b >> 8));
put_byte(s, (Byte)(b & 0xff));
@@ -529,8 +500,7 @@ local void putShortMSB (s, b)
* to avoid allocating a large strm->next_out buffer and copying into it.
* (See also read_buf()).
*/
-local void flush_pending(strm)
- z_streamp strm;
+local void flush_pending(z_streamp strm)
{
unsigned len = strm->state->pending;
@@ -549,9 +519,7 @@ local void flush_pending(strm)
}
/* ========================================================================= */
-int ZEXPORT deflate (strm, flush)
- z_streamp strm;
- int flush;
+int ZEXPORT deflate (z_streamp strm, int flush)
{
int old_flush; /* value of flush param for previous deflate call */
deflate_state *s;
@@ -856,8 +824,7 @@ int ZEXPORT deflate (strm, flush)
}
/* ========================================================================= */
-int ZEXPORT deflateEnd (strm)
- z_streamp strm;
+int ZEXPORT deflateEnd (z_streamp strm)
{
int status;
@@ -891,9 +858,7 @@ int ZEXPORT deflateEnd (strm)
* To simplify the source, this is not supported for 16-bit MSDOS (which
* doesn't have enough memory anyway to duplicate compression states).
*/
-int ZEXPORT deflateCopy (dest, source)
- z_streamp dest;
- z_streamp source;
+int ZEXPORT deflateCopy (z_streamp dest, z_streamp source)
{
#ifdef MAXSEG_64K
return Z_STREAM_ERROR;
@@ -953,10 +918,7 @@ int ZEXPORT deflateCopy (dest, source)
* allocating a large strm->next_in buffer and copying from it.
* (See also flush_pending()).
*/
-local int read_buf(strm, buf, size)
- z_streamp strm;
- Bytef *buf;
- unsigned size;
+local int read_buf(z_streamp strm, Bytef *buf, unsigned size)
{
unsigned len = strm->avail_in;
@@ -983,8 +945,7 @@ local int read_buf(strm, buf, size)
/* ===========================================================================
* Initialize the "longest match" routines for a new zlib stream
*/
-local void lm_init (s)
- deflate_state *s;
+local void lm_init (deflate_state *s)
{
s->window_size = (ulg)2L*s->w_size;
@@ -1024,9 +985,7 @@ local void lm_init (s)
/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
* match.S. The code will be functionally equivalent.
*/
-local uInt longest_match(s, cur_match)
- deflate_state *s;
- IPos cur_match; /* current match */
+local uInt longest_match(deflate_state *s, IPos cur_match) /* current match */
{
unsigned chain_length = s->max_chain_length;/* max hash chain length */
register Bytef *scan = s->window + s->strstart; /* current string */
@@ -1172,9 +1131,7 @@ local uInt longest_match(s, cur_match)
/* ---------------------------------------------------------------------------
* Optimized version for level == 1 or strategy == Z_RLE only
*/
-local uInt longest_match_fast(s, cur_match)
- deflate_state *s;
- IPos cur_match; /* current match */
+local uInt longest_match_fast(deflate_state *s, IPos cur_match) /* current match */
{
register Bytef *scan = s->window + s->strstart; /* current string */
register Bytef *match; /* matched string */
@@ -1263,8 +1220,7 @@ local void check_match(s, start, match, length)
* performed for at least two bytes (required for the zip translate_eol
* option -- not supported here).
*/
-local void fill_window(s)
- deflate_state *s;
+local void fill_window(deflate_state *s)
{
register unsigned n, m;
register Posf *p;
@@ -1387,9 +1343,7 @@ local void fill_window(s)
* NOTE: this function should be optimized to avoid extra copying from
* window to pending_buf.
*/
-local block_state deflate_stored(s, flush)
- deflate_state *s;
- int flush;
+local block_state deflate_stored(deflate_state *s, int flush)
{
/* Stored blocks are limited to 0xffff bytes, pending_buf is limited
* to pending_buf_size, and each stored block has a 5 byte header:
@@ -1445,9 +1399,7 @@ local block_state deflate_stored(s, flush)
* new strings in the dictionary only for unmatched strings or for short
* matches. It is used only for the fast compression options.
*/
-local block_state deflate_fast(s, flush)
- deflate_state *s;
- int flush;
+local block_state deflate_fast(deflate_state *s, int flush)
{
IPos hash_head = NIL; /* head of the hash chain */
int bflush; /* set if current block must be flushed */
@@ -1551,9 +1503,7 @@ local block_state deflate_fast(s, flush)
* evaluation for matches: a match is finally adopted only if there is
* no better match at the next window position.
*/
-local block_state deflate_slow(s, flush)
- deflate_state *s;
- int flush;
+local block_state deflate_slow(deflate_state *s, int flush)
{
IPos hash_head = NIL; /* head of hash chain */
int bflush; /* set if current block must be flushed */
diff --git a/zlib/gzio.c b/zlib/gzio.c
index a35877440f5..a6f70b5fb79 100644
--- a/zlib/gzio.c
+++ b/zlib/gzio.c
@@ -90,10 +90,7 @@ local uLong getLong OF((gz_stream *s));
can be checked to distinguish the two cases (if errno is zero, the
zlib error is Z_MEM_ERROR).
*/
-local gzFile gz_open (path, mode, fd)
- const char *path;
- const char *mode;
- int fd;
+local gzFile gz_open (const char *path, const char *mode, int fd)
{
int err;
int level = Z_DEFAULT_COMPRESSION; /* compression level */
@@ -205,9 +202,7 @@ local gzFile gz_open (path, mode, fd)
/* ===========================================================================
Opens a gzip (.gz) file for reading or writing.
*/
-gzFile ZEXPORT gzopen (path, mode)
- const char *path;
- const char *mode;
+gzFile ZEXPORT gzopen (const char *path, const char *mode)
{
return gz_open (path, mode, -1);
}
@@ -216,9 +211,7 @@ gzFile ZEXPORT gzopen (path, mode)
Associate a gzFile with the file descriptor fd. fd is not dup'ed here
to mimic the behavio(u)r of fdopen.
*/
-gzFile ZEXPORT gzdopen (fd, mode)
- int fd;
- const char *mode;
+gzFile ZEXPORT gzdopen (int fd, const char *mode)
{
char name[46]; /* allow for up to 128-bit integers */
@@ -231,10 +224,7 @@ gzFile ZEXPORT gzdopen (fd, mode)
/* ===========================================================================
* Update the compression level and strategy
*/
-int ZEXPORT gzsetparams (file, level, strategy)
- gzFile file;
- int level;
- int strategy;
+int ZEXPORT gzsetparams (gzFile file, int level, int strategy)
{
gz_stream *s = (gz_stream*)file;
@@ -258,8 +248,7 @@ int ZEXPORT gzsetparams (file, level, strategy)
for end of file.
IN assertion: the stream s has been sucessfully opened for reading.
*/
-local int get_byte(s)
- gz_stream *s;
+local int get_byte(gz_stream *s)
{
if (s->z_eof) return EOF;
if (s->stream.avail_in == 0) {
@@ -285,8 +274,7 @@ local int get_byte(s)
s->stream.avail_in is zero for the first time, but may be non-zero
for concatenated .gz files.
*/
-local void check_header(s)
- gz_stream *s;
+local void check_header(gz_stream *s)
{
int method; /* method byte */
int flags; /* flags byte */
@@ -352,8 +340,7 @@ local void check_header(s)
* Cleanup then free the given gz_stream. Return a zlib error code.
Try freeing in the reverse order of allocations.
*/
-local int destroy (s)
- gz_stream *s;
+local int destroy (gz_stream *s)
{
int err = Z_OK;
@@ -391,10 +378,7 @@ local int destroy (s)
Reads the given number of uncompressed bytes from the compressed file.
gzread returns the number of bytes actually read (0 for end of file).
*/
-int ZEXPORT gzread (file, buf, len)
- gzFile file;
- voidp buf;
- unsigned len;
+int ZEXPORT gzread (gzFile file, voidp buf, unsigned len)
{
gz_stream *s = (gz_stream*)file;
Bytef *start = (Bytef*)buf; /* starting point for crc computation */
@@ -500,8 +484,7 @@ int ZEXPORT gzread (file, buf, len)
Reads one byte from the compressed file. gzgetc returns this byte
or -1 in case of end of file or error.
*/
-int ZEXPORT gzgetc(file)
- gzFile file;
+int ZEXPORT gzgetc(gzFile file)
{
unsigned char c;
@@ -512,9 +495,7 @@ int ZEXPORT gzgetc(file)
/* ===========================================================================
Push one byte back onto the stream.
*/
-int ZEXPORT gzungetc(c, file)
- int c;
- gzFile file;
+int ZEXPORT gzungetc(int c, gzFile file)
{
gz_stream *s = (gz_stream*)file;
@@ -537,10 +518,7 @@ int ZEXPORT gzungetc(c, file)
The current implementation is not optimized at all.
*/
-char * ZEXPORT gzgets(file, buf, len)
- gzFile file;
- char *buf;
- int len;
+char * ZEXPORT gzgets(gzFile file, char *buf, int len)
{
char *b = buf;
if (buf == Z_NULL || len <= 0) return Z_NULL;
@@ -556,10 +534,7 @@ char * ZEXPORT gzgets(file, buf, len)
Writes the given number of uncompressed bytes into the compressed file.
gzwrite returns the number of bytes actually written (0 in case of error).
*/
-int ZEXPORT gzwrite (file, buf, len)
- gzFile file;
- voidpc buf;
- unsigned len;
+int ZEXPORT gzwrite (gzFile file, voidpc buf, unsigned len)
{
gz_stream *s = (gz_stream*)file;
@@ -675,9 +650,7 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
Writes c, converted to an unsigned char, into the compressed file.
gzputc returns the value that was written, or -1 in case of error.
*/
-int ZEXPORT gzputc(file, c)
- gzFile file;
- int c;
+int ZEXPORT gzputc(gzFile file, int c)
{
unsigned char cc = (unsigned char) c; /* required for big endian systems */
@@ -690,9 +663,7 @@ int ZEXPORT gzputc(file, c)
the terminating null character.
gzputs returns the number of characters written, or -1 in case of error.
*/
-int ZEXPORT gzputs(file, s)
- gzFile file;
- const char *s;
+int ZEXPORT gzputs(gzFile file, const char *s)
{
return gzwrite(file, (char*)s, (unsigned)strlen(s));
}
@@ -702,9 +673,7 @@ int ZEXPORT gzputs(file, s)
Flushes all pending output into the compressed file. The parameter
flush is as in the deflate() function.
*/
-local int do_flush (file, flush)
- gzFile file;
- int flush;
+local int do_flush (gzFile file, int flush)
{
uInt len;
int done = 0;
@@ -743,9 +712,7 @@ local int do_flush (file, flush)
return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
}
-int ZEXPORT gzflush (file, flush)
- gzFile file;
- int flush;
+int ZEXPORT gzflush (gzFile file, int flush)
{
gz_stream *s = (gz_stream*)file;
int err = do_flush (file, flush);
@@ -764,10 +731,7 @@ int ZEXPORT gzflush (file, flush)
SEEK_END is not implemented, returns error.
In this version of the library, gzseek can be extremely slow.
*/
-z_off_t ZEXPORT gzseek (file, offset, whence)
- gzFile file;
- z_off_t offset;
- int whence;
+z_off_t ZEXPORT gzseek (gzFile file, z_off_t offset, int whence)
{
gz_stream *s = (gz_stream*)file;
@@ -854,8 +818,7 @@ z_off_t ZEXPORT gzseek (file, offset, whence)
/* ===========================================================================
Rewinds input file.
*/
-int ZEXPORT gzrewind (file)
- gzFile file;
+int ZEXPORT gzrewind (gzFile file)
{
gz_stream *s = (gz_stream*)file;
@@ -878,8 +841,7 @@ int ZEXPORT gzrewind (file)
given compressed file. This position represents a number of bytes in the
uncompressed data stream.
*/
-z_off_t ZEXPORT gztell (file)
- gzFile file;
+z_off_t ZEXPORT gztell (gzFile file)
{
return gzseek(file, 0L, SEEK_CUR);
}
@@ -888,8 +850,7 @@ z_off_t ZEXPORT gztell (file)
Returns 1 when EOF has previously been detected reading the given
input stream, otherwise zero.
*/
-int ZEXPORT gzeof (file)
- gzFile file;
+int ZEXPORT gzeof (gzFile file)
{
gz_stream *s = (gz_stream*)file;
@@ -905,8 +866,7 @@ int ZEXPORT gzeof (file)
/* ===========================================================================
Returns 1 if reading and doing so transparently, otherwise zero.
*/
-int ZEXPORT gzdirect (file)
- gzFile file;
+int ZEXPORT gzdirect (gzFile file)
{
gz_stream *s = (gz_stream*)file;
@@ -917,9 +877,7 @@ int ZEXPORT gzdirect (file)
/* ===========================================================================
Outputs a long in LSB order to the given file
*/
-local void putLong (file, x)
- FILE *file;
- uLong x;
+local void putLong (FILE *file, uLong x)
{
int n;
for (n = 0; n < 4; n++) {
@@ -932,8 +890,7 @@ local void putLong (file, x)
Reads a long in LSB order from the given gz_stream. Sets z_err in case
of error.
*/
-local uLong getLong (s)
- gz_stream *s;
+local uLong getLong (gz_stream *s)
{
uLong x = (uLong)get_byte(s);
int c;
@@ -950,8 +907,7 @@ local uLong getLong (s)
Flushes all pending output if necessary, closes the compressed file
and deallocates all the (de)compression state.
*/
-int ZEXPORT gzclose (file)
- gzFile file;
+int ZEXPORT gzclose (gzFile file)
{
gz_stream *s = (gz_stream*)file;
@@ -984,9 +940,7 @@ int ZEXPORT gzclose (file)
errnum is set to Z_ERRNO and the application may consult errno
to get the exact error code.
*/
-const char * ZEXPORT gzerror (file, errnum)
- gzFile file;
- int *errnum;
+const char * ZEXPORT gzerror (gzFile file, int *errnum)
{
char *m;
gz_stream *s = (gz_stream*)file;
@@ -1014,8 +968,7 @@ const char * ZEXPORT gzerror (file, errnum)
/* ===========================================================================
Clear the error and end-of-file flags, and do the same for the real file.
*/
-void ZEXPORT gzclearerr (file)
- gzFile file;
+void ZEXPORT gzclearerr (gzFile file)
{
gz_stream *s = (gz_stream*)file;
diff --git a/zlib/infback.c b/zlib/infback.c
index 455dbc9ee84..e3a2345d261 100644
--- a/zlib/infback.c
+++ b/zlib/infback.c
@@ -25,12 +25,8 @@ local void fixedtables OF((struct inflate_state FAR *state));
windowBits is in the range 8..15, and window is a user-supplied
window and output buffer that is 2**windowBits bytes.
*/
-int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
-z_streamp strm;
-int windowBits;
-unsigned char FAR *window;
-const char *version;
-int stream_size;
+int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
+ unsigned char FAR *window, const char *version, int stream_size)
{
struct inflate_state FAR *state;
@@ -70,8 +66,7 @@ int stream_size;
used for threaded applications, since the rewriting of the tables and virgin
may not be thread-safe.
*/
-local void fixedtables(state)
-struct inflate_state FAR *state;
+local void fixedtables(struct inflate_state FAR *state)
{
#ifdef BUILDFIXED
static int virgin = 1;
@@ -238,12 +233,8 @@ struct inflate_state FAR *state;
inflateBack() can also return Z_STREAM_ERROR if the input parameters
are not correct, i.e. strm is Z_NULL or the state was not initialized.
*/
-int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
-z_streamp strm;
-in_func in;
-void FAR *in_desc;
-out_func out;
-void FAR *out_desc;
+int ZEXPORT inflateBack(z_streamp strm, in_func in, void FAR *in_desc,
+ out_func out, void FAR *out_desc)
{
struct inflate_state FAR *state;
unsigned char FAR *next; /* next input */
@@ -253,7 +244,7 @@ void FAR *out_desc;
unsigned bits; /* bits in bit buffer */
unsigned copy; /* number of stored or match bytes to copy */
unsigned char FAR *from; /* where to copy match bytes from */
- code this; /* current decoding table entry */
+ code it; /* current decoding table entry */
code last; /* parent table entry */
unsigned len; /* length to copy for repeats, bits to drop */
int ret; /* return code */
@@ -389,19 +380,19 @@ void FAR *out_desc;
state->have = 0;
while (state->have < state->nlen + state->ndist) {
for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ it = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(it.bits) <= bits) break;
PULLBYTE();
}
- if (this.val < 16) {
- NEEDBITS(this.bits);
- DROPBITS(this.bits);
- state->lens[state->have++] = this.val;
+ if (it.val < 16) {
+ NEEDBITS(it.bits);
+ DROPBITS(it.bits);
+ state->lens[state->have++] = it.val;
}
else {
- if (this.val == 16) {
- NEEDBITS(this.bits + 2);
- DROPBITS(this.bits);
+ if (it.val == 16) {
+ NEEDBITS(it.bits + 2);
+ DROPBITS(it.bits);
if (state->have == 0) {
strm->msg = (char *)"invalid bit length repeat";
state->mode = BAD;
@@ -411,16 +402,16 @@ void FAR *out_desc;
copy = 3 + BITS(2);
DROPBITS(2);
}
- else if (this.val == 17) {
- NEEDBITS(this.bits + 3);
- DROPBITS(this.bits);
+ else if (it.val == 17) {
+ NEEDBITS(it.bits + 3);
+ DROPBITS(it.bits);
len = 0;
copy = 3 + BITS(3);
DROPBITS(3);
}
else {
- NEEDBITS(this.bits + 7);
- DROPBITS(this.bits);
+ NEEDBITS(it.bits + 7);
+ DROPBITS(it.bits);
len = 0;
copy = 11 + BITS(7);
DROPBITS(7);
@@ -474,28 +465,28 @@ void FAR *out_desc;
/* get a literal, length, or end-of-block code */
for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ it = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(it.bits) <= bits) break;
PULLBYTE();
}
- if (this.op && (this.op & 0xf0) == 0) {
- last = this;
+ if (it.op && (it.op & 0xf0) == 0) {
+ last = it;
for (;;) {
- this = state->lencode[last.val +
+ it = state->lencode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
+ if ((unsigned)(last.bits + it.bits) <= bits) break;
PULLBYTE();
}
DROPBITS(last.bits);
}
- DROPBITS(this.bits);
- state->length = (unsigned)this.val;
+ DROPBITS(it.bits);
+ state->length = (unsigned)it.val;
/* process literal */
- if (this.op == 0) {
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ if (it.op == 0) {
+ Tracevv((stderr, it.val >= 0x20 && it.val < 0x7f ?
"inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
+ "inflate: literal 0x%02x\n", it.val));
ROOM();
*put++ = (unsigned char)(state->length);
left--;
@@ -504,21 +495,21 @@ void FAR *out_desc;
}
/* process end of block */
- if (this.op & 32) {
+ if (it.op & 32) {
Tracevv((stderr, "inflate: end of block\n"));
state->mode = TYPE;
break;
}
/* invalid code */
- if (this.op & 64) {
+ if (it.op & 64) {
strm->msg = (char *)"invalid literal/length code";
state->mode = BAD;
break;
}
/* length code -- get extra bits, if any */
- state->extra = (unsigned)(this.op) & 15;
+ state->extra = (unsigned)(it.op) & 15;
if (state->extra != 0) {
NEEDBITS(state->extra);
state->length += BITS(state->extra);
@@ -528,30 +519,30 @@ void FAR *out_desc;
/* get distance code */
for (;;) {
- this = state->distcode[BITS(state->distbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ it = state->distcode[BITS(state->distbits)];
+ if ((unsigned)(it.bits) <= bits) break;
PULLBYTE();
}
- if ((this.op & 0xf0) == 0) {
- last = this;
+ if ((it.op & 0xf0) == 0) {
+ last = it;
for (;;) {
- this = state->distcode[last.val +
+ it = state->distcode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
+ if ((unsigned)(last.bits + it.bits) <= bits) break;
PULLBYTE();
}
DROPBITS(last.bits);
}
- DROPBITS(this.bits);
- if (this.op & 64) {
+ DROPBITS(it.bits);
+ if (it.op & 64) {
strm->msg = (char *)"invalid distance code";
state->mode = BAD;
break;
}
- state->offset = (unsigned)this.val;
+ state->offset = (unsigned)it.val;
/* get distance extra bits, if any */
- state->extra = (unsigned)(this.op) & 15;
+ state->extra = (unsigned)(it.op) & 15;
if (state->extra != 0) {
NEEDBITS(state->extra);
state->offset += BITS(state->extra);
@@ -611,8 +602,7 @@ void FAR *out_desc;
return ret;
}
-int ZEXPORT inflateBackEnd(strm)
-z_streamp strm;
+int ZEXPORT inflateBackEnd(z_streamp strm)
{
if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
return Z_STREAM_ERROR;
diff --git a/zlib/inffast.c b/zlib/inffast.c
index bbee92ed1e6..a18de8abdc5 100644
--- a/zlib/inffast.c
+++ b/zlib/inffast.c
@@ -64,9 +64,7 @@
requires strm->avail_out >= 258 for each loop to avoid checking for
output space.
*/
-void inflate_fast(strm, start)
-z_streamp strm;
-unsigned start; /* inflate()'s starting value for strm->avail_out */
+void inflate_fast(z_streamp strm, unsigned start) /* inflate()'s starting value for strm->avail_out */
{
struct inflate_state FAR *state;
unsigned char FAR *in; /* local strm->next_in */
@@ -87,7 +85,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
code const FAR *dcode; /* local strm->distcode */
unsigned lmask; /* mask for first level of length codes */
unsigned dmask; /* mask for first level of distance codes */
- code this; /* retrieved table entry */
+ code it; /* retrieved table entry */
unsigned op; /* code bits, operation, extra bits, or */
/* window position, window bytes to copy */
unsigned len; /* match length, unused bytes */
@@ -124,20 +122,20 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
}
- this = lcode[hold & lmask];
+ it = lcode[hold & lmask];
dolen:
- op = (unsigned)(this.bits);
+ op = (unsigned)(it.bits);
hold >>= op;
bits -= op;
- op = (unsigned)(this.op);
+ op = (unsigned)(it.op);
if (op == 0) { /* literal */
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ Tracevv((stderr, it.val >= 0x20 && it.val < 0x7f ?
"inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
- PUP(out) = (unsigned char)(this.val);
+ "inflate: literal 0x%02x\n", it.val));
+ PUP(out) = (unsigned char)(it.val);
}
else if (op & 16) { /* length base */
- len = (unsigned)(this.val);
+ len = (unsigned)(it.val);
op &= 15; /* number of extra bits */
if (op) {
if (bits < op) {
@@ -155,14 +153,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
}
- this = dcode[hold & dmask];
+ it = dcode[hold & dmask];
dodist:
- op = (unsigned)(this.bits);
+ op = (unsigned)(it.bits);
hold >>= op;
bits -= op;
- op = (unsigned)(this.op);
+ op = (unsigned)(it.op);
if (op & 16) { /* distance base */
- dist = (unsigned)(this.val);
+ dist = (unsigned)(it.val);
op &= 15; /* number of extra bits */
if (bits < op) {
hold += (unsigned long)(PUP(in)) << bits;
@@ -259,7 +257,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
}
else if ((op & 64) == 0) { /* 2nd level distance code */
- this = dcode[this.val + (hold & ((1U << op) - 1))];
+ it = dcode[it.val + (hold & ((1U << op) - 1))];
goto dodist;
}
else {
@@ -269,7 +267,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
}
else if ((op & 64) == 0) { /* 2nd level length code */
- this = lcode[this.val + (hold & ((1U << op) - 1))];
+ it = lcode[it.val + (hold & ((1U << op) - 1))];
goto dolen;
}
else if (op & 32) { /* end-of-block */
diff --git a/zlib/inflate.c b/zlib/inflate.c
index 792fdee8e9c..eb0910f09ee 100644
--- a/zlib/inflate.c
+++ b/zlib/inflate.c
@@ -100,8 +100,7 @@ local int updatewindow OF((z_streamp strm, unsigned out));
local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
unsigned len));
-int ZEXPORT inflateReset(strm)
-z_streamp strm;
+int ZEXPORT inflateReset(z_streamp strm)
{
struct inflate_state FAR *state;
@@ -125,10 +124,7 @@ z_streamp strm;
return Z_OK;
}
-int ZEXPORT inflatePrime(strm, bits, value)
-z_streamp strm;
-int bits;
-int value;
+int ZEXPORT inflatePrime(z_streamp strm, int bits, int value)
{
struct inflate_state FAR *state;
@@ -141,11 +137,8 @@ int value;
return Z_OK;
}
-int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
-z_streamp strm;
-int windowBits;
-const char *version;
-int stream_size;
+int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, const char *version,
+ int stream_size)
{
struct inflate_state FAR *state;
@@ -184,10 +177,7 @@ int stream_size;
return inflateReset(strm);
}
-int ZEXPORT inflateInit_(strm, version, stream_size)
-z_streamp strm;
-const char *version;
-int stream_size;
+int ZEXPORT inflateInit_(z_streamp strm, const char *version, int stream_size)
{
return inflateInit2_(strm, DEF_WBITS, version, stream_size);
}
@@ -202,8 +192,7 @@ int stream_size;
used for threaded applications, since the rewriting of the tables and virgin
may not be thread-safe.
*/
-local void fixedtables(state)
-struct inflate_state FAR *state;
+local void fixedtables(struct inflate_state FAR *state)
{
#ifdef BUILDFIXED
static int virgin = 1;
@@ -320,9 +309,7 @@ void makefixed()
output will fall in the output data, making match copies simpler and faster.
The advantage may be dependent on the size of the processor's data caches.
*/
-local int updatewindow(strm, out)
-z_streamp strm;
-unsigned out;
+local int updatewindow(z_streamp strm, unsigned out)
{
struct inflate_state FAR *state;
unsigned copy, dist;
@@ -551,9 +538,7 @@ unsigned out;
will return Z_BUF_ERROR if it has not reached the end of the stream.
*/
-int ZEXPORT inflate(strm, flush)
-z_streamp strm;
-int flush;
+int ZEXPORT inflate(z_streamp strm, int flush)
{
struct inflate_state FAR *state;
unsigned char FAR *next; /* next input */
@@ -564,7 +549,7 @@ int flush;
unsigned in, out; /* save starting available input and output */
unsigned copy; /* number of stored or match bytes to copy */
unsigned char FAR *from; /* where to copy match bytes from */
- code this; /* current decoding table entry */
+ code it; /* current decoding table entry */
code last; /* parent table entry */
unsigned len; /* length to copy for repeats, bits to drop */
int ret; /* return code */
@@ -876,19 +861,19 @@ int flush;
case CODELENS:
while (state->have < state->nlen + state->ndist) {
for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ it = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(it.bits) <= bits) break;
PULLBYTE();
}
- if (this.val < 16) {
- NEEDBITS(this.bits);
- DROPBITS(this.bits);
- state->lens[state->have++] = this.val;
+ if (it.val < 16) {
+ NEEDBITS(it.bits);
+ DROPBITS(it.bits);
+ state->lens[state->have++] = it.val;
}
else {
- if (this.val == 16) {
- NEEDBITS(this.bits + 2);
- DROPBITS(this.bits);
+ if (it.val == 16) {
+ NEEDBITS(it.bits + 2);
+ DROPBITS(it.bits);
if (state->have == 0) {
strm->msg = (char *)"invalid bit length repeat";
state->mode = BAD;
@@ -898,16 +883,16 @@ int flush;
copy = 3 + BITS(2);
DROPBITS(2);
}
- else if (this.val == 17) {
- NEEDBITS(this.bits + 3);
- DROPBITS(this.bits);
+ else if (it.val == 17) {
+ NEEDBITS(it.bits + 3);
+ DROPBITS(it.bits);
len = 0;
copy = 3 + BITS(3);
DROPBITS(3);
}
else {
- NEEDBITS(this.bits + 7);
- DROPBITS(this.bits);
+ NEEDBITS(it.bits + 7);
+ DROPBITS(it.bits);
len = 0;
copy = 11 + BITS(7);
DROPBITS(7);
@@ -955,40 +940,40 @@ int flush;
break;
}
for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ it = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(it.bits) <= bits) break;
PULLBYTE();
}
- if (this.op && (this.op & 0xf0) == 0) {
- last = this;
+ if (it.op && (it.op & 0xf0) == 0) {
+ last = it;
for (;;) {
- this = state->lencode[last.val +
+ it = state->lencode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
+ if ((unsigned)(last.bits + it.bits) <= bits) break;
PULLBYTE();
}
DROPBITS(last.bits);
}
- DROPBITS(this.bits);
- state->length = (unsigned)this.val;
- if ((int)(this.op) == 0) {
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ DROPBITS(it.bits);
+ state->length = (unsigned)it.val;
+ if ((int)(it.op) == 0) {
+ Tracevv((stderr, it.val >= 0x20 && it.val < 0x7f ?
"inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
+ "inflate: literal 0x%02x\n", it.val));
state->mode = LIT;
break;
}
- if (this.op & 32) {
+ if (it.op & 32) {
Tracevv((stderr, "inflate: end of block\n"));
state->mode = TYPE;
break;
}
- if (this.op & 64) {
+ if (it.op & 64) {
strm->msg = (char *)"invalid literal/length code";
state->mode = BAD;
break;
}
- state->extra = (unsigned)(this.op) & 15;
+ state->extra = (unsigned)(it.op) & 15;
state->mode = LENEXT;
case LENEXT:
if (state->extra) {
@@ -1000,28 +985,28 @@ int flush;
state->mode = DIST;
case DIST:
for (;;) {
- this = state->distcode[BITS(state->distbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ it = state->distcode[BITS(state->distbits)];
+ if ((unsigned)(it.bits) <= bits) break;
PULLBYTE();
}
- if ((this.op & 0xf0) == 0) {
- last = this;
+ if ((it.op & 0xf0) == 0) {
+ last = it;
for (;;) {
- this = state->distcode[last.val +
+ it = state->distcode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
+ if ((unsigned)(last.bits + it.bits) <= bits) break;
PULLBYTE();
}
DROPBITS(last.bits);
}
- DROPBITS(this.bits);
- if (this.op & 64) {
+ DROPBITS(it.bits);
+ if (it.op & 64) {
strm->msg = (char *)"invalid distance code";
state->mode = BAD;
break;
}
- state->offset = (unsigned)this.val;
- state->extra = (unsigned)(this.op) & 15;
+ state->offset = (unsigned)it.val;
+ state->extra = (unsigned)(it.op) & 15;
state->mode = DISTEXT;
case DISTEXT:
if (state->extra) {
@@ -1152,8 +1137,7 @@ int flush;
return ret;
}
-int ZEXPORT inflateEnd(strm)
-z_streamp strm;
+int ZEXPORT inflateEnd(z_streamp strm)
{
struct inflate_state FAR *state;
if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
@@ -1166,10 +1150,8 @@ z_streamp strm;
return Z_OK;
}
-int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
-z_streamp strm;
-const Bytef *dictionary;
-uInt dictLength;
+int ZEXPORT inflateSetDictionary(z_streamp strm,
+ const Bytef *dictionary, uInt dictLength)
{
struct inflate_state FAR *state;
unsigned long id;
@@ -1208,9 +1190,7 @@ uInt dictLength;
return Z_OK;
}
-int ZEXPORT inflateGetHeader(strm, head)
-z_streamp strm;
-gz_headerp head;
+int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head)
{
struct inflate_state FAR *state;
@@ -1236,10 +1216,8 @@ gz_headerp head;
called again with more data and the *have state. *have is initialized to
zero for the first call.
*/
-local unsigned syncsearch(have, buf, len)
-unsigned FAR *have;
-unsigned char FAR *buf;
-unsigned len;
+local unsigned syncsearch(unsigned FAR *have,
+ unsigned char FAR *buf, unsigned len)
{
unsigned got;
unsigned next;
@@ -1259,8 +1237,7 @@ unsigned len;
return next;
}
-int ZEXPORT inflateSync(strm)
-z_streamp strm;
+int ZEXPORT inflateSync(z_streamp strm)
{
unsigned len; /* number of bytes to look at or looked at */
unsigned long in, out; /* temporary to save total_in and total_out */
@@ -1310,8 +1287,7 @@ z_streamp strm;
block. When decompressing, PPP checks that at the end of input packet,
inflate is waiting for these length bytes.
*/
-int ZEXPORT inflateSyncPoint(strm)
-z_streamp strm;
+int ZEXPORT inflateSyncPoint(z_streamp strm)
{
struct inflate_state FAR *state;
@@ -1320,9 +1296,7 @@ z_streamp strm;
return state->mode == STORED && state->bits == 0;
}
-int ZEXPORT inflateCopy(dest, source)
-z_streamp dest;
-z_streamp source;
+int ZEXPORT inflateCopy(z_streamp dest, z_streamp source)
{
struct inflate_state FAR *state;
struct inflate_state FAR *copy;
diff --git a/zlib/inftrees.c b/zlib/inftrees.c
index 8a9c13ff03d..ca439de86ed 100644
--- a/zlib/inftrees.c
+++ b/zlib/inftrees.c
@@ -29,13 +29,8 @@ const char inflate_copyright[] =
table index bits. It will differ if the request is greater than the
longest code or if it is less than the shortest code.
*/
-int inflate_table(type, lens, codes, table, bits, work)
-codetype type;
-unsigned short FAR *lens;
-unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
+int inflate_table(codetype type, unsigned short FAR *lens, unsigned codes,
+ code FAR * FAR *table, unsigned FAR *bits, unsigned short FAR *work)
{
unsigned len; /* a code's length in bits */
unsigned sym; /* index of code symbols */
@@ -50,7 +45,7 @@ unsigned short FAR *work;
unsigned fill; /* index for replicating entries */
unsigned low; /* low bits for current root entry */
unsigned mask; /* mask for low root bits */
- code this; /* table entry for duplication */
+ code it; /* table entry for duplication */
code FAR *next; /* next available space in table */
const unsigned short FAR *base; /* base value table to use */
const unsigned short FAR *extra; /* extra bits table to use */
@@ -115,11 +110,11 @@ unsigned short FAR *work;
if (count[max] != 0) break;
if (root > max) root = max;
if (max == 0) { /* no symbols to code at all */
- this.op = (unsigned char)64; /* invalid code marker */
- this.bits = (unsigned char)1;
- this.val = (unsigned short)0;
- *(*table)++ = this; /* make a table to force an error */
- *(*table)++ = this;
+ it.op = (unsigned char)64; /* invalid code marker */
+ it.bits = (unsigned char)1;
+ it.val = (unsigned short)0;
+ *(*table)++ = it; /* make a table to force an error */
+ *(*table)++ = it;
*bits = 1;
return 0; /* no symbols, but wait for decoding to report error */
}
@@ -215,18 +210,18 @@ unsigned short FAR *work;
/* process all codes and make table entries */
for (;;) {
/* create table entry */
- this.bits = (unsigned char)(len - drop);
+ it.bits = (unsigned char)(len - drop);
if ((int)(work[sym]) < end) {
- this.op = (unsigned char)0;
- this.val = work[sym];
+ it.op = (unsigned char)0;
+ it.val = work[sym];
}
else if ((int)(work[sym]) > end) {
- this.op = (unsigned char)(extra[work[sym]]);
- this.val = base[work[sym]];
+ it.op = (unsigned char)(extra[work[sym]]);
+ it.val = base[work[sym]];
}
else {
- this.op = (unsigned char)(32 + 64); /* end of block */
- this.val = 0;
+ it.op = (unsigned char)(32 + 64); /* end of block */
+ it.val = 0;
}
/* replicate for those indices with low len bits equal to huff */
@@ -235,7 +230,7 @@ unsigned short FAR *work;
min = fill; /* save offset to next table */
do {
fill -= incr;
- next[(huff >> drop) + fill] = this;
+ next[(huff >> drop) + fill] = it;
} while (fill != 0);
/* backwards increment the len-bit code huff */
@@ -295,20 +290,20 @@ unsigned short FAR *work;
through high index bits. When the current sub-table is filled, the loop
drops back to the root table to fill in any remaining entries there.
*/
- this.op = (unsigned char)64; /* invalid code marker */
- this.bits = (unsigned char)(len - drop);
- this.val = (unsigned short)0;
+ it.op = (unsigned char)64; /* invalid code marker */
+ it.bits = (unsigned char)(len - drop);
+ it.val = (unsigned short)0;
while (huff != 0) {
/* when done with sub-table, drop back to root table */
if (drop != 0 && (huff & mask) != low) {
drop = 0;
len = root;
next = *table;
- this.bits = (unsigned char)len;
+ it.bits = (unsigned char)len;
}
/* put invalid code marker in table */
- next[huff >> drop] = this;
+ next[huff >> drop] = it;
/* backwards increment the len-bit code huff */
incr = 1U << (len - 1);
diff --git a/zlib/trees.c b/zlib/trees.c
index 91eef7e1c11..f69db2e73e8 100644
--- a/zlib/trees.c
+++ b/zlib/trees.c
@@ -379,8 +379,7 @@ void gen_trees_header()
/* ===========================================================================
* Initialize the tree data structures for a new zlib stream.
*/
-void _tr_init(s)
- deflate_state *s;
+void _tr_init(deflate_state *s)
{
tr_static_init();
@@ -408,8 +407,7 @@ void _tr_init(s)
/* ===========================================================================
* Initialize a new block.
*/
-local void init_block(s)
- deflate_state *s;
+local void init_block(deflate_state *s)
{
int n; /* iterates over tree elements */
@@ -452,10 +450,8 @@ local void init_block(s)
* when the heap property is re-established (each father smaller than its
* two sons).
*/
-local void pqdownheap(s, tree, k)
- deflate_state *s;
- ct_data *tree; /* the tree to restore */
- int k; /* node to move down */
+local void pqdownheap(deflate_state *s, ct_data *tree, /* the tree to restore */
+ int k) /* node to move down */
{
int v = s->heap[k];
int j = k << 1; /* left son of k */
@@ -487,9 +483,7 @@ local void pqdownheap(s, tree, k)
* The length opt_len is updated; static_len is also updated if stree is
* not null.
*/
-local void gen_bitlen(s, desc)
- deflate_state *s;
- tree_desc *desc; /* the tree descriptor */
+local void gen_bitlen(deflate_state *s, tree_desc *desc) /* the tree descriptor */
{
ct_data *tree = desc->dyn_tree;
int max_code = desc->max_code;
@@ -574,10 +568,10 @@ local void gen_bitlen(s, desc)
* OUT assertion: the field code is set for all tree elements of non
* zero code length.
*/
-local void gen_codes (tree, max_code, bl_count)
- ct_data *tree; /* the tree to decorate */
- int max_code; /* largest code with non zero frequency */
- ushf *bl_count; /* number of codes at each bit length */
+local void gen_codes (
+ ct_data *tree, /* the tree to decorate */
+ int max_code, /* largest code with non zero frequency */
+ ushf *bl_count) /* number of codes at each bit length */
{
ush next_code[MAX_BITS+1]; /* next code value for each bit length */
ush code = 0; /* running code value */
@@ -616,9 +610,7 @@ local void gen_codes (tree, max_code, bl_count)
* and corresponding code. The length opt_len is updated; static_len is
* also updated if stree is not null. The field max_code is set.
*/
-local void build_tree(s, desc)
- deflate_state *s;
- tree_desc *desc; /* the tree descriptor */
+local void build_tree(deflate_state *s, tree_desc *desc) /* the tree descriptor */
{
ct_data *tree = desc->dyn_tree;
const ct_data *stree = desc->stat_desc->static_tree;
@@ -704,10 +696,9 @@ local void build_tree(s, desc)
* Scan a literal or distance tree to determine the frequencies of the codes
* in the bit length tree.
*/
-local void scan_tree (s, tree, max_code)
- deflate_state *s;
- ct_data *tree; /* the tree to be scanned */
- int max_code; /* and its largest code of non zero frequency */
+local void scan_tree (deflate_state *s,
+ ct_data *tree, /* the tree to be scanned */
+ int max_code) /* and its largest code of non zero frequency */
{
int n; /* iterates over all tree elements */
int prevlen = -1; /* last emitted length */
@@ -749,10 +740,9 @@ local void scan_tree (s, tree, max_code)
* Send a literal or distance tree in compressed form, using the codes in
* bl_tree.
*/
-local void send_tree (s, tree, max_code)
- deflate_state *s;
- ct_data *tree; /* the tree to be scanned */
- int max_code; /* and its largest code of non zero frequency */
+local void send_tree (deflate_state *s,
+ ct_data *tree, /* the tree to be scanned */
+ int max_code) /* and its largest code of non zero frequency */
{
int n; /* iterates over all tree elements */
int prevlen = -1; /* last emitted length */
@@ -800,8 +790,7 @@ local void send_tree (s, tree, max_code)
* Construct the Huffman tree for the bit lengths and return the index in
* bl_order of the last bit length code to send.
*/
-local int build_bl_tree(s)
- deflate_state *s;
+local int build_bl_tree(deflate_state *s)
{
int max_blindex; /* index of last bit length code of non zero freq */
@@ -835,9 +824,8 @@ local int build_bl_tree(s)
* lengths of the bit length codes, the literal tree and the distance tree.
* IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
*/
-local void send_all_trees(s, lcodes, dcodes, blcodes)
- deflate_state *s;
- int lcodes, dcodes, blcodes; /* number of codes for each tree */
+local void send_all_trees(deflate_state *s, int lcodes, int dcodes,
+ int blcodes) /* number of codes for each tree */
{
int rank; /* index in bl_order */
@@ -864,11 +852,10 @@ local void send_all_trees(s, lcodes, dcodes, blcodes)
/* ===========================================================================
* Send a stored block
*/
-void _tr_stored_block(s, buf, stored_len, eof)
- deflate_state *s;
- charf *buf; /* input block */
- ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
+void _tr_stored_block(deflate_state *s,
+ charf *buf, /* input block */
+ ulg stored_len, /* length of input block */
+ int eof) /* true if this is the last block for a file */
{
send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
#ifdef DEBUG
@@ -889,8 +876,7 @@ void _tr_stored_block(s, buf, stored_len, eof)
* To simplify the code, we assume the worst case of last real code encoded
* on one bit only.
*/
-void _tr_align(s)
- deflate_state *s;
+void _tr_align(deflate_state *s)
{
send_bits(s, STATIC_TREES<<1, 3);
send_code(s, END_BLOCK, static_ltree);
@@ -918,11 +904,10 @@ void _tr_align(s)
* Determine the best encoding for the current block: dynamic trees, static
* trees or store, and output the encoded block to the zip file.
*/
-void _tr_flush_block(s, buf, stored_len, eof)
- deflate_state *s;
- charf *buf; /* input block, or NULL if too old */
- ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
+void _tr_flush_block(deflate_state *s,
+ charf *buf, /* input block, or NULL if too old */
+ ulg stored_len, /* length of input block */
+ int eof) /* true if this is the last block for a file */
{
ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
int max_blindex = 0; /* index of last bit length code of non zero freq */
@@ -1019,10 +1004,9 @@ void _tr_flush_block(s, buf, stored_len, eof)
* Save the match info and tally the frequency counts. Return true if
* the current block must be flushed.
*/
-int _tr_tally (s, dist, lc)
- deflate_state *s;
- unsigned dist; /* distance of matched string */
- unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
+int _tr_tally (deflate_state *s,
+ unsigned dist, /* distance of matched string */
+ unsigned lc) /* match length-MIN_MATCH or unmatched char (if dist==0) */
{
s->d_buf[s->last_lit] = (ush)dist;
s->l_buf[s->last_lit++] = (uch)lc;
@@ -1069,10 +1053,9 @@ int _tr_tally (s, dist, lc)
/* ===========================================================================
* Send the block data compressed using the given Huffman trees
*/
-local void compress_block(s, ltree, dtree)
- deflate_state *s;
- ct_data *ltree; /* literal tree */
- ct_data *dtree; /* distance tree */
+local void compress_block(deflate_state *s,
+ ct_data *ltree, /* literal tree */
+ ct_data *dtree) /* distance tree */
{
unsigned dist; /* distance of matched string */
int lc; /* match length or unmatched char (if dist == 0) */
@@ -1123,8 +1106,7 @@ local void compress_block(s, ltree, dtree)
* or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise.
* IN assertion: the fields Freq of dyn_ltree are set.
*/
-local void set_data_type(s)
- deflate_state *s;
+local void set_data_type(deflate_state *s)
{
int n;
@@ -1143,9 +1125,9 @@ local void set_data_type(s)
* method would use a table)
* IN assertion: 1 <= len <= 15
*/
-local unsigned bi_reverse(code, len)
- unsigned code; /* the value to invert */
- int len; /* its bit length */
+local unsigned bi_reverse(
+ unsigned code, /* the value to invert */
+ int len) /* its bit length */
{
register unsigned res = 0;
do {
@@ -1158,8 +1140,7 @@ local unsigned bi_reverse(code, len)
/* ===========================================================================
* Flush the bit buffer, keeping at most 7 bits in it.
*/
-local void bi_flush(s)
- deflate_state *s;
+local void bi_flush(deflate_state *s)
{
if (s->bi_valid == 16) {
put_short(s, s->bi_buf);
@@ -1175,8 +1156,7 @@ local void bi_flush(s)
/* ===========================================================================
* Flush the bit buffer and align the output on a byte boundary
*/
-local void bi_windup(s)
- deflate_state *s;
+local void bi_windup(deflate_state *s)
{
if (s->bi_valid > 8) {
put_short(s, s->bi_buf);
@@ -1194,11 +1174,10 @@ local void bi_windup(s)
* Copy a stored block, storing first the length and its
* one's complement if requested.
*/
-local void copy_block(s, buf, len, header)
- deflate_state *s;
- charf *buf; /* the input data */
- unsigned len; /* its length */
- int header; /* true if block header must be written */
+local void copy_block(deflate_state *s,
+ charf *buf, /* the input data */
+ unsigned len, /* its length */
+ int header) /* true if block header must be written */
{
bi_windup(s); /* align on byte boundary */
s->last_eob_len = 8; /* enough lookahead for inflate */
diff --git a/zlib/uncompr.c b/zlib/uncompr.c
index 8519d9bfaf8..394d9f8a533 100644
--- a/zlib/uncompr.c
+++ b/zlib/uncompr.c
@@ -23,11 +23,8 @@
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer, or Z_DATA_ERROR if the input data was corrupted.
*/
-int ZEXPORT uncompress (dest, destLen, source, sourceLen)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
- uLong sourceLen;
+int ZEXPORT uncompress (Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen)
{
z_stream stream;
int err;
diff --git a/zlib/zutil.c b/zlib/zutil.c
index 04730f8bffb..c0623c92d85 100644
--- a/zlib/zutil.c
+++ b/zlib/zutil.c
@@ -130,8 +130,7 @@ void z_error (m)
/* exported to allow conversion of error code to string for compress() and
* uncompress()
*/
-const char * ZEXPORT zError(err)
- int err;
+const char * ZEXPORT zError(int err)
{
return ERR_MSG(err);
}
@@ -297,19 +296,14 @@ extern voidp calloc OF((uInt items, uInt size));
extern void free OF((voidpf ptr));
#endif
-voidpf zcalloc (opaque, items, size)
- voidpf opaque;
- unsigned items;
- unsigned size;
+voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
{
if (opaque) items += size - size; /* make compiler happy */
return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
(voidpf)calloc(items, size);
}
-void zcfree (opaque, ptr)
- voidpf opaque;
- voidpf ptr;
+void zcfree (voidpf opaque, voidpf ptr)
{
free(ptr);
if (opaque) return; /* make compiler happy */