gcc/gcc
Jan Hubicka 06c9eb5136 re PR lto/46083 (gcc.dg/initpri1.c FAILs with -flto/-fwhopr (attribute constructor/destructor doesn't work))
PR lto/46083
	* lto-streamer-out.c (pack_ts_function_decl_value_fields): Store
	DECL_FINI_PRIORITY.
	* lto-streamer-in.c (unpack_ts_function_decl_value_fields):
	Restore DECL_FINI_PRIORITY.
	* gcc.dg/initpri3.c: New testcase.

From-SVN: r168642
2011-01-10 21:54:33 +00:00
..
ada decl.c: Disable Stdcall convention handling for 64-bit. 2011-01-04 11:33:39 +00:00
c-family c-parser.c (c_parser_omp_atomic): Pass location of assignment operator to c_finish_omp_atomic. 2011-01-05 14:51:20 +00:00
config darwin-sections.def: Remove unused section. 2011-01-10 08:41:58 +00:00
cp In gcc/: 2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com> 2011-01-08 19:44:30 +00:00
doc doc: fix deftypefn markup in gccint manual. 2011-01-10 19:00:10 +00:00
fortran re PR fortran/47224 ([F03] ICE with procedure pointer component) 2011-01-09 22:01:38 +01:00
ginclude Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
go Fix order in which recursive structs are converted to GENERIC. 2011-01-06 01:35:19 +00:00
java re PR bootstrap/47215 (Failed to bootstrap) 2011-01-07 22:11:48 +01:00
lto Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
objc update gcc/objc/Changelog copyright years. 2011-01-08 20:47:27 +00:00
objcp Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
po * ja.po: Update. 2011-01-10 13:19:40 +00:00
testsuite re PR lto/46083 (gcc.dg/initpri1.c FAILs with -flto/-fwhopr (attribute constructor/destructor doesn't work)) 2011-01-10 21:54:33 +00:00
ABOUT-GCC-NLS
acinclude.m4
aclocal.m4
addresses.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
alias.c
alias.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
alloc-pool.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
alloc-pool.h
attribs.c
auto-inc-dec.c
BASE-VER
basic-block.h
bb-reorder.c
bb-reorder.h
bitmap.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
bitmap.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
bt-load.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
builtin-attrs.def Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
builtin-types.def Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
builtins.c
builtins.def
builtins.h
c-aux-info.c
c-config-lang.in Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
c-convert.c re PR c/47150 (ICE in gimplify_expr at gimplify.c) 2011-01-06 11:37:02 +01:00
c-decl.c re PR c/46889 (Missing diagnosis on duplicate struct member with anonymous union) 2010-12-30 18:24:03 +00:00
c-errors.c
c-lang.c
c-lang.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
c-objc-common.c
c-objc-common.h
c-parser.c In gcc/: 2011-01-09 Nicola Pero <nicola.pero@meta-innovation.com> 2011-01-09 22:47:22 +00:00
c-tree.h
c-typeck.c re PR c/47150 (ICE in gimplify_expr at gimplify.c) 2011-01-06 11:37:02 +01:00
caller-save.c
calls.c
cfg.c
cfganal.c
cfgbuild.c
cfgcleanup.c
cfgexpand.c Bump Copyright years. 2011-01-02 18:23:22 +01:00
cfghooks.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
cfghooks.h
cfglayout.c
cfglayout.h
cfgloop.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
cfgloop.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
cfgloopanal.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
cfgloopmanip.c
cfgrtl.c
cgraph.c re PR tree-optimization/46984 (g++.dg/torture/pr45699.C FAILs with -fno-early-inlining -flto) 2011-01-03 14:06:54 +01:00
cgraph.h re PR tree-optimization/46984 (g++.dg/torture/pr45699.C FAILs with -fno-early-inlining -flto) 2011-01-03 14:06:54 +01:00
cgraphbuild.c re PR tree-optimization/47056 (10 Ada ACATS tests fail to link with undefined reference on ia64-linux) 2011-01-04 23:22:31 +00:00
cgraphunit.c re PR c++/47218 (C++ multiple definitions of non-virtual thunk problem) 2011-01-10 00:33:32 +00:00
ChangeLog re PR lto/46083 (gcc.dg/initpri1.c FAILs with -flto/-fwhopr (attribute constructor/destructor doesn't work)) 2011-01-10 21:54:33 +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 re PR target/45258 (linkage on -ldl, -lm and -lpthread should be purged from darwin build) 2011-01-10 19:41:39 +00:00
ChangeLog.dataflow
ChangeLog.graphite Fix PR47021: ADDR_EXPRs don't contain SCoP parameters. 2011-01-03 17:01:36 +00:00
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
cif-code.def Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
collect2-aix.c
collect2-aix.h
collect2.c re PR lto/47188 (Undefined reference errors when combining IR and non-IR object files) 2011-01-06 18:50:20 +00:00
collect2.h
combine-stack-adj.c
combine.c re PR rtl-optimization/47157 (ICE: in calc_dfs_tree, at dominance.c:395 with -O) 2011-01-03 21:59:20 +01:00
common.opt
conditions.h
config.build
config.gcc Bobcat (btver1) Enablement 2011-01-06 22:59:46 +00:00
config.host
config.in Makefile.in: Regenerate. 2011-01-08 01:37:00 +00:00
configure Makefile.in: Regenerate. 2011-01-08 01:37:00 +00:00
configure.ac Makefile.in: Regenerate. 2011-01-08 01:37:00 +00:00
convert.c
convert.h
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
coretypes.h
coverage.c
coverage.h
cppbuiltin.c
cppbuiltin.h
cppdefault.c
cppdefault.h
cppspec.c
crtstuff.c
cse.c
cselib.c
cselib.h
cstamp-h.in
DATESTAMP Daily bump. 2011-01-10 00:18:33 +00:00
dbgcnt.c
dbgcnt.def Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
dbgcnt.h
dbxout.c
dbxout.h
dce.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
dce.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
ddg.c
ddg.h
debug.c
debug.h
defaults.h
DEV-PHASE
df-core.c
df-problems.c
df-scan.c
df.h
dfp.c
dfp.h
diagnostic-core.h
diagnostic.c
diagnostic.def
diagnostic.h
dojump.c
dominance.c
domwalk.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
domwalk.h
double-int.c
double-int.h
dse.c
dse.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
dwarf2asm.c
dwarf2asm.h
dwarf2out.c provide pubnames when there are multiple code sections 2011-01-07 13:52:29 +00:00
dwarf2out.h
ebitmap.c
ebitmap.h
emit-rtl.c emit-rtl.c (set_mem_attributes_minus_bitpos): Explicitly derive default values from MEM mode if no memory attributes are present. 2010-12-30 13:28:05 +00:00
emit-rtl.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
emutls.c
errors.c
errors.h
et-forest.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
et-forest.h
except.c
except.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
exec-tool.in Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
explow.c
expmed.c
expmed.h
expr.c re PR middle-end/47017 (gnatlib ICE on sparc64-linux) 2011-01-03 23:59:55 +00:00
expr.h
final.c allow the target to label code fragments generated by partitioning. 2011-01-07 13:57:45 +00:00
fixed-value.c
fixed-value.h
flag-types.h
flags.h
fold-const.c
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function.c function.c (thread_prologue_and_epilogue_insns): Do not crash on empty epilogue sequences. 2011-01-04 12:20:45 +00:00
function.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
fwprop.c
gbl-ctors.h
gcc-plugin.h
gcc.c Makefile.in: Regenerate. 2011-01-08 01:37:00 +00:00
gcc.h
gccspec.c
gcov-dump.c gcc.c (process_command): Update copyright notice dates. 2011-01-03 17:14:57 +01:00
gcov-io.c
gcov-io.h
gcov-iov.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
gcov.c gcc.c (process_command): Update copyright notice dates. 2011-01-03 17:14:57 +01:00
gcse.c
gcse.h
gdbinit.in Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
genattr.c
genattrtab.c
genautomata.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
gencheck.c
genchecksum.c
gencodes.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
genconditions.c
genconfig.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
genconstants.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
genemit.c
genenums.c
genextract.c
genflags.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
gengenrtl.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
gengtype-lex.l Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
gengtype-parse.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
gengtype-state.c
gengtype.c
gengtype.h
genhooks.c
genmddeps.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
genmodes.c
genmultilib
genopinit.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
ggc-common.c
ggc-internal.h
ggc-none.c
ggc-page.c
ggc-zone.c
ggc.h
gimple-fold.c
gimple-iterator.c
gimple-low.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
gimple-pretty-print.c
gimple-pretty-print.h
gimple.c
gimple.def Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
gimple.h
gimplify.c
glimits.h
godump.c
graph.c
graph.h
graphds.c
graphds.h
graphite-blocking.c
graphite-clast-to-gimple.c
graphite-clast-to-gimple.h
graphite-cloog-compat.h
graphite-cloog-util.c
graphite-cloog-util.h
graphite-dependences.c
graphite-dependences.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
graphite-flattening.c
graphite-interchange.c
graphite-poly.c
graphite-poly.h
graphite-ppl.c
graphite-ppl.h
graphite-scop-detection.c
graphite-scop-detection.h
graphite-sese-to-poly.c Fix PR47021: ADDR_EXPRs don't contain SCoP parameters. 2011-01-03 17:01:36 +00:00
graphite-sese-to-poly.h
graphite.c
gsstruct.def Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
gstab.h
gsyms.h
gsyslimits.h
gthr-aix.h
gthr-dce.h
gthr-gnat.c
gthr-gnat.h
gthr-lynx.h
gthr-mipssde.h
gthr-nks.h
gthr-posix95.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
gthr-posix.c
gthr-posix.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
gthr-rtems.h
gthr-single.h
gthr-solaris.h
gthr-tpf.h
gthr-vxworks.h
gthr-win32.h
gthr.h
haifa-sched.c
hard-reg-set.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
highlev-plugin-common.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hwint.c
hwint.h
ifcvt.c
implicit-zee.c
incpath.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
incpath.h
init-regs.c
input.c
input.h
insn-addr.h
insn-notes.def
integrate.c
integrate.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
intl.c
intl.h
ipa-cp.c
ipa-inline.c re PR tree-optimization/46367 (ICE during cgraph edge cloning) 2011-01-07 22:52:54 +00:00
ipa-prop.c re PR tree-optimization/46367 (ICE during cgraph edge cloning) 2011-01-07 22:52:54 +00:00
ipa-prop.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
ipa-pure-const.c
ipa-ref-inline.h
ipa-ref.c
ipa-ref.h
ipa-reference.c
ipa-reference.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
ipa-split.c re PR tree-optimization/47141 (segfault) 2011-01-10 09:48:42 -07:00
ipa-struct-reorg.c
ipa-struct-reorg.h
ipa-type-escape.c
ipa-type-escape.h
ipa-utils.c
ipa-utils.h
ipa.c re PR tree-optimization/46469 (ICE: verify_cgraph_node failed: inline clone is needed at -O) 2011-01-08 16:33:57 +00:00
ira-build.c
ira-color.c
ira-conflicts.c
ira-costs.c
ira-emit.c
ira-int.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
ira-lives.c
ira.c
ira.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
jump.c
lambda-code.c
lambda-mat.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
lambda-trans.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
lambda.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
langhooks-def.h
langhooks.c
langhooks.h
LANGUAGES
lcm.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
libfuncs.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
libgcc2.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
libgcc2.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
libgcc-libsystem.ver
libgcc-std.ver
libgcov.c re PR bootstrap/47055 ("make profiledbootstrap" fails on MSYS/mingw-w64) 2011-01-04 19:05:06 +01:00
limitx.h
limity.h
lists.c
longlong.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
loop-doloop.c
loop-init.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
loop-invariant.c
loop-iv.c
loop-unroll.c
loop-unswitch.c
lower-subreg.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
lto-cgraph.c re PR lto/47162 (LTO is broken) 2011-01-05 06:55:27 -08:00
lto-compress.c
lto-compress.h
lto-opts.c re PR lto/45375 ([meta-bug] Issues with building Mozilla (i.e. Firefox) with LTO) 2011-01-07 18:21:00 +00:00
lto-section-in.c
lto-section-out.c
lto-streamer-in.c re PR lto/46083 (gcc.dg/initpri1.c FAILs with -flto/-fwhopr (attribute constructor/destructor doesn't work)) 2011-01-10 21:54:33 +00:00
lto-streamer-out.c re PR lto/46083 (gcc.dg/initpri1.c FAILs with -flto/-fwhopr (attribute constructor/destructor doesn't work)) 2011-01-10 21:54:33 +00:00
lto-streamer.c
lto-streamer.h
lto-symtab.c
lto-wrapper.c lto-wrapper.c (run_gcc): Default to WHOPR mode when none is specified at the command line. 2011-01-05 16:07:09 +00:00
machmode.def
machmode.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
main.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
Makefile.in
matrix-reorg.c
mcf.c
mips-tdump.c gcc.c (process_command): Update copyright notice dates. 2011-01-03 17:14:57 +01:00
mips-tfile.c gcc.c (process_command): Update copyright notice dates. 2011-01-03 17:14:57 +01:00
mkconfig.sh Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
mkmap-flat.awk
mkmap-symver.awk
mode-classes.def
mode-switching.c
modulo-sched.c
omega.c
omega.h
omp-builtins.def
omp-low.c
ONEWS
opt-functions.awk
opt-gather.awk
opt-include.awk
optabs.c
optabs.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
optc-gen.awk
opth-gen.awk
opts-common.c
opts-diagnostic.h
opts-global.c
opts.c opts.c (finish_options): Set opts->x_flag_opts_finished to true, not false. 2011-01-08 01:59:33 +00:00
opts.h
output.h allow the target to label code fragments generated by partitioning. 2011-01-07 13:57:45 +00:00
params.c
params.def
params.h
passes.c re PR tree-optimization/47234 (ipa-split is executed before profile feedback is read) 2011-01-10 14:33:04 +00:00
plugin.c re PR c/46902 (gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9) 2011-01-09 12:41:33 +00:00
plugin.def
plugin.h
pointer-set.c
pointer-set.h
postreload-gcse.c
postreload.c
predict.c
predict.def
predict.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c
print-tree.c
profile.c
profile.h
read-md.c
read-md.h
read-rtl.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
README.Portability
real.c
real.h
realmpfr.c
realmpfr.h
recog.c
recog.h
reg-notes.def
reg-stack.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
regcprop.c
reginfo.c
regmove.c
regrename.c regrename.c: Add general comment describing the pass. 2011-01-02 17:28:24 +00:00
regs.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
regset.h
regstat.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
reload1.c re PR target/44606 (Wrong SPE floating point during computation) 2010-12-30 15:47:43 +00:00
reload.c
reload.h
reorg.c
resource.c
resource.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
rtl-error.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
rtl-error.h
rtl.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
rtl.def
rtl.h
rtlanal.c
rtlhooks-def.h
rtlhooks.c
sbitmap.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
sbitmap.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
sched-deps.c
sched-ebb.c
sched-int.h
sched-rgn.c
sched-vis.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
sdbout.c
sdbout.h
sel-sched-dump.c
sel-sched-dump.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
sel-sched-ir.c
sel-sched-ir.h
sel-sched.c
sel-sched.h
sese.c
sese.h
simplify-rtx.c
sparseset.c
sparseset.h
sreal.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
sreal.h
ssaexpand.h
stab.def
stack-ptr-mod.c
statistics.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
statistics.h
stmt.c
stor-layout.c
store-motion.c
stringpool.c
sync-builtins.def Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
system.h re PR c/46902 (gcc.dg/plugin/plugindir*.c gives ICEs on powerpc-apple-darwin9) 2011-01-09 12:41:33 +00:00
target-def.h
target-globals.c
target-globals.h
target.def allow the target to label code fragments generated by partitioning. 2011-01-07 13:57:45 +00:00
target.h
targhooks.c
targhooks.h
timevar.c
timevar.def
timevar.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tlink.c
toplev.c
toplev.h
tracer.c
tree-affine.c
tree-affine.h
tree-browser.c
tree-browser.def
tree-call-cdce.c
tree-cfg.c
tree-cfgcleanup.c
tree-chrec.c
tree-chrec.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-complex.c
tree-data-ref.c
tree-data-ref.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-dfa.c
tree-diagnostic.c
tree-diagnostic.h
tree-dump.c
tree-dump.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-eh.c
tree-emutls.c
tree-flow-inline.h
tree-flow.h
tree-if-conv.c
tree-inline.c Check e->call_stmt before calling gimple_call_set_cannot_inline. 2011-01-10 05:24:27 -08:00
tree-inline.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-into-ssa.c
tree-iterator.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-iterator.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-loop-distribution.c tree-loop-distribution.c (tree_loop_distribution): Do not use freed memory. 2011-01-01 13:25:17 +00:00
tree-loop-linear.c
tree-mudflap.c
tree-mudflap.h
tree-nested.c
tree-nomudflap.c
tree-nrv.c
tree-object-size.c
tree-optimize.c
tree-outof-ssa.c
tree-parloops.c re PR tree-optimization/47060 (ICE: SIGSEGV in reduction_phi (tree-parloops.c:212) with -O -ffast-math -ftree-parallelize-loops=2 -fno-tree-dce) 2010-12-30 09:24:58 +01:00
tree-pass.h re PR tree-optimization/47234 (ipa-split is executed before profile feedback is read) 2011-01-10 14:33:04 +00:00
tree-phinodes.c
tree-predcom.c
tree-pretty-print.c
tree-pretty-print.h
tree-profile.c
tree-scalar-evolution.c
tree-scalar-evolution.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-sra.c re PR tree-optimization/47005 (ACATS c62002a is miscompiled at -O2) 2011-01-05 11:23:40 +00:00
tree-ssa-address.c
tree-ssa-alias.c
tree-ssa-alias.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-ssa-ccp.c re PR tree-optimization/47155 (ccp caused miscompilation) 2011-01-03 22:01:14 +01:00
tree-ssa-coalesce.c
tree-ssa-copy.c
tree-ssa-copyrename.c
tree-ssa-dce.c
tree-ssa-dom.c
tree-ssa-dse.c
tree-ssa-forwprop.c
tree-ssa-ifcombine.c
tree-ssa-live.c
tree-ssa-live.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-ssa-loop-ch.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01: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
tree-ssa-math-opts.c
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phiopt.c
tree-ssa-phiprop.c
tree-ssa-pre.c
tree-ssa-propagate.c
tree-ssa-propagate.h
tree-ssa-reassoc.c
tree-ssa-sccvn.c
tree-ssa-sccvn.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-ssa-sink.c
tree-ssa-structalias.c
tree-ssa-ter.c
tree-ssa-threadedge.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-ssa-threadupdate.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-ssa-uncprop.c
tree-ssa-uninit.c
tree-ssa.c
tree-ssanames.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-stdarg.c
tree-stdarg.h
tree-switch-conversion.c
tree-tailcall.c
tree-vect-data-refs.c
tree-vect-generic.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-vect-loop-manip.c
tree-vect-loop.c re PR tree-optimization/47139 (ice in process_use, at tree-vect-stmts.c:290) 2011-01-06 07:34:24 +00:00
tree-vect-patterns.c
tree-vect-slp.c
tree-vect-stmts.c
tree-vectorizer.c
tree-vectorizer.h
tree-vrp.c
tree.c ChangeLog gcc/ 2011-01-01 12:05:41 +01:00
tree.def
tree.h
treestruct.def Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tsystem.h
typeclass.h
unwind-c.c
unwind-compat.c
unwind-compat.h
unwind-dw2-fde-compat.c
unwind-dw2-fde-darwin.c
unwind-dw2-fde-glibc.c
unwind-dw2-fde.c
unwind-dw2-fde.h
unwind-dw2.c
unwind-dw2.h
unwind-generic.h
unwind-pe.h
unwind-sjlj.c
unwind.inc
value-prof.c re PR bootstrap/47187 (profiledbootstrap failure on i386) 2011-01-07 19:39:11 +01:00
value-prof.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
var-tracking.c
varasm.c
varpool.c
vec.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
vec.h
vecir.h
vecprim.h
version.c
version.h
vmsdbg.h
vmsdbgout.c re PR target/47101 (ia64-hp-vms: main_input_filename clash) 2010-12-30 14:19:06 +00:00
web.c
xcoff.h
xcoffout.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
xcoffout.h

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


free and realloc
----------------

Some implementations crash upon attempts to free or realloc the null
pointer.  Thus if mem might be null, you need to write

  if (mem)
    free (mem);


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.