gcc/gcc
Jason Merrill 62f9aedcd0 re PR c++/47041 (Internal compiler error in build_data_member_initialization, add cp/semantics.c:5483)
PR c++/47041
	* semantics.c (build_constexpr_constructor_member_initializers):
	Handle trivial copy.

From-SVN: r169108
2011-01-21 17:30:26 -05:00
..
ada decl.c: Disable Stdcall convention handling for 64-bit. 2011-01-04 11:33:39 +00:00
c-family re PR c/32511 (GCC rejects inline+weak function) 2011-01-11 10:09:15 +00:00
config re PR bootstrap/47215 (Failed to bootstrap) 2011-01-21 10:05:14 +01:00
cp re PR c++/47041 (Internal compiler error in build_data_member_initialization, add cp/semantics.c:5483) 2011-01-21 17:30:26 -05:00
doc tm.texi.in (BRANCH_COST): Englishify. 2011-01-20 00:19:07 +00:00
fortran re PR fortran/47394 (Internal compiler error when error count limit is reached) 2011-01-21 21:33:10 +01:00
ginclude Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
go Remove the types float and complex. 2011-01-21 18:19:03 +00:00
java re PR bootstrap/47215 (Failed to bootstrap) 2011-01-21 10:05:14 +01:00
lto re PR lto/45721 (ICE: in function_and_variable_visibility, at ipa.c:673 with -flto) 2011-01-11 17:29:52 +00:00
objc In gcc/objc/: 2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com> 2011-01-17 22:17:47 +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-13 02:30:06 +00:00
testsuite re PR c++/47041 (Internal compiler error in build_data_member_initialization, add cp/semantics.c:5483) 2011-01-21 17:30:26 -05: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
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 c-parser.c (c_parser_for_statement): Initialize collection_expression. 2011-01-19 21:59:47 +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 re PR rtl-optimization/41619 (ICE in insert_save (caller-save.c) for SPEC CPU2000's 252.eon) 2011-01-21 09:49:31 -07:00
calls.c
cfg.c
cfganal.c
cfgbuild.c
cfgcleanup.c
cfgexpand.c re PR debug/47106 (-fcompare-debug failure (length) with -fpartial-inlining -flto -fconserve-stack) 2011-01-21 14:57:33 +00: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
cgraph.h
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 bootstrap/47402 (Bootstrap comparison failure) 2011-01-21 22:11:24 +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
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 common.opt (fdevirtualize): New flag. 2011-01-15 00:19:08 +01:00
conditions.h
config.build
config.gcc config.gcc (arm*-*-linux*, [...]): Use gnu-user.h before linux.h. 2011-01-12 14:29:14 +00:00
config.host
config.in Makefile.in: Regenerate. 2011-01-08 01:37:00 +00:00
configure configure.ac (gcc_cv_ld_static_dynamic): Solaris 2 ld always supports -Bstatic/-Bdynamic. 2011-01-14 17:00:24 +00:00
configure.ac configure.ac (gcc_cv_ld_static_dynamic): Solaris 2 ld always supports -Bstatic/-Bdynamic. 2011-01-14 17:00:24 +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-21 00:18:42 +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 re PR rtl-optimization/47337 (Wrong RTL dce of calls) 2011-01-19 16:13:01 +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 re PR c++/47291 (ICE: SIGSEGV in size_binop_loc (fold-const.c:1427) with -g) 2011-01-19 23:57:47 +01:00
dwarf2out.h
ebitmap.c
ebitmap.h
emit-rtl.c re PR rtl-optimization/47216 (gcc.dg/torture/pr43360.c FAILs with -O -fPIC -fgcse -fgcse-sm -fnon-call-exceptions -fno-tree-dse) 2011-01-18 15:50:55 +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 re PR middle-end/45566 (ICE: in convert_to_eh_region_ranges, at except.c:2446 with -freorder-blocks-and-partition -fnon-call-exceptions -fprofile-use) 2011-01-21 20:35:42 +01:00
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 re PR middle-end/46894 (vector tests fail on powerpc 32-bit) 2011-01-18 21:29:11 +00:00
expmed.c re PR rtl-optimization/47299 (Widening multiply optimization generates bad code) 2011-01-18 08:45:12 +01:00
expmed.h
expr.c re PR rtl-optimization/47299 (Widening multiply optimization generates bad code) 2011-01-18 08:45:12 +01: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 re PR debug/47079 (FAIL: gcc.dg/guality/nrv-1.c) 2011-01-19 22:00:00 +00:00
function.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
fwprop.c re PR rtl-optimization/47366 (ICE: verify_flow_info failed: missing REG_EH_REGION note in the end of bb 3 with -fnon-call-exceptions -fno-tree-ccp -fno-tree-forwprop) 2011-01-21 20:34:03 +01:00
gbl-ctors.h
gcc-plugin.h
gcc.c re PR driver/47244 (plugin linker is used unconditionally) 2011-01-12 15:47:29 +00:00
gcc.h
gccspec.c
gcov-dump.c
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
gcse.c re PR rtl-optimization/39077 (GCSE-optimization causes enormous binary size increase (~20 times !)) 2011-01-13 06:41:03 -07:00
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 godump.c (go_output_var): Don't output the variable if there is already a type with the same name. 2011-01-11 22:58:35 +00:00
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
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 common.opt (fdevirtualize): New flag. 2011-01-15 00:19:08 +01: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/46130 (ICE: SIGSEGV in walk_stmt_load_store_addr_ops (gimple.c:4894) with -O2 -fno-tree-dce) 2011-01-20 13:02:33 +01: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/47276 (ICE in function_and_variable_visibility, at ipa.c:857 during compiling glibc.) 2011-01-15 15:44:56 +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 re PR rtl-optimization/39077 (GCSE-optimization causes enormous binary size increase (~20 times !)) 2011-01-13 06:41:03 -07: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 mn10300: Add support in longlong.h. 2011-01-19 11:36:42 -08: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/45375 ([meta-bug] Issues with building Mozilla (i.e. Firefox) with LTO) 2011-01-10 23:37:45 +00: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/47259 (LTO and global register variable) 2011-01-12 15:01:09 +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 re PR rtl-optimization/47216 (gcc.dg/torture/pr43360.c FAILs with -O -fPIC -fgcse -fgcse-sm -fnon-call-exceptions -fno-tree-dse) 2011-01-18 15:50:55 +00:00
matrix-reorg.c
mcf.c
mips-tdump.c
mips-tfile.c
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 common.opt (fdevirtualize): New flag. 2011-01-15 00:19:08 +01: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 re PR rtl-optimization/39077 (GCSE-optimization causes enormous binary size increase (~20 times !)) 2011-01-13 06:41:03 -07:00
params.h re PR rtl-optimization/39077 (GCSE-optimization causes enormous binary size increase (~20 times !)) 2011-01-13 06:41:03 -07:00
passes.c re PR lto/45721 (ICE: in function_and_variable_visibility, at ipa.c:673 with -flto) 2011-01-11 17:29:52 +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 re PR lto/45375 ([meta-bug] Issues with building Mozilla (i.e. Firefox) with LTO) 2011-01-10 23:37:11 +00:00
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
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
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 re PR rtl-optimization/45352 (ICE: in reset_sched_cycles_in_current_ebb, at sel-sched.c:7058) 2011-01-13 12:29:09 +03:00
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 re PR tree-optimization/47179 (SPU: errno misoptimization around malloc call) 2011-01-14 15:02:20 +00:00
target.h re PR tree-optimization/47179 (SPU: errno misoptimization around malloc call) 2011-01-14 15:02:20 +00:00
targhooks.c re PR tree-optimization/47179 (SPU: errno misoptimization around malloc call) 2011-01-14 15:02:20 +00:00
targhooks.h re PR tree-optimization/47179 (SPU: errno misoptimization around malloc call) 2011-01-14 15:02:20 +00:00
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 Fixup formatting. 2011-01-19 23:52:57 +00:00
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 re PR bootstrap/47402 (Bootstrap comparison failure) 2011-01-21 22:11:24 +00:00
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 re PR tree-optimization/47355 (ICE: verify_ssa failed with -O2 -fipa-cp-clone) 2011-01-21 16:15:40 +01:00
tree-emutls.c
tree-flow-inline.h
tree-flow.h
tree-if-conv.c
tree-inline.c re PR middle-end/47370 (error: invalid first operand of MEM_REF) 2011-01-20 14:42:20 +00:00
tree-inline.h Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
tree-into-ssa.c re PR debug/46240 (ice in maybe_register_def) 2011-01-19 22:07:14 +00:00
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-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
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 re PR tree-optimization/47179 (SPU: errno misoptimization around malloc call) 2011-01-14 15:02:20 +00:00
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/47239 ((int)&func & 3 is always optimized to 0 on some targets) 2011-01-11 14:23:20 +00:00
tree-ssa-coalesce.c
tree-ssa-copy.c
tree-ssa-copyrename.c re PR other/47167 (Performance regression in numerical code) 2011-01-20 10:33:15 +00:00
tree-ssa-dce.c
tree-ssa-dom.c
tree-ssa-dse.c
tree-ssa-forwprop.c re PR tree-optimization/47280 (ICE: verify_stmts failed: statement marked for throw, but doesn't with -fnon-call-exceptions -ftrapv) 2011-01-14 13:20:22 +00:00
tree-ssa-ifcombine.c
tree-ssa-live.c tree-ssa-live.c (remove_unused_scope_block_p): Don't remove DECL_IGNORED_P non-reg vars if they are used. 2011-01-21 13:51:18 +01:00
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 re PR tree-optimization/47086 (ICE: verify_flow_info failed: BB 3 can not throw but has an EH edge with -O -fexceptions -fnon-call-exceptions -ftrapv) 2011-01-11 07:10:54 -07:00
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 re PR tree-optimization/47365 (wrong code with -O -ftree-pre) 2011-01-21 14:02:41 +00:00
tree-ssa-propagate.c
tree-ssa-propagate.h
tree-ssa-reassoc.c
tree-ssa-sccvn.c re PR tree-optimization/47365 (wrong code with -O -ftree-pre) 2011-01-21 14:02:41 +00:00
tree-ssa-sccvn.h re PR tree-optimization/47365 (wrong code with -O -ftree-pre) 2011-01-21 14:02:41 +00:00
tree-ssa-sink.c
tree-ssa-structalias.c tree-ssa-structalias.c (new_var_info): Use DECL_HARD_REGISTER. 2011-01-14 14:58:01 +00:00
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 re PR middle-end/47281 (error: non-trivial conversion at assignment) 2011-01-14 12:39:09 +00:00
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
tree.def re PR other/47395 (the tree code WIDEN_MULT_MINUS_EXPR has a mismatching name) 2011-01-21 14:14:12 +00:00
tree.h re PR lto/45721 (ICE: in function_and_variable_visibility, at ipa.c:673 with -flto) 2011-01-11 17:29:52 +00:00
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 re PR debug/47079 (FAIL: gcc.dg/guality/nrv-1.c) 2011-01-19 22:00:00 +00:00
varasm.c re PR lto/45721 (ICE: in function_and_variable_visibility, at ipa.c:673 with -flto) 2011-01-11 17:29:52 +00:00
varpool.c re PR tree-optimization/47391 (read from const volatile incorrectly eliminated) 2011-01-21 13:57:52 +01:00
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
web.c
xcoff.h
xcoffout.c re PR target/46655 (invalid '.line 0' directive emitted with -g) 2011-01-17 12:35:21 +00: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.