gcc/gcc
Andrew Pinski 298ac1dd20 rs6000.c (compute_save_world_info): Set lr_save_p if we are going to "save the world".
2008-04-12  Andrew Pinski  <pinskia@gmail.com>

        * config/rs6000/rs6000.c (compute_save_world_info): Set lr_save_p if
        we are going to "save the world".


2008-04-12  Andrew Pinski  <pinskia@gmail.com>

        * gcc.target/powerpc/darwin-save-world-1.c: New test.

From-SVN: r134237
2008-04-12 20:17:01 -07:00
..
ada re PR ada/35825 (Update g-soccon-rtems.ads) 2008-04-12 21:55:35 +00:00
config rs6000.c (compute_save_world_info): Set lr_save_p if we are going to "save the world". 2008-04-12 20:17:01 -07:00
cp re PR c++/35708 (jump to label enters catch block) 2008-04-09 12:15:53 -04:00
doc constraints.md: New file. 2008-04-11 14:40:55 +00:00
fortran PR fortran/25829 28655 2008-04-07 22:07:44 +00:00
ginclude
java t-uclinux (generated_files): Add sysroot-suffix.h. 2008-04-03 06:12:27 +00:00
objc t-uclinux (generated_files): Add sysroot-suffix.h. 2008-04-03 06:12:27 +00:00
objcp t-uclinux (generated_files): Add sysroot-suffix.h. 2008-04-03 06:12:27 +00:00
po * zh_CN.po: Update. 2008-03-27 21:21:53 +00:00
testsuite rs6000.c (compute_save_world_info): Set lr_save_p if we are going to "save the world". 2008-04-12 20:17:01 -07:00
ABOUT-GCC-NLS
BASE-VER * BASE-VER: Set to 4.4.0. 2008-02-18 23:41:06 +01:00
COPYING
COPYING.LIB
COPYING3
COPYING3.LIB
ChangeLog rs6000.c (compute_save_world_info): Set lr_save_p if we are going to "save the world". 2008-04-12 20:17:01 -07:00
ChangeLog-1997
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007 2008-01-12 Richard Guenther <rguenther@suse.de> 2008-01-12 12:27:07 +00:00
ChangeLog.dataflow
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
DATESTAMP Daily bump. 2008-04-13 00:17:35 +00:00
DEV-PHASE
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
LANGUAGES
Makefile.in t-uclinux (generated_files): Add sysroot-suffix.h. 2008-04-03 06:12:27 +00:00
ONEWS
README.Portability
acinclude.m4
aclocal.m4 re PR bootstrap/35752 (Combined gcc + binutils source tree doesn't bootstrap with --enable-shared) 2008-04-02 10:07:58 +00:00
addresses.h
alias.c alias.c (struct alias_set_entry): Move has_zero_child field to pack with alias_set. 2008-03-06 09:16:16 +00:00
alias.h * alias.h (alias_set_type): Change from HOST_WIDE_INT to int. 2008-03-06 01:18:51 +00:00
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 re PR c/35744 (ICE attributes for invalid types) 2008-04-11 06:55:38 +00:00
auto-inc-dec.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
basic-block.h struct-equiv.c: Remove file. 2008-03-02 12:09:08 +00:00
bb-reorder.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +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 re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
builtin-attrs.def
builtin-types.def
builtins.c function.h (incomming_args): Break out of struct function. 2008-04-08 08:59:34 +00:00
builtins.def re PR tree-optimization/26264 (Extraneous warning with __builtin_stdarg_start and optimization) 2008-02-26 14:16:13 +00:00
c-aux-info.c
c-common.c re PR c/32511 (GCC rejects inline+weak function) 2008-03-27 16:34:55 +00:00
c-common.def
c-common.h cppopts.texi (-dU): Document. 2008-04-02 20:42:53 +01:00
c-config-lang.in
c-convert.c
c-cppbuiltin.c re PR libstdc++/34680 (Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti) 2008-01-06 22:30:32 +00:00
c-decl.c tree-inline.c (copy_generic_body, [...]): Export. 2008-04-03 05:41:57 +00:00
c-dump.c
c-errors.c re PR c++/24924 (front end and preprocessor pedantic_errors settings should agree) 2008-03-02 15:45:29 +00:00
c-format.c re PR c/35436 (ICE with attribute "format") 2008-04-01 20:33:37 +00:00
c-format.h ms format support for mingw. 2008-03-20 09:24:42 +01:00
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 toplev.c (input_file_stack, [...]): Remove. 2008-02-29 20:09:05 +00:00
c-objc-common.c
c-objc-common.h function.c (free_after_parsing): Replace with cxx_push_function_context from C++ front-end. 2008-04-04 14:57:18 +00:00
c-omp.c c-omp.c (check_omp_for_incr_expr): Handle CONVERT_EXPR. 2008-01-05 16:57:00 +00:00
c-opts.c cppopts.texi (-dU): Document. 2008-04-02 20:42:53 +01:00
c-parser.c re PR c/35738 (ICE with #pragma omp atomic and conversion from pointer to int) 2008-04-03 23:03:54 +02:00
c-pch.c re PR pch/13675 (#including a precompiled header more than once in the same unit fails) 2008-04-01 12:58:02 +02:00
c-ppoutput.c cppopts.texi (-dU): Document. 2008-04-02 20:42:53 +01:00
c-pragma.c c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA and CPP_PRAGMA_EOL. 2008-02-27 09:51:22 +01:00
c-pragma.h c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA and CPP_PRAGMA_EOL. 2008-02-27 09:51:22 +01:00
c-pretty-print.c re PR c/35440 (ICE resulting in completely broken diagnostic) 2008-04-04 15:07:27 +02:00
c-pretty-print.h
c-semantics.c
c-tree.h tree-inline.c (copy_generic_body, [...]): Export. 2008-04-03 05:41:57 +00:00
c-typeck.c re PR c/35748 (ICE with cast to invalid union) 2008-03-30 21:58:43 +00:00
c.opt c.opt (Wsynth): Deprecate. 2008-03-09 17:43:10 +00:00
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 function.h (incomming_args): Break out of struct function. 2008-04-08 08:59:34 +00:00
cfg.c cfg.c: Include tree-flow.h. 2008-03-05 17:20:26 +00:00
cfganal.c
cfgbuild.c
cfgcleanup.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
cfgexpand.c expr.c (expand_var): Delete it. 2008-04-02 10:01:43 +00:00
cfghooks.c
cfghooks.h
cfglayout.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
cfglayout.h
cfgloop.c
cfgloop.h
cfgloopanal.c
cfgloopmanip.c
cfgrtl.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
cgraph.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
cgraph.h re PR middle-end/34969 (ICE with -fipa-cp -ffast-math) 2008-01-30 00:21:24 +01:00
cgraphbuild.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
cgraphunit.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
collect2.c re PR driver/35665 (FAIL: gfortran.dg/include_2.f90 -O (test for excess error)) 2008-04-09 00:11:58 +00:00
collect2.h
combine-stack-adj.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
combine.c re PR target/34916 (gcc.c-torture/execute/pr27364.c fails with -O1, -O2 and -Os) 2008-04-04 23:45:46 +00:00
common.opt common.opt (fprofile-dir=, [...]): New options 2008-03-31 21:52:10 +00:00
conditions.h
config.build re PR bootstrap/35273 (Bootstrap of mingw32 using non-MSYS shell broken) 2008-02-21 19:55:39 +00:00
config.gcc config.gcc (need_64bit_hwint): Need 64bit hwint for sh-*-*. 2008-04-11 04:21:18 +00:00
config.host config.cc (m68hc11, [...]): Add usegas.h, rename tmake_file to m68hc11/t-m68hc11. 2008-03-27 10:04:08 +00:00
config.in extensions.m4: New. 2008-03-27 09:46:19 +00:00
configure re PR bootstrap/35752 (Combined gcc + binutils source tree doesn't bootstrap with --enable-shared) 2008-04-02 10:07:58 +00:00
configure.ac re PR bootstrap/35752 (Combined gcc + binutils source tree doesn't bootstrap with --enable-shared) 2008-04-02 10:07:58 +00:00
convert.c
convert.h
coretypes.h
coverage.c common.opt (fprofile-dir=, [...]): New options 2008-03-31 21:52:10 +00:00
coverage.h coverage.h (tree_coverage_counter_addr): Declare. 2008-03-08 20:52:50 +00:00
cppdefault.c
cppdefault.h
cppspec.c
crtstuff.c
cse.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
cselib.c
cselib.h
cstamp-h.in
dbgcnt.c
dbgcnt.def dbgcnt.def (cfg_cleanup, [...]): New counters. 2008-02-26 14:21:21 -05:00
dbgcnt.h
dbxout.c function.h (incomming_args): Break out of struct function. 2008-04-08 08:59:34 +00:00
dbxout.h
dce.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
dce.h
ddg.c re PR tree-optimization/26854 (Inordinate compile times on large routines) 2008-01-22 13:57:01 +00:00
ddg.h
debug.c
debug.h re PR debug/34249 (FAIL: gcc.dg/tree-prof/bb-reorg.c compilation, -fprofile-use -D_PROFILE_USE) 2008-01-16 12:10:27 +01:00
defaults.h MAINTAINERS (c4x port): Remove. 2008-01-25 20:49:04 +00:00
df-core.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
df-problems.c re PR tree-optimization/26854 (Inordinate compile times on large routines) 2008-01-22 13:57:01 +00:00
df-scan.c function.h (incomming_args): Break out of struct function. 2008-04-08 08:59:34 +00:00
df.h fwprop.c (update_df): Support width and offset parameters of df_ref_create. 2008-03-06 00:21:34 +00:00
dfp.c re PR c/35712 (decimal float literal constant zero loses significant trailing zeroes) 2008-04-03 23:49:35 +00:00
dfp.h
diagnostic.c diagnostic.c (diagnostic_count_diagnostic): Delete. 2008-03-24 14:19:55 +00:00
diagnostic.def
diagnostic.h re PR c++/24924 (front end and preprocessor pedantic_errors settings should agree) 2008-03-02 15:45:29 +00:00
dojump.c
dominance.c
domwalk.c
domwalk.h
double-int.c
double-int.h re PR bootstrap/35051 (Build machine requires GMP and MPFR for building cross-host gccs) 2008-02-08 19:10:25 +00:00
dse.c dse.c (record_store): Use HOST_BITS_PER_WIDE_INT instead of size of positions_needed * CHAR_BIT. 2008-04-11 10:24:24 -07: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 function.h (incomming_args): Break out of struct function. 2008-04-08 08:59:34 +00: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 function.h (rtl): Rename to x_rtl. 2008-04-07 23:52:32 +00:00
emit-rtl.h
emutls.c
errors.c
errors.h
et-forest.c
et-forest.h
except.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
except.h
exec-tool.in re PR bootstrap/35752 (Combined gcc + binutils source tree doesn't bootstrap with --enable-shared) 2008-04-02 10:07:58 +00:00
explow.c PR middle-end/PR28690 2008-04-09 08:42:43 -05:00
expmed.c * expmed.c (extract_force_align_mem_bit_field): Remove. 2008-04-03 16:17:11 +11:00
expr.c function.h (rtl): Rename to x_rtl. 2008-04-07 23:52:32 +00:00
expr.h re PR middle-end/35800 (Revision 133835 failed to compile binutils) 2008-04-03 02:09:20 +00:00
final.c * final.c (final_scan_insn): Remove if (0) code. 2008-03-30 08:33:54 +11:00
fix-header.c
fixed-value.c
fixed-value.h
fixproto Committed with RM approval this time. 2008-01-25 07:52:56 +11:00
flags.h re PR c++/24924 (front end and preprocessor pedantic_errors settings should agree) 2008-03-02 15:45:29 +00:00
fold-const.c fold-const.c (fold_widened_comparison): Do not allow sign-changes that change the result. 2008-04-08 21:57:43 +00:00
fp-test.c
function.c function.c (free_after_compilation): Clear out regno_reg_rtx pointer. 2008-04-08 16:33:46 +00:00
function.h function.h (incomming_args): Break out of struct function. 2008-04-08 08:59:34 +00:00
fwprop.c fwprop.c: Fix ISO-C99ism. 2008-04-02 12:16:54 +00:00
gbl-ctors.h
gcc.c gcc.c (default_compilers): Sync Fortran extensions list with that in fortran/lang-specs.h. 2008-04-06 12:36:58 +00:00
gcc.h
gccbug.in
gccspec.c
gcov-dump.c gcov-dump.c (tag_summary): Only print summaries for the first GCOV_COUNTERS_SUMMABLE counters. 2008-04-10 18:21:26 +00:00
gcov-io.c
gcov-io.h * gcov-io.h (__gcov_merge_ior, __gcov_fork): Mark hidden. 2008-03-18 14:47:14 +00:00
gcov-iov.c
gcov.c re PR driver/35420 (--version copyright date vs. 2008) 2008-03-02 23:50:02 +01:00
gcse.c PR middle-end/PR28690 2008-04-07 12:36:59 -05: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 system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +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 Support valgrind 3.3 for --enable-checking=valgrind. 2008-02-19 04:13:05 +00:00
ggc-none.c
ggc-page.c Support valgrind 3.3 for --enable-checking=valgrind. 2008-02-19 04:13:05 +00:00
ggc-zone.c Support valgrind 3.3 for --enable-checking=valgrind. 2008-02-19 04:13:05 +00:00
ggc.h
gimple-low.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
gimplify.c re PR c/22371 (C front-end produces mis-match types in MODIFY_EXPR) 2008-03-24 15:08:52 +00:00
glimits.h
global.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
graph.c
graph.h
graphds.c
graphds.h invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
gstab.h
gsyms.h
gsyslimits.h
gthr-aix.h
gthr-dce.h re PR libfortran/35063 (Clean up use of destroy_unit_mutex()) 2008-03-01 12:46:31 +02:00
gthr-gnat.c
gthr-gnat.h
gthr-lynx.h
gthr-mipssde.h re PR libfortran/35063 (Clean up use of destroy_unit_mutex()) 2008-03-01 12:46:31 +02:00
gthr-nks.h re PR libfortran/35063 (Clean up use of destroy_unit_mutex()) 2008-03-01 12:46:31 +02:00
gthr-posix.c
gthr-posix.h re PR libfortran/35063 (Clean up use of destroy_unit_mutex()) 2008-03-01 17:12:52 +00:00
gthr-posix95.h gthr-posix95.h (__gthread_cond_wait_recursive): Add missing &. 2008-04-06 09:57:49 +00:00
gthr-rtems.h gthr-rtems.h: Implement __gthread_mutex_destroy. 2008-03-05 13:16:57 +00:00
gthr-single.h re PR libfortran/35063 (Clean up use of destroy_unit_mutex()) 2008-03-01 12:46:31 +02:00
gthr-solaris.h re PR libfortran/35063 (Clean up use of destroy_unit_mutex()) 2008-03-01 12:46:31 +02:00
gthr-tpf.h re PR libfortran/35063 (Clean up use of destroy_unit_mutex()) 2008-03-01 12:46:31 +02:00
gthr-vxworks.h * gthr-vxworks.h (UNUSED): Define. 2008-03-24 11:18:22 +00:00
gthr-win32.h * gthr-win32.h [__GTHREAD_HIDE_WIN32API] 2008-03-04 06:33:39 +00:00
gthr.h re PR libfortran/35063 (Clean up use of destroy_unit_mutex()) 2008-03-01 12:46:31 +02:00
haifa-sched.c df-scan.c (df_ref_chain_change_bb): Simplify. 2008-03-01 03:36:43 +00:00
hard-reg-set.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hwint.h
ifcvt.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
init-regs.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
input.h toplev.c (input_file_stack, [...]): Remove. 2008-02-29 20:09:05 +00:00
insn-addr.h
insn-notes.def
integrate.c function.h (incomming_args): Break out of struct function. 2008-04-08 08:59:34 +00:00
integrate.h function.h (incomming_args): Break out of struct function. 2008-04-08 08:59:34 +00:00
intl.c
intl.h
ipa-cp.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
ipa-inline.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
ipa-prop.c
ipa-prop.h
ipa-pure-const.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
ipa-reference.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
ipa-reference.h
ipa-struct-reorg.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
ipa-struct-reorg.h
ipa-type-escape.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
ipa-type-escape.h
ipa-utils.c [multiple changes] 2007-11-08 16:45:53 +00:00
ipa-utils.h
ipa.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
jump.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
lambda-code.c lambda-code.c (lambda_transform_legal_p): Handle the case of no dependences in the dependence_relations vector. 2008-01-16 19:26:26 +00:00
lambda-mat.c
lambda-trans.c
lambda.h invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
langhooks-def.h function.c (free_after_parsing): Replace with cxx_push_function_context from C++ front-end. 2008-04-04 14:57:18 +00:00
langhooks.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
langhooks.h function.c (free_after_parsing): Replace with cxx_push_function_context from C++ front-end. 2008-04-04 14:57:18 +00:00
lcm.c
libada-mk.in
libfuncs.h
libgcc-std.ver
libgcc2.c libgcc2.c (__addvSI3, [...]): Use unsigned arithmetic. 2008-03-02 13:11:19 +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 function.h (incomming_args): Break out of struct function. 2008-04-08 08:59:34 +00:00
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 Fix 34826 2008-01-17 17:49:32 +00:00
loop-init.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
loop-invariant.c PR middle-end/PR28690 2008-04-07 12:36:59 -05:00
loop-iv.c re PR tree-optimization/26854 (Inordinate compile times on large routines) 2008-01-22 13:57:01 +00:00
loop-unroll.c
loop-unswitch.c
lower-subreg.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
machmode.def
machmode.h
main.c
matrix-reorg.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
mips-tdump.c re PR driver/35420 (--version copyright date vs. 2008) 2008-03-02 23:50:02 +01:00
mips-tfile.c re PR driver/35420 (--version copyright date vs. 2008) 2008-03-02 23:50:02 +01:00
mkconfig.sh
mkmap-flat.awk
mkmap-symver.awk
mode-classes.def
mode-switching.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
modulo-sched.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
omega.c
omega.h
omp-builtins.def
omp-low.c re PR middle-end/35818 (ICE on incomplete array in shared clause) 2008-04-03 23:02:44 +02:00
opt-functions.awk
opt-gather.awk
optabs.c re PR target/35083 (ICE: in extract_insn, at recog.c:1990) 2008-02-06 11:45:29 +01: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 common.opt (Wlarger-than=): New. 2008-02-26 14:01:02 +00:00
opth-gen.awk common.opt (Wlarger-than=): New. 2008-02-26 14:01:02 +00:00
opts-common.c re PR other/32754 (The opt?-gen.awk file generators produce incorrect credits) 2008-02-07 20:40:19 +00:00
opts.c common.opt (fprofile-dir=, [...]): New options 2008-03-31 21:52:10 +00:00
opts.h re PR other/28322 (GCC new warnings and compatibility) 2008-02-25 23:41:43 +00:00
output.h
params.c
params.def re PR c/35002 (Incorrect spelling of "hottest") 2008-01-29 16:56:20 +01:00
params.h
passes.c tree-dump.c (dump_enable_all): Remove prototype; do not accept letter argument. 2008-04-05 05:50:19 +00:00
pointer-set.c
pointer-set.h
postreload-gcse.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
postreload.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
predict.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
predict.def tree-pretty-print.c: Include predict.h. 2008-03-18 15:21:06 +00:00
predict.h tree-pretty-print.c: Include predict.h. 2008-03-18 15:21:06 +00:00
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c
print-tree.c Removal of Return with Depressed Stack Pointer support 2008-04-07 09:37:51 +00:00
profile.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
protoize.c
ra-conflict.c fwprop.c (update_df): Support width and offset parameters of df_ref_create. 2008-03-06 00:21:34 +00:00
ra.h global.c (find_reg): Mark the eh regs as used if necessary. 2008-01-17 16:18:59 +00:00
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 builtins.c (expand_builtin_pow, [...]): Remove uses of dconst3, dconstsqrt2, dconstthird, dconste and/or dconst10. 2008-03-26 15:04:44 +00:00
real.h builtins.c (expand_builtin_pow, [...]): Remove uses of dconst3, dconstsqrt2, dconstthird, dconste and/or dconst10. 2008-03-26 15:04:44 +00:00
recog.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
recog.h
reg-notes.def re PR rtl-optimization/34773 (miscompilation of vfprintf_r) 2008-02-01 21:28:46 +00:00
reg-stack.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
regclass.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
regmove.c regmove.c (try_auto_increment): Fix spelling error in comment. 2008-03-20 15:31:53 +11:00
regrename.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
regs.h re PR rtl-optimization/31396 (Inline code performance much worse than out-of-line) 2008-01-16 16:32:05 +00:00
regstat.c re PR rtl-optimization/31396 (Inline code performance much worse than out-of-line) 2008-01-16 16:32:05 +00:00
reload.c Fix bug Joern Rennecke reported. 2008-04-07 15:09:07 -07:00
reload.h
reload1.c re PR rtl-optimization/35232 (ICE in fp-int-convert-double.c at -O2) 2008-03-25 20:43:06 +00:00
reorg.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
resource.c function.h (incomming_args): Break out of struct function. 2008-04-08 08:59:34 +00:00
resource.h
rtl-error.c system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
rtl-factoring.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
rtl.c
rtl.def system.h (USE_MAPPED_LOCATION): Poison. 2008-02-26 16:05:24 +00:00
rtl.h PR middle-end/PR28690 2008-04-07 12:36:59 -05:00
rtlanal.c Revert 2008-04-08 09:40:27 -05:00
rtlhooks-def.h
rtlhooks.c re PR rtl-optimization/33927 (replace_read in dse.c could handle cases where GET_MODE_CLASS (read_mode) != GET_MODE_CLASS (store_mode) (and the size is the same)) 2008-03-22 19:37:53 +00:00
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 re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
sched-vis.c
sdbout.c
sdbout.h
see.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
simplify-rtx.c simplify-rtx.c (simplify_subreg): Remove useless shifts from word-extractions out of a multi-word object. 2008-03-06 13:30:10 +00:00
sort-protos
sparseset.c re PR rtl-optimization/33796 (valgrind error with -O2 for linux kernel code) 2008-01-16 21:21:36 -06: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 re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
statistics.h
stmt.c re PR middle-end/35800 (Revision 133835 failed to compile binutils) 2008-04-03 02:09:20 +00:00
stor-layout.c Revert: 2008-03-23 13:07:34 +01:00
stringpool.c
stub-objc.c
sync-builtins.def
sys-protos.h
sys-types.h
system.h Fix bug reported by Andrew Pinski. 2008-04-12 00:13:44 -07:00
target-def.h re PR target/34814 (SDmode function args not passed according to ABI specification) 2008-01-26 11:18:35 -06:00
target.h re PR target/34814 (SDmode function args not passed according to ABI specification) 2008-01-26 11:18:35 -06:00
targhooks.c
targhooks.h
timevar.c
timevar.def Makefile.in (OBJS-common): Add tree-ssa-phiprop.o 2008-03-12 12:15:41 +00:00
timevar.h
tlink.c tlink.c (scan_linker_output): Look for symbol name in single quotes. 2008-03-31 18:01:43 +00:00
toplev.c re PR libstdc++/35597 (libstdc++ -ffunction-sections -fdata-sections disabled on AIX) 2008-04-09 10:41:07 -04:00
toplev.h tree-dump.c (dump_enable_all): Remove prototype; do not accept letter argument. 2008-04-05 05:50:19 +00:00
tracer.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-affine.c tree-affine.h (aff_combination_expand): Declare. 2008-03-27 10:25:36 +00:00
tree-affine.h tree-affine.h (aff_combination_expand): Declare. 2008-03-27 10:25:36 +00:00
tree-browser.c
tree-browser.def
tree-cfg.c tree-vrp.c (extract_range_from_binary_expr): Don't handle TRUTH_ANDIF_EXPR or TRUTH_ORIF_EXPR. 2008-04-10 20:59:50 +00:00
tree-cfgcleanup.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-chrec.c tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME defined in a loop at depth 0 is invariant. 2008-03-03 11:51:36 +00: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 re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-data-ref.c tree-data-ref.c (dump_data_dependence_relation): Avoid data reference dumps if ddr is NULL or dependence is unknown. 2008-03-21 13:42:56 +01:00
tree-data-ref.h invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
tree-dfa.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-dump.c tree-dump.c (dump_enable_all): Remove prototype; do not accept letter argument. 2008-04-05 05:50:19 +00:00
tree-dump.h re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-eh.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-flow-inline.h tree-ssa-structalias.c (get_constraint_for_component_ref): Use ranges_overlap_p. 2008-03-05 19:33:55 +00:00
tree-flow.h tree-flow.h (widen_bitfield): Remove declaration. 2008-03-26 11:09:43 +00:00
tree-gimple.c tree-pretty-print.c: Include predict.h. 2008-03-18 15:21:06 +00:00
tree-gimple.h tree-gimple.h (is_gimple_invariant_address): Declare. 2008-03-18 14:02:17 +00:00
tree-if-conv.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-inline.c tree-inline.c (copy_generic_body, [...]): Export. 2008-04-03 05:41:57 +00:00
tree-inline.h tree-inline.c (copy_generic_body, [...]): Export. 2008-04-03 05:41:57 +00:00
tree-into-ssa.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-loop-linear.c tree-loop-linear.c (try_interchange_loops): Compare memory access strides against cache sizes. 2008-02-29 12:41:14 +00:00
tree-mudflap.c common.opt (Wmudflap): New option. 2008-03-20 16:37:47 +00:00
tree-mudflap.h
tree-nested.c re PR middle-end/34921 (Misalign stack variable referenced by nested function) 2008-02-18 15:43:23 -08:00
tree-nomudflap.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-nrv.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-object-size.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-optimize.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-outof-ssa.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-parloops.c tree-affine.h (aff_combination_expand): Declare. 2008-03-27 10:25:36 +00:00
tree-pass.h tree-dump.c (dump_enable_all): Remove prototype; do not accept letter argument. 2008-04-05 05:50:19 +00:00
tree-phinodes.c
tree-predcom.c
tree-pretty-print.c tree-pretty-print.c: Include predict.h. 2008-03-18 15:21:06 +00:00
tree-profile.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-scalar-evolution.c tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Use is_gimple_min_invariant instead of TREE_INVARIANT. 2008-03-20 23:14:35 +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 re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-address.c re PR tree-optimization/35834 (building libiberty fails in build2_stat for -mcpu=m32c as of r133403) 2008-04-08 09:53:52 +00:00
tree-ssa-alias-warnings.c revert: tree-flow.h (uid_decl_map_hash, [...]): Move ... 2008-02-28 09:56:54 +00:00
tree-ssa-alias.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-ccp.c re PR tree-optimization/32810 (Not folding of const element for goto) 2008-03-27 16:32:28 +00:00
tree-ssa-coalesce.c
tree-ssa-copy.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-copyrename.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-dce.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-dom.c tree-flow.h (widen_bitfield): Remove declaration. 2008-03-26 11:09:43 +00:00
tree-ssa-dse.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-forwprop.c tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Remove special casing of constant qualifiers. 2008-03-20 22:06:40 +00:00
tree-ssa-ifcombine.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
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 re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-loop-im.c tree-affine.h (aff_combination_expand): Declare. 2008-03-27 10:25:36 +00:00
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-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Use is_gimple_min_invariant instead of TREE_INVARIANT. 2008-03-20 23:14:35 +00:00
tree-ssa-loop-manip.c re PR tree-optimization/31358 (IV-OPTs produces a weird MEM_REF) 2008-03-11 09:36:51 +00:00
tree-ssa-loop-niter.c tree-gimple.h (is_gimple_invariant_address): Declare. 2008-03-18 14:02:17 +00:00
tree-ssa-loop-prefetch.c
tree-ssa-loop-unswitch.c
tree-ssa-loop.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-math-opts.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-operands.c tree-pretty-print.c: Include predict.h. 2008-03-18 15:21:06 +00:00
tree-ssa-operands.h re PR tree-optimization/34683 (SSA rewriting in the loop unroller causes quadratic behavior) 2008-01-08 16:29:14 +00:00
tree-ssa-phiopt.c re PR tree-optimization/35431 (ICE with complex integer, invalid gimple) 2008-03-31 02:45:53 -07:00
tree-ssa-phiprop.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-pre.c tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Use is_gimple_min_invariant instead of TREE_INVARIANT. 2008-03-20 23:14:35 +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 re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-sccvn.c tree-ssa-sccvn.c (visit_reference_op_load): If the lookup found an expression with constants, note that in the VN for the lhs. 2008-03-18 16:10:24 +00:00
tree-ssa-sccvn.h re PR tree-optimization/34043 (Missed optimization causing extra loads and stores when using x86_64 builtin function together with aggregate types.) 2008-03-14 14:52:07 +00:00
tree-ssa-sink.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa-structalias.c expmed.c (extract_split_bit_field): Remove if (0) code. 2008-04-03 06:56:03 +11:00
tree-ssa-structalias.h
tree-ssa-ter.c tree-ssa-ter.c (free_temp_expr_table): Free num_in_part and new_replaceable_dependencies. 2008-01-13 04:27:46 +00:00
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 re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-ssa.c tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Remove special casing of constant qualifiers. 2008-03-20 22:06:40 +00:00
tree-ssanames.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-stdarg.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-stdarg.h
tree-tailcall.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-vect-analyze.c invoke.texi: Document -ftree-loop-distribution. 2008-02-28 12:37:24 +00:00
tree-vect-generic.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-vect-patterns.c re PR tree-optimization/35171 (ICE in vect_recog_dot_prod_pattern) 2008-02-12 21:29:39 +00:00
tree-vect-transform.c re PR tree-optimization/35821 (Internal compiler error: segmentation fault) 2008-04-10 05:51:59 +00:00
tree-vectorizer.c re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
tree-vectorizer.h tree-vectorizer.c (free_stmt_vec_info): New function. 2008-03-12 06:06:00 +00:00
tree-vn.c tree-ssa-sccvn.h (vn_binary_op_lookup): Remove. 2008-03-08 19:30:55 +00:00
tree-vrp.c re PR tree-optimization/35869 (ICE in calc_dfs_tree at -O2 -gnatp after VRP optimization) 2008-04-11 14:14:04 +00:00
tree.c tree.c (get_unwidened): Remove code fiddling with COMPONENT_REF. 2008-03-27 00:09:30 +00:00
tree.def re PR tree-optimization/30317 (VRP cannot extract a range from (unsigned int) i + 0x0ffffffff > 4) 2008-03-28 12:20:09 +00:00
tree.h tree.h (struct tree_base): Added a new flag default_def_flag. 2008-04-11 05:30:33 +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 other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
varasm.c function.h (incomming_args): Break out of struct function. 2008-04-08 08:59:34 +00: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 re PR other/35094 (RTL dump file letters hosed and partly undocumented) 2008-03-19 11:22:40 +00:00
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.