gcc/gcc
Martin Liska 3e43b79cce Revert r234572 (aka PR testsuite/70577)
Revert
	2016-03-30  Jan Hubicka  <hubicka@ucw.cz>

	* tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can't get realistic
	estimates here.
	* tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also
	max_loop_iterations_int.
	(tree_unswitch_outer_loop): Likewise.
	* tree-ssa-loop-ivopts.c (avg_loop_niter): Likewise.
	* tree-vect-loop.c (vect_analyze_loop_2): Likewise.

From-SVN: r234902
2016-04-12 13:38:46 +00:00
..
ada decl.c (components_to_record): Restrict the previous change to fields with variable size. 2016-04-02 08:56:19 +00:00
c re PR middle-end/70307 (ICE: in gimplify_expr, at gimplify.c:10915 on valid code) 2016-04-04 08:11:46 +00:00
c-family * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for. 2016-03-28 13:22:49 -04:00
common [Patch AArch64 2/3] Rework the code to print extension strings (pr70133) 2016-04-11 10:14:59 +00:00
config re PR target/70381 (On powerpc, -mfloat128 is on by default for all VSX systems) 2016-04-11 19:45:35 +00:00
cp mangle.c (decl_is_template_id): The template itself counts as a template-id. 2016-04-11 09:38:34 -04:00
doc re PR target/70381 (On powerpc, -mfloat128 is on by default for all VSX systems) 2016-04-11 19:45:35 +00:00
fortran re PR fortran/68566 (ICE on using unusable array in reshape (double free or corruption)) 2016-04-09 19:09:02 +00:00
ginclude Test __cplusplus instead of __GXX_EXPERIMENTAL_CXX0X__ 2016-01-29 12:29:42 +00:00
go runtime: Use atomic load for in entersyscall. 2016-04-02 00:47:53 +00:00
java Remove -fshort-double 2016-02-08 15:36:16 +00:00
jit jit: fix build after r233218 (build_common_tree_nodes) 2016-02-08 17:18:57 +00:00
lto Set flag_pic to flag_pie for PIE in LTO 2016-03-17 04:07:10 -07:00
objc cgraph.c: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. 2016-02-12 00:53:54 +01:00
objcp
po Regenerate .pot files. 2016-04-08 21:57:02 +01:00
testsuite Executable test case for asm flags, by David Wohlferd. 2016-04-12 13:04:44 +00:00
ABOUT-GCC-NLS
BASE-VER
COPYING
COPYING.LIB
COPYING3
COPYING3.LIB
ChangeLog Revert r234572 (aka PR testsuite/70577) 2016-04-12 13:38:46 +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-2015 Minor ChangeLog formatting fixes. 2016-03-02 21:30:48 +01:00
ChangeLog.dataflow
ChangeLog.gimple-classes
ChangeLog.graphite
ChangeLog.jit
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
DATESTAMP Daily bump. 2016-04-12 00:16:19 +00:00
DEV-PHASE
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
LANGUAGES
Makefile.in re PR c/69835 (-Wnonnull diagnoses parameter comparisons with NULL even when those could have changed) 2016-02-16 21:46:17 +01:00
ONEWS
README.Portability
acinclude.m4
aclocal.m4
addresses.h
alias.c re PR rtl-optimization/70484 (Wrong optimization with aliasing and access via char) 2016-04-04 09:30:16 +00:00
alias.h
alloc-pool.c Do not gather mem stats in run_exit_handles (PR 2016-02-25 16:57:39 +00:00
alloc-pool.h Do not gather mem stats in run_exit_handles (PR 2016-02-25 16:57:39 +00:00
asan.c re PR sanitizer/70541 (unnoticed invalid dereference when using address sanitizer) 2016-04-08 13:46:13 +03:00
asan.h
attribs.c
attribs.h
auto-inc-dec.c
auto-profile.c
auto-profile.h
backend.h
basic-block.h
bb-reorder.c re PR rtl-optimization/69609 (block reordering consumes an inordinate amount of time, REE consumes much memory) 2016-02-17 14:57:58 +00:00
bb-reorder.h
bitmap.c re PR tree-optimization/64058 (Performance degradation after r216304) 2016-03-23 07:20:16 -06:00
bitmap.h re PR tree-optimization/64058 (Performance degradation after r216304) 2016-03-23 07:20:16 -06:00
bt-load.c
builtin-attrs.def
builtin-types.def Merge of HSA 2016-01-19 11:35:10 +01:00
builtins.c PR70117, ppc long double isinf 2016-04-08 11:41:52 +09:30
builtins.def
builtins.h
caller-save.c
calls.c * calls.c (load_register_parameters): Fix zero size sibcall logic. 2016-03-18 11:31:18 -04:00
calls.h
ccmp.c This patch fixes an exponential issue in ccmp.c. 2016-02-04 18:23:35 +00:00
ccmp.h
cfg-flags.def
cfg.c
cfg.h
cfganal.c
cfganal.h
cfgbuild.c
cfgbuild.h
cfgcleanup.c
cfgcleanup.h
cfgexpand.c Do not emit red stack zones for a fn with no_sanitize_address 2016-02-18 17:15:25 +00:00
cfgexpand.h
cfghooks.c re PR tree-optimization/69740 (gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "verify_loop_structure") 2016-03-07 10:01:54 -07:00
cfghooks.h
cfgloop.c
cfgloop.h re PR tree-optimization/69740 (gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "verify_loop_structure") 2016-03-07 10:01:54 -07:00
cfgloopanal.c
cfgloopmanip.c tree-ssanames.c (release_free_names_and_compact_live_names): Replace "the the" with "the" in the comments. 2016-01-23 15:13:53 +01:00
cfgloopmanip.h
cfgrtl.c
cfgrtl.h
cgraph.c Set dump_file to NULL in cgraph_node::get_body 2016-03-18 09:17:23 +00:00
cgraph.h cgraph.h (struct cgraph_simd_clone): Add mask_mode field. 2016-04-07 23:32:05 +02:00
cgraphbuild.c
cgraphclones.c re PR lto/70283 (bogus vtable mismatch warnings) 2016-03-29 19:37:55 +00:00
cgraphunit.c re PR c/70093 (Instancing function with VM return type cases internal compiler error in 'assign_stack_temp_for_type'.) 2016-03-16 15:51:47 +00:00
chkp-builtins.def
cif-code.def
cilk-builtins.def
cilk-common.c
cilk.h
cilkplus.def
collect-utils.c
collect-utils.h
collect2-aix.c
collect2-aix.h
collect2.c
collect2.h
combine-stack-adj.c
combine.c re PR rtl-optimization/70429 (Wrong code with -O1.) 2016-03-29 20:49:00 +02:00
common.md
common.opt Properly set flag_pie and flag_pic 2016-03-17 08:11:35 -07:00
compare-elim.c
conditions.h
config.build
config.gcc [Patch AArch64 2/3] Rework the code to print extension strings (pr70133) 2016-04-11 10:14:59 +00:00
config.host
config.in configure.ac (ac_cv_std_swap_in_utility): New test. 2016-01-26 16:34:24 +00:00
configure re PR target/68380 (NetBSD has SSP in libc) 2016-01-27 09:54:48 -07:00
configure.ac re PR target/68380 (NetBSD has SSP in libc) 2016-01-27 09:54:48 -07:00
context.c
context.h
convert.c * convert.c (convert_to_integer_1): Re-indent. 2016-02-08 10:31:53 -05:00
convert.h re PR c++/69631 (Bogus overflow in constant expression error) 2016-02-08 10:31:47 -05:00
coretypes.h
coverage.c re PR lto/70283 (bogus vtable mismatch warnings) 2016-03-29 19:37:55 +00:00
coverage.h
cppbuiltin.c
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c
cse.c [cse][3/4] Don't overwrite original rtx when folding source of set 2016-02-04 09:56:13 +00:00
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
dbxout.h
dce.c
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h
df-core.c
df-problems.c mem-stats.h (struct mem_usage): Use PRIu64 for printing size_t. 2016-02-23 14:01:51 +00:00
df-scan.c
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h
diagnostic-show-locus.c PR c/70264: fix crash in compatible_locations_p with BUILTINS_LOCATION 2016-03-17 18:27:47 +00:00
diagnostic.c PR c++/70105: Defer location expansion until diagnostic_show_locus 2016-03-09 18:14:43 +00:00
diagnostic.def
diagnostic.h PR c++/70105: Defer location expansion until diagnostic_show_locus 2016-03-09 18:14:43 +00:00
dojump.c
dojump.h
dominance.c
dominance.h
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c dse.c (struct store_info): Remove alias_set member. 2016-04-05 14:25:35 +00:00
dumpfile.c
dumpfile.h
dwarf2asm.c
dwarf2asm.h
dwarf2cfi.c
dwarf2out.c re PR debug/70271 (internal compiler error: in dwarf2out_finish, at dwarf2out.c:27346) 2016-03-17 13:43:01 +00:00
dwarf2out.h Replace ENABLE_CHECKING with CHECKING_P in dwarf2out 2016-02-26 10:46:48 +00:00
emit-rtl.c re PR target/48344 (powerpc ICE with -fstack-limit-register=r2) 2016-02-16 23:12:19 +00:00
emit-rtl.h
errors.c
errors.h
et-forest.c
et-forest.h
except.c
except.h
exec-tool.in
explow.c re PR ada/70017 (c52103x and c52104x test failure on s390x) 2016-03-12 11:32:54 +00:00
explow.h
expmed.c re PR rtl-optimization/70174 (ICE at -O1 and above on x86_64-linux-gnu in gen_lowpart_general, at rtlhooks.c:63) 2016-03-11 13:07:01 +01:00
expmed.h
expr.c re PR middle-end/69909 (wrong code with -Os and vectors @ x86_64) 2016-02-24 09:36:16 +01:00
expr.h
fibonacci_heap.h
file-find.c
file-find.h
final.c system.h (string, algorithm): Include only conditionally. 2016-01-22 16:44:10 +00:00
fixed-value.c
fixed-value.h
flag-types.h
flags.h
fold-const-call.c
fold-const-call.h
fold-const.c PR c++/67376 - [5/6 regression] Comparison with pointer to past-the-end 2016-04-02 11:14:48 -06:00
fold-const.h
fp-test.c
function.c
function.h re PR middle-end/70199 (Crash at -O2 when using labels.) 2016-03-16 09:50:18 -07:00
fwprop.c re PR target/70574 (wrong code with -mavx2, read of partially initialised stack variable) 2016-04-08 19:21:17 +02:00
gcc-ar.c
gcc-main.c
gcc-plugin.h
gcc-rich-location.c PR c++/70105: Defer location expansion until diagnostic_show_locus 2016-03-09 18:14:43 +00:00
gcc-rich-location.h
gcc-symtab.h
gcc.c re PR driver/69805 (ICE in greater_than_spec_func, at gcc.c:9722) 2016-02-19 23:18:38 +01:00
gcc.h PR driver/69265 and 69453: improved suggestions for various misspelled options 2016-02-12 17:39:27 +00:00
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 re PR rtl-optimization/70007 (wrong code with -mbmi2) 2016-03-01 22:31:52 +00:00
gcse.h
gdbasan.in
gdbhooks.py Add dot-fn to gdbhooks.py 2016-02-22 10:31:41 +00:00
gdbinit.in
gen-pass-instances.awk
genattr-common.c
genattr.c
genattrtab.c
genautomata.c
gencfn-macros.c
gencheck.c
genchecksum.c
gencodes.c
genconditions.c system.h (string, algorithm): Include only conditionally. 2016-01-22 16:44:10 +00:00
genconfig.c
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 re PR tree-optimization/70251 (Wrong code with -O3 -march=skylake-avx512.) 2016-03-22 14:38:42 +00:00
genmddeps.c
genmddump.c
genmodes.c
genmultilib
genopinit.c
genoutput.c re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 18:47:17 +00:00
genpeep.c
genpreds.c re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 18:47:17 +00:00
genrecog.c genrecog: Fix crash on invalid input 2016-03-15 01:42:43 +01:00
gensupport.c Revert recent gensupport change. 2016-03-01 14:51:17 +00:00
gensupport.h
gentarget-def.c
ggc-common.c re PR pch/68758 (Invalid read of size 8 in gt_pch_save (ggc-common.c:551)) 2016-01-28 08:39:05 +00:00
ggc-internal.h
ggc-none.c
ggc-page.c
ggc.h
gimple-builder.c
gimple-builder.h
gimple-expr.c re PR tree-optimization/70177 (ICE in extract_ops_from_tree starting with r233660) 2016-03-11 13:28:50 +01:00
gimple-expr.h re PR tree-optimization/70177 (ICE in extract_ops_from_tree starting with r233660) 2016-03-11 13:28:50 +01:00
gimple-fold.c re PR tree-optimization/69483 (gcc ICE on x86_64-linux-gnu with "expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p") 2016-01-26 16:51:51 +01:00
gimple-fold.h
gimple-iterator.c
gimple-iterator.h
gimple-laddress.c
gimple-low.c Merge of HSA 2016-01-19 11:35:10 +01:00
gimple-low.h
gimple-match-head.c re PR tree-optimization/70251 (Wrong code with -O3 -march=skylake-avx512.) 2016-03-22 14:38:42 +00:00
gimple-match.h
gimple-predict.h
gimple-pretty-print.c Merge of HSA 2016-01-19 11:35:10 +01:00
gimple-pretty-print.h
gimple-ssa-backprop.c gimple-ssa-backprop.c (optimize_phi): Do not replace an argument corresponding to an abnormal edge. 2016-02-09 17:21:57 +00:00
gimple-ssa-isolate-paths.c cgraph.c: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. 2016-02-12 00:53:54 +01:00
gimple-ssa-nonnull-compare.c re PR c++/69850 (unnecessary -Wnonnull-compare warning) 2016-02-17 23:27:24 +01:00
gimple-ssa-split-paths.c re PR tree-optimization/69999 (ICE in verify_loop_structure, at cfgloop.c:1639 (error: loop with header 3 not in loop tree) at -O3 or -Ofast) 2016-02-29 15:45:41 -07:00
gimple-ssa-strength-reduction.c re PR tree-optimization/68799 (lto ICE on powerpc64le-linux-gnu builing python 2.7.x) 2016-01-18 02:43:06 +00:00
gimple-ssa.h
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple-walk.c Merge of HSA 2016-01-19 11:35:10 +01:00
gimple-walk.h
gimple.c re PR tree-optimization/70177 (ICE in extract_ops_from_tree starting with r233660) 2016-03-11 13:28:50 +01:00
gimple.def Merge of HSA 2016-01-19 11:35:10 +01:00
gimple.h Merge of HSA 2016-01-19 11:35:10 +01:00
gimplify-me.c re PR middle-end/70499 (internal compiler error: in make_ssa_name_fn, at tree-ssanames.c:266) 2016-04-05 08:05:06 +00:00
gimplify-me.h
gimplify.c re PR lto/70289 ([openacc] ICE in input_varpool_node) 2016-04-08 14:09:47 -07:00
gimplify.h
glimits.h
godump.c
graph.c Add dot-fn to gdbhooks.py 2016-02-22 10:31:41 +00:00
graph.h
graphds.c
graphds.h
graphite-dependences.c new scop schedule for isl-0.15 2016-01-26 00:19:20 +00:00
graphite-isl-ast-to-gimple.c Fix typo in copy_cond_phi_args 2016-04-12 10:08:48 +00:00
graphite-optimize-isl.c Fix optimize_isl dump 2016-01-28 10:23:24 -08:00
graphite-poly.c new scop schedule for isl-0.15 2016-01-26 00:19:20 +00:00
graphite-scop-detection.c Add missing single_pred_p test in scop_detection::merge_sese 2016-03-16 09:19:23 +00:00
graphite-sese-to-poly.c Fix pdr accesses order 2016-04-09 15:28:24 +00:00
graphite.c
graphite.h new scop schedule for isl-0.15 2016-01-26 00:19:20 +00:00
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.c haifa-sched.c (autopref_multipass_init): Work around -Wmaybe-uninitialized warning. 2016-01-18 10:02:42 +01:00
hard-reg-set.h
hash-map-traits.h
hash-map.h
hash-set.h
hash-table.c
hash-table.h Optimise hash_table::empty 2016-01-16 11:03:18 +00:00
hash-traits.h
highlev-plugin-common.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hsa-brig-format.h Merge of HSA 2016-01-19 11:35:10 +01:00
hsa-brig.c re PR hsa/70402 (HSA: SBR instruction can be undefined) 2016-04-04 08:46:51 +00:00
hsa-dump.c re PR hsa/70402 (HSA: SBR instruction can be undefined) 2016-04-04 08:46:51 +00:00
hsa-gen.c re PR hsa/70402 (HSA: SBR instruction can be undefined) 2016-04-04 08:46:51 +00:00
hsa-regalloc.c HSA: handle alignment of string builtins (PR hsa/70391) 2016-03-31 17:10:48 +00:00
hsa.c HSA: support alignment for hsa_symbols (PR hsa/70391) 2016-03-31 17:10:15 +00:00
hsa.h re PR hsa/70402 (HSA: SBR instruction can be undefined) 2016-04-04 08:46:51 +00:00
hw-doloop.c
hw-doloop.h
hwint.c
hwint.h cgraph.c: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. 2016-02-12 00:53:54 +01:00
ifcvt.c re PR rtl-optimization/69291 (wrong code at -O1 for ruby-2.3.0/regcomp.c:985:compile_length_quantifier_node()) 2016-02-16 10:53:08 +00:00
ifcvt.h
inchash.c
inchash.h
incpath.c
incpath.h
init-regs.c
input.c
input.h
insn-addr.h
insn-notes.def
internal-fn.c
internal-fn.def
internal-fn.h
intl.c
intl.h
ipa-chkp.c re PR middle-end/70199 (Crash at -O2 when using labels.) 2016-03-16 09:50:18 -07:00
ipa-chkp.h
ipa-comdats.c
ipa-cp.c
ipa-devirt.c re PR ipa/66223 (Diagnostic of pure virtual function call broken, including __cxa_pure_virtual) 2016-04-05 20:58:56 +00:00
ipa-hsa.c Merge of HSA 2016-01-19 11:35:10 +01:00
ipa-icf-gimple.c
ipa-icf-gimple.h
ipa-icf.c Skip static ctors/dtors in IPA ICF (PR ipa/70306) 2016-03-21 19:33:33 +00:00
ipa-icf.h
ipa-inline-analysis.c
ipa-inline-transform.c re PR ipa/70366 (chromium fails to build with LTO due to segfault in ipa-inline-transform.c:inline_call) 2016-03-26 10:08:47 +00:00
ipa-inline.c ipa-polymorphic-call.c (walk_ssa_copies): Fix spelling - becuase -> because. 2016-03-08 18:49:34 +01:00
ipa-inline.h
ipa-polymorphic-call.c re PR middle-end/12392 (very long optimized compile) 2016-03-30 07:47:40 +00:00
ipa-profile.c
ipa-prop.c re PR middle-end/70424 (Pointer derived from integer gets reduced alignment) 2016-03-29 12:36:39 +00:00
ipa-prop.h
ipa-pure-const.c
ipa-ref.c
ipa-ref.h
ipa-reference.c ipa-polymorphic-call.c (walk_ssa_copies): Fix spelling - becuase -> because. 2016-03-08 18:49:34 +01:00
ipa-reference.h
ipa-split.c re PR ipa/69241 (ICE with noreturn and function that return non-POD) 2016-02-12 12:59:00 +01:00
ipa-utils.c
ipa-utils.h
ipa-visibility.c re PR lto/68881 (UNRESOLVED/FAIL: gcc.dg/lto/attr-weakref-1 -O2 -flto) 2016-04-04 09:26:29 +00:00
ipa.c re PR ipa/69589 (ICE in initialize_node_lattices, at ipa-cp.c:971) 2016-03-10 16:11:14 +00:00
ira-build.c cgraph.c: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. 2016-02-12 00:53:54 +01:00
ira-color.c re PR rtl-optimization/70461 (Performance regression after r234527) 2016-03-31 17:51:13 +00:00
ira-conflicts.c
ira-costs.c Improve TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS target hook. 2016-02-02 17:12:56 +00:00
ira-emit.c
ira-int.h
ira-lives.c re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 18:47:17 +00:00
ira.c re PR rtl-optimization/70460 (Miscompilation of glibc on i686-linux starting with r234101) 2016-03-31 15:00:52 +02: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 re PR rtl-optimization/69014 (gcc.c-torture/execute/991023-1.c FAILs with -Os -fmodulo-sched -fno-tree-vrp) 2016-01-14 15:12:53 -08:00
loop-init.c
loop-invariant.c re PR rtl-optimization/69052 (Performance regression after r229402.) 2016-03-02 14:10:56 +00:00
loop-iv.c
loop-unroll.c
loop-unroll.h
lower-subreg.c re PR target/70355 (ICE: in simplify_subreg_concatn, at lower-subreg.c:617 with -funroll-loops -mavx512f) 2016-03-29 08:19:00 -07:00
lower-subreg.h
lra-assigns.c Avoid terminating early in LRA, unless -fchecking (PR57676) 2016-03-04 14:12:36 +00:00
lra-coalesce.c re PR rtl-optimization/68990 (wrong code at -O3 on x86_64-pc-linux-gnu in 32-bit mode.) 2016-01-21 16:01:22 +00:00
lra-constraints.c re PR rtl-optimization/70398 (gcc.dg/vect/slp-multitypes-9.c FAILs with -fno-tree-loop-optimize -fno-tree-ter) 2016-04-06 16:48:36 +00:00
lra-eliminations.c re PR rtl-optimization/69691 (wrong code at -O2 on x86_64-linux-gnu) 2016-02-05 22:13:43 +01:00
lra-int.h
lra-lives.c LRA: identify biggest access mode for hard_regs and use it in split_reg 2016-03-14 15:08:54 +00:00
lra-remat.c re PR target/70123 (Miscompilation of cfitsio testcase on s390x-linux starting with r222144) 2016-03-11 15:38:41 -07:00
lra-spills.c Revert revsion 229087 changes in lra-spills.c 2016-01-29 10:03:42 -08:00
lra.c re PR rtl-optimization/70326 (ICE: RTL check: expected elt 3 type 'e' or 'u', have '0' (rtx note) in PATTERN, at rtl.h:1440) 2016-03-21 22:04:32 +01:00
lra.h
lto-cgraph.c Don't mark offload symbols with force_output in ltrans 2016-02-15 09:30:31 +00:00
lto-compress.c
lto-compress.h
lto-opts.c
lto-section-in.c Merge of HSA 2016-01-19 11:35:10 +01:00
lto-section-names.h
lto-section-out.c
lto-streamer-in.c re PR middle-end/70199 (Crash at -O2 when using labels.) 2016-03-16 09:50:18 -07:00
lto-streamer-out.c re PR middle-end/70199 (Crash at -O2 when using labels.) 2016-03-16 09:50:18 -07:00
lto-streamer.c
lto-streamer.h Don't mark offload symbols with force_output in ltrans 2016-02-15 09:30:31 +00:00
lto-wrapper.c re PR driver/68463 (Offloading fails when some objects are compiled with LTO and some without) 2016-02-25 12:23:52 +00:00
machmode.def
machmode.h
main.c
match.pd re PR c++/70336 (Incorrect Wconversion warning) 2016-04-05 23:33:37 +02:00
mcf.c
mem-stats-traits.h Missing copyright for mem-stats header files. 2016-02-01 13:57:09 +00:00
mem-stats.h mem-stats.h (struct mem_usage): Use PRIu64 for printing size_t. 2016-02-23 14:01:51 +00:00
memory-block.cc
memory-block.h
mkconfig.sh
mode-classes.def
mode-switching.c
modulo-sched.c re PR target/69252 (gcc.dg/vect/vect-iv-9.c FAILs with -Os -fmodulo-sched -fmodulo-sched-allow-regmoves -fsched-pressure) 2016-01-21 15:58:29 -07:00
multiple_target.c
omp-builtins.def Merge BUILT_IN_GOACC_HOST_DATA into BUILT_IN_GOACC_DATA_START 2016-02-02 14:53:55 +01:00
omp-low.c omp-low.c (lower_omp_target): Use GOMP_MAP_FIRSTPRIVATE_INT regardless whether there are depend clauses or not. 2016-04-12 09:05:29 +02:00
omp-low.h omp-low.h (oacc_fn_attrib_kernels_p): Declare. 2016-01-26 14:32:30 +00:00
opt-functions.awk
opt-gather.awk
opt-include.awk
opt-read.awk
optabs-libfuncs.c
optabs-libfuncs.h
optabs-query.c
optabs-query.h
optabs-tree.c re PR tree-optimization/69282 (aarch64/armhf ICE on SPEC2006 464.h264ref at -O3) 2016-02-09 19:13:53 -08:00
optabs-tree.h
optabs.c re PR rtl-optimization/69764 (ICE on x86_64-linux-gnu at -O0 (in decompose, at rtl.h:2107)) 2016-02-16 16:15:40 +01:00
optabs.def
optabs.h
optc-gen.awk
optc-save-gen.awk
opth-gen.awk
opts-common.c PR driver/69265 and 69453: improved suggestions for various misspelled options 2016-02-12 17:39:27 +00:00
opts-diagnostic.h
opts-global.c re PR target/48344 (powerpc ICE with -fstack-limit-register=r2) 2016-02-16 23:12:19 +00:00
opts.c Properly set flag_pie and flag_pic 2016-03-17 08:11:35 -07:00
opts.h re PR target/48344 (powerpc ICE with -fstack-limit-register=r2) 2016-02-16 23:12:19 +00:00
output.h
params-enum.h
params-list.h
params.c
params.def re PR middle-end/12392 (very long optimized compile) 2016-03-30 07:47:40 +00:00
params.h
pass_manager.h
passes.c Do not call todo_after for a discarded function 2016-03-31 10:42:55 +00:00
passes.def re PR c/69835 (-Wnonnull diagnoses parameter comparisons with NULL even when those could have changed) 2016-02-16 21:46:17 +01:00
plugin.c
plugin.def
plugin.h
postreload-gcse.c
postreload.c re PR rtl-optimization/69941 (bogus zero_extend transformation in postreload on aarch64) 2016-03-04 22:30:10 -07:00
predict.c
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h PR other/69006: fix extra newlines after diagnostics 2016-01-26 17:08:12 +00:00
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 re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 18:47:17 +00:00
recog.h
ree.c re PR rtl-optimization/70542 (Wrong code with -O3 -mavx2.) 2016-04-05 19:05:23 +02:00
reg-notes.def
reg-stack.c
regcprop.c re PR rtl-optimization/69896 (wrong code with -frename-registers @ x64_64) 2016-02-25 09:09:02 +01:00
regcprop.h
reginfo.c PR 69577: Invalid RA of destination subregs 2016-02-04 15:01:15 +00:00
regrename.c
regrename.h
regs.h
regset.h
regstat.c re PR target/69634 (-fcompare-debug failure (length) with -O2 -fno-dce -fschedule-insns -fno-tree-vrp @ i686) 2016-02-09 11:26:00 -07:00
reload.c PRE_INC with invalid hard reg 2016-02-14 12:07:40 +10:30
reload.h
reload1.c reload1.c (emit_input_reload_insns): Use simplify_replace_rtx instead of replace_rtx for DEBUG_INSNs. 2016-03-18 09:25:57 +01:00
reorg.c re PR rtl-optimization/70224 (ICE: RTL flag check: CROSSING_JUMP_P used with unexpected rtx code 'insn' in relax_delay_slots, at reorg.c:3310) 2016-03-16 10:58:12 -06:00
resource.c
resource.h
rtl-chkp.c
rtl-chkp.h
rtl-error.c
rtl-error.h
rtl-iter.h
rtl.c
rtl.def re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 18:47:17 +00:00
rtl.h re PR rtl-optimization/70484 (Wrong optimization with aliasing and access via char) 2016-04-04 09:30:16 +00:00
rtlanal.c re PR middle-end/70245 (Miscompilation of ICU on i386 with atom tuning starting with r227382) 2016-03-17 12:53:53 +01:00
rtlhash.c
rtlhash.h
rtlhooks-def.h
rtlhooks.c
sancov.c
sanitizer.def re PR lto/69254 (ICE in streamer_get_builtin_tree when using -fsanitize=shift on the compile side only) 2016-01-27 19:48:30 +01:00
sanopt.c
sbitmap.c
sbitmap.h
sched-deps.c re PR rtl-optimization/69102 (ICE: in move_op_ascend, at sel-sched.c:6138 with -fselective-scheduling2) 2016-03-21 10:52:05 +03:00
sched-ebb.c cgraph.c: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. 2016-02-12 00:53:54 +01:00
sched-int.h re PR target/64411 (ICE: in verify_target_availability, at sel-sched.c:1577 with -Os -mcmodel=medium -fPIC -fschedule-insns -fselective-scheduling) 2016-03-15 18:13:29 +03:00
sched-rgn.c
sdbout.c
sdbout.h
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c re PR rtl-optimization/69032 (ICE: in cfg_preds_1, at sel-sched-ir.c:4809 with -fsched-pressure -fsel-sched-pipelining -fselective-scheduling) 2016-03-15 18:42:07 +03:00
sel-sched-ir.h
sel-sched.c re PR rtl-optimization/63384 (scheduler loops on endless fence list with -fselective-scheduling2 on x86) 2016-03-15 18:25:41 +03:00
sel-sched.h
sese.c new scop schedule for isl-0.15 2016-01-26 00:19:20 +00:00
sese.h new scop schedule for isl-0.15 2016-01-26 00:19:20 +00:00
shrink-wrap.c re PR debug/65779 (undefined local symbol on powerpc [regression]) 2016-01-19 14:21:04 +01:00
shrink-wrap.h
signop.h
simplify-rtx.c re PR tree-optimization/70509 (wrong code with extract from a v64qi) 2016-04-05 19:01:52 +02:00
sparseset.c
sparseset.h
spellcheck-tree.c
spellcheck.c PR driver/69265 and 69453: improved suggestions for various misspelled options 2016-02-12 17:39:27 +00:00
spellcheck.h PR driver/69265 and 69453: improved suggestions for various misspelled options 2016-02-12 17:39:27 +00:00
sreal.c
sreal.h
ssa-iterators.h re PR tree-optimization/70405 (-fcompare-debug failure with -mavx512f) 2016-03-29 19:33:52 +02:00
ssa.h
stab.def
stack-ptr-mod.c
statistics.c
statistics.h
stmt.c re PR target/69299 (-mavx performance degradation with r232088) 2016-01-29 18:47:17 +00:00
stmt.h
stor-layout.c
stor-layout.h
store-motion.c [gcse] PR rtl-optimization/69886: Check target mode in can_assign_to_reg_without_clobbers_p 2016-02-24 13:00:10 +00:00
streamer-hooks.c
streamer-hooks.h
stringpool.c
stringpool.h
symbol-summary.h
symtab.c re PR lto/68881 (UNRESOLVED/FAIL: gcc.dg/lto/attr-weakref-1 -O2 -flto) 2016-04-04 09:26:29 +00:00
sync-builtins.def
system.h Poison ENABLE_CHECKING macro 2016-02-29 15:40:20 +00:00
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target-insns.def
target.def target.def (lra_p): Specify that new ports should use LRA. 2016-03-02 20:17:15 +00:00
target.h cgraph.c: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. 2016-02-12 00:53:54 +01:00
targhooks.c re PR c/69973 (ICE on excessive attribute vector_size) 2016-03-04 22:36:42 -07:00
targhooks.h Improve TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS target hook. 2016-02-02 17:12:56 +00:00
timevar.c
timevar.def timevar.def (TV_PHASE_DBGINFO): Delete. 2016-02-10 11:22:29 +00:00
timevar.h
tlink.c
toplev.c Do not gather mem stats in run_exit_handles (PR 2016-02-25 16:57:39 +00:00
toplev.h
tracer.c
tracer.h
trans-mem.c re PR middle-end/60908 (compiler bug related to trans-mem.c) 2016-01-26 09:29:02 -08:00
trans-mem.h
tree-affine.c
tree-affine.h
tree-call-cdce.c
tree-cfg.c re PR target/67278 (ICE: verify_gimple failed on darwin 14.5 x86_64) 2016-03-02 08:16:16 +00:00
tree-cfg.h
tree-cfgcleanup.c
tree-cfgcleanup.h
tree-chkp-opt.c
tree-chkp.c Properly initialize variable in tree-chkp.c (chkp_mark_invalid_bounds_walker) 2016-02-21 11:25:31 +00:00
tree-chkp.h
tree-chrec.c re PR middle-end/69983 (FAIL: gcc.dg/graphite/scop-sor.c scan-tree-dump-times graphite "number of SCoPs: 1" 1) 2016-03-01 15:58:25 +00:00
tree-chrec.h
tree-complex.c
tree-core.h Merge of HSA 2016-01-19 11:35:10 +01:00
tree-data-ref.c Handle DR_NUM_DIMENSIONS == 0 in initialize_data_dependence_relation 2016-01-26 22:11:51 +00:00
tree-data-ref.h
tree-dfa.c Add -funconstrained-commons to work around PR/69368 (and others) in SPEC2006 2016-03-10 12:19:45 +00:00
tree-dfa.h
tree-diagnostic.c
tree-diagnostic.h
tree-dump.c
tree-dump.h
tree-eh.c
tree-eh.h
tree-emutls.c
tree-hash-traits.h
tree-hasher.h
tree-if-conv.c
tree-inline.c re PR middle-end/70457 (ICE (segfault) in gimple_expand_builtin_pow on powerpc64le-linux-gnu) 2016-04-04 15:42:19 +00:00
tree-inline.h re PR middle-end/70199 (Crash at -O2 when using labels.) 2016-03-16 09:50:18 -07:00
tree-into-ssa.c
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 re PR rtl-optimization/70061 (ICE: SIGSEGV in delete_insn_chain() with unused label) 2016-03-07 03:48:57 -08:00
tree-outof-ssa.h
tree-parloops.c Fix new -Wparentheses warnings encountered during bootstrap 2016-04-06 23:07:21 +00:00
tree-parloops.h
tree-pass.h re PR c/69835 (-Wnonnull diagnoses parameter comparisons with NULL even when those could have changed) 2016-02-16 21:46:17 +01:00
tree-phinodes.c
tree-phinodes.h
tree-predcom.c
tree-pretty-print.c Rename GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE 2016-03-17 16:07:54 +01:00
tree-pretty-print.h
tree-profile.c
tree-scalar-evolution.c re PR tree-optimization/69760 (Wrong 64-bit memory address caused by an unneeded overflowing 32-bit integer multiplication on x86_64 under -O2 and -O3 code optimization) 2016-02-24 14:54:01 +00:00
tree-scalar-evolution.h
tree-sra.c re PR tree-optimization/70602 (wrong code at -O1 and above on x86_64-linux-gnu in 32-bit mode (and at -Os only in 64-bit mode)) 2016-04-12 11:08:43 +02:00
tree-ssa-address.c
tree-ssa-address.h
tree-ssa-alias.c re PR tree-optimization/69776 (Wrong optimization with aliasing) 2016-02-16 15:00:45 +00:00
tree-ssa-alias.h
tree-ssa-ccp.c
tree-ssa-coalesce.c re PR middle-end/70593 (Miscompilation of xen starting with r226901) 2016-04-08 19:28:20 +02:00
tree-ssa-coalesce.h
tree-ssa-copy.c
tree-ssa-dce.c re PR middle-end/69547 (no-op array initializer emits an empty loop) 2016-01-29 11:21:19 +00:00
tree-ssa-dom.c re PR tree-optimization/69776 (Wrong optimization with aliasing) 2016-02-16 15:00:45 +00:00
tree-ssa-dom.h
tree-ssa-dse.c
tree-ssa-forwprop.c re PR tree-optimization/70509 (wrong code with extract from a v64qi) 2016-04-05 18:58:50 +02:00
tree-ssa-ifcombine.c re PR tree-optimization/70586 (wrong code at -O2 and -O3 on x86_64-linux-gnu in 32-bit and 64-bit modes) 2016-04-09 13:23:51 +02:00
tree-ssa-live.c
tree-ssa-live.h
tree-ssa-loop-ch.c
tree-ssa-loop-im.c re PR tree-optimization/69452 (gcc ICE at -O3 on x86_64-linux-gnu in with verify_ssa failed) 2016-01-26 11:51:01 +00:00
tree-ssa-loop-ivcanon.c tree-ssa-loop-ivcanon.c (try_peel_loop): Change type of peel to HOST_WIDE_INT. 2016-03-29 22:03:00 +00:00
tree-ssa-loop-ivopts.c Revert r234572 (aka PR testsuite/70577) 2016-04-12 13:38:46 +00:00
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.c
tree-ssa-loop-manip.h
tree-ssa-loop-niter.c Revert r234572 (aka PR testsuite/70577) 2016-04-12 13:38:46 +00:00
tree-ssa-loop-niter.h
tree-ssa-loop-prefetch.c
tree-ssa-loop-unswitch.c Revert r234572 (aka PR testsuite/70577) 2016-04-12 13:38:46 +00:00
tree-ssa-loop.c re PR tree-optimization/70169 (ICE at -O1 and above on x86_64-linux-gnu in gen_lsm_tmp_name, at tree-ssa-loop.c:791) 2016-03-11 13:05:58 +01:00
tree-ssa-loop.h
tree-ssa-math-opts.c re PR middle-end/70457 (ICE (segfault) in gimple_expand_builtin_pow on powerpc64le-linux-gnu) 2016-04-04 15:42:19 +00:00
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phionlycprop.c
tree-ssa-phiopt.c re PR tree-optimization/56365 (Missed opportunities for smin/smax standard name patterns when compiling as C++) 2016-03-14 14:50:40 +00:00
tree-ssa-phiprop.c
tree-ssa-pre.c re PR tree-optimization/69776 (Wrong optimization with aliasing) 2016-02-15 08:42:38 +00:00
tree-ssa-propagate.c tree-ssa-propagate.c: Enhance docs for SSA_PROP_NOT_INTERESTING. 2016-03-25 05:59:57 +00:00
tree-ssa-propagate.h
tree-ssa-reassoc.c re PR tree-optimization/70372 (ICE: in wide_int_to_tree, at tree.c:1488 with -fno-tree-fre and v2ti vectors) 2016-03-24 08:17:43 +00:00
tree-ssa-sccvn.c re PR middle-end/70239 (ICE in ggc_set_mark) 2016-03-15 17:10:59 +01:00
tree-ssa-sccvn.h re PR tree-optimization/69776 (Wrong optimization with aliasing) 2016-02-15 08:42:38 +00:00
tree-ssa-scopedtables.c re PR tree-optimization/65917 (XFAIL: gcc.dg/tree-ssa/20030922-2.c scan-tree-dump-times dom1 "if " 2) 2016-02-08 01:17:32 -07:00
tree-ssa-scopedtables.h re PR tree-optimization/65917 (XFAIL: gcc.dg/tree-ssa/20030922-2.c scan-tree-dump-times dom1 "if " 2) 2016-02-08 01:17:32 -07:00
tree-ssa-sink.c
tree-ssa-strlen.c
tree-ssa-structalias.c re PR tree-optimization/70128 (Linux kernel div patching optimized away) 2016-03-10 08:06:03 +00:00
tree-ssa-tail-merge.c Skip ubsan/asan internal fns with different location in tail-merge 2016-03-07 14:50:13 +00:00
tree-ssa-ter.c
tree-ssa-ter.h
tree-ssa-threadbackward.c re PR target/70232 (excessive stack usage with -O2) 2016-03-22 15:32:34 -06:00
tree-ssa-threadbackward.h
tree-ssa-threadedge.c
tree-ssa-threadedge.h
tree-ssa-threadupdate.c re PR tree-optimization/69196 (code size regression with jump threading at -O2) 2016-01-25 12:19:09 -07:00
tree-ssa-threadupdate.h re PR tree-optimization/69196 (code size regression with jump threading at -O2) 2016-01-25 12:19:09 -07:00
tree-ssa-uncprop.c re PR tree-optimization/70005 (wrong code at -O2 and -O3 on x86_64-linux-gnu) 2016-02-29 17:04:48 -07:00
tree-ssa-uninit.c
tree-ssa.c re PR middle-end/69715 (ICE: in store_bit_field_1, at expmed.c:839) 2016-02-09 08:35:22 +00:00
tree-ssa.h
tree-ssanames.c re PR target/68273 (Wrong code on mips/mipsel due to (invalid?) peeking at alignments in function_arg.) 2016-02-08 10:04:18 +00:00
tree-ssanames.h re PR tree-optimization/69270 (DOM should exploit range information to create more equivalences) 2016-01-15 15:32:05 -07:00
tree-stdarg.c
tree-stdarg.h
tree-streamer-in.c re PR lto/69254 (ICE in streamer_get_builtin_tree when using -fsanitize=shift on the compile side only) 2016-01-27 19:48:30 +01:00
tree-streamer-out.c ipa-polymorphic-call.c (walk_ssa_copies): Fix spelling - becuase -> because. 2016-03-08 18:49:34 +01:00
tree-streamer.c
tree-streamer.h
tree-switch-conversion.c
tree-tailcall.c
tree-vect-data-refs.c re PR tree-optimization/69783 (Loop is not vectorized after r233212) 2016-02-15 09:40:01 +00:00
tree-vect-generic.c re PR tree-optimization/70310 (wrong code with vector compare at -O0) 2016-03-21 13:50:50 +00:00
tree-vect-loop-manip.c re PR tree-optimization/70138 (wrong code at -O3 on x86_64-linux-gnu) 2016-03-09 16:41:19 +00:00
tree-vect-loop.c Revert r234572 (aka PR testsuite/70577) 2016-04-12 13:38:46 +00:00
tree-vect-patterns.c re PR tree-optimization/70354 (Wrong code with -O3 -march=broadwell and -march=skylake-avx512.) 2016-03-23 10:52:00 +01:00
tree-vect-slp.c re PR tree-optimization/69980 (Supposedly wrong SLP code emitted) 2016-02-29 13:24:24 +00:00
tree-vect-stmts.c re PR tree-optimization/70396 (ICE on valid code at -O3 in 32-bit and 64-bit modes on x86_64-linux-gnu (in immed_wide_int_const, at emit-rtl.c:606)) 2016-03-24 14:07:42 +00:00
tree-vectorizer.c re PR middle-end/68542 (10% 481.wrf performance regression) 2016-02-02 09:46:26 +00:00
tree-vectorizer.h re PR middle-end/68542 (10% 481.wrf performance regression) 2016-02-02 09:46:26 +00:00
tree-vrp.c PR tree-optimization/59124 (bogus -Warray-bounds warning) 2016-03-30 00:55:00 +00:00
tree.c re PR ipa/69589 (ICE in initialize_node_lattices, at ipa-cp.c:971) 2016-03-10 16:02:55 +00:00
tree.def * tree.def (TRY_CATCH_EXPR): Correct documentation. 2016-04-01 12:57:52 +00:00
tree.h re PR lto/70289 ([openacc] ICE in input_varpool_node) 2016-04-08 14:09:47 -07:00
treestruct.def
tsan.c
tsan.h
tsystem.h
typeclass.h
typed-splay-tree.h
ubsan.c
ubsan.h
valtrack.c
valtrack.h
value-prof.c
value-prof.h
var-tracking.c re PR rtl-optimization/69217 (ICE at var-tracking.c:5038 Segmentation fault) 2016-01-26 20:57:37 +00:00
varasm.c re PR c++/70393 (Miscompilation: missing constructor call for static object) 2016-03-31 15:30:33 +00:00
varasm.h
varpool.c timevar.def (TV_PHASE_DBGINFO): Delete. 2016-02-10 11:22:29 +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.cc (canonize_uhwi): New function. 2016-02-02 20:44:16 +01:00
wide-int.h re PR tree-optimization/69399 (wrong code with -O and int128) 2016-01-27 12:40:04 +01:00
xcoff.h
xcoffout.c
xcoffout.h

README.Portability

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