gcc/gcc
Jan Hubicka 60108d34dc re PR debug/17389 (ICE in dwarf2out_finish, at dwarf2out.c:13566)
PR debug/17389
	* dwarf2out.c (dwarf2out_finish): Deal with nested functions
	of fully inlined functions.
	* tree-inline.c (inline_forbidden_p_1): Nested functions can be
	inlined.

From-SVN: r87911
2004-09-23 00:51:40 +00:00
..
ada decl.c (gnat_to_gnu_entity): Check for a dummy designated type via TYPE_MODE instead of COMPLETE_TYPE_P. 2004-09-21 17:34:36 +02:00
config sparc.md (cmove splitter): Fix formatting. 2004-09-22 23:18:28 +00:00
cp cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree). 2004-09-22 18:12:10 +00:00
doc c-tree.texi (TRUTH_NOT_EXPR, [...]): Mention the restriction on types. 2004-09-22 19:43:04 +00:00
fortran re PR middle-end/16460 (ICE when compiling glibc (ld-ctype.c)) 2004-09-20 20:38:29 +00:00
ginclude
java aclocal.m4: Import AM_PROG_CC_C_O and AM_AUX_DIR_EXPAND. 2004-09-22 11:21:21 +00:00
objc objc-act.c (objc_fold_objc_type_ref): New function. 2004-09-22 01:13:07 +00:00
po * gcc.pot: Regenerate. 2004-09-16 09:01:11 +01:00
testsuite 20001012-1.c: Add prototypes for builtin functions. 2004-09-23 00:07:15 +00:00
treelang alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
.cvsignore
ABOUT-GCC-NLS
aclocal.m4 aclocal.m4: Add in gettext's m4 includes. 2004-09-23 00:29:07 +00:00
alias.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
alias.h
alloc-pool.c
alloc-pool.h
attribs.c attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. 2004-09-15 21:48:10 +01:00
basic-block.h basic-block.h (update_bb_profile_after_threading): Declare. 2004-09-19 16:04:03 +00:00
bb-reorder.c
bitmap.c
bitmap.h
bt-load.c
builtin-attrs.def
builtin-types.def
builtins.c builtins.c (fold_builtin): Call the new omonymous target hook for machine-dependent built-ins. 2004-09-20 14:47:20 +00:00
builtins.def
c-aux-info.c
c-common.c c-common.c (fix_string_type): Build the unqualified array type unconditionally... 2004-09-21 02:22:45 +00:00
c-common.def alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
c-common.h
c-config-lang.in
c-convert.c
c-cppbuiltin.c
c-decl.c c-decl.c (implicitly_declare): Call maybe_apply_renaming_pragma. 2004-09-22 02:24:06 +00:00
c-dump.c
c-errors.c
c-format.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
c-format.h
c-gimplify.c
c-incpath.c re PR libobjc/11572 (GNU libobjc no longer compiled on Darwin) 2004-09-15 23:49:59 -07:00
c-incpath.h re PR libobjc/11572 (GNU libobjc no longer compiled on Darwin) 2004-09-15 23:49:59 -07:00
c-lang.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
c-lex.c c-common.c (fix_string_type): Build the unqualified array type unconditionally... 2004-09-21 02:22:45 +00:00
c-objc-common.c c-typeck.c (build_function_call): Give name of object we are attempting to call in error message. 2004-09-21 15:42:44 +00:00
c-objc-common.h
c-opts.c
c-parse.in c-tree.h (enum c_typespec_keyword): New. 2004-09-17 19:18:05 +01:00
c-pch.c attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. 2004-09-15 21:48:10 +01:00
c-ppoutput.c
c-pragma.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
c-pragma.h c-common.c (fix_string_type): Build the unqualified array type unconditionally... 2004-09-21 02:22:45 +00:00
c-pretty-print.c
c-pretty-print.h
c-semantics.c
c-tree.h c-tree.h (enum c_typespec_keyword): New. 2004-09-17 19:18:05 +01:00
c-typeck.c re PR c/16566 (ICE with flexible arrays) 2004-09-22 23:51:58 +01:00
c.opt
caller-save.c
calls.c
cfg.c cfg.c, [...]: Fix comment typos. 2004-09-20 11:17:22 +00:00
cfganal.c
cfgbuild.c
cfgcleanup.c basic-block.h (update_bb_profile_after_threading): Declare. 2004-09-19 16:04:03 +00:00
cfgexpand.c cfgexpand.c (add_reg_br_prob_note): New function. 2004-09-23 00:50:37 +00:00
cfghooks.c
cfghooks.h
cfglayout.c
cfglayout.h
cfgloop.c
cfgloop.h [multiple changes] 2004-09-16 16:16:14 +00:00
cfgloopanal.c
cfgloopmanip.c [multiple changes] 2004-09-16 16:16:14 +00:00
cfgrtl.c cfgexpand.c (add_reg_br_prob_note): New function. 2004-09-23 00:50:37 +00:00
cgraph.c re PR middle-end/16460 (ICE when compiling glibc (ld-ctype.c)) 2004-09-20 20:38:29 +00:00
cgraph.h re PR middle-end/16460 (ICE when compiling glibc (ld-ctype.c)) 2004-09-20 20:38:29 +00:00
cgraphunit.c re PR middle-end/16460 (ICE when compiling glibc (ld-ctype.c)) 2004-09-20 20:38:29 +00:00
ChangeLog re PR debug/17389 (ICE in dwarf2out_finish, at dwarf2out.c:13566) 2004-09-23 00:51:40 +00:00
ChangeLog.0
ChangeLog.1
ChangeLog.2
ChangeLog.3
ChangeLog.4
ChangeLog.5
ChangeLog.6
ChangeLog.7
ChangeLog.8
ChangeLog.9
ChangeLog.10
ChangeLog.11
ChangeLog.lib
ChangeLog.tree-ssa
collect2.c
collect2.h
combine.c
common.opt
conditions.h
config.build
config.gcc * config.gcc: Do not build a shared libgcc for arm-none-eabi. 2004-09-14 19:58:49 +00:00
config.host
config.in configure.ac: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF. 2004-09-18 00:50:15 +00:00
configure aclocal.m4: Add in gettext's m4 includes. 2004-09-23 00:29:07 +00:00
configure.ac aclocal.m4: Add in gettext's m4 includes. 2004-09-23 00:29:07 +00:00
conflict.c
convert.c re PR tree-optimization/17512 (ICE in regex.c) 2004-09-22 18:02:08 +00:00
convert.h
COPYING
COPYING.LIB
coretypes.h
coverage.c attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. 2004-09-15 21:48:10 +01:00
coverage.h
cppdefault.c
cppdefault.h
cppspec.c
crtstuff.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
cse.c re PR middle-end/16460 (ICE when compiling glibc (ld-ctype.c)) 2004-09-20 20:38:29 +00:00
cselib.c
cselib.h
cstamp-h.in
dbxout.c dbxout.c (get_lang_number): Do not define if DBX_OUTPUT_MAIN_SOURCE_DIRECTORY is defined. 2004-09-22 12:58:15 -04:00
dbxout.h dbxout.c (get_lang_number): New. 2004-09-17 11:47:19 -07:00
ddg.c basic-block.h, [...]: Fix comment typos. 2004-09-17 09:14:12 +00:00
ddg.h
debug.c
debug.h
defaults.h
df.c
df.h
diagnostic.c
diagnostic.def
diagnostic.h
dojump.c
dominance.c dominance.c (verify_dominators): Don't SEGV if recount_dominator returns NULL. 2004-09-22 20:36:14 +00:00
domwalk.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
domwalk.h alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
dummy-conditions.c
dwarf2.h
dwarf2asm.c
dwarf2asm.h
dwarf2out.c re PR debug/17389 (ICE in dwarf2out_finish, at dwarf2out.c:13566) 2004-09-23 00:51:40 +00:00
dwarf2out.h
dwarf.h
emit-rtl.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
emit-rtl.h
errors.c
errors.h
et-forest.c
et-forest.h
except.c attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. 2004-09-15 21:48:10 +01:00
except.h
explow.c
expmed.c
expr.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
expr.h
final.c
fix-header.c re PR libobjc/11572 (GNU libobjc no longer compiled on Darwin) 2004-09-15 23:49:59 -07:00
fixinc.in
fixproto
flags.h
flow.c
fold-const.c fold-const.c (fold): Avoid non INTEGER_TYPEs when widening operands in an integer comparison. 2004-09-22 07:40:12 -04:00
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function.c attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. 2004-09-15 21:48:10 +01:00
function.h
gbl-ctors.h
gcc.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
gcc.h
gccbug.in
gccspec.c
gcov-dump.c
gcov-io.c
gcov-io.h
gcov-iov.c
gcov.c
gcse.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
gdbinit.in
gen-protos.c
genattr.c
genattrtab.c
genattrtab.h
genautomata.c
gencheck.c
gencodes.c
genconditions.c
genconfig.c
genconstants.c
genemit.c
genextract.c
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-yacc.y
gengtype.c
gengtype.h
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
ggc.h
gimple-low.c
gimplify.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
glimits.h
global.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
gmon.c
graph.c
graph.h
gstab.h
gsyms.h
gsyslimits.h
gthr-aix.h
gthr-dce.h
gthr-gnat.c
gthr-gnat.h
gthr-lynx.h
gthr-nks.h
gthr-posix.c
gthr-posix.h
gthr-rtems.h
gthr-single.h
gthr-solaris.h
gthr-vxworks.h
gthr-win32.h
gthr.h
haifa-sched.c
hard-reg-set.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hwint.h
ifcvt.c re PR rtl-optimization/15187 (Inefficient if optimization with -O2 -ffast-math) 2004-09-17 07:32:36 +02:00
input.h
insn-addr.h
insn-notes.def
integrate.c
integrate.h
intl.c
intl.h
jump.c
lambda-code.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
lambda-mat.c [multiple changes] 2004-09-16 16:16:14 +00:00
lambda-trans.c [multiple changes] 2004-09-16 16:16:14 +00:00
lambda.h [multiple changes] 2004-09-16 16:16:14 +00:00
langhooks-def.h configure.ac: Check for COMDAT support. 2004-09-15 17:03:22 +00:00
langhooks.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
langhooks.h alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
LANGUAGES alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
lcm.c
libada-mk.in
libfuncs.h
libgcc2.c
libgcc2.h
libgcc-darwin.ver
libgcc-std.ver
libgcov.c
limitx.h
limity.h
lists.c
local-alloc.c
longlong.h
loop-doloop.c
loop-init.c
loop-invariant.c
loop-iv.c
loop-unroll.c
loop-unswitch.c
loop.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
machmode.def
machmode.h
main.c
Makefile.in aclocal.m4: Import AM_PROG_CC_C_O and AM_AUX_DIR_EXPAND. 2004-09-22 11:21:21 +00:00
mips-tdump.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
mips-tfile.c
mkconfig.sh
mkfixinc.sh
mkheaders.in
mklibgcc.in
mkmap-flat.awk
mkmap-symver.awk
mode-classes.def
modulo-sched.c
ONEWS
opt-functions.awk
opt-gather.awk
optabs.c basic-block.h, [...]: Fix comment typos. 2004-09-17 09:14:12 +00:00
optabs.h alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
optc-gen.awk
opth-gen.awk
opts.c
opts.h
output.h configure.ac: Check for COMDAT support. 2004-09-15 17:03:22 +00:00
params.c attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. 2004-09-15 21:48:10 +01:00
params.def
params.h
passes.c cfgexpand.c (add_reg_br_prob_note): New function. 2004-09-23 00:50:37 +00:00
postreload-gcse.c re PR rtl-optimization/17482 (GCSE after reload replacing changing instructions) 2004-09-21 07:48:29 +00:00
postreload.c
predict.c cfgexpand.c (add_reg_br_prob_note): New function. 2004-09-23 00:50:37 +00:00
predict.def predict.c (return_prediction): New function. 2004-09-20 18:43:30 +00:00
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. 2004-09-15 21:48:10 +01:00
print-rtl.c reg-notes.def (REG_DEP_TRUE): New entry, place first so it gets value 0. 2004-09-21 20:34:43 +00:00
print-tree.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
profile.c cfgexpand.c (add_reg_br_prob_note): New function. 2004-09-23 00:50:37 +00:00
protoize.c
ra-build.c
ra-colorize.c
ra-debug.c
ra-rewrite.c
ra.c
ra.h
read-rtl.c
README-fixinc
README.Portability
real.c
real.h
recog.c
recog.h
reg-notes.def reg-notes.def (REG_DEP_TRUE): New entry, place first so it gets value 0. 2004-09-21 20:34:43 +00:00
reg-stack.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
regclass.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
regmove.c re PR rtl-optimization/17266 (Libgfortran doesn't build) 2004-09-21 05:57:55 +00:00
regrename.c
regs.h
reload1.c re PR middle-end/16460 (ICE when compiling glibc (ld-ctype.c)) 2004-09-20 20:38:29 +00:00
reload.c attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. 2004-09-15 21:48:10 +01:00
reload.h
reorg.c
resource.c
resource.h
rtl-error.c
rtl-profile.c
rtl.c
rtl.def
rtl.h
rtlanal.c re PR rtl-optimization/14851 (suboptimal fp division with -ffast-math) 2004-09-21 07:10:54 +02:00
rtlhooks-def.h
rtlhooks.c
sbitmap.c
sbitmap.h
scan-decls.c
scan-types.sh
scan.c
scan.h
sched-deps.c
sched-ebb.c
sched-int.h
sched-rgn.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
sched-vis.c
sdbout.c
sdbout.h
SERVICE
simplify-rtx.c
sort-protos
sreal.c
sreal.h
stab.def
stack.h
statistics.h
stmt.c re PR pch/13361 (const wchar_t * strings not stored in pch) 2004-09-18 05:50:52 +00:00
stor-layout.c attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. 2004-09-15 21:48:10 +01:00
stringpool.c
stub-objc.c
sys-protos.h
sys-types.h
system.h
target-def.h builtins.c (fold_builtin): Call the new omonymous target hook for machine-dependent built-ins. 2004-09-20 14:47:20 +00:00
target.h builtins.c (fold_builtin): Call the new omonymous target hook for machine-dependent built-ins. 2004-09-20 14:47:20 +00:00
targhooks.c builtins.c (fold_builtin): Call the new omonymous target hook for machine-dependent built-ins. 2004-09-20 14:47:20 +00:00
targhooks.h builtins.c (fold_builtin): Call the new omonymous target hook for machine-dependent built-ins. 2004-09-20 14:47:20 +00:00
timevar.c
timevar.def
timevar.h
tlink.c
toplev.c attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. 2004-09-15 21:48:10 +01:00
toplev.h
tracer.c
tree-browser.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-browser.def
tree-cfg.c fold-const.c (fold): Avoid non INTEGER_TYPEs when widening operands in an integer comparison. 2004-09-22 07:40:12 -04:00
tree-chrec.c tree-vectorizer.h (stmt_vec_info): Add vect_dr_base field. 2004-09-19 18:01:51 +00:00
tree-chrec.h tree-vectorizer.h (stmt_vec_info): Add vect_dr_base field. 2004-09-19 18:01:51 +00:00
tree-complex.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-data-ref.c tree-vectorizer.h (stmt_vec_info): Add vect_dr_base field. 2004-09-19 18:01:51 +00:00
tree-data-ref.h
tree-dfa.c re PR tree-optimization/16721 (Accesses to volatile objects optimized away) 2004-09-22 19:33:20 -04:00
tree-dump.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-dump.h
tree-eh.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-flow-inline.h
tree-flow.h Makefile.in (tree-cfg.o): Add CFGLAYOUT_H dependency. 2004-09-16 21:29:43 +00:00
tree-gimple.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-gimple.h
tree-if-conv.c
tree-inline.c re PR debug/17389 (ICE in dwarf2out_finish, at dwarf2out.c:13566) 2004-09-23 00:51:40 +00:00
tree-inline.h
tree-into-ssa.c tree-into-ssa.c (rewrite_ssa_into_ssa): Expect ssa_name to return NULL. 2004-09-18 07:31:30 +00:00
tree-iterator.c
tree-iterator.h
tree-loop-linear.c [multiple changes] 2004-09-16 16:16:14 +00:00
tree-mudflap.c attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c. 2004-09-15 21:48:10 +01:00
tree-mudflap.h
tree-nested.c re PR middle-end/16460 (ICE when compiling glibc (ld-ctype.c)) 2004-09-20 20:38:29 +00:00
tree-nomudflap.c
tree-nrv.c
tree-optimize.c re PR middle-end/17126 (ICE with -fno-unit-at-a-time and -O3) 2004-09-21 00:08:53 +00:00
tree-outof-ssa.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-pass.h
tree-phinodes.c
tree-pretty-print.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-profile.c
tree-scalar-evolution.c basic-block.h, [...]: Fix comment typos. 2004-09-17 09:14:12 +00:00
tree-scalar-evolution.h
tree-sra.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-ssa-alias.c re PR tree-optimization/16721 (Accesses to volatile objects optimized away) 2004-09-22 19:33:20 -04:00
tree-ssa-ccp.c tree-ssa-ccp.c (get_default_value): If we have a constant value recorded for an SSA_NAME... 2004-09-21 22:07:23 -06:00
tree-ssa-copy.c re PR tree-optimization/17558 (internal compiler error: in merge_alias_info, at tree-ssa-copy.c:182) 2004-09-20 13:53:08 -07:00
tree-ssa-copyrename.c re PR tree-optimization/17517 (ICE: SSA corruption) 2004-09-16 18:45:33 +00:00
tree-ssa-dce.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-ssa-dom.c tree-ssa-dom.c (opt_stats): Move so that it lives just after the opt_stats_d structure. 2004-09-21 22:12:01 -06:00
tree-ssa-dse.c tree-dfa.c (free_df_for_stmt): No longer static. 2004-09-14 22:12:18 -06:00
tree-ssa-forwprop.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
tree-ssa-live.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-ssa-live.h
tree-ssa-loop-ch.c basic-block.h, [...]: Fix comment typos. 2004-09-17 09:14:12 +00:00
tree-ssa-loop-im.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-ssa-loop-ivcanon.c
tree-ssa-loop-ivopts.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-ssa-loop-manip.c
tree-ssa-loop-niter.c fold-const.c (fold): Fold difference of addresses. 2004-09-16 14:58:01 +00:00
tree-ssa-loop.c
tree-ssa-operands.c tree.def (VEC_COND_EXPR): New tree node. 2004-09-21 18:16:20 -07:00
tree-ssa-operands.h
tree-ssa-phiopt.c alias.c, [...]: Fix comment typos. 2004-09-18 19:47:10 +00:00
tree-ssa-pre.c re PR tree-optimization/17587 (Mauve's UnicodeBase.java fails to compile) 2004-09-22 23:50:19 +00:00
tree-ssa-propagate.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-ssa-propagate.h
tree-ssa-threadupdate.c cfg.c, [...]: Fix comment typos. 2004-09-20 11:17:22 +00:00
tree-ssa.c tree-ssa.c (verify_def): Use print_generic_stmt, not debug_generic_stmt. 2004-09-22 01:03:40 +00:00
tree-ssanames.c tree-ssanames.c (make_ssa_name): No longer need to clear, then initialize key elements here. 2004-09-20 21:19:00 -06:00
tree-tailcall.c alias.c (find_base_decl): Remove unreachable case '3' block. 2004-09-17 21:55:02 +00:00
tree-vectorizer.c cfg.c, [...]: Fix comment typos. 2004-09-20 11:17:22 +00:00
tree-vectorizer.h tree-vectorizer.h (stmt_vec_info): Add vect_dr_base field. 2004-09-19 18:01:51 +00:00
tree-vn.c
tree.c re PR pch/13361 (const wchar_t * strings not stored in pch) 2004-09-18 05:50:52 +00:00
tree.def tree.def (VEC_COND_EXPR): New tree node. 2004-09-21 18:16:20 -07:00
tree.h tree-ssa-ccp.c (get_default_value): If we have a constant value recorded for an SSA_NAME... 2004-09-21 22:07:23 -06:00
tsystem.h tsystem.h (alloca): Provide a default definition. 2004-09-20 22:23:12 +00:00
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 tsystem.h (alloca): Provide a default definition. 2004-09-20 22:23:12 +00:00
unwind-dw2.h
unwind-pe.h
unwind-sjlj.c
unwind.h
unwind.inc
value-prof.c
value-prof.h
var-tracking.c
varasm.c varasm.c (default_assemble_integer): Return false for values wider than the target word size. 2004-09-21 23:40:21 +00:00
varray.c
varray.h
vec.c
vec.h vec.h (VEC_space): Return true if there _is_ space. 2004-09-22 10:51:42 +00:00
version.c Daily bump. 2004-09-23 00:16:17 +00:00
version.h
vmsdbg.h
vmsdbgout.c
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.