gcc/gcc
Jakub Jelinek 61a861e686 re PR c++/34364 (class& is not known as as a class-type anymore after dynamic_cast)
PR c++/34364
	* rtti.c (build_dynamic_cast): Call convert_from_reference even for
	dynamic_cast in a template.

	* g++.dg/rtti/dyncast2.C: New test.

From-SVN: r130770
2007-12-11 09:20:15 +01:00
..
ada ada-tree.h (TYPE_RETURNS_BY_TARGET_PTR_P): Move around. 2007-12-10 23:15:17 +00:00
config re PR target/34403 (wrong frequency of block) 2007-12-10 22:30:02 +00:00
cp re PR c++/34364 (class& is not known as as a class-type anymore after dynamic_cast) 2007-12-11 09:20:15 +01:00
doc re PR ada/29157 (gnattools fail on cross compilation - Makefile bug?) 2007-12-07 14:31:48 +00:00
fortran re PR fortran/34425 (bogus warning) 2007-12-10 22:42:56 +01:00
ginclude
java PR 34081/C++ 2007-11-26 17:33:23 +00:00
objc
objcp
po * zh_CN.po: Update. 2007-11-29 02:21:41 +00:00
testsuite re PR c++/34364 (class& is not known as as a class-type anymore after dynamic_cast) 2007-12-11 09:20:15 +01:00
treelang PR 34081/C++ 2007-11-26 17:33:23 +00:00
ABOUT-GCC-NLS
BASE-VER
COPYING
COPYING.LIB
COPYING3
COPYING3.LIB
ChangeLog re PR tree-optimization/34371 (verify_stmts failed (incorrect sharing of tree nodes)) 2007-12-10 23:49:43 +01:00
ChangeLog-1997
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog.dataflow
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
DATESTAMP Daily bump. 2007-12-11 00:17:54 +00:00
DEV-PHASE
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
LANGUAGES
Makefile.in [multiple changes] 2007-11-29 15:34:21 +00:00
ONEWS
README.Portability
acinclude.m4
aclocal.m4
addresses.h
alias.c
alias.h
alloc-pool.c re PR tree-optimization/34176 (SCCVN breaks gettext) 2007-11-23 14:28:59 +00:00
alloc-pool.h re PR tree-optimization/34176 (SCCVN breaks gettext) 2007-11-23 14:28:59 +00:00
attribs.c
auto-inc-dec.c [multiple changes] 2007-12-10 21:31:59 +00:00
basic-block.h
bb-reorder.c re PR rtl-optimization/34085 (ICE with -freorder-blocks-and-partition) 2007-11-26 12:15:02 +00:00
bitmap.c bitmap.h (bitmap_single_bit_set_p): Declare. 2007-11-09 14:01:33 +00:00
bitmap.h bitmap.h (bitmap_single_bit_set_p): Declare. 2007-11-09 14:01:33 +00:00
bt-load.c
builtin-attrs.def
builtin-types.def
builtins.c re PR middle-end/20983 (varargs functions force va_list variable to stack unnecessarily) 2007-12-06 14:25:37 +01:00
builtins.def
c-aux-info.c
c-common.c c-common.c (conversion_warning): Use get_unwidened instead of get_narrower. 2007-11-26 19:05:49 +00:00
c-common.def
c-common.h
c-config-lang.in
c-convert.c
c-cppbuiltin.c
c-decl.c PR 34081/C++ 2007-11-26 17:33:23 +00:00
c-dump.c
c-errors.c
c-format.c
c-format.h
c-gimplify.c re PR c/34146 (Inefficient code with compound literals inside a CONSTRUCTO) 2007-11-20 11:36:03 +01:00
c-incpath.c
c-incpath.h
c-lang.c
c-lex.c
c-objc-common.c
c-objc-common.h
c-omp.c
c-opts.c re PR c/29172 (--combine can't handle #pragma once) 2007-12-06 18:56:26 +00:00
c-parser.c c-parser (c_parser_statement_after_labels): Move error from here... 2007-12-04 21:10:09 +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
c-tree.h re PR c/14050 ([DR289] c99 restrict doesn't work in abs declarator) 2007-11-22 23:12:29 +00:00
c-typeck.c re PR c/27898 (Compile failure with --combine and anonymous structures) 2007-11-26 06:26:18 +00:00
c.opt
caller-save.c caller-save.c (insert_one_insn): If inserting before a call_insn then the registers containing the arguments of... 2007-12-10 01:01:03 +00:00
calls.c
cfg.c re PR tree-optimization/34046 (verify_flow_info failed) 2007-11-14 19:06:10 +00:00
cfganal.c
cfgbuild.c
cfgcleanup.c re PR rtl-optimization/33737 (verify_flow_info failed: Wrong probability of edge 94->1 -6651) 2007-11-07 22:05:37 +00:00
cfgexpand.c
cfghooks.c
cfghooks.h
cfglayout.c
cfglayout.h
cfgloop.c
cfgloop.h
cfgloopanal.c
cfgloopmanip.c
cfgrtl.c re PR rtl-optimization/34171 (Segfault in df_chain_remove_problem with -O3 on alpha) 2007-11-30 17:02:43 +00:00
cgraph.c langhooks.h (struct lang_hooks_for_callgraph): Remove third argument from function pointer ANALYZE_EXPR. 2007-11-02 07:12:30 -04:00
cgraph.h langhooks.h (struct lang_hooks_for_callgraph): Remove third argument from function pointer ANALYZE_EXPR. 2007-11-02 07:12:30 -04:00
cgraphbuild.c langhooks.h (struct lang_hooks_for_callgraph): Remove third argument from function pointer ANALYZE_EXPR. 2007-11-02 07:12:30 -04:00
cgraphunit.c PR 34081/C++ 2007-11-26 17:33:23 +00:00
collect2.c collect2.c (dump_file): If a demangled symbol is followed by a space... 2007-11-16 22:11:29 +00:00
collect2.h
combine-stack-adj.c
combine.c re PR middle-end/33713 (can't find a register in class 'GENERAL_REGS' while reloading 'asm') 2007-12-03 23:09:23 +00:00
common.opt re PR middle-end/33713 (can't find a register in class 'GENERAL_REGS' while reloading 'asm') 2007-12-03 23:09:23 +00:00
conditions.h
config.build
config.gcc re PR target/16350 (gcc only understands little endian ARM systems) 2007-11-08 13:44:09 +00:00
config.host
config.in
configure common.opt (fshow-column): Default to 0. 2007-11-08 16:39:59 +00:00
configure.ac common.opt (fshow-column): Default to 0. 2007-11-08 16:39:59 +00:00
convert.c
convert.h
coretypes.h
coverage.c
coverage.h
cppdefault.c
cppdefault.h
cppspec.c
crtstuff.c
cse.c re PR rtl-optimization/34035 (ICE in calc_dfs_tree with -O2 -fnon-call-exceptions -ffast-math -fno-gcse) 2007-11-12 21:21:37 +00:00
cselib.c
cselib.h
cstamp-h.in
dbgcnt.c
dbgcnt.def
dbgcnt.h
dbxout.c
dbxout.h
dce.c
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h
df-core.c
df-problems.c
df-scan.c
df.h
dfp.c
dfp.h
diagnostic.c
diagnostic.def
diagnostic.h
dojump.c
dominance.c
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c dse.c (find_shift_sequence): Always choose an integer mode for new_mode. 2007-11-09 12:11:48 +00:00
dse.h
dummy-checksum.c
dwarf.h
dwarf2.h re PR fortran/22244 (dimension information is lost for multi-dimension array) 2007-12-09 18:08:06 +01:00
dwarf2asm.c dwarf2asm.c (splay_tree_compare_strings): New function. 2007-11-26 06:38:30 +00:00
dwarf2asm.h
dwarf2out.c dwarf2out.c (gen_array_type_die, [...]): For Fortran multi-dimensional arrays use DW_AT_ordering DW_ORD_col_major. 2007-12-10 14:05:15 +01:00
dwarf2out.h re PR fortran/22244 (dimension information is lost for multi-dimension array) 2007-12-09 18:08:06 +01:00
ebitmap.c
ebitmap.h
emit-rtl.c tree.h (struct tree_block): Move locus member next to flags. 2007-11-25 14:26:10 +00: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 re PR middle-end/33713 (can't find a register in class 'GENERAL_REGS' while reloading 'asm') 2007-12-03 23:09:23 +00:00
expmed.c
expr.c re PR middle-end/33713 (can't find a register in class 'GENERAL_REGS' while reloading 'asm') 2007-12-03 23:09:23 +00:00
expr.h re PR middle-end/33713 (can't find a register in class 'GENERAL_REGS' while reloading 'asm') 2007-12-03 23:09:23 +00:00
final.c
fix-header.c
fixed-value.c
fixed-value.h
fixproto
flags.h
fold-const.c re PR middle-end/34337 (Internal error while building gtkwhiteboardc.c from pidgin 2.3.0) 2007-12-05 23:24:08 +01:00
fp-test.c
function.c PR 34081/C++ 2007-11-26 17:33:23 +00:00
function.h PR 34081/C++ 2007-11-26 17:33:23 +00:00
fwprop.c fwprop.c (try_fwprop_subst): Skip profitability check for forward propagation into an address... 2007-11-15 14:45:55 +00:00
gbl-ctors.h
gcc.c re PR driver/30460 (asm_debug is not initialized in gcc.c when using a "default" specs file) 2007-11-16 08:02:49 +01:00
gcc.h
gccbug.in
gccspec.c
gcov-dump.c
gcov-io.c
gcov-io.h
gcov-iov.c
gcov.c
gcse.c rtlanal.c (label_is_jump_target_p): Return true for a matching REG_LABEL_TARGET. 2007-11-24 22:15:54 +00:00
gdbinit.in
gen-protos.c
genattr.c
genattrtab.c
genautomata.c
gencheck.c
genchecksum.c
gencodes.c
genconditions.c
genconfig.c
genconstants.c
genemit.c
genextract.c
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-parse.c
gengtype.c tree-ssa-structalias.c (ipa_pta_execute): Rename 'cfun' to 'func'. 2007-11-16 00:11:47 +00:00
gengtype.h
genmddeps.c
genmodes.c
genmultilib
genopinit.c genopinit.c: Include tm_p.h in generated file. 2007-12-10 05:42:02 +00:00
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
ggc-common.c ggc-common.c (dump_ggc_loc_statistics): Reset ggc_force_collect flag. 2007-12-01 21:06:31 +00:00
ggc-none.c
ggc-page.c ggc-page.c (extra_order_size_tab): Add bitmap_head size. 2007-11-01 22:20:29 +00:00
ggc-zone.c
ggc.h
gimple-low.c 2007-09-23 Razya Ladelsky 2007-10-29 11:05:04 +00:00
gimplify.c [multiple changes] 2007-12-06 11:06:38 +01:00
glimits.h
global.c global.c (rest_of_handle_global_alloc): Fix comment typos. 2007-11-14 12:28:41 +00:00
graph.c
graph.h
graphds.c
graphds.h
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-posix.c
gthr-posix.h
gthr-posix95.h
gthr-rtems.h
gthr-single.h
gthr-solaris.h
gthr-tpf.h
gthr-vxworks.h
gthr-win32.h
gthr.h
haifa-sched.c haifa-sched.c (haifa_classify_insn): Rename to ... 2007-11-09 20:02:10 +03:00
hard-reg-set.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hwint.h
ifcvt.c ifcvt.c (noce_can_store_speculate_p): New static function. 2007-10-29 20:41:17 +00:00
init-regs.c
input.h
insn-addr.h
insn-notes.def
integrate.c
integrate.h
intl.c
intl.h
ipa-cp.c
ipa-inline.c
ipa-prop.c
ipa-prop.h
ipa-pure-const.c [multiple changes] 2007-11-08 16:45:53 +00:00
ipa-reference.c
ipa-reference.h
ipa-struct-reorg.c tree-ssa-structalias.c (ipa_pta_execute): Rename 'cfun' to 'func'. 2007-11-16 00:11:47 +00:00
ipa-struct-reorg.h
ipa-type-escape.c
ipa-type-escape.h
ipa-utils.c [multiple changes] 2007-11-08 16:45:53 +00:00
ipa-utils.h
ipa.c
jump.c rtlanal.c (label_is_jump_target_p): Return true for a matching REG_LABEL_TARGET. 2007-11-24 22:15:54 +00:00
lambda-code.c
lambda-mat.c
lambda-trans.c
lambda.h
langhooks-def.h re PR fortran/22244 (dimension information is lost for multi-dimension array) 2007-12-09 18:08:06 +01:00
langhooks.c langhooks.h (struct lang_hooks_for_callgraph): Remove third argument from function pointer ANALYZE_EXPR. 2007-11-02 07:12:30 -04:00
langhooks.h re PR fortran/22244 (dimension information is lost for multi-dimension array) 2007-12-09 18:08:06 +01:00
lcm.c
libada-mk.in
libfuncs.h
libgcc-std.ver
libgcc2.c libgcc2.c (__fixunstfDI, [...]): Make return type unsigned. 2007-11-05 11:41:40 +00:00
libgcc2.h libgcc2.c (__fixunstfDI, [...]): Make return type unsigned. 2007-11-05 11:41:40 +00:00
libgcov.c
limitx.h
limity.h
lists.c
local-alloc.c
longlong.h longlong.h (add_ssaaaa): Support Intel asm syntax in i386 and x86_64 versions. 2007-10-29 23:54:54 +00:00
loop-doloop.c
loop-init.c
loop-invariant.c
loop-iv.c
loop-unroll.c
loop-unswitch.c
lower-subreg.c
machmode.def
machmode.h
main.c
matrix-reorg.c
mips-tdump.c
mips-tfile.c
mkconfig.sh
mkmap-flat.awk
mkmap-symver.awk
mode-classes.def
mode-switching.c
modulo-sched.c Fix the direction of the scheduling window & Fix scheduling order within a row 2007-12-02 11:01:26 +00:00
omega.c
omega.h
omp-builtins.def
omp-low.c omp-low.c (optimize_omp_library_calls): New function. 2007-12-04 23:01:04 +01:00
opt-functions.awk
opt-gather.awk
optabs.c 200x-xx-xx Jakub Jelinek <jakub@redhat.com> Richard Sandiford <rsandifo@nildram.co.uk> 2007-12-05 09:33:42 +00:00
optabs.h re PR middle-end/33335 (FAIL: 26_numerics/complex/inserters_extractors/wchar_t/1.cc) 2007-11-18 20:18:39 +01:00
optc-gen.awk
opth-gen.awk
opts-common.c
opts.c re PR middle-end/34382 (-fforce-addr completely broken) 2007-12-07 19:11:31 +00:00
opts.h
output.h
params.c
params.def re PR tree-optimization/32540 (Exponential time behavior in PRE) 2007-11-05 15:42:30 +00:00
params.h
passes.c passes.c (init_optimization_passes): Exchange store_copy_prop with copy_prop. 2007-10-29 21:16:45 +00:00
pointer-set.c
pointer-set.h
postreload-gcse.c
postreload.c
predict.c
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c
print-tree.c * print-tree.c (print_node): Print column number. 2007-11-01 15:06:11 +00:00
profile.c
protoize.c
ra-conflict.c
ra.h
read-rtl.c read-rtl.c (fatal_expected_char): Print EOF as text rather that its binary representation. 2007-11-20 17:24:51 +00:00
real.c
real.h
recog.c
recog.h
reg-notes.def
reg-stack.c
regclass.c regclass.c (init_reg_autoinc): Fix typo preventing test of secondary output reload when... 2007-11-21 19:59:54 +00:00
regmove.c
regrename.c
regs.h
regstat.c
reload.c reload.c (find_reloads_address_1): To properly mark as an autoincdec... 2007-12-10 01:09:44 +00:00
reload.h
reload1.c
reorg.c rtlanal.c (label_is_jump_target_p): Return true for a matching REG_LABEL_TARGET. 2007-11-24 22:15:54 +00:00
resource.c
resource.h
rtl-error.c
rtl-factoring.c
rtl.c
rtl.def
rtl.h re PR rtl-optimization/33822 (-g -O -mstrict-align causes an ICE in set_variable_part,) 2007-11-07 20:48:08 +00:00
rtlanal.c rtlanal.c (label_is_jump_target_p): Return true for a matching REG_LABEL_TARGET. 2007-11-24 22:15:54 +00:00
rtlhooks-def.h
rtlhooks.c
sbitmap.c
sbitmap.h
scan-decls.c
scan-types.sh
scan.c
scan.h
sched-deps.c Maxim Kuvyrkov <maxim@codesourcery.com> 2007-11-09 20:23:42 +03:00
sched-ebb.c
sched-int.h
sched-rgn.c rtlanal.c (label_is_jump_target_p): Return true for a matching REG_LABEL_TARGET. 2007-11-24 22:15:54 +00:00
sched-vis.c
sdbout.c
sdbout.h
see.c
simplify-rtx.c
sort-protos
sparseset.c sparseset.c: Include config.h and system.h before sparseset.h. 2007-12-05 13:47:22 +01:00
sparseset.h sparseset.c: Include config.h and system.h before sparseset.h. 2007-12-05 13:47:22 +01:00
sreal.c
sreal.h
stab.def
stack-ptr-mod.c
statistics.h
stmt.c re PR middle-end/34134 (ICE when using __builtin_stack_restore) 2007-12-04 22:55:32 +01:00
stor-layout.c re PR ada/34098 (xgcc: Internal error: Segmentation fault (program gnat1)) 2007-11-19 17:49:11 +00:00
stringpool.c
struct-equiv.c
stub-objc.c
sync-builtins.def
sys-protos.h
sys-types.h
system.h
target-def.h re PR middle-end/20983 (varargs functions force va_list variable to stack unnecessarily) 2007-12-06 14:25:37 +01:00
target.h re PR middle-end/20983 (varargs functions force va_list variable to stack unnecessarily) 2007-12-06 14:25:37 +01:00
targhooks.c
targhooks.h
timevar.c
timevar.def
timevar.h
tlink.c
toplev.c re PR tree-optimization/34036 (ICE with control flow in the middle of basic block for -fnon-call-exceptions) 2007-11-19 06:27:31 +00:00
toplev.h
tracer.c
tree-affine.c
tree-affine.h
tree-browser.c
tree-browser.def
tree-cfg.c 2007-09-23 Razya Ladelsky 2007-10-29 11:05:04 +00:00
tree-cfgcleanup.c
tree-chrec.c re PR tree-optimization/34063 (ICE: build2_stat, at tree.c:3115) 2007-11-13 19:23:03 +01:00
tree-chrec.h tree-chrec.h (build_polynomial_chrec): RHS of a chrec should not be of pointer type. 2007-11-14 00:41:05 +00:00
tree-complex.c
tree-data-ref.c re PR tree-optimization/33453 (ICE in build2_stat, at tree.c:3110 with -ftree-parallelize-loops=4 -ftree-vectorize) 2007-12-03 23:35:39 +01:00
tree-data-ref.h
tree-dfa.c re PR tree-optimization/33870 (miscompiles sqlite) 2007-11-16 14:40:04 +00:00
tree-dump.c c-common.c (vector_types_convertible_p, [...]): Constify. 2007-08-25 15:10:40 +00:00
tree-dump.h
tree-eh.c
tree-flow-inline.h tree-flow-inline.h (get_subvar_at): Use binary search. 2007-10-29 18:27:38 +00:00
tree-flow.h re PR tree-optimization/33870 (miscompiles sqlite) 2007-11-16 14:40:04 +00:00
tree-gimple.c [multiple changes] 2007-12-06 11:06:38 +01:00
tree-gimple.h
tree-if-conv.c re PR tree-optimization/34140 (ICE in is_hidden_global_store, at tree-ssa-sink.c:207) 2007-11-28 20:48:19 +01:00
tree-inline.c re PR tree-optimization/33434 (inlining miscompilation) 2007-11-29 22:57:38 +01:00
tree-inline.h re PR middle-end/34018 (ICE: verify_stmts failed) 2007-11-10 08:46:31 +01:00
tree-into-ssa.c
tree-iterator.c
tree-iterator.h
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 re PR middle-end/33589 (ICE on valid code at -O2: verify_flow_info failed) 2007-10-28 10:00:54 -07:00
tree-parloops.c re PR tree-optimization/33453 (ICE in build2_stat, at tree.c:3110 with -ftree-parallelize-loops=4 -ftree-vectorize) 2007-12-03 23:35:39 +01:00
tree-pass.h passes.c (init_optimization_passes): Exchange store_copy_prop with copy_prop. 2007-10-29 21:16:45 +00:00
tree-phinodes.c
tree-predcom.c
tree-pretty-print.c 2007-09-23 Razya Ladelsky 2007-10-29 11:05:04 +00:00
tree-profile.c tree-profile.c (gcov_type_tmp_var): New global variable. 2007-12-07 10:39:14 +00:00
tree-scalar-evolution.c re PR tree-optimization/34244 (VRP/SCEV miscompiles Firefox) 2007-11-30 00:32:04 +00:00
tree-scalar-evolution.h re PR tree-optimization/34244 (VRP/SCEV miscompiles Firefox) 2007-11-30 00:32:04 +00:00
tree-sra.c tree-sra.c (scalarize_use): Adjust the vpos argument to sra_explode_bitfield_assignment in cases where the... 2007-11-25 14:45:53 +00:00
tree-ssa-address.c
tree-ssa-alias-warnings.c
tree-ssa-alias.c re PR tree-optimization/34148 (Too many VOPs, too deep tree-ssa-sccvn.c recursion) 2007-11-21 10:16:21 +00:00
tree-ssa-ccp.c re PR middle-end/20983 (varargs functions force va_list variable to stack unnecessarily) 2007-12-06 14:25:37 +01:00
tree-ssa-coalesce.c
tree-ssa-copy.c tree-ssa-copy.c (may_propagate_copy): Remove redundant checks. 2007-11-23 09:49:29 +00:00
tree-ssa-copyrename.c
tree-ssa-dce.c
tree-ssa-dom.c
tree-ssa-dse.c
tree-ssa-forwprop.c re PR tree-optimization/34138 (verify_ssa failed (found real variable when subvariables should have appeared)) 2007-12-05 21:45:15 +00:00
tree-ssa-ifcombine.c
tree-ssa-live.c tree-ssa-live.c (remove_unused_scope_block_p): Drop declarations and blocks only after inlining. 2007-11-26 06:24:54 +00:00
tree-ssa-live.h
tree-ssa-loop-ch.c
tree-ssa-loop-im.c
tree-ssa-loop-ivcanon.c tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Remove unused edges after loop duplication. 2007-11-14 17:36:01 +00:00
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-loop.c (gate_tree_parallelize_loops): Return true when "flag_tree_parallelize_loops > 1". 2007-12-06 11:35:44 +01:00
tree-ssa-math-opts.c
tree-ssa-operands.c re PR middle-end/34334 (ICE in vuses_compare, at tree-vn.c:118) 2007-12-04 17:20:34 +00:00
tree-ssa-operands.h
tree-ssa-phiopt.c re PR tree-optimization/33961 (gcc 4.3 causes crash valid code to crash) 2007-11-01 03:06:38 +00:00
tree-ssa-pre.c re PR tree-optimization/32540 (Exponential time behavior in PRE) 2007-11-05 15:42:30 +00:00
tree-ssa-propagate.c tree-ssa-propagate.c (set_rhs): Fix typo. 2007-11-27 01:03:54 +00:00
tree-ssa-propagate.h
tree-ssa-reassoc.c
tree-ssa-sccvn.c re PR tree-optimization/34176 (SCCVN breaks gettext) 2007-11-23 14:28:59 +00:00
tree-ssa-sccvn.h
tree-ssa-sink.c
tree-ssa-structalias.c re PR tree-optimization/34148 (Too many VOPs, too deep tree-ssa-sccvn.c recursion) 2007-11-21 10:16:21 +00:00
tree-ssa-structalias.h
tree-ssa-ter.c
tree-ssa-threadedge.c
tree-ssa-threadupdate.c re PR rtl-optimization/33737 (verify_flow_info failed: Wrong probability of edge 94->1 -6651) 2007-11-07 22:05:37 +00:00
tree-ssa-uncprop.c
tree-ssa.c re PR middle-end/34088 (ICE with uninitialized variable and -Werror) 2007-11-14 20:32:45 +01:00
tree-ssanames.c
tree-stdarg.c
tree-stdarg.h
tree-tailcall.c
tree-vect-analyze.c tree-vectorizer.c (slpeel_add_loop_guard): Gimplify the condition. 2007-12-06 16:18:55 +00:00
tree-vect-generic.c
tree-vect-patterns.c
tree-vect-transform.c re PR tree-optimization/34391 (Vectorizer does not fix up alias information correctly) 2007-12-08 14:51:59 +00:00
tree-vectorizer.c re PR tree-optimization/34371 (verify_stmts failed (incorrect sharing of tree nodes)) 2007-12-10 23:49:43 +01:00
tree-vectorizer.h re PR tree-optimization/34371 (verify_stmts failed (incorrect sharing of tree nodes)) 2007-12-10 23:49:43 +01:00
tree-vn.c
tree-vrp.c re PR tree-optimization/34244 (VRP/SCEV miscompiles Firefox) 2007-11-30 00:32:04 +00:00
tree.c * tree.c (type_hash_add): Don't violate strict aliasing rules. 2007-11-26 06:37:46 +00:00
tree.def 2007-09-23 Razya Ladelsky 2007-10-29 11:05:04 +00:00
tree.h PR 34081/C++ 2007-11-26 17:33:23 +00: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.c: Fix comment typo. 2007-11-26 13:22:41 +11:00
unwind-dw2-fde.h
unwind-dw2.c
unwind-dw2.h
unwind-generic.h * unwind-generic.h: Fix comment typos. 2007-11-26 13:25:50 +11:00
unwind-pe.h
unwind-sjlj.c
unwind.inc * unwind.inc: Comment that unwind-sjlj.c includes this file. 2007-11-20 16:38:30 +11:00
value-prof.c
value-prof.h
var-tracking.c re PR rtl-optimization/33822 (-g -O -mstrict-align causes an ICE in set_variable_part,) 2007-11-07 20:48:08 +00:00
varasm.c varasm.c (merge_weak, [...]): Commentary typo fixes. 2007-12-05 22:55:10 +01:00
varpool.c varpool.c (dump_varpool): Use 'next', not 'next_needed' when traversing pool. 2007-11-02 15:29:09 +00:00
varray.c
varray.h
vec.c
vec.h
vecprim.h
version.c
version.h
vmsdbg.h
vmsdbgout.c
web.c
xcoff.h
xcoffout.c
xcoffout.h

README.Portability

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.