gcc/gcc
Trevor Saunders df167cbe0d make validate_replace_src_group take a rtx_insn *
gcc/ChangeLog:

2015-05-02  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* recog.c (struct validate_replace_src_data): Change type of
	insn field to rtx_insn *.
	(validate_replace_src_group): Change type of argument to rtx_insn *.
	* recog.h (validate_replace_src_group): Adjust.

From-SVN: r222738
2015-05-02 21:06:09 +00:00
..
ada Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1. 2015-04-27 15:59:06 -07:00
c c-typeck.c (c_build_va_arg): Clarify the error message. 2015-04-30 13:35:44 +00:00
c-family c-common.c (maybe_warn_bool_compare): When comparing with 0/1, require that the non-constant be of a boolean type. 2015-04-30 13:20:03 +00:00
common [AArch64] Increase static buffer size in aarch64_rewrite_selected_cpu 2015-04-21 08:14:22 +00:00
config make some functions in config/ take a rtx_insn * 2015-05-02 21:05:37 +00:00
cp re PR c++/65858 (ICE in varpool_node::get_constructor during chromium build on arm-linux-gnueabihf with LTO during LINK chrome) 2015-05-01 18:43:40 +00:00
doc extend.texi (Variable Attributes): Add menu and proper @nodes to subsections. 2015-05-01 23:30:37 -04:00
fortran re PR fortran/65976 (gfortran man-page lists the -fno-fixed-form flag but does not define it, and it doesn't work) 2015-05-02 16:37:35 +00:00
ginclude
go compiler: Use backend interface for stack allocation. 2015-04-30 20:44:03 +00:00
java remove need for store_values_directly 2015-04-18 18:13:18 +00:00
jit Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1. 2015-04-27 15:59:06 -07:00
lto dwarf2out.c (gen_type_die_with_usage): Call verify_type. 2015-04-30 02:45:54 +00:00
objc Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1. 2015-04-27 15:59:06 -07:00
objcp Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1. 2015-04-27 15:59:06 -07:00
po * de.po: Update. 2015-05-01 17:19:00 +01:00
testsuite Wnarrowing4.C: Rename to Wnarrowing3.C. 2015-05-01 18:53:51 +00:00
ABOUT-GCC-NLS
acinclude.m4
aclocal.m4
addresses.h
alias.c always define HAVE_epilogue 2015-04-28 04:45:12 +00:00
alias.h
alloc-pool.c
alloc-pool.h
asan.c Allow wildcards in -fsanitize-sections. 2015-04-22 11:44:26 +00:00
asan.h asan.c (set_sanitized_sections): New function. 2015-04-17 07:51:02 +00:00
attribs.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
attribs.h
auto-inc-dec.c
auto-profile.c
auto-profile.h
BASE-VER
basic-block.h
bb-reorder.c always define HAVE_simple_return and HAVE_return 2015-04-28 04:44:09 +00:00
bb-reorder.h
bitmap.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
bitmap.h
bt-load.c
builtin-attrs.def
builtin-types.def
builtins.c change local vars to rtx_insn * 2015-05-02 21:03:53 +00:00
builtins.def
builtins.h
caller-save.c remove more ifdefs for HAVE_cc0 2015-04-22 00:45:06 +00:00
calls.c remove #if ARGS_GROW_DOWNWARD 2015-04-28 04:47:09 +00:00
calls.h
ccmp.c
ccmp.h
cfg-flags.def
cfg.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
cfg.h
cfganal.c
cfganal.h
cfgbuild.c
cfgbuild.h
cfgcleanup.c remove more ifdefs for HAVE_cc0 2015-04-22 00:45:06 +00:00
cfgcleanup.h
cfgexpand.c cfgexpand.c (expand_gimple_stmt_1): Use ops.code. 2015-04-23 08:30:04 +00:00
cfgexpand.h
cfghooks.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
cfghooks.h cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
cfgloop.c cfgexpand.c (expand_gimple_stmt_1): Use ops.code. 2015-04-23 08:30:04 +00:00
cfgloop.h
cfgloopanal.c
cfgloopmanip.c
cfgloopmanip.h
cfgrtl.c always define HAVE_epilogue 2015-04-28 04:45:12 +00:00
cfgrtl.h
cgraph.c
cgraph.h Fix spurious semicolons 2015-04-30 21:07:45 +00:00
cgraphbuild.c
cgraphclones.c
cgraphunit.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
ChangeLog make validate_replace_src_group take a rtx_insn * 2015-05-02 21:06:09 +00:00
ChangeLog-1997
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog.dataflow
ChangeLog.gimple-classes
ChangeLog.graphite
ChangeLog.jit
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
chkp-builtins.def
cif-code.def
cilk-builtins.def
cilk-common.c
cilk.h
cilkplus.def
collect2-aix.c
collect2-aix.h
collect2.c
collect2.h
collect-utils.c
collect-utils.h
combine-stack-adj.c
combine.c [combine][obvious] Use std::swap instead of manually swapping 2015-04-27 14:56:10 +00:00
common.md
common.opt asan.c (set_sanitized_sections): New function. 2015-04-17 07:51:02 +00:00
compare-elim.c
conditions.h Re: [PATCH 02/12] remove some ifdef HAVE_cc0. 2015-04-23 10:34:58 +00:00
config.build
config.gcc re PR target/63503 ([AArch64] A57 executes fused multiply-add poorly in some situations) 2015-04-28 08:10:44 +00:00
config.host [AArch64] Implement -m{cpu,tune,arch}=native using only /proc/cpuinfo 2015-04-24 14:52:47 +00:00
config.in re PR target/65810 (powerpc64 alignment of r2 insufficient for loading long-double constants) 2015-04-28 13:17:19 +09:30
configure re PR target/65810 (powerpc64 alignment of r2 insufficient for loading long-double constants) 2015-04-28 13:17:19 +09:30
configure.ac re PR target/65810 (powerpc64 alignment of r2 insufficient for loading long-double constants) 2015-04-28 13:17:19 +09:30
context.c
context.h
convert.c
convert.h
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
coretypes.h
coverage.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
coverage.h
cppbuiltin.c
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c re PR rtl-optimization/34503 (Issues with constant/copy propagation implementation in gcse.c) 2015-04-24 04:49:34 +00:00
cse.c add default for NO_FUNCTION_CSE 2015-04-28 04:40:00 +00:00
cselib.c change local vars to rtx_insn * 2015-05-02 21:03:53 +00:00
cselib.h
cstamp-h.in
data-streamer-in.c
data-streamer-out.c
data-streamer.c
data-streamer.h
DATESTAMP Daily bump. 2015-05-02 00:16:15 +00:00
dbgcnt.c
dbgcnt.def
dbgcnt.h
dbxout.c
dbxout.h
dce.c
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h always define ARGS_GROW_DOWNWARD 2015-04-28 04:46:20 +00:00
DEV-PHASE
df-core.c df-core.c (df_finish_pass): Iterate over df->problems_by_index[] and use df_remove_problem rather than... 2015-04-21 10:23:25 +00:00
df-problems.c df_set_note can take a rtx_insn * 2015-05-02 21:04:13 +00:00
df-scan.c always define HAVE_epilogue 2015-04-28 04:45:12 +00:00
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h
diagnostic.c
diagnostic.def
diagnostic.h
dojump.c dojump.c (do_compare_rtx_and_jump): Use std::swap instead of manual swaps. 2015-04-29 21:47:40 -06:00
dojump.h
dominance.c
dominance.h
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
dumpfile.c
dumpfile.h
dwarf2asm.c
dwarf2asm.h
dwarf2cfi.c add_cfi_insn can be a rtx_insn * 2015-05-02 21:04:31 +00:00
dwarf2out.c dwarf2out.c (gen_type_die_with_usage): Call verify_type. 2015-04-30 02:45:54 +00:00
dwarf2out.h
emit-rtl.c reduce conditional compilation for HARD_FRAME_POINTER_IS_FRAME_POINTER 2015-04-22 00:44:54 +00:00
emit-rtl.h function.h (struct emit_status): Delete x_first_insn, x_last_insn and sequence_stack. 2015-04-15 15:35:44 +09:30
errors.c
errors.h
et-forest.c
et-forest.h
except.c cfgexpand.c (expand_gimple_stmt_1): Use ops.code. 2015-04-23 08:30:04 +00:00
except.h
exec-tool.in
explow.c
explow.h
expmed.c [expmed] Properly account for the cost and latency of shift+add ops when synthesizing mults 2015-04-21 12:56:39 +00:00
expmed.h
expr.c dojump.c (do_compare_rtx_and_jump): Use std::swap instead of manual swaps. 2015-04-29 21:47:40 -06:00
expr.h
fibonacci_heap.h
file-find.c
file-find.h
final.c Define & use special macros to record the name & size of cold partitions. 2015-04-30 10:49:02 -07:00
fixed-value.c
fixed-value.h
flag-types.h
flags.h
fold-const.c Handle internal_fn in operand_equal_p 2015-04-17 09:26:50 +00:00
fold-const.h
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function.c change local vars to rtx_insn * 2015-05-02 21:03:53 +00:00
function.h Fix fdump-passes 2015-04-15 18:43:32 +00:00
fwprop.c
gcc-ar.c
gcc-main.c
gcc-plugin.h
gcc-symtab.h
gcc.c
gcc.h
gcov-counter.def
gcov-dump.c
gcov-io.c
gcov-io.h
gcov-iov.c
gcov-tool.c
gcov.c
gcse-common.c
gcse-common.h
gcse.c change local vars to rtx_insn * 2015-05-02 21:03:53 +00:00
gcse.h
gdbasan.in
gdbhooks.py
gdbinit.in
gen-pass-instances.awk
genattr-common.c
genattr.c
genattrtab.c
genautomata.c
gencheck.c
genchecksum.c
gencodes.c
genconditions.c
genconfig.c always define HAVE_cc0 2015-04-22 00:44:27 +00:00
genconstants.c
genemit.c
genenums.c
generic-match-head.c
generic-match.h
genextract.c
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-parse.c
gengtype-state.c
gengtype.c
gengtype.h
genhooks.c
genmatch.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
genmddeps.c
genmddump.c
genmodes.c
genmultilib
genopinit.c
genoutput.c
genpeep.c
genpreds.c re PR target/65689 ([AArch64] S constraint fails for inline asm at -O0) 2015-04-17 18:43:28 +02:00
genrecog.c recog_data::insn can be a rtx_insn * 2015-05-02 21:04:47 +00:00
gensupport.c gensupport.c (std_preds): Add missing codes to address_operand entry. 2015-04-28 07:46:40 +00:00
gensupport.h
ggc-common.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
ggc-internal.h
ggc-none.c
ggc-page.c
ggc.h
gimple-builder.c
gimple-builder.h
gimple-expr.c
gimple-expr.h
gimple-fold.c re PR tree-optimization/65650 (CCP does not propgate copies) 2015-04-21 12:52:43 +00:00
gimple-fold.h gimple-fold.h (gimple_build): Remove optional valueize arguments. 2015-04-20 13:23:59 +00:00
gimple-iterator.c Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
gimple-iterator.h Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
gimple-low.c
gimple-low.h
gimple-match-head.c re PR tree-optimization/65650 (CCP does not propgate copies) 2015-04-21 12:52:43 +00:00
gimple-match.h re PR tree-optimization/65650 (CCP does not propgate copies) 2015-04-21 12:52:43 +00:00
gimple-pretty-print.c
gimple-pretty-print.h
gimple-ssa-isolate-paths.c
gimple-ssa-strength-reduction.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
gimple-ssa.h
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple-walk.c gimple-walk.c #include TLC 2015-04-29 12:45:31 +02:00
gimple-walk.h
gimple.c
gimple.def
gimple.h
gimplify-me.c
gimplify-me.h
gimplify.c Add OMP_STANDALONE_CLAUSES. 2015-04-29 17:44:41 +02:00
gimplify.h Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
glimits.h
godump.c
graph.c
graph.h
graphds.c
graphds.h
graphite-blocking.c
graphite-dependences.c
graphite-interchange.c
graphite-isl-ast-to-gimple.c
graphite-isl-ast-to-gimple.h
graphite-optimize-isl.c
graphite-poly.c
graphite-poly.h
graphite-scop-detection.c graphite-scop-detection.c: Do not include cp/cp-tree.h. 2015-04-14 12:33:57 +00:00
graphite-scop-detection.h
graphite-sese-to-poly.c
graphite-sese-to-poly.h
graphite.c
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.c make several functions in the scheduler take rtx_insn * 2015-05-02 21:05:54 +00:00
hard-reg-set.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
hash-map.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
hash-set.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
hash-table.c
hash-table.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
highlev-plugin-common.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hw-doloop.c
hw-doloop.h
hwint.c
hwint.h
ifcvt.c change local vars to rtx_insn * 2015-05-02 21:03:53 +00:00
ifcvt.h
inchash.c inchash.h, inchash.c: Include bconfig.h for build objects. 2015-04-29 13:32:34 +00:00
inchash.h inchash.h, inchash.c: Include bconfig.h for build objects. 2015-04-29 13:32:34 +00:00
incpath.c
incpath.h
init-regs.c
input.c
input.h re PR c/61534 (Wlogical-op should not warn when either operand comes from macro expansion) 2015-04-24 11:49:52 +00:00
insn-addr.h
insn-notes.def
internal-fn.c Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
internal-fn.def Mark ifn_va_arg as ECF_LEAF 2015-04-26 07:13:13 +00:00
internal-fn.h
intl.c
intl.h
ipa-chkp.c dwarf2out.c (gen_type_die_with_usage): Call verify_type. 2015-04-30 02:45:54 +00:00
ipa-chkp.h
ipa-comdats.c
ipa-cp.c
ipa-devirt.c re PR tree-optimization/65948 (FAIL: g++.dg/lto/20101010-4 cp_lto_20101010-4_0.o-cp_lto_20101010-4_0.o link) 2015-04-30 13:18:22 +00:00
ipa-icf-gimple.c re PR ipa/65765 (Compiling Firefox with GCC 5 leads to broken javascript engine on x86-64) 2015-04-15 13:47:44 +02:00
ipa-icf-gimple.h
ipa-icf.c * ipa-icf.c (icf_handled_component_p): Remove redundant tests. 2015-04-27 10:10:47 +00:00
ipa-icf.h ipa-icf.c (sem_function::equals_wpa): Compare thunk info. 2015-04-24 00:58:25 +00:00
ipa-inline-analysis.c
ipa-inline-transform.c
ipa-inline.c re PR ipa/65873 (Failure to inline always_inline memcpy) 2015-04-30 15:09:19 +00:00
ipa-inline.h
ipa-polymorphic-call.c
ipa-profile.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
ipa-prop.c
ipa-prop.h
ipa-pure-const.c
ipa-ref.c
ipa-ref.h
ipa-reference.c Fix IPA memory leaks. 2015-04-17 13:56:15 +00:00
ipa-reference.h
ipa-split.c
ipa-utils.c
ipa-utils.h
ipa-visibility.c
ipa.c
ira-build.c
ira-color.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
ira-conflicts.c
ira-costs.c ira-costs.c (record_operand_costs): Fix typo (remove redundant code). 2015-04-23 00:43:30 +00:00
ira-emit.c
ira-int.h
ira-lives.c add default definition of EH_RETURN_DATA_REGNO 2015-04-22 00:44:08 +00:00
ira.c remove more ifdefs for HAVE_cc0 2015-04-22 00:45:06 +00:00
ira.h
is-a.h
jump.c remove some ifdef HAVE_cc0 2015-04-22 00:44:15 +00:00
langhooks-def.h
langhooks.c
langhooks.h
LANGUAGES
lcm.c
lcm.h
libfuncs.h
limitx.h
limity.h
lists.c
lock-and-run.sh
loop-doloop.c change local vars to rtx_insn * 2015-05-02 21:03:53 +00:00
loop-init.c cfgexpand.c (expand_gimple_stmt_1): Use ops.code. 2015-04-23 08:30:04 +00:00
loop-invariant.c make some HAVE_cc0 code always compiled 2015-04-22 00:44:37 +00:00
loop-iv.c loop-iv.c (canon_condition): Generalize to all types of integer constant. 2015-04-29 11:12:17 +00:00
loop-unroll.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
loop-unroll.h
lower-subreg.c
lower-subreg.h
lra-assigns.c
lra-coalesce.c
lra-constraints.c make some functions in lra-constraints.c take rtx_insn * 2015-05-02 21:05:20 +00:00
lra-eliminations.c re PR rtl-optimization/65805 (Chromium gets miscompiled) 2015-04-19 23:48:24 +00:00
lra-int.h
lra-lives.c add default definition of EH_RETURN_DATA_REGNO 2015-04-22 00:44:08 +00:00
lra-remat.c
lra-spills.c re PR rtl-optimization/65805 (Chromium gets miscompiled) 2015-04-19 23:48:24 +00:00
lra.c
lra.h
lto-cgraph.c
lto-compress.c
lto-compress.h
lto-opts.c
lto-section-in.c
lto-section-names.h
lto-section-out.c
lto-streamer-in.c
lto-streamer-out.c
lto-streamer.c
lto-streamer.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
lto-wrapper.c
machmode.def
machmode.h
main.c
Makefile.in Makefile.in (build/genrecog.o): Depend on inchash.h. 2015-04-29 13:32:59 +00:00
match.pd match.pd: New simplification patterns. 2015-05-01 12:25:12 -06:00
mcf.c
mkconfig.sh
mode-classes.def
mode-switching.c
modulo-sched.c change local vars to rtx_insn * 2015-05-02 21:03:53 +00:00
omega.c
omega.h
omp-builtins.def
omp-low.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
omp-low.h
ONEWS
opt-functions.awk
opt-gather.awk
opt-include.awk
opt-read.awk
optabs.c always define HAVE_cc0 2015-04-22 00:44:27 +00:00
optabs.def
optabs.h
optc-gen.awk
optc-save-gen.awk
opth-gen.awk
opts-common.c
opts-diagnostic.h
opts-global.c asan.c (set_sanitized_sections): New function. 2015-04-17 07:51:02 +00:00
opts.c Fix spurious semicolons 2015-04-30 21:07:45 +00:00
opts.h
output.h Properly handle uninitialized common symbol 2015-04-17 09:23:24 -07:00
params.c
params.def
params.h Summary: Mark help string in DEFPARAM as no-c-format 2015-05-01 14:07:51 +00:00
pass_manager.h
passes.c Fix fdump-passes 2015-04-15 18:43:32 +00:00
passes.def Move pass_stdarg to after pass_dce in pass_all_optimizations 2015-04-29 09:13:49 +00:00
plugin.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
plugin.def
plugin.h
postreload-gcse.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
postreload.c make some HAVE_cc0 code always compiled 2015-04-22 00:44:37 +00:00
predict.c
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c
print-rtl.h
print-tree.c
print-tree.h
profile.c
profile.h
read-md.c
read-md.h
read-rtl.c
README.Portability
real.c
real.h
realmpfr.c
realmpfr.h
recog.c make validate_replace_src_group take a rtx_insn * 2015-05-02 21:06:09 +00:00
recog.h make validate_replace_src_group take a rtx_insn * 2015-05-02 21:06:09 +00:00
ree.c
reg-notes.def
reg-stack.c
regcprop.c kill_autoinc_value can take a rtx_insn * 2015-05-02 21:05:04 +00:00
regcprop.h
reginfo.c reduce conditional compilation for HARD_FRAME_POINTER_IS_FRAME_POINTER 2015-04-22 00:44:54 +00:00
regrename.c add default for HARD_REGNO_RENAME_OK 2015-04-28 04:40:43 +00:00
regrename.h
regs.h
regset.h
regstat.c
reload1.c reduce conditional compilation for HARD_FRAME_POINTER_IS_FRAME_POINTER 2015-04-22 00:44:54 +00:00
reload.c make some HAVE_cc0 code always compiled 2015-04-22 00:44:37 +00:00
reload.h
reorg.c change local vars to rtx_insn * 2015-05-02 21:03:53 +00:00
resource.c add default for EPILOGUE_USES 2015-04-28 04:43:12 +00:00
resource.h
rtl-chkp.c
rtl-chkp.h
rtl-error.c
rtl-error.h
rtl-iter.h
rtl.c
rtl.def
rtl.h
rtlanal.c remove more ifdef HAVE_cc0 2015-04-22 00:44:20 +00:00
rtlhash.c
rtlhash.h
rtlhooks-def.h
rtlhooks.c
sanitizer.def
sanopt.c
sbitmap.c
sbitmap.h
sched-deps.c make several functions in the scheduler take rtx_insn * 2015-05-02 21:05:54 +00:00
sched-ebb.c
sched-int.h make several functions in the scheduler take rtx_insn * 2015-05-02 21:05:54 +00:00
sched-rgn.c make several functions in the scheduler take rtx_insn * 2015-05-02 21:05:54 +00:00
sched-vis.c
sdbout.c
sdbout.h
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c
sel-sched-ir.h
sel-sched.c make several functions in the scheduler take rtx_insn * 2015-05-02 21:05:54 +00:00
sel-sched.h
sese.c
sese.h
shrink-wrap.c always define HAVE_simple_return and HAVE_return 2015-04-28 04:44:09 +00:00
shrink-wrap.h always define HAVE_simple_return and HAVE_return 2015-04-28 04:44:09 +00:00
signop.h
simplify-rtx.c [simplify-rtx][trivial] Use std::swap instead of manually swapping 2015-04-27 13:45:26 +00:00
sparseset.c
sparseset.h
sreal.c
sreal.h
ssa-iterators.h
stab.def
stack-ptr-mod.c
statistics.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
statistics.h
stmt.c re PR target/65689 ([AArch64] S constraint fails for inline asm at -O0) 2015-04-17 18:43:28 +02:00
stmt.h
stor-layout.c re PR c++/65734 (Yet another case of lost alignment by stor_layout) 2015-04-28 10:43:48 -04:00
stor-layout.h
store-motion.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
streamer-hooks.c
streamer-hooks.h
stringpool.c
stringpool.h
symbol-summary.h
symtab.c
sync-builtins.def
system.h
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target.def [doc] Update definition location of attribute_spec in documentation 2015-05-01 15:35:15 +00:00
target.h
targhooks.c remove #if ARGS_GROW_DOWNWARD 2015-04-28 04:47:09 +00:00
targhooks.h
timevar.c
timevar.def
timevar.h
tlink.c
toplev.c always define HAVE_epilogue 2015-04-28 04:45:12 +00:00
toplev.h
tracer.c
trans-mem.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
trans-mem.h
tree-affine.c
tree-affine.h
tree-browser.c
tree-browser.def
tree-call-cdce.c Fix example in header comment in tree-call-cdce.c 2015-04-28 08:46:37 +00:00
tree-cfg.c stor-layout.c (self_referential_component_ref_p): New predicate. 2015-04-27 10:29:07 +00:00
tree-cfg.h Add gimple_find_sub_bbs 2015-04-17 09:26:33 +00:00
tree-cfgcleanup.c
tree-cfgcleanup.h
tree-chkp-opt.c
tree-chkp.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
tree-chkp.h
tree-chrec.c
tree-chrec.h
tree-complex.c
tree-core.h
tree-data-ref.c
tree-data-ref.h
tree-dfa.c
tree-dfa.h
tree-diagnostic.c
tree-diagnostic.h
tree-dump.c
tree-dump.h
tree-eh.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-eh.h
tree-emutls.c
tree-hasher.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-if-conv.c
tree-inline.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
tree-inline.h
tree-into-ssa.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-into-ssa.h
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c
tree-nested.c
tree-nested.h
tree-nrv.c
tree-object-size.c
tree-object-size.h
tree-outof-ssa.c
tree-outof-ssa.h
tree-parloops.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-parloops.h
tree-pass.h Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
tree-phinodes.c
tree-phinodes.h
tree-predcom.c
tree-pretty-print.c
tree-pretty-print.h
tree-profile.c
tree-scalar-evolution.c
tree-scalar-evolution.h
tree-sra.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-address.c
tree-ssa-address.h
tree-ssa-alias.c
tree-ssa-alias.h
tree-ssa-ccp.c re PR c++/65851 (ice in set_lattice_value at tree-ssa-cc p.c:535) 2015-04-28 07:26:41 +00:00
tree-ssa-coalesce.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-coalesce.h
tree-ssa-copy.c
tree-ssa-copyrename.c
tree-ssa-dce.c
tree-ssa-dom.c * tree-ssa-dom.c (record_equality); Fix comment typos. 2015-04-28 17:18:27 -06:00
tree-ssa-dom.h
tree-ssa-dse.c
tree-ssa-forwprop.c
tree-ssa-ifcombine.c
tree-ssa-live.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-live.h
tree-ssa-loop-ch.c re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-loop-im.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-loop-ivcanon.c
tree-ssa-loop-ivopts.c Fix spurious semicolons 2015-04-30 21:07:45 +00:00
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.c
tree-ssa-loop-manip.h
tree-ssa-loop-niter.c Fix spurious semicolons 2015-04-30 21:07:45 +00:00
tree-ssa-loop-niter.h
tree-ssa-loop-prefetch.c
tree-ssa-loop-unswitch.c
tree-ssa-loop.c
tree-ssa-loop.h
tree-ssa-math-opts.c
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phiopt.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-phiprop.c
tree-ssa-pre.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-propagate.c tree-ssa-ccp.c (likely_value): See if we have operands that are marked as never simulate again and return... 2015-04-16 07:55:57 +00:00
tree-ssa-propagate.h
tree-ssa-reassoc.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-sccvn.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-sccvn.h
tree-ssa-scopedtables.c re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-scopedtables.h re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-sink.c
tree-ssa-strlen.c
tree-ssa-structalias.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-tail-merge.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-ter.c
tree-ssa-ter.h
tree-ssa-threadedge.c re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-threadedge.h re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-threadupdate.c re PR tree-optimization/65658 (Jump threading too pessimistic when optimizing for size) 2015-04-20 13:35:50 -06:00
tree-ssa-threadupdate.h
tree-ssa-uncprop.c
tree-ssa-uninit.c
tree-ssa.c
tree-ssa.h
tree-ssanames.c
tree-ssanames.h
tree-stdarg.c Evaluate side-effects in expand_ifn_va_arg_1 2015-04-28 06:05:14 +00:00
tree-stdarg.h
tree-streamer-in.c
tree-streamer-out.c
tree-streamer.c
tree-streamer.h
tree-switch-conversion.c
tree-tailcall.c tree-tailcall.c (suitable_for_tail_opt_p, [...]): Remove unneeded forward declarations. 2015-04-22 10:20:32 +02:00
tree-vect-data-refs.c tree-vect-data-refs.c (vect_analyze_group_access): Properly compute GROUP_SIZE for basic-block SLP. 2015-04-29 08:15:52 +00:00
tree-vect-generic.c
tree-vect-loop-manip.c
tree-vect-loop.c
tree-vect-patterns.c
tree-vect-slp.c tree-vect-data-refs.c (vect_analyze_group_access): Properly compute GROUP_SIZE for basic-block SLP. 2015-04-29 08:15:52 +00:00
tree-vect-stmts.c re PR fortran/62283 (basic-block vectorization fails) 2015-04-28 08:30:44 +00:00
tree-vectorizer.c tree-vectorizer.c (set_uid_loop_bbs): New. 2015-04-29 23:42:54 -06:00
tree-vectorizer.h tree-vect-slp.c (vect_find_first_load_in_slp_instance): Remove. 2015-04-23 08:43:10 +00:00
tree-vrp.c re PR tree-optimization/65875 (ICE: Segmentation fault) 2015-04-27 13:26:12 +02:00
tree.c ipa-devirt.c (odr_subtypes_equivalent_p): Compare TYPE_NAME only for aggregate types. 2015-04-30 04:43:32 +00:00
tree.def
tree.h dwarf2out.c (gen_type_die_with_usage): Call verify_type. 2015-04-30 02:45:54 +00:00
treestruct.def
tsan.c
tsan.h
tsystem.h
typeclass.h
ubsan.c
ubsan.h
valtrack.c
valtrack.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
value-prof.c
value-prof.h
var-tracking.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
varasm.c Define & use special macros to record the name & size of cold partitions. 2015-04-30 10:49:02 -07:00
varasm.h Give proper type and size to named cold partitions. 2015-04-27 09:44:35 -07:00
varpool.c
vec.c
vec.h vec.h (vec): Make splice arguments const. 2015-04-27 09:55:21 +00:00
version.c
version.h
vmsdbg.h
vmsdbgout.c
vtable-verify.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
vtable-verify.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
web.c
wide-int-print.cc
wide-int-print.h
wide-int.cc
wide-int.h
xcoff.h
xcoffout.c
xcoffout.h

Copyright (C) 2000-2015 Free Software Foundation, Inc.

This file is intended to contain a few notes about writing C code
within GCC so that it compiles without error on the full range of
compilers GCC needs to be able to compile on.

The problem is that many ISO-standard constructs are not accepted by
either old or buggy compilers, and we keep getting bitten by them.
This knowledge until now has been sparsely spread around, so I
thought I'd collect it in one useful place.  Please add and correct
any problems as you come across them.

I'm going to start from a base of the ISO C90 standard, since that is
probably what most people code to naturally.  Obviously using
constructs introduced after that is not a good idea.

For the complete coding style conventions used in GCC, please read
http://gcc.gnu.org/codingconventions.html


String literals
---------------

Irix6 "cc -n32" and OSF4 "cc" have problems with constant string
initializers with parens around it, e.g.

const char string[] = ("A string");

This is unfortunate since this is what the GNU gettext macro N_
produces.  You need to find a different way to code it.

Some compilers like MSVC++ have fairly low limits on the maximum
length of a string literal; 509 is the lowest we've come across.  You
may need to break up a long printf statement into many smaller ones.


Empty macro arguments
---------------------

ISO C (6.8.3 in the 1990 standard) specifies the following:

If (before argument substitution) any argument consists of no
preprocessing tokens, the behavior is undefined.

This was relaxed by ISO C99, but some older compilers emit an error,
so code like

#define foo(x, y) x y
foo (bar, )

needs to be coded in some other way.


Avoid unnecessary test before free
----------------------------------

Since SunOS 4 stopped being a reasonable portability target,
(which happened around 2007) there has been no need to guard
against "free (NULL)".  Thus, any guard like the following
constitutes a redundant test:

  if (P)
    free (P);

It is better to avoid the test.[*]
Instead, simply free P, regardless of whether it is NULL.

[*] However, if your profiling exposes a test like this in a
performance-critical loop, say where P is nearly always NULL, and
the cost of calling free on a NULL pointer would be prohibitively
high, consider using __builtin_expect, e.g., like this:

  if (__builtin_expect (ptr != NULL, 0))
    free (ptr);



Trigraphs
---------

You weren't going to use them anyway, but some otherwise ISO C
compliant compilers do not accept trigraphs.


Suffixes on Integer Constants
-----------------------------

You should never use a 'l' suffix on integer constants ('L' is fine),
since it can easily be confused with the number '1'.


			Common Coding Pitfalls
			======================

errno
-----

errno might be declared as a macro.


Implicit int
------------

In C, the 'int' keyword can often be omitted from type declarations.
For instance, you can write

  unsigned variable;

as shorthand for

  unsigned int variable;

There are several places where this can cause trouble.  First, suppose
'variable' is a long; then you might think

  (unsigned) variable

would convert it to unsigned long.  It does not.  It converts to
unsigned int.  This mostly causes problems on 64-bit platforms, where
long and int are not the same size.

Second, if you write a function definition with no return type at
all:

  operate (int a, int b)
  {
    ...
  }

that function is expected to return int, *not* void.  GCC will warn
about this.

Implicit function declarations always have return type int.  So if you
correct the above definition to

  void
  operate (int a, int b)
  ...

but operate() is called above its definition, you will get an error
about a "type mismatch with previous implicit declaration".  The cure
is to prototype all functions at the top of the file, or in an
appropriate header.

Char vs unsigned char vs int
----------------------------

In C, unqualified 'char' may be either signed or unsigned; it is the
implementation's choice.  When you are processing 7-bit ASCII, it does
not matter.  But when your program must handle arbitrary binary data,
or fully 8-bit character sets, you have a problem.  The most obvious
issue is if you have a look-up table indexed by characters.

For instance, the character '\341' in ISO Latin 1 is SMALL LETTER A
WITH ACUTE ACCENT.  In the proper locale, isalpha('\341') will be
true.  But if you read '\341' from a file and store it in a plain
char, isalpha(c) may look up character 225, or it may look up
character -31.  And the ctype table has no entry at offset -31, so
your program will crash.  (If you're lucky.)

It is wise to use unsigned char everywhere you possibly can.  This
avoids all these problems.  Unfortunately, the routines in <string.h>
take plain char arguments, so you have to remember to cast them back
and forth - or avoid the use of strxxx() functions, which is probably
a good idea anyway.

Another common mistake is to use either char or unsigned char to
receive the result of getc() or related stdio functions.  They may
return EOF, which is outside the range of values representable by
char.  If you use char, some legal character value may be confused
with EOF, such as '\377' (SMALL LETTER Y WITH UMLAUT, in Latin-1).
The correct choice is int.

A more subtle version of the same mistake might look like this:

  unsigned char pushback[NPUSHBACK];
  int pbidx;
  #define unget(c) (assert(pbidx < NPUSHBACK), pushback[pbidx++] = (c))
  #define get(c) (pbidx ? pushback[--pbidx] : getchar())
  ...
  unget(EOF);

which will mysteriously turn a pushed-back EOF into a SMALL LETTER Y
WITH UMLAUT.


Other common pitfalls
---------------------

o Expecting 'plain' char to be either sign or unsigned extending.

o Shifting an item by a negative amount or by greater than or equal to
  the number of bits in a type (expecting shifts by 32 to be sensible
  has caused quite a number of bugs at least in the early days).

o Expecting ints shifted right to be sign extended.

o Modifying the same value twice within one sequence point.

o Host vs. target floating point representation, including emitting NaNs
  and Infinities in a form that the assembler handles.

o qsort being an unstable sort function (unstable in the sense that
  multiple items that sort the same may be sorted in different orders
  by different qsort functions).

o Passing incorrect types to fprintf and friends.

o Adding a function declaration for a module declared in another file to
  a .c file instead of to a .h file.