gcc/gcc
Jan Hubicka 85912441e4 Makefile.in (cgraphbuild.o): Add dependency on ipa-utils.h
* Makefile.in (cgraphbuild.o): Add dependency on ipa-utils.h
	* cgraphbuild.c: Include ipa-utils.h
	(record_reference_ctx): New struct.
	(record_reference): Simplify to work on initializers; not statements.
	(mark_address, mark_load, mark_store): New.
	(build_cgraph_edges): Simplify using walk_stmt_load_store_addr_ops;
	walk PHI nodes too.
	(record_references_in_initializer): Update use of record_reference.
	(rebuild_cgraph_edges): Simplify using walk_stmt_load_store_addr_ops;
	walk PHI nodes too.

From-SVN: r159032
2010-05-04 15:42:15 +00:00
..
ada * gnathtml.pl: Use 755 as mask for new directories. 2010-05-02 16:56:05 +00:00
config sh.c (sh_small_register_classes_for_mode_p): Remove static. 2010-05-04 12:43:13 +00:00
cp re PR c++/43705 (ICE: SIGSEGV with template specialization in non-namespace scope) 2010-05-04 14:17:52 +00:00
doc re PR c++/43680 ([DR 1022] G++ is too aggressive in optimizing away bounds checking with enums) 2010-05-03 17:16:40 -04:00
fortran re PR fortran/43592 (Unexpected INTERFACE statement in INTERFACE block at (1)) 2010-05-03 17:57:14 +00:00
ginclude c-common.c (flag_isoc1x): New. 2010-04-25 22:54:22 +01:00
java
lto lto.c (get_filename_for_set): Look for cgraph node and if none found, use default name. 2010-04-30 18:44:41 +00:00
objc [multiple changes] 2010-05-01 00:32:13 +00:00
objcp toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
po * sv.po: Update. 2010-05-01 16:23:59 +01:00
testsuite re PR c++/43705 (ICE: SIGSEGV with template specialization in non-namespace scope) 2010-05-04 14:17:52 +00:00
ABOUT-GCC-NLS
acinclude.m4
aclocal.m4
addresses.h
alias.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
alias.h
alloc-pool.c
alloc-pool.h
attribs.c
auto-inc-dec.c
BASE-VER
basic-block.h toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
bb-reorder.c
bitmap.c
bitmap.h
bt-load.c
builtin-attrs.def
builtin-types.def
builtins.c target.h (struct calls): Add function_value_regno_p field. 2010-05-02 14:49:10 +04:00
builtins.def
c-aux-info.c
c-common.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
c-common.def
c-common.h toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
c-config-lang.in
c-convert.c
c-cppbuiltin.c c-common.c (flag_isoc1x): New. 2010-04-25 22:54:22 +01:00
c-decl.c
c-dump.c
c-errors.c
c-format.c
c-format.h
c-gimplify.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
c-lang.c
c-lang.h
c-lex.c
c-objc-common.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
c-objc-common.h
c-omp.c re PR c/43893 (Error: Invalid controlling predicate with -fopenmp) 2010-04-26 22:07:10 +02:00
c-opts.c c-common.c (flag_isoc1x): New. 2010-04-25 22:54:22 +01:00
c-parser.c c-parser.c (struct c_token): Move location field up. 2010-04-26 19:10:17 +00:00
c-pch.c
c-ppoutput.c
c-pragma.c
c-pragma.h
c-pretty-print.c
c-pretty-print.h
c-semantics.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
c-tree.h c-parser.c (struct c_token): Move location field up. 2010-04-26 19:10:17 +00:00
c-typeck.c re PR c/32207 (missing warnings about address of 'x'.) 2010-04-27 02:40:19 +00:00
c.opt re PR c++/43680 ([DR 1022] G++ is too aggressive in optimizing away bounds checking with enums) 2010-05-03 17:16:40 -04:00
caller-save.c
calls.c tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
cfg.c
cfganal.c
cfgbuild.c
cfgcleanup.c
cfgexpand.c
cfghooks.c
cfghooks.h
cfglayout.c
cfglayout.h
cfgloop.c
cfgloop.h cfgloop.h (struct loop): Move can_be_parallel field up. 2010-04-26 18:21:17 +00:00
cfgloopanal.c
cfgloopmanip.c
cfgrtl.c tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
cgraph.c * lto-symtab.c (lto_symtab_entry_def) Add vnode. 2010-04-29 07:10:38 +00:00
cgraph.h lto.c (get_filename_for_set): Look for cgraph node and if none found, use default name. 2010-04-30 18:44:41 +00:00
cgraphbuild.c Makefile.in (cgraphbuild.o): Add dependency on ipa-utils.h 2010-05-04 15:42:15 +00:00
cgraphunit.c * lto-symtab.c (lto_symtab_entry_def) Add vnode. 2010-04-29 07:10:38 +00:00
ChangeLog Makefile.in (cgraphbuild.o): Add dependency on ipa-utils.h 2010-05-04 15:42:15 +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.dataflow
ChangeLog.graphite
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
cif-code.def cgraph.h (struct cgraph_node): New field indirect_calls. 2010-04-28 16:05:54 +02:00
collect2-aix.c
collect2-aix.h
collect2.c collect2.c (vflag): Change type from int to bool. 2010-04-29 17:42:54 +00:00
collect2.h collect2.c (vflag): Change type from int to bool. 2010-04-29 17:42:54 +00:00
combine-stack-adj.c
combine.c target.h (struct calls): Add function_value_regno_p field. 2010-05-02 14:49:10 +04:00
common.opt invoke.texi (-Wsuggest-attribute=const, [...]): Document. 2010-04-27 20:22:54 +00:00
conditions.h
config.build
config.gcc re PR lto/42776 (LTO doesn't work on non-ELF platforms.) 2010-04-27 02:22:40 +00:00
config.host
config.in collect2.c (TARGET_64BIT): Redefine to target's default. 2010-04-27 19:48:58 +02:00
configure collect2.c (TARGET_64BIT): Redefine to target's default. 2010-04-27 19:48:58 +02:00
configure.ac collect2.c (TARGET_64BIT): Redefine to target's default. 2010-04-27 19:48:58 +02:00
convert.c
convert.h
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
coretypes.h
coverage.c
coverage.h
cppdefault.c
cppdefault.h
cppspec.c
crtstuff.c
cse.c tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
cselib.c
cselib.h
cstamp-h.in
DATESTAMP Daily bump. 2010-05-04 00:17:21 +00:00
dbgcnt.c
dbgcnt.def
dbgcnt.h
dbxout.c
dbxout.h
dce.c
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h
DEV-PHASE
df-byte-scan.c
df-core.c
df-problems.c df-problems.c (df_simulate_initialize_forwards): Set, don't clear, bits for artificial defs at the top of the block. 2010-04-26 21:17:17 +00:00
df-scan.c
df.h ifcvt.c (dead_or_predicable): Use df_simulate_find_defs and df_simulate_find_noclobber_defs as appropriate. 2010-04-22 10:42:21 +00:00
dfp.c
dfp.h
diagnostic.c
diagnostic.def
diagnostic.h
dojump.c
dominance.c
domwalk.c
domwalk.h
double-int.c double-int.h (tree_to_double_int): Remove macro. 2010-05-03 20:21:15 +04:00
double-int.h double-int.h (tree_to_double_int): Remove macro. 2010-05-03 20:21:15 +04:00
dse.c
dse.h
dummy-checksum.c
dwarf2asm.c
dwarf2asm.h
dwarf2out.c rtl.h (CONST_DOUBLE_P): Define. 2010-05-01 21:52:02 +04:00
dwarf2out.h
ebitmap.c
ebitmap.h
emit-rtl.c rtl.h (CONST_DOUBLE_P): Define. 2010-05-01 21:52:02 +04:00
emit-rtl.h
emutls.c
errors.c
errors.h
et-forest.c
et-forest.h
except.c
except.h
exec-tool.in
explow.c
expmed.c
expr.c expr.c (expand_expr_real_1): Only use conversion between modes if both types are integral. 2010-04-23 16:16:50 +00:00
expr.h
final.c cgraph.c (cgraph_create_node): Set node frequency to normal. 2010-04-26 13:33:24 +00:00
fixed-value.c
fixed-value.h
flags.h
fold-const.c re PR tree-optimization/41442 (missed optimization for boolean expression) 2010-04-24 18:53:47 +00:00
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function.c cgraph.c (cgraph_create_node): Set node frequency to normal. 2010-04-26 13:33:24 +00:00
function.h cgraph.c (cgraph_create_node): Set node frequency to normal. 2010-04-26 13:33:24 +00:00
fwprop.c df-problems.c (df_simulate_initialize_forwards): Set, don't clear, bits for artificial defs at the top of the block. 2010-04-26 21:17:17 +00:00
gbl-ctors.h
gcc-plugin.h
gcc.c
gcc.h
gccbug.in
gccspec.c
gcov-dump.c vmsdbgout.c (ASM_OUTPUT_DEBUG_DATA1): Change format string placeholder from 0x%x to %#x. 2010-05-02 21:39:31 +02:00
gcov-io.c
gcov-io.h
gcov-iov.c vmsdbgout.c (ASM_OUTPUT_DEBUG_DATA1): Change format string placeholder from 0x%x to %#x. 2010-05-02 21:39:31 +02:00
gcov.c
gcse.c tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
gdbinit.in
genattr.c
genattrtab.c
genautomata.c
gencheck.c
genchecksum.c vmsdbgout.c (ASM_OUTPUT_DEBUG_DATA1): Change format string placeholder from 0x%x to %#x. 2010-05-02 21:39:31 +02:00
gencodes.c
genconditions.c
genconfig.c
genconstants.c
genemit.c
genextract.c
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-parse.c
gengtype.c sdbout.c: Include vec.h, do not include varray.h. 2010-04-30 14:58:54 +00:00
gengtype.h
genmddeps.c
genmodes.c
genmultilib
genopinit.c
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
ggc-common.c
ggc-none.c
ggc-page.c
ggc-zone.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
ggc.h
gimple-fold.c
gimple-iterator.c
gimple-low.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
gimple-pretty-print.c
gimple.c re PR c++/43080 (ICE with anonymous union and -flto) 2010-04-26 09:19:24 +00:00
gimple.def
gimple.h
gimplify.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
glimits.h
graph.c
graph.h
graphds.c
graphds.h
graphite-blocking.c
graphite-clast-to-gimple.c
graphite-clast-to-gimple.h
graphite-dependences.c
graphite-dependences.h
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
graphite.h
gsstruct.def
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
gthr-posix.c
gthr-posix.h
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
highlev-plugin-common.h
hooks.c tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
hooks.h tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
host-default.c
hosthooks-def.h
hosthooks.h
hwint.h revert: hwint.h (HOST_WIDE_INT_PRINT_DOUBLE_HEX): Change format string placeholder from 0x%x to %#x. 2010-05-02 15:10:40 +02:00
ifcvt.c tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
incpath.c
incpath.h
init-regs.c
input.h
insn-addr.h
insn-notes.def
integrate.c
integrate.h toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
intl.c
intl.h
ipa-cp.c gengtype.c (open_base_files): Add lto-streamer.h 2010-04-29 22:44:18 +00:00
ipa-inline.c cgraph.h (cgraph_local_info): Remove for_functions_valid. 2010-04-30 09:29:44 +00:00
ipa-prop.c cgraph.h (struct cgraph_node): New field indirect_calls. 2010-04-28 16:05:54 +02:00
ipa-prop.h cgraph.h (struct cgraph_node): New field indirect_calls. 2010-04-28 16:05:54 +02:00
ipa-pure-const.c * lto-symtab.c (lto_symtab_entry_def) Add vnode. 2010-04-29 07:10:38 +00:00
ipa-reference.c * lto-symtab.c (lto_symtab_entry_def) Add vnode. 2010-04-29 07:10:38 +00:00
ipa-reference.h
ipa-struct-reorg.c
ipa-struct-reorg.h
ipa-type-escape.c
ipa-type-escape.h
ipa-utils.c
ipa-utils.h
ipa.c gengtype.c (open_base_files): Add lto-streamer.h 2010-04-29 22:44:18 +00:00
ira-build.c
ira-color.c re PR bootstrap/43964 (4.6-20100501 (r158965) bootstrap failure on ARM, ira-color.c triggers -Werror) 2010-05-04 10:49:41 +00:00
ira-conflicts.c
ira-costs.c
ira-emit.c
ira-int.h
ira-lives.c
ira.c re PR target/42895 (Low registers are preferred than register ip in thumb2 mode) 2010-04-29 21:37:01 +00:00
ira.h
jump.c
lambda-code.c tree-parloops.c (loop_parallel_p): New argument parloop_obstack. 2010-04-22 12:42:15 +00:00
lambda-mat.c tree-parloops.c (loop_parallel_p): New argument parloop_obstack. 2010-04-22 12:42:15 +00:00
lambda-trans.c tree-parloops.c (loop_parallel_p): New argument parloop_obstack. 2010-04-22 12:42:15 +00:00
lambda.h tree-parloops.c (loop_parallel_p): New argument parloop_obstack. 2010-04-22 12:42:15 +00:00
langhooks-def.h
langhooks.c
langhooks.h
LANGUAGES
lcm.c
libfuncs.h
libgcc2.c
libgcc2.h
libgcc-libsystem.ver
libgcc-std.ver
libgcov.c
limitx.h
limity.h
lists.c
longlong.h
loop-doloop.c
loop-init.c
loop-invariant.c
loop-iv.c
loop-unroll.c
loop-unswitch.c
lower-subreg.c
lto-cgraph.c lto.c (get_filename_for_set): Look for cgraph node and if none found, use default name. 2010-04-30 18:44:41 +00:00
lto-compress.c
lto-compress.h
lto-opts.c
lto-section-in.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
lto-section-out.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
lto-streamer-in.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
lto-streamer-out.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
lto-streamer.c * lto-symtab.c (lto_symtab_entry_def) Add vnode. 2010-04-29 07:10:38 +00:00
lto-streamer.h lto.c (get_filename_for_set): Look for cgraph node and if none found, use default name. 2010-04-30 18:44:41 +00:00
lto-symtab.c lto-symtab.c (lto_cgraph_replace_node): Do not remove edges; node will be removed anyway. 2010-05-04 15:17:10 +00:00
lto-wrapper.c
machmode.def
machmode.h
main.c
Makefile.in target.h (struct calls): Add function_value_regno_p field. 2010-05-02 14:49:10 +04:00
matrix-reorg.c
mcf.c
mips-tdump.c
mips-tfile.c
mkconfig.sh
mkmap-flat.awk
mkmap-symver.awk
mode-classes.def
mode-switching.c target.h (struct calls): Add function_value_regno_p field. 2010-05-02 14:49:10 +04:00
modulo-sched.c
omega.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
omega.h
omp-builtins.def
omp-low.c
ONEWS
opt-functions.awk
opt-gather.awk
optabs.c
optabs.h optabs.h (expand_widening_mult): Declare. 2010-04-22 11:47:52 +00:00
optc-gen.awk vmsdbgout.c (ASM_OUTPUT_DEBUG_DATA1): Change format string placeholder from 0x%x to %#x. 2010-05-02 14:31:18 +02:00
opth-gen.awk
opts-common.c
opts.c invoke.texi (-fipa-profile): Document. 2010-04-27 14:56:33 +00:00
opts.h
output.h
params.c
params.def
params.h
passes.c re PR lto/43946 (SPEC2000 GCC fails to build with -fprofile-generate -O2 -ffast-math -flto -fwhole-program) 2010-04-30 13:23:25 +00:00
plugin.c plugin.h (invoke_plugin_callbacks): New inline function. 2010-04-29 09:01:56 +00:00
plugin.def
plugin.h Move flag_plugin_added out of invoke_plugin_callbacks. 2010-04-29 09:29:10 -07:00
pointer-set.c
pointer-set.h
postreload-gcse.c
postreload.c
predict.c cgraph.c (cgraph_create_node): Set node frequency to normal. 2010-04-26 13:33:24 +00:00
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c
print-tree.c
profile.c
profile.h
read-rtl.c
README.Portability
real.c
real.h
recog.c
recog.h
reg-notes.def
reg-stack.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
regcprop.c
reginfo.c
regmove.c tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
regrename.c
regs.h tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
regstat.c
reload1.c tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
reload.c tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
reload.h
reorg.c
resource.c
resource.h
rtl-error.c
rtl.c
rtl.def
rtl.h rtl.h (CONST_DOUBLE_P): Define. 2010-05-01 21:52:02 +04:00
rtlanal.c target.h (struct calls): Add function_value_regno_p field. 2010-05-02 14:49:10 +04:00
rtlhooks-def.h
rtlhooks.c
sbitmap.c
sbitmap.h
sched-deps.c tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
sched-ebb.c
sched-int.h
sched-rgn.c
sched-vis.c
sdbout.c sdbout.c: Include vec.h, do not include varray.h. 2010-04-30 14:58:54 +00:00
sdbout.h
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c
sel-sched-ir.h
sel-sched.c
sel-sched.h
sese.c sese.h (create_if_region_on_edge): Remove. 2010-04-23 06:02:06 +00:00
sese.h sese.h (create_if_region_on_edge): Remove. 2010-04-23 06:02:06 +00:00
simplify-rtx.c
sparseset.c
sparseset.h
sreal.c
sreal.h
ssaexpand.h
stab.def
stack-ptr-mod.c
statistics.c
statistics.h
stmt.c
stor-layout.c
store-motion.c
stringpool.c
stub-objc.c
sync-builtins.def
system.h re PR target/42895 (Low registers are preferred than register ip in thumb2 mode) 2010-04-29 21:37:01 +00:00
target-def.h tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
target.h tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. 2010-05-03 17:47:47 +00:00
targhooks.c target.h (struct calls): Add function_value_regno_p field. 2010-05-02 14:49:10 +04:00
targhooks.h target.h (struct calls): Add function_value_regno_p field. 2010-05-02 14:49:10 +04:00
timevar.c
timevar.def gengtype.c (open_base_files): Add lto-streamer.h 2010-04-29 22:44:18 +00:00
timevar.h
tlink.c collect2.c (TARGET_64BIT): Redefine to target's default. 2010-04-27 19:48:58 +02:00
toplev.c sdbout.c: Include vec.h, do not include varray.h. 2010-04-30 14:58:54 +00:00
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
tree-complex.c
tree-data-ref.c tree-parloops.c (loop_parallel_p): New argument parloop_obstack. 2010-04-22 12:42:15 +00:00
tree-data-ref.h tree-parloops.c (loop_parallel_p): New argument parloop_obstack. 2010-04-22 12:42:15 +00:00
tree-dfa.c
tree-dump.c
tree-dump.h
tree-eh.c
tree-flow-inline.h
tree-flow.h predicate aware uninitialized analysis 2010-04-28 17:41:31 +00:00
tree-if-conv.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
tree-inline.c cgraph.h (struct cgraph_node): New field indirect_calls. 2010-04-28 16:05:54 +02:00
tree-inline.h
tree-into-ssa.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c
tree-loop-linear.c tree-parloops.c (loop_parallel_p): New argument parloop_obstack. 2010-04-22 12:42:15 +00:00
tree-mudflap.c
tree-mudflap.h
tree-nested.c
tree-nomudflap.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
tree-nrv.c
tree-object-size.c
tree-optimize.c
tree-outof-ssa.c
tree-parloops.c tree-parloops.c (loop_parallel_p): New argument parloop_obstack. 2010-04-22 12:42:15 +00:00
tree-pass.h * lto-symtab.c (lto_symtab_entry_def) Add vnode. 2010-04-29 07:10:38 +00:00
tree-phinodes.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
tree-predcom.c
tree-pretty-print.c
tree-profile.c tree-profile.c (tree_init_ic_make_global_vars): Mark new decls as needed. 2010-04-30 14:24:44 +00:00
tree-scalar-evolution.c
tree-scalar-evolution.h
tree-sra.c re PR tree-optimization/43846 (array vs members, total scalarization issues) 2010-04-23 16:52:06 +02:00
tree-ssa-address.c
tree-ssa-alias.c
tree-ssa-alias.h
tree-ssa-ccp.c
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
tree-ssa-loop-ch.c
tree-ssa-loop-im.c
tree-ssa-loop-ivcanon.c
tree-ssa-loop-ivopts.c tree-ssa-loop-ivopts.c (may_be_unaligned_p): Check the alignment of the variable part of the offset as well. 2010-04-30 21:10:53 +00:00
tree-ssa-loop-manip.c
tree-ssa-loop-niter.c
tree-ssa-loop-prefetch.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
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/43845 (Segfault when using __attribute__((const)), versions 4.4.3 and 4.6) 2010-04-22 11:19:45 +00:00
tree-ssa-propagate.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
tree-ssa-propagate.h
tree-ssa-reassoc.c tree-ssa-reassoc.c (eliminate_plus_minus_pair): Handle BIT_NOT_EXPR to simplify a + ~a. 2010-04-22 16:44:30 +04:00
tree-ssa-sccvn.c
tree-ssa-sccvn.h
tree-ssa-sink.c
tree-ssa-structalias.c re PR tree-optimization/43879 (-fipa-pta causes various miscompilations) 2010-05-04 13:12:02 +00:00
tree-ssa-ter.c
tree-ssa-threadedge.c
tree-ssa-threadupdate.c
tree-ssa-uncprop.c
tree-ssa-uninit.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
tree-ssa.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
tree-ssanames.c toplev.c: Include varray.h for statistics dumping. 2010-04-30 11:58:49 +00:00
tree-stdarg.c
tree-stdarg.h
tree-switch-conversion.c
tree-tailcall.c re PR tree-optimization/43879 (-fipa-pta causes various miscompilations) 2010-05-02 18:10:53 +00:00
tree-vect-data-refs.c tree-vectorizer.h (struct _stmt_vec_info): Add new field to determine if the statement is vectorizable... 2010-04-26 06:39:27 +00:00
tree-vect-generic.c
tree-vect-loop-manip.c
tree-vect-loop.c re PR tree-optimization/43842 (ice in vect_create_epilog_for_reduction) 2010-04-22 18:03:01 +00:00
tree-vect-patterns.c
tree-vect-slp.c tree-vectorizer.h (struct _stmt_vec_info): Add new field to determine if the statement is vectorizable... 2010-04-26 06:39:27 +00:00
tree-vect-stmts.c tree-vectorizer.h (struct _stmt_vec_info): Add new field to determine if the statement is vectorizable... 2010-04-26 06:39:27 +00:00
tree-vectorizer.c
tree-vectorizer.h cfgloop.h (struct loop): Move can_be_parallel field up. 2010-04-26 18:21:17 +00:00
tree-vrp.c re PR tree-optimization/43949 (bogus warning: array subscript is above array bounds) 2010-05-04 09:53:28 +00:00
tree.c double-int.h (tree_to_double_int): Remove macro. 2010-05-03 20:21:15 +04:00
tree.def
tree.h double-int.h (tree_to_double_int): Remove macro. 2010-05-03 20:21:15 +04:00
treestruct.def
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.c (_Unwind_DebugHook): Add used and noclone attributes. 2010-04-27 11:40:46 +02:00
unwind-dw2.h
unwind-generic.h
unwind-pe.h
unwind-sjlj.c
unwind.inc
value-prof.c
value-prof.h
var-tracking.c
varasm.c Uniquization of constants at the Tree level 2010-04-28 19:11:50 +00:00
varpool.c lto-symtab.c (lto_cgraph_replace_node): Do not remove edges; node will be removed anyway. 2010-05-04 15:17:10 +00:00
vec.c
vec.h
vecprim.h
version.c
version.h
vmsdbg.h
vmsdbgout.c vmsdbgout.c (ASM_OUTPUT_DEBUG_DATA1): Change format string placeholder from 0x%x to %#x. 2010-05-02 14:31:18 +02:00
web.c
xcoff.h
xcoffout.c
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.