gcc/gcc
Renlin Li da9c88d86d [AArch64] Implement <su><maxmin>v2di3 pattern
gcc/:
        PR target/63424
        * config/aarch64/aarch64-simd.md (<su><maxmin>v2di3): New.

gcc/testsuite/:
        PR target/63424
        * gcc.target/aarch64/pr63424.c: New test.

From-SVN: r217786
2014-11-19 16:34:38 +00:00
..
ada re PR ada/42978 (gnatmake doesn't report the options it actually provides to ranlib) 2014-11-11 11:58:26 +00:00
c Allow the static chain to be set from C 2014-11-19 05:31:24 -08:00
c-family Allow the static chain to be set from C 2014-11-19 05:31:24 -08:00
common Implement MIPS o32 FPXX, FP64, FP64A ABI extensions. 2014-11-12 21:39:46 +00:00
config [AArch64] Implement <su><maxmin>v2di3 pattern 2014-11-19 16:34:38 +00:00
cp re PR c++/63924 (Constexpr constructible expression "is not constexpr" when used in a template non-type argument) 2014-11-18 22:03:45 -05:00
doc Allow the static chain to be set from C 2014-11-19 05:31:24 -08:00
fortran error.c (gfc_fatal_error_1): Renamed from gfc_fatal_error. 2014-11-15 12:06:07 +01:00
ginclude
go compiler: Initialize variables in declaration order. 2014-11-18 17:29:41 +00:00
java Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
lto tree.c (free_lang_data_in_decl): Annotate all functio nbodies with DECL_FUNCTION_SPECIFIC_TARGET. 2014-11-17 16:48:29 +00:00
objc
objcp
po
testsuite [AArch64] Implement <su><maxmin>v2di3 pattern 2014-11-19 16:34:38 +00:00
ABOUT-GCC-NLS
BASE-VER
COPYING
COPYING.LIB
COPYING3
COPYING3.LIB
ChangeLog [AArch64] Implement <su><maxmin>v2di3 pattern 2014-11-19 16:34:38 +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.dataflow
ChangeLog.graphite
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
DATESTAMP Daily bump. 2014-11-19 00:16:31 +00:00
DEV-PHASE
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
LANGUAGES
Makefile.in Makefile.in: Add ccmp.o. 2014-11-17 06:03:07 +00:00
ONEWS
README.Portability
acinclude.m4
aclocal.m4
addresses.h
alias.c
alias.h
alloc-pool.c
alloc-pool.h
asan.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
asan.h Makefile.in (OBJS): Add sanopt.o. 2014-11-04 19:43:01 +00:00
attribs.c attribs.c (decl_attributes): Remove always true condition, TREE_TYPE(x) will never compare equal to a TYPE_DECL. 2014-11-19 03:37:34 +00:00
attribs.h
auto-inc-dec.c
auto-profile.c
auto-profile.h
basic-block.h
bb-reorder.c fibonacci_heap is used for bb-reoder purpose. 2014-11-18 16:13:05 +00:00
bb-reorder.h
bitmap.c
bitmap.h
bt-load.c bt-load is ported to fibonacci_heap. 2014-11-18 16:17:28 +00:00
builtin-attrs.def re PR sanitizer/63839 (ICE: tree check: expected ssa_name, have var_decl in simplify_builtin_call, at tree-ssa-forwprop.c:1441 with -fsanitize=unreachable) 2014-11-14 11:22:12 +00:00
builtin-types.def re PR c/59708 (clang-compatible checked arithmetic builtins) 2014-11-12 13:28:06 +01:00
builtins.c builtins.c (expand_builtin_memcpy_with_bounds): Use target hook instead of BNDmode. 2014-11-17 16:17:06 +00:00
builtins.def re PR c/59708 (clang-compatible checked arithmetic builtins) 2014-11-12 13:28:06 +01:00
builtins.h tree-core.h (built_in_class): Add builtin codes to be used by Pointer Bounds Checker for instrumented builtin... 2014-11-17 13:45:55 +00:00
caller-save.c
calls.c Allow the front-end to create calls with a static chain 2014-11-19 05:30:59 -08:00
calls.h
ccmp.c Makefile.in: Add ccmp.o. 2014-11-17 06:03:07 +00:00
ccmp.h Makefile.in: Add ccmp.o. 2014-11-17 06:03:07 +00:00
cfg-flags.def
cfg.c
cfg.h
cfganal.c
cfganal.h
cfgbuild.c
cfgbuild.h
cfgcleanup.c
cfgcleanup.h
cfgexpand.c cfgexpand.c (expand_gimple_cond): Check ccmp. 2014-11-17 05:52:26 +00:00
cfgexpand.h
cfghooks.c
cfghooks.h
cfgloop.c
cfgloop.h
cfgloopanal.c
cfgloopmanip.c
cfgloopmanip.h
cfgrtl.c re PR debug/63581 (undefined references in debug_info) 2014-11-14 00:30:31 +00:00
cfgrtl.h
cgraph.c re PR regression/63868 (Multiple failures in the libgomp test suite between r217458 and r217501.) 2014-11-19 13:52:12 +00:00
cgraph.h cgraphunit.c (analyze_functions): Use opt_for_fn. 2014-11-17 18:53:51 +00:00
cgraphbuild.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
cgraphclones.c passes.c (execute_one_pass): Do not apply all transforms prior every simple IPA pass. 2014-11-16 19:36:37 +00:00
cgraphunit.c ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn. 2014-11-18 20:44:16 +00:00
chkp-builtins.def ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
cif-code.def
cilk-builtins.def
cilk-common.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
cilk.h
cilkplus.def
collect-utils.c
collect-utils.h
collect2-aix.c
collect2-aix.h
collect2.c collect2.c (main): Don't call fatal_error before diagnostic_initialize. 2014-11-19 14:48:48 +03:00
collect2.h
combine-stack-adj.c
combine.c Don't combine calls into i3, it wouldn't be changed into a CALL_INSN. 2014-11-06 17:19:57 +00:00
common.md
common.opt ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn. 2014-11-18 20:44:16 +00:00
compare-elim.c
conditions.h
config.build
config.gcc [Patch ARM Refactor Builtins 3/8] Pull builtins code to its own file 2014-11-18 09:52:46 +00:00
config.host
config.in configure.ac (--with-diagnostics-color): New configure option, default to --with-diagnostics-color=auto. 2014-11-14 08:30:27 +01:00
configure configure.ac (--with-diagnostics-color): New configure option, default to --with-diagnostics-color=auto. 2014-11-14 08:30:27 +01:00
configure.ac configure.ac (--with-diagnostics-color): New configure option, default to --with-diagnostics-color=auto. 2014-11-14 08:30:27 +01:00
context.c [PATCH 2/7] OpenMP 4.0 offloading infrastructure: LTO streaming. 2014-11-13 13:37:38 +00:00
context.h [PATCH 2/7] OpenMP 4.0 offloading infrastructure: LTO streaming. 2014-11-13 13:37:38 +00:00
convert.c genmatch.c (capture_info::walk_c_expr): Ignore capture uses inside TREE_TYPE (). 2014-10-30 15:36:05 +00:00
convert.h
coretypes.h [PATCH 6/7] OpenMP 4.0 offloading infrastructure: option handling. 2014-11-13 13:54:07 +00:00
coverage.c
coverage.h
cppbuiltin.c Predefine __NO_MATH_ERRNO__ for -fno-math-errno. 2014-11-12 13:33:45 +00:00
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c
cse.c
cselib.c
cselib.h
cstamp-h.in
data-streamer-in.c
data-streamer-out.c
data-streamer.c
data-streamer.h
dbgcnt.c
dbgcnt.def
dbgcnt.h
dbxout.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
dbxout.h
dce.c
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h [Patch 1/7] Hookize *_BY_PIECES_P 2014-11-01 08:13:09 +00:00
df-core.c rtl.h (rtx_function, [...]): Delete. 2014-11-12 09:05:29 +00:00
df-problems.c
df-scan.c
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h re PR driver/36312 (should refuse to overwrite input file with output file) 2014-11-11 23:33:25 +00:00
diagnostic.c re PR driver/36312 (should refuse to overwrite input file with output file) 2014-11-11 23:33:25 +00:00
diagnostic.def
diagnostic.h
dojump.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
dominance.c
dominance.h
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
dumpfile.c
dumpfile.h
dwarf2asm.c
dwarf2asm.h
dwarf2cfi.c
dwarf2out.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
dwarf2out.h
emit-rtl.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
emit-rtl.h
errors.c
errors.h
et-forest.c
et-forest.h
except.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
except.h
exec-tool.in
explow.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
expmed.c cfgexpand.c (expand_gimple_cond): Check ccmp. 2014-11-17 05:52:26 +00:00
expmed.h cfgexpand.c (expand_gimple_cond): Check ccmp. 2014-11-17 05:52:26 +00:00
expr.c tree-core.h (built_in_class): Add builtin codes to be used by Pointer Bounds Checker for instrumented builtin... 2014-11-17 13:45:55 +00:00
expr.h cfgexpand.c (expand_gimple_cond): Check ccmp. 2014-11-17 05:52:26 +00:00
fibonacci_heap.h New template fibonacci_heap class introduced. 2014-11-18 16:09:11 +00:00
file-find.c
file-find.h
final.c Add a target hook for assembling undeclared decls. 2014-11-10 16:12:21 +00:00
fixed-value.c
fixed-value.h
flag-types.h Makefile.in: Remove the compilation of graphite-clast-to-gimple.o. 2014-11-10 20:32:31 +00:00
flags.h
fold-const.c re PR middle-end/63879 (ICE compiling Linux Kernel fs/ext3/namei.c with -fsanitize=undefined) 2014-11-19 12:03:04 +00:00
fold-const.h match.pd: Implement more binary patterns exercised by fold_stmt. 2014-11-14 09:30:08 +00:00
fp-test.c
function.c re PR c/59708 (clang-compatible checked arithmetic builtins) 2014-11-12 13:28:06 +01:00
function.h Make thread_prologue_and_epilogue_insns callable from backends. 2014-11-10 16:12:30 +00:00
fwprop.c
gcc-ar.c
gcc-plugin.h
gcc-symtab.h
gcc.c re PR bootstrap/63853 (The use of strchrnul breaks bootstrap on x86_64-apple-darwin14.) 2014-11-13 22:06:15 +00:00
gcc.h
gcov-counter.def
gcov-dump.c
gcov-io.c
gcov-io.h
gcov-iov.c
gcov-tool.c
gcov.c
gcse.c
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
genconstants.c
genemit.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
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 [PATCH 3/7] OpenMP 4.0 offloading infrastructure: Offload tables. 2014-11-13 13:44:04 +00:00
gengtype.h
genhooks.c
genmatch.c genmatch.c (add_operator): Allow CONSTRUCTOR. 2014-11-14 08:37:41 +00:00
genmddeps.c
genmddump.c
genmodes.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
genmultilib
genopinit.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
ggc-common.c
ggc-internal.h
ggc-none.c
ggc-page.c
ggc.h
gimple-builder.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
gimple-builder.h
gimple-expr.c
gimple-expr.h
gimple-fold.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
gimple-fold.h gimple-fold.h (gimple_fold_stmt_to_constant_1): Add 2nd valueization hook defaulted to no_follow_ssa_edges. 2014-11-14 13:32:56 +00:00
gimple-iterator.c
gimple-iterator.h
gimple-low.c gimple-low.c (lower_function_body): Clear the location of the first inserted representative return if... 2014-11-10 08:53:16 +00:00
gimple-low.h
gimple-match-head.c
gimple-match.h
gimple-pretty-print.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
gimple-pretty-print.h
gimple-ssa-isolate-paths.c
gimple-ssa-strength-reduction.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
gimple-ssa.h
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple-walk.c
gimple-walk.h
gimple.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
gimple.def
gimple.h gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
gimplify-me.c
gimplify-me.h
gimplify.c Allow the front-end to create calls with a static chain 2014-11-19 05:30:59 -08:00
gimplify.h
glimits.h
godump.c godump.c (go_format_type): Rewrite RECORD_TYPE nad UNION_TYPE support with -fdump-go-spec. 2014-11-04 00:00:14 +00:00
graph.c
graph.h
graphds.c
graphds.h
graphite-blocking.c Makefile.in: Remove the compilation of graphite-clast-to-gimple.o. 2014-11-10 20:32:31 +00:00
graphite-dependences.c Makefile.in: Remove the compilation of graphite-clast-to-gimple.o. 2014-11-10 20:32:31 +00:00
graphite-interchange.c Makefile.in (CLOOGLIBS, CLOOGINC): Remove. 2014-11-12 19:28:36 +01:00
graphite-isl-ast-to-gimple.c New unroll and jam option in Graphite. 2014-11-15 15:37:49 +00:00
graphite-isl-ast-to-gimple.h
graphite-optimize-isl.c Support for unroll and jam optimization. 2014-11-17 22:59:07 +00:00
graphite-poly.c New unroll and jam option in Graphite. 2014-11-15 15:37:49 +00:00
graphite-poly.h New unroll and jam option in Graphite. 2014-11-15 15:37:49 +00:00
graphite-scop-detection.c Makefile.in: Remove the compilation of graphite-clast-to-gimple.o. 2014-11-10 20:32:31 +00:00
graphite-scop-detection.h
graphite-sese-to-poly.c Makefile.in: Remove the compilation of graphite-clast-to-gimple.o. 2014-11-10 20:32:31 +00:00
graphite-sese-to-poly.h
graphite.c New unroll and jam option in Graphite. 2014-11-15 15:37:49 +00:00
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.c timevar.def (TV_SCHED_FUSION): New time var. 2014-11-14 02:32:38 +00:00
hard-reg-set.h
hash-map.h genmatch.c: Remove <map>, <utility> and <string> includes. 2014-10-30 15:41:45 +00:00
hash-set.h
hash-table.c
hash-table.h re PR middle-end/63819 (Cannot build compiler with --enable-gather-detailed-mem-stats (error: default argument given for parameter 5 of ‘void* ggc_internal_cleared_alloc)) 2014-11-12 10:12:47 +00:00
highlev-plugin-common.h
hooks.c [PATCH 6/7] OpenMP 4.0 offloading infrastructure: option handling. 2014-11-13 13:54:07 +00:00
hooks.h [PATCH 6/7] OpenMP 4.0 offloading infrastructure: option handling. 2014-11-13 13:54:07 +00:00
host-default.c
hosthooks-def.h
hosthooks.h
hw-doloop.c
hw-doloop.h
hwint.c
hwint.h
ifcvt.c ifcvt.c (HAVE_cbranchcc4): Define. 2014-11-17 06:29:07 +00:00
ifcvt.h
inchash.c
inchash.h
incpath.c
incpath.h
init-regs.c
input.c input.c (expand_location_to_spelling_point): Fix typo. 2014-11-03 22:57:33 +00:00
input.h
insn-addr.h
insn-notes.def
internal-fn.c re PR sanitizer/63520 (ICE: in get_biv_step, at loop-iv.c:824 with -fsanitize=undefined on ppc64) 2014-11-19 10:49:18 +01:00
internal-fn.def re PR c/59708 (clang-compatible checked arithmetic builtins) 2014-11-12 13:28:06 +01:00
internal-fn.h
intl.c
intl.h
ipa-chkp.c tree-core.h (built_in_class): Add builtin codes to be used by Pointer Bounds Checker for instrumented builtin... 2014-11-17 13:45:55 +00:00
ipa-chkp.h tree-core.h (built_in_class): Add builtin codes to be used by Pointer Bounds Checker for instrumented builtin... 2014-11-17 13:45:55 +00:00
ipa-comdats.c
ipa-cp.c ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn. 2014-11-18 20:44:16 +00:00
ipa-devirt.c ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn. 2014-11-18 20:44:16 +00:00
ipa-icf-gimple.c ipa-icf-gimple.c (func_checker::compare_bb): Fix comment typo. 2014-11-11 00:08:08 +01:00
ipa-icf-gimple.h re PR tree-optimization/63574 (ICE building libjava (segfault) on arm-linux-gnueabihf) 2014-10-30 10:10:58 +00:00
ipa-icf.c passes.c (execute_one_pass): Do not apply all transforms prior every simple IPA pass. 2014-11-16 19:36:37 +00:00
ipa-icf.h re PR bootstrap/63622 (Bootstrap fails on x86_64-apple-darwin1[34] after revision r216305) 2014-11-11 14:58:21 +00:00
ipa-inline-analysis.c ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn. 2014-11-18 20:44:16 +00:00
ipa-inline-transform.c ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn. 2014-11-18 20:44:16 +00:00
ipa-inline.c ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn. 2014-11-18 20:44:16 +00:00
ipa-inline.h ipa-prop.h (ipa_get_jf_pass_through_type_preserved): use agg_preserved flag instead. 2014-11-14 21:03:19 +01:00
ipa-polymorphic-call.c * ipa-polymorphic-call.c 2014-11-16 21:01:45 +00:00
ipa-profile.c ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn. 2014-11-18 20:44:16 +00:00
ipa-prop.c ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn. 2014-11-18 20:44:16 +00:00
ipa-prop.h ipa-cp.c (ipa_get_indirect_edge_target_1): Handle speculation. 2014-11-17 22:04:36 +00:00
ipa-pure-const.c ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn. 2014-11-18 20:44:16 +00:00
ipa-ref.c
ipa-ref.h ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
ipa-reference.c
ipa-reference.h
ipa-split.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
ipa-utils.c
ipa-utils.h ipa-utils.h: Fix typo in comments. 2014-11-13 16:04:30 +00:00
ipa-visibility.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
ipa.c ipa-cp.c (ipcp_cloning_candidate_p): Use opt_for_fn. 2014-11-18 20:44:16 +00:00
ira-build.c
ira-color.c
ira-conflicts.c ira-conflicts.c (build_conflict_bit_table): Add the current object to OBJECTS_LIVE after traversing OBJECTS_LIVE. 2014-11-17 15:05:45 -07:00
ira-costs.c
ira-emit.c
ira-int.h
ira-lives.c
ira.c re PR middle-end/63762 ([ARM]GCC generates UNPREDICTABLE STR with Rn = Rt when hard-float abi is used) 2014-11-19 15:15:51 +00:00
ira.h
is-a.h
jump.c
langhooks-def.h
langhooks.c
langhooks.h
lcm.c
lcm.h
libfuncs.h
limitx.h
limity.h
lists.c
lock-and-run.sh
loop-doloop.c
loop-init.c
loop-invariant.c
loop-iv.c
loop-unroll.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
loop-unroll.h
lower-subreg.c
lower-subreg.h
lra-assigns.c
lra-coalesce.c
lra-constraints.c common.opt (flra-remat): New. 2014-11-13 03:02:49 +00:00
lra-eliminations.c [LRA] Relax one gcc_assert in lra-eliminate for fixed register 2014-11-18 09:30:08 +00:00
lra-int.h lra-int.h (lra_create_live_ranges): Add parameter. 2014-11-14 20:06:11 +00:00
lra-lives.c lra-int.h (lra_create_live_ranges): Add parameter. 2014-11-14 20:06:11 +00:00
lra-remat.c re PR rtl-optimization/63906 (lra_remat miscompiles glibc on aarch64) 2014-11-18 00:14:25 +00:00
lra-spills.c common.opt (flra-remat): New. 2014-11-13 03:02:49 +00:00
lra.c lra-remat.c (cand_transf_func): Process regno for rematerialization too. 2014-11-16 05:00:30 +00:00
lra.h
lto-cgraph.c ipa-pure-const.c (struct funct_state_d): Add can_free field. 2014-11-14 18:46:50 +01:00
lto-compress.c
lto-compress.h
lto-opts.c [PATCH 6/7] OpenMP 4.0 offloading infrastructure: option handling. 2014-11-13 13:54:07 +00:00
lto-section-in.c [PATCH 3/7] OpenMP 4.0 offloading infrastructure: Offload tables. 2014-11-13 13:44:04 +00:00
lto-section-names.h [PATCH 3/7] OpenMP 4.0 offloading infrastructure: Offload tables. 2014-11-13 13:44:04 +00:00
lto-section-out.c
lto-streamer-in.c
lto-streamer-out.c lto-streamer-out.c (hash_tree): Use cl_optimization_hash. 2014-11-15 16:53:51 +00:00
lto-streamer.c [PATCH 2/7] OpenMP 4.0 offloading infrastructure: LTO streaming. 2014-11-13 13:37:38 +00:00
lto-streamer.h lto-streamer-out.c (hash_tree): Use cl_optimization_hash. 2014-11-15 16:53:51 +00:00
lto-wrapper.c collect2.c (main): Don't call fatal_error before diagnostic_initialize. 2014-11-19 14:48:48 +03:00
machmode.def
machmode.h ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
main.c
match.pd tree.c (element_mode, [...]): New functions. 2014-11-18 10:26:31 +00:00
mcf.c
mkconfig.sh
mode-classes.def ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
mode-switching.c
modulo-sched.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
omega.c
omega.h
omp-builtins.def
omp-low.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
omp-low.h [PATCH 3/7] OpenMP 4.0 offloading infrastructure: Offload tables. 2014-11-13 13:44:04 +00:00
opt-functions.awk
opt-gather.awk
opt-include.awk
opt-read.awk
optabs.c cfgexpand.c (expand_gimple_cond): Check ccmp. 2014-11-17 05:52:26 +00:00
optabs.def re PR c/59708 (clang-compatible checked arithmetic builtins) 2014-11-12 13:28:06 +01:00
optabs.h cfgexpand.c (expand_gimple_cond): Check ccmp. 2014-11-17 05:52:26 +00:00
optc-gen.awk
optc-save-gen.awk lto-streamer-out.c (hash_tree): Use cl_optimization_hash. 2014-11-15 16:53:51 +00:00
opth-gen.awk lto-streamer-out.c (hash_tree): Use cl_optimization_hash. 2014-11-15 16:53:51 +00:00
opts-common.c
opts-diagnostic.h
opts-global.c opts-global.c (postpone_unknown_option_warning): Fix spelling. 2014-11-13 01:08:06 +00:00
opts.c opts.c (finish_options): Disable aggressive opts for sanitizer. 2014-11-18 08:46:39 +00:00
opts.h
output.h Add a target hook for assembling undeclared decls. 2014-11-10 16:12:21 +00:00
params.c
params.def New unroll and jam option in Graphite. 2014-11-15 15:37:49 +00:00
params.h
pass_manager.h
passes.c passes.c (remove_cgraph_node_from_order): New. 2014-11-18 07:25:12 +00:00
passes.def timevar.def (TV_SCHED_FUSION): New time var. 2014-11-14 02:32:38 +00:00
plugin.c
plugin.def
plugin.h
postreload-gcse.c
postreload.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
predict.c predict.c (maybe_hot_frequency_p): Use opt_for_fn. 2014-11-17 18:52:28 +00:00
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
real.c
real.h
realmpfr.c
realmpfr.h
recog.c
recog.h
ree.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
reg-notes.def
reg-stack.c
regcprop.c
regcprop.h
reginfo.c
regrename.c
regrename.h
regs.h
regset.h
regstat.c
reload.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
reload.h
reload1.c Add a no_register_allocation target hook. 2014-11-05 12:14:27 +00:00
reorg.c * reorg.c (fill_slots_from_thread): Do not copy frame-related insns. 2014-11-11 22:31:09 +00:00
resource.c
resource.h
rtl-chkp.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
rtl-chkp.h ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
rtl-error.c
rtl-error.h
rtl-iter.h
rtl.c
rtl.def
rtl.h rtl.h (rtx_function, [...]): Delete. 2014-11-12 09:05:29 +00:00
rtlanal.c rtl.h (rtx_function, [...]): Delete. 2014-11-12 09:05:29 +00:00
rtlhash.c
rtlhash.h
rtlhooks-def.h
rtlhooks.c
sanitizer.def re PR sanitizer/63839 (ICE: tree check: expected ssa_name, have var_decl in simplify_builtin_call, at tree-ssa-forwprop.c:1441 with -fsanitize=unreachable) 2014-11-14 11:22:12 +00:00
sanopt.c sanopt.c: Include tree-ssa-operands.h. 2014-11-14 18:28:11 +01:00
sbitmap.c
sbitmap.h
sched-deps.c sched-deps.c (sched_analyze_1): Check pending list if it is not less than MAX_PENDING_LIST_LENGTH. 2014-11-11 02:10:37 +00:00
sched-ebb.c
sched-int.h timevar.def (TV_SCHED_FUSION): New time var. 2014-11-14 02:32:38 +00:00
sched-rgn.c timevar.def (TV_SCHED_FUSION): New time var. 2014-11-14 02:32:38 +00:00
sched-vis.c
sdbout.c sdbout.c (sdbout_symbol): Eliminate register only if decl isn't a global variable. 2014-11-12 21:04:50 +01:00
sdbout.h
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c
sel-sched-ir.h
sel-sched.c
sel-sched.h
sese.c
sese.h
shrink-wrap.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
shrink-wrap.h
signop.h
simplify-rtx.c re PR rtl-optimization/63843 (wrong code generation at -O1 and higher) 2014-11-19 09:18:53 +01:00
sparseset.c
sparseset.h
sreal.c sreal.c (sreal::to_int): Use INTTYPE_MAXIMUM (int64_t) instead of INT64_MAX. 2014-11-11 09:53:08 +01:00
sreal.h c++ify sreal 2014-11-11 02:31:00 +00:00
ssa-iterators.h
stab.def
stack-ptr-mod.c
statistics.c
statistics.h
stmt.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
stmt.h
stor-layout.c re PR sanitizer/63802 (UBSan doesn't catch misaligned access if address is 16-bytes (or more) aligned) 2014-11-18 07:37:17 +00:00
stor-layout.h
store-motion.c
streamer-hooks.c
streamer-hooks.h
stringpool.c
stringpool.h
symtab.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
sync-builtins.def
system.h system.h: Include algorithm and utility. 2014-11-11 14:12:39 +01:00
target-def.h
target-globals.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
target-globals.h
target-hooks-macros.h
target.def Make TARGET_STATIC_CHAIN allow a function type 2014-11-19 05:30:34 -08:00
target.h [Patchv3] Control SRA and IPA-SRA by a param rather than MOVE_RATIO 2014-11-06 14:18:52 +00:00
targhooks.c Make TARGET_STATIC_CHAIN allow a function type 2014-11-19 05:30:34 -08:00
targhooks.h [Patch] PR target/63937 TARGET_USE_BY_PIECES_INFRASTRUCTURE_P should take an unsigned HOST_WIDE_INT size argument 2014-11-18 22:45:21 +00:00
timevar.c
timevar.def timevar.def (TV_SCHED_FUSION): New time var. 2014-11-14 02:32:38 +00:00
timevar.h
tlink.c
toplev.c New unroll and jam option in Graphite. 2014-11-15 15:37:49 +00:00
toplev.h
tracer.c tracer ported to new fibonacci_heap data structure. 2014-11-18 16:15:52 +00:00
trans-mem.c builtins.c (fold_builtin_atomic_always_lock_free): Use CONVERT_EXPR_P, CONVERT_EXPR_CODE_P and CASE_CONVERT where approprate. 2014-10-31 16:26:43 +00:00
trans-mem.h
tree-affine.c builtins.c (fold_builtin_atomic_always_lock_free): Use CONVERT_EXPR_P, CONVERT_EXPR_CODE_P and CASE_CONVERT where approprate. 2014-10-31 16:26:43 +00:00
tree-affine.h
tree-browser.c
tree-browser.def
tree-call-cdce.c
tree-cfg.c Allow the front-end to create calls with a static chain 2014-11-19 05:30:59 -08:00
tree-cfg.h tree-chkp-opt.c (chkp_get_nobnd_fndecl): New. 2014-11-17 13:52:37 +00:00
tree-cfgcleanup.c * tree-cfgcleanup.c (fixup_noreturn_call): Do not perform DCE here. 2014-11-06 20:13:18 +00:00
tree-cfgcleanup.h
tree-chkp-opt.c tree-chkp-opt.c (chkp_get_nobnd_fndecl): New. 2014-11-17 13:52:37 +00:00
tree-chkp.c tree-core.h (built_in_class): Add builtin codes to be used by Pointer Bounds Checker for instrumented builtin... 2014-11-17 13:45:55 +00:00
tree-chkp.h ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
tree-chrec.c
tree-chrec.h
tree-complex.c
tree-core.h tree-core.h (built_in_class): Add builtin codes to be used by Pointer Bounds Checker for instrumented builtin... 2014-11-17 13:45:55 +00:00
tree-data-ref.c builtins.c (fold_builtin_atomic_always_lock_free): Use CONVERT_EXPR_P, CONVERT_EXPR_CODE_P and CASE_CONVERT where approprate. 2014-10-31 16:26:43 +00:00
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 tree-eh.c (operation_could_trap_helper_p): Handle conversions like ordinary operations. 2014-11-03 15:49:43 +00:00
tree-eh.h
tree-emutls.c
tree-hasher.h
tree-if-conv.c tree-if-conv.c (add_to_predicate_list): Check unconditionally that bb is always executed to early exit. 2014-11-10 07:46:45 +00:00
tree-inline.c C++14 constexpr support (minus loops and multiple returns) 2014-11-17 13:16:14 -05:00
tree-inline.h C++14 constexpr support (minus loops and multiple returns) 2014-11-17 13:16:14 -05:00
tree-into-ssa.c re PR tree-optimization/60770 (disappearing clobbers) 2014-11-03 10:47:04 +00:00
tree-into-ssa.h
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
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 Run pass_expand_omp_ssa after pass_paralellize_loops 2014-11-13 10:51:58 +00:00
tree-parloops.h
tree-pass.h timevar.def (TV_SCHED_FUSION): New time var. 2014-11-14 02:32:38 +00:00
tree-phinodes.c
tree-phinodes.h
tree-predcom.c
tree-pretty-print.c Remove VEC_RSHIFT_EXPR tree code, now unused 2014-11-13 16:35:06 +00:00
tree-pretty-print.h
tree-profile.c
tree-scalar-evolution.c
tree-scalar-evolution.h
tree-sra.c [Patchv3] Control SRA and IPA-SRA by a param rather than MOVE_RATIO 2014-11-06 14:18:52 +00:00
tree-ssa-address.c
tree-ssa-address.h
tree-ssa-alias.c
tree-ssa-alias.h
tree-ssa-ccp.c re PR tree-optimization/63914 (ICE in set_lattice_value, at tree-ssa-ccp.c:517) 2014-11-18 13:03:46 +00:00
tree-ssa-coalesce.c
tree-ssa-coalesce.h
tree-ssa-copy.c
tree-ssa-copyrename.c
tree-ssa-dce.c tree-ssa.dce.c (eliminate_unnecessary_stmts): Eliminate IFN_GOMP_SIMD_LANE without lhs as useless. 2014-11-14 20:41:00 +01:00
tree-ssa-dom.c builtins.c (fold_builtin_atomic_always_lock_free): Use CONVERT_EXPR_P, CONVERT_EXPR_CODE_P and CASE_CONVERT where approprate. 2014-10-31 16:26:43 +00:00
tree-ssa-dom.h
tree-ssa-dse.c
tree-ssa-forwprop.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree-ssa-ifcombine.c
tree-ssa-live.c re PR tree-optimization/60770 (disappearing clobbers) 2014-11-03 10:47:04 +00:00
tree-ssa-live.h
tree-ssa-loop-ch.c
tree-ssa-loop-im.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree-ssa-loop-ivcanon.c tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add log message for max-completely-peeled-insns limit. 2014-11-15 12:06:23 +00:00
tree-ssa-loop-ivopts.c
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.c
tree-ssa-loop-manip.h
tree-ssa-loop-niter.c
tree-ssa-loop-niter.h
tree-ssa-loop-prefetch.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
tree-ssa-loop-unswitch.c
tree-ssa-loop.c
tree-ssa-loop.h
tree-ssa-math-opts.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree-ssa-operands.c tree-ssa-operands.c (finalize_ssa_uses): Properly put released operands on the free list. 2014-11-10 15:46:23 +00:00
tree-ssa-operands.h
tree-ssa-phiopt.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree-ssa-phiprop.c
tree-ssa-pre.c re PR tree-optimization/63800 (ICE on valid code at -O3 on x86_64-linux-gnu) 2014-11-10 14:31:31 +00:00
tree-ssa-propagate.c re PR tree-optimization/63748 (wrong may be used uninitialized warning (abnormal edges)) 2014-11-10 20:43:40 +00:00
tree-ssa-propagate.h
tree-ssa-reassoc.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree-ssa-sccvn.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
tree-ssa-sccvn.h ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
tree-ssa-sink.c
tree-ssa-strlen.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree-ssa-structalias.c passes.c (execute_one_pass): Do not apply all transforms prior every simple IPA pass. 2014-11-16 19:36:37 +00:00
tree-ssa-tail-merge.c Fix tail-merge pass for dead type-unsafe code 2014-11-19 10:44:58 +00:00
tree-ssa-ter.c
tree-ssa-ter.h
tree-ssa-threadedge.c re PR tree-optimization/61515 (Extremely long compile time for generated code) 2014-11-07 15:55:00 -07:00
tree-ssa-threadedge.h
tree-ssa-threadupdate.c [PATCH] Partially fix PR61529, bound basic block frequency 2014-11-10 17:53:21 +00:00
tree-ssa-threadupdate.h
tree-ssa-uncprop.c
tree-ssa-uninit.c
tree-ssa.c re PR tree-optimization/60770 (disappearing clobbers) 2014-11-03 10:47:04 +00:00
tree-ssa.h re PR tree-optimization/60770 (disappearing clobbers) 2014-11-03 10:47:04 +00:00
tree-ssanames.c
tree-ssanames.h
tree-stdarg.c
tree-stdarg.h
tree-streamer-in.c tree-core.h (built_in_class): Add builtin codes to be used by Pointer Bounds Checker for instrumented builtin... 2014-11-17 13:45:55 +00:00
tree-streamer-out.c lto-streamer-out.c (hash_tree): Use cl_optimization_hash. 2014-11-15 16:53:51 +00:00
tree-streamer.c
tree-streamer.h
tree-switch-conversion.c 2014-11-01 Andrew MacLeod <amacleod@redhat,com> 2014-11-01 13:34:15 +00:00
tree-tailcall.c
tree-vect-data-refs.c [Vectorizer] Split vect_gen_perm_mask into _checked and _any variants 2014-11-13 16:20:13 +00:00
tree-vect-generic.c Remove VEC_RSHIFT_EXPR tree code, now unused 2014-11-13 16:35:06 +00:00
tree-vect-loop-manip.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree-vect-loop.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree-vect-patterns.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree-vect-slp.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree-vect-stmts.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree-vectorizer.c
tree-vectorizer.h [Vectorizer] Split vect_gen_perm_mask into _checked and _any variants 2014-11-13 16:20:13 +00:00
tree-vrp.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tree.c * tree.c (warn_deprecated_use): Show declaration with inform. 2014-11-18 08:36:38 -05:00
tree.def Remove VEC_RSHIFT_EXPR tree code, now unused 2014-11-13 16:35:06 +00:00
tree.h tree.c (element_mode, [...]): New functions. 2014-11-18 10:26:31 +00:00
treestruct.def
tsan.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
tsan.h
tsystem.h
typeclass.h
ubsan.c gimple.h (gimple_build_assign_with_ops): Add unary arg overload. 2014-11-19 15:43:02 +01:00
ubsan.h re PR sanitizer/63839 (ICE: tree check: expected ssa_name, have var_decl in simplify_builtin_call, at tree-ssa-forwprop.c:1441 with -fsanitize=unreachable) 2014-11-14 11:22:12 +00:00
valtrack.c
valtrack.h
value-prof.c ipa-chkp.c: New. 2014-11-05 12:42:03 +00:00
value-prof.h
var-tracking.c fibonacci_heap is used for var-tracking. 2014-11-18 16:18:46 +00:00
varasm.c Add a target hook for assembling undeclared decls. 2014-11-10 16:12:21 +00:00
varasm.h
varpool.c re PR regression/63868 (Multiple failures in the libgomp test suite between r217458 and r217501.) 2014-11-19 13:52:12 +00:00
vec.c
vec.h
version.c
version.h
vmsdbg.h
vmsdbgout.c
vtable-verify.c
vtable-verify.h
web.c
wide-int-print.cc
wide-int-print.h
wide-int.cc
wide-int.h system.h: Include algorithm and utility. 2014-11-11 14:12:39 +01:00
xcoff.h
xcoffout.c
xcoffout.h

README.Portability

Copyright (C) 2000-2014 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.