gcc/gcc
Janis Johnson fb2e392200 atomic-comp-swap-release-acquire.c: Move dg-do to be the first test directive.
* gcc.target/arm/atomic-comp-swap-release-acquire.c: Move dg-do
	to be the first test directive.
	* gcc.target/arm/atomic-op-acq_rel.c: Likewise.
	* gcc.target/arm/atomic-op-acquire.c: Likewise.
	* gcc.target/arm/atomic-op-char.c: Likewise.
	* gcc.target/arm/atomic-op-consume.c: Likewise.
	* gcc.target/arm/atomic-op-int.c: Likewise.
	* gcc.target/arm/atomic-op-relaxed.c: Likewise.
	* gcc.target/arm/atomic-op-release.c: Likewise.
	* gcc.target/arm/atomic-op-seq_cst.c: Likewise.
	* gcc.target/arm/atomic-op-short.c: Likewise.

From-SVN: r201730
2013-08-14 16:52:40 +00:00
..
ada decl.c (gnat_to_gnu_entity): Do not bother about alias sets of derived types in ASIS mode. 2013-08-13 19:58:24 +00:00
c pretty-print.h (pp_base): Remove. 2013-08-05 04:00:57 +00:00
c-family * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name 2013-08-09 10:51:54 +00:00
common
config re PR target/58067 (ICE in GFortran recog.c:2158) 2013-08-14 11:09:58 +02:00
cp * pt.c: Grammar fix in comments ("it's" to "its"). 2013-08-13 00:26:18 +01:00
doc * doc/invoke.texi: Mention that -ftls-model does not force the final model. 2013-08-12 13:40:28 +04:00
fortran re PR fortran/56666 (Suppression flag for " DO loop at (1) will be executed zero times") 2013-08-12 05:50:03 +00:00
ginclude
go compiler: Fix "missing return" error for case T1, T2 in type switches. 2013-08-07 19:01:16 +00:00
java
lto cgraph.c (cgraph_get_body): New function based on lto.c implementation. 2013-08-06 16:59:49 +00:00
objc
objcp
po
testsuite atomic-comp-swap-release-acquire.c: Move dg-do to be the first test directive. 2013-08-14 16:52:40 +00:00
ABOUT-GCC-NLS
acinclude.m4
aclocal.m4 Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
addresses.h
alias.c
alias.h
alloc-pool.c
alloc-pool.h
asan.c re PR middle-end/56417 (internal compiler error: verify_gimple failed) 2013-08-13 18:58:46 +02:00
asan.h
attribs.c
auto-inc-dec.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
BASE-VER
basic-block.h
bb-reorder.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
bb-reorder.h
bitmap.c
bitmap.h
bt-load.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
builtin-attrs.def
builtin-types.def
builtins.c
builtins.def
builtins.h
caller-save.c
calls.c
cfg-flags.def
cfg.c
cfganal.c
cfgbuild.c
cfgcleanup.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
cfgexpand.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
cfghooks.c
cfghooks.h
cfgloop.c
cfgloop.h
cfgloopanal.c
cfgloopmanip.c
cfgrtl.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
cgraph.c cgraph.c (cgraph_turn_edge_to_speculative): Return newly introduced edge; fix typo in sanity check. 2013-08-13 12:21:16 +00:00
cgraph.h cgraph.c (cgraph_turn_edge_to_speculative): Return newly introduced edge; fix typo in sanity check. 2013-08-13 12:21:16 +00:00
cgraphbuild.c cgraphbuild.c (cgraph_rebuild_references): Rebuild only non-speculative refs. 2013-08-09 15:23:19 +00:00
cgraphclones.c cgraphbuild.c (cgraph_rebuild_references): Rebuild only non-speculative refs. 2013-08-09 15:23:19 +00:00
cgraphunit.c cgraphbuild.c (build_cgraph_edges): Do not walk into debugs. 2013-08-08 14:15:15 +00:00
ChangeLog re PR rtl-optimization/57662 (ICE: SIGSEGV in code_motion_process_successors with -fschedule-insns2 -fselective-scheduling2) 2013-08-14 18:31:26 +04: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.dataflow
ChangeLog.graphite
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
cif-code.def
cilkplus.def
collect2-aix.c
collect2-aix.h
collect2.c
collect2.h
combine-stack-adj.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
combine.c re PR rtl-optimization/58079 (internal compiler error: in do_SUBST, at combine.c:711) 2013-08-08 18:42:21 +00:00
common.opt Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
compare-elim.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
conditions.h
config.build
config.gcc * config.gcc: (avr-linux): Allow for tmake_file not being empty. 2013-08-13 15:42:17 +00:00
config.host
config.in configure.ac: Add GAS check for LEON instructions on SPARC. 2013-08-09 09:13:32 +00:00
configure configure.ac: Add GAS check for LEON instructions on SPARC. 2013-08-09 09:13:32 +00:00
configure.ac configure.ac: Add GAS check for LEON instructions on SPARC. 2013-08-09 09:13:32 +00:00
context.c
context.h
convert.c
convert.h
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
coretypes.h coretypes.h (rtl_opt_pass): Add. 2013-08-07 01:14:39 +00:00
coverage.c cgraph.h (cgraph_node): Add profile_id. 2013-08-09 18:23:23 +00:00
coverage.h cgraph.h (cgraph_node): Add profile_id. 2013-08-09 18:23:23 +00:00
cppbuiltin.c
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
cse.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
cselib.c
cselib.h
cstamp-h.in
data-streamer-in.c
data-streamer-out.c
data-streamer.c
data-streamer.h
DATESTAMP Daily bump. 2013-08-14 00:16:49 +00:00
dbgcnt.c
dbgcnt.def
dbgcnt.h
dbxout.c
dbxout.h
dce.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h
DEV-PHASE
df-core.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
df-problems.c
df-scan.c
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h
diagnostic.c diagnostic.c (diagnostic_classify_diagnostic): Accept zero index and document its semantics. 2013-08-07 17:15:25 +00:00
diagnostic.def
diagnostic.h pretty-print.h (pp_base): Remove. 2013-08-05 04:00:57 +00:00
dojump.c
dominance.c
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
dumpfile.c
dumpfile.h
dwarf2asm.c
dwarf2asm.h
dwarf2cfi.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
dwarf2out.c dwarf2out.c (CHECKSUM_BLOCK): New macro. 2013-08-13 16:39:54 -07:00
dwarf2out.h
emit-rtl.c
emit-rtl.h
errors.c
errors.h
et-forest.c
et-forest.h
except.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
except.h
exec-tool.in
explow.c
expmed.c
expmed.h
expr.c re PR other/12081 (Gcc can't be compiled with -mregparm=3) 2013-08-05 22:09:45 +00:00
expr.h
file-find.c
file-find.h
final.c rtl.h (update_alignments): Declare. 2013-08-07 17:17:07 +00:00
fixed-value.c
fixed-value.h
flag-types.h Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
flags.h
fold-const.c
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
function.h
fwprop.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
gcc-ar.c
gcc-plugin.h
gcc.c Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
gcc.h
gcov-dump.c
gcov-io.c
gcov-io.h cgraph.h (cgraph_node): Add profile_id. 2013-08-09 18:23:23 +00:00
gcov-iov.c
gcov.c
gcse.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
gcse.h
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
genenums.c
genextract.c
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-parse.c
gengtype-state.c
gengtype.c
gengtype.h
genhooks.c
genmddeps.c
genmddump.c
genmodes.c
genmultilib
genopinit.c
genoutput.c re PR other/12081 (Gcc can't be compiled with -mregparm=3) 2013-08-05 22:09:45 +00:00
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-fold.c
gimple-fold.h
gimple-iterator.c
gimple-low.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
gimple-pretty-print.c gimple-pretty-print.c (buffer): Remove. 2013-08-05 07:27:27 +00:00
gimple-pretty-print.h
gimple-ssa-strength-reduction.c re PR middle-end/58041 (Unaligned access to arrays in packed structure) 2013-08-06 11:22:16 +02:00
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple.c
gimple.def
gimple.h
gimplify.c
glimits.h
godump.c
graph.c graph.c (init_graph_slim_pretty_print): Remove. 2013-08-05 08:58:27 +00:00
graph.h
graphds.c
graphds.h
graphite-blocking.c
graphite-clast-to-gimple.c
graphite-clast-to-gimple.h
graphite-dependences.c
graphite-htab.h
graphite-interchange.c
graphite-optimize-isl.c
graphite-poly.c
graphite-poly.h
graphite-scop-detection.c
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
hard-reg-set.h
hash-table.c
hash-table.h
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 Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
incpath.c
incpath.h
init-regs.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
input.c
input.h
insn-addr.h
insn-notes.def
internal-fn.c
internal-fn.def
internal-fn.h
intl.c
intl.h
ipa-cp.c cgraphbuild.c (cgraph_rebuild_references): Rebuild only non-speculative refs. 2013-08-09 15:23:19 +00:00
ipa-inline-analysis.c ipa-inline-analysis.c (add_clause): Avoid shifting integer NUM_CONDITIONS bit positions. 2013-08-14 04:44:37 +00:00
ipa-inline-transform.c cgraph.c (cgraph_turn_edge_to_speculative): Return newly introduced edge; fix typo in sanity check. 2013-08-13 12:21:16 +00:00
ipa-inline.c cgraph.c (cgraph_turn_edge_to_speculative): Return newly introduced edge; fix typo in sanity check. 2013-08-13 12:21:16 +00:00
ipa-inline.h cgraph.c (cgraph_turn_edge_to_speculative): Return newly introduced edge; fix typo in sanity check. 2013-08-13 12:21:16 +00:00
ipa-prop.c cgraphbuild.c (cgraph_rebuild_references): Rebuild only non-speculative refs. 2013-08-09 15:23:19 +00:00
ipa-prop.h ipa-cp.c (gather_context_independent_values): Use ipa_get_param_move_cost. 2013-08-03 08:23:55 +00:00
ipa-pure-const.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
ipa-ref-inline.h
ipa-ref.c * ipa-ref.c (ipa_clear_stmts_in_references): Clear lto_stmt_uid, too. 2013-08-09 23:07:52 +00:00
ipa-ref.h cgraphbuild.c (cgraph_rebuild_references): Rebuild only non-speculative refs. 2013-08-09 15:23:19 +00:00
ipa-reference.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
ipa-reference.h
ipa-split.c cgraphbuild.c (build_cgraph_edges): Do not walk into debugs. 2013-08-08 14:15:15 +00:00
ipa-utils.c
ipa-utils.h
ipa.c cgraph.c (cgraph_turn_edge_to_speculative): Return newly introduced edge; fix typo in sanity check. 2013-08-13 12:21:16 +00:00
ira-build.c
ira-color.c
ira-conflicts.c
ira-costs.c
ira-emit.c
ira-int.h
ira-lives.c
ira.c ira.c (setup_class_translate_array): Use aclass instead of cl for classes not fully covered by allocno classes. 2013-08-13 17:10:07 +00:00
ira.h
is-a.h
jump.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
langhooks-def.h
langhooks.c pretty-print.h (pp_underscore): New. 2013-08-03 18:57:25 +00:00
langhooks.h
LANGUAGES
lcm.c
libfuncs.h
limitx.h
limity.h
lists.c
lock-and-run.sh
loop-doloop.c
loop-init.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
loop-invariant.c
loop-iv.c
loop-unroll.c
loop-unswitch.c
lower-subreg.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
lower-subreg.h
lra-assigns.c
lra-coalesce.c
lra-constraints.c lra-constraints.c (emit_spill_move): Remove assert. 2013-08-08 20:56:52 +00:00
lra-eliminations.c
lra-int.h
lra-lives.c
lra-spills.c
lra.c
lra.h
lto-cgraph.c cgraph.c (cgraph_resolve_speculation): Cut frequency to CGRAPH_FREQ_MAX. 2013-08-09 22:53:00 +00:00
lto-compress.c
lto-compress.h
lto-opts.c
lto-section-in.c
lto-section-out.c
lto-streamer-in.c cgraph.c (cgraph_resolve_speculation): Cut frequency to CGRAPH_FREQ_MAX. 2013-08-09 22:53:00 +00:00
lto-streamer-out.c lto-streamer-out.c (output_function): Renumber PHIs. 2013-08-09 11:44:27 +00:00
lto-streamer.c
lto-streamer.h
lto-symtab.c cgraph.c (cgraph_release_function_body): Use used_as_abstract_origin. 2013-08-01 13:24:49 +00:00
lto-wrapper.c
machmode.def
machmode.h
main.c
Makefile.in Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
mcf.c
mkconfig.sh
mode-classes.def
mode-switching.c coretypes.h (rtl_opt_pass): Add. 2013-08-07 01:14:39 +00:00
modulo-sched.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
omega.c
omega.h
omp-builtins.def
omp-low.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
ONEWS
opt-functions.awk
opt-gather.awk
opt-include.awk
opt-read.awk
optabs.c
optabs.def
optabs.h
optc-gen.awk
optc-save-gen.awk
opth-gen.awk
opts-common.c
opts-diagnostic.h
opts-global.c
opts.c
opts.h
output.h Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
params.c
params.def
params.h
pass_manager.h coretypes.h (rtl_opt_pass): Add. 2013-08-07 01:14:39 +00:00
passes.c cgraph.c (cgraph_get_body): New function based on lto.c implementation. 2013-08-06 16:59:49 +00:00
passes.def Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
plugin.c
plugin.def
plugin.h
pointer-set.c
pointer-set.h
postreload-gcse.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
postreload.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
predict.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c pretty-print.h (pp_base): Remove. 2013-08-05 04:00:57 +00:00
pretty-print.h pretty-print.h (pp_base): Remove. 2013-08-05 04:00:57 +00:00
print-rtl.c
print-tree.c
profile.c * profile.c (compute_value_histograms): Fix thinko. 2013-08-01 10:03:55 +00:00
profile.h cgraph.h (cgraph_node): Add profile_id. 2013-08-09 18:23:23 +00:00
read-md.c
read-md.h
read-rtl.c
README.Portability
real.c
real.h
realmpfr.c
realmpfr.h
recog.c coretypes.h (rtl_opt_pass): Add. 2013-08-07 01:14:39 +00:00
recog.h re PR other/12081 (Gcc can't be compiled with -mregparm=3) 2013-08-05 22:09:45 +00:00
ree.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
reg-notes.def
reg-stack.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
regcprop.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
reginfo.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
regmove.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
regrename.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
regrename.h
regs.h
regset.h
regstat.c
reload1.c
reload.c
reload.h
reorg.c rtl.h (update_alignments): Declare. 2013-08-07 17:17:07 +00:00
resource.c
resource.h
rtl-error.c
rtl-error.h
rtl.c
rtl.def
rtl.h rtl.h (update_alignments): Declare. 2013-08-07 17:17:07 +00:00
rtlanal.c
rtlhooks-def.h
rtlhooks.c
sanitizer.def
sbitmap.c
sbitmap.h
sched-deps.c
sched-ebb.c
sched-int.h
sched-rgn.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
sched-vis.c pretty-print.h (pp_base): Remove. 2013-08-05 04:00:57 +00:00
sdbout.c
sdbout.h
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c
sel-sched-ir.h
sel-sched.c re PR rtl-optimization/57662 (ICE: SIGSEGV in code_motion_process_successors with -fschedule-insns2 -fselective-scheduling2) 2013-08-14 18:31:26 +04:00
sel-sched.h
sese.c
sese.h
simplify-rtx.c
sparseset.c
sparseset.h
sreal.c
sreal.h
ssaexpand.h
stab.def
stack-ptr-mod.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
statistics.c
statistics.h
stmt.c
stor-layout.c
store-motion.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
streamer-hooks.c
streamer-hooks.h
stringpool.c
symtab.c cgraph.c (cgraph_function_body_availability): Do not check cgrpah flags. 2013-08-02 14:38:15 +00:00
sync-builtins.def
system.h
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target.def
target.h
targhooks.c
targhooks.h
timevar.c
timevar.def Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
timevar.h
tlink.c
toplev.c Handwritten part of conversion of passes to C++ classes 2013-08-05 20:01:43 +00:00
toplev.h Handwritten part of conversion of passes to C++ classes 2013-08-05 20:01:43 +00:00
tracer.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
trans-mem.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
trans-mem.h
tree-affine.c
tree-affine.h
tree-browser.c
tree-browser.def
tree-call-cdce.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-cfg.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-cfgcleanup.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-chrec.c
tree-chrec.h
tree-complex.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-data-ref.c
tree-data-ref.h
tree-dfa.c
tree-diagnostic.c
tree-diagnostic.h
tree-dump.c
tree-dump.h
tree-eh.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-emutls.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-flow-inline.h
tree-flow.h
tree-hasher.h
tree-if-conv.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-inline.c re PR middle-end/57661 (ICE: SIGSEGV in verify_ssa) 2013-08-13 19:06:13 +02:00
tree-inline.h re PR middle-end/57661 (ICE: SIGSEGV in verify_ssa) 2013-08-13 19:06:13 +02:00
tree-into-ssa.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-mudflap.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-mudflap.h
tree-nested.c
tree-nomudflap.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-nrv.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-object-size.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-optimize.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-outof-ssa.c
tree-parloops.c
tree-pass.h Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
tree-phinodes.c
tree-predcom.c
tree-pretty-print.c pretty-print.h (pp_base): Remove. 2013-08-05 04:00:57 +00:00
tree-pretty-print.h pretty-print.h (pp_base): Remove. 2013-08-05 04:00:57 +00:00
tree-profile.c Workaround binutils PR14342 2013-08-10 20:52:06 +00:00
tree-scalar-evolution.c
tree-scalar-evolution.h
tree-sra.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-address.c
tree-ssa-alias.c
tree-ssa-alias.h
tree-ssa-ccp.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-coalesce.c
tree-ssa-copy.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-copyrename.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-dce.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-dom.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-dse.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-forwprop.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-ifcombine.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-live.c
tree-ssa-live.h
tree-ssa-loop-ch.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-loop-im.c
tree-ssa-loop-ivcanon.c
tree-ssa-loop-ivopts.c
tree-ssa-loop-manip.c
tree-ssa-loop-niter.c
tree-ssa-loop-prefetch.c
tree-ssa-loop-unswitch.c
tree-ssa-loop.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-math-opts.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phiopt.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-phiprop.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-pre.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-propagate.c
tree-ssa-propagate.h
tree-ssa-reassoc.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-sccvn.c
tree-ssa-sccvn.h
tree-ssa-sink.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-strlen.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-structalias.c cgraph.c (cgraph_get_body): New function based on lto.c implementation. 2013-08-06 16:59:49 +00:00
tree-ssa-tail-merge.c
tree-ssa-ter.c
tree-ssa-threadedge.c
tree-ssa-threadupdate.c
tree-ssa-uncprop.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa-uninit.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssa.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-ssanames.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-stdarg.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-stdarg.h
tree-streamer-in.c lto-cgraph.c (compute_ltrans_boundary): Add abstract origins into boundaries. 2013-08-03 19:54:18 +00:00
tree-streamer-out.c lto-cgraph.c (compute_ltrans_boundary): Add abstract origins into boundaries. 2013-08-03 19:54:18 +00:00
tree-streamer.c
tree-streamer.h
tree-switch-conversion.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-tailcall.c re PR tree-optimization/57980 (gcc 4.8.1 -foptimize-sibling-calls -O1 ICE in build_int_cst_wide, at tree.c:1210) 2013-08-12 08:46:41 +00:00
tree-vect-data-refs.c
tree-vect-generic.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-vect-loop-manip.c
tree-vect-loop.c
tree-vect-patterns.c
tree-vect-slp.c
tree-vect-stmts.c
tree-vectorizer.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree-vectorizer.h
tree-vrp.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tree.def
tree.h Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
treestruct.def
tsan.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
tsan.h
tsystem.h
typeclass.h
valtrack.c
valtrack.h
value-prof.c cgraph.c (cgraph_turn_edge_to_speculative): Return newly introduced edge; fix typo in sanity check. 2013-08-13 12:21:16 +00:00
value-prof.h cgraph.h (cgraph_node): Add profile_id. 2013-08-09 18:23:23 +00:00
var-tracking.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
varasm.c Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
varpool.c
vec.c
vec.h
version.c
version.h
vmsdbg.h
vmsdbgout.c
vtable-verify.c Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
vtable-verify.h Commit the vtable verification feature. 2013-08-06 20:38:59 -07:00
web.c Automated conversion of passes to C++ classes 2013-08-05 20:16:05 +00:00
xcoff.h
xcoffout.c
xcoffout.h

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