gcc/gcc
Richard Guenther 75af9746ba tree-ssa-structalias.c (intra_create_variable_infos): Make a constraint for the static chain parameter.
2008-11-27  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (intra_create_variable_infos): Make
	a constraint for the static chain parameter.

From-SVN: r142242
2008-11-27 09:45:56 +00:00
..
ada * gcc-interface/utils.c (init_gigi_decls): Fix type mismatch. 2008-11-20 20:56:23 +00:00
config Fix error in last change. 2008-11-27 09:14:59 +00:00
cp re PR c++/28743 (ICE with invalid specialization) 2008-11-25 22:51:40 -05:00
doc bfin.opt (micplb): New option. 2008-11-27 09:11:50 +00:00
fortran module.c (gfc_dump_module): Report error on unlink only if errno != ENOENT. 2008-11-25 07:01:41 -08:00
ginclude float.h (DEC_EVAL_METHOD): Correct the macro name. 2008-09-11 22:50:51 +00:00
java re PR java/37068 (libgcj linkage failure: Incorrect library ABI version detected) 2008-11-05 10:05:03 +00:00
objc c-decl.c (finish_decl): Pass input_location to build_unary_op. 2008-10-06 21:35:02 +00:00
objcp re PR objc/37460 (NeXT runtime ICEs) 2008-09-17 14:39:13 -07:00
po * ru.po: Update. 2008-11-23 16:43:25 +00:00
testsuite re PR testsuite/28870 (configuring, over-riding timeout values in testsuite) 2008-11-26 22:15:07 +00:00
ABOUT-GCC-NLS
BASE-VER
COPYING
COPYING.LIB
COPYING3
COPYING3.LIB
ChangeLog tree-ssa-structalias.c (intra_create_variable_infos): Make a constraint for the static chain parameter. 2008-11-27 09:45:56 +00:00
ChangeLog-1997
ChangeLog-1998 Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
ChangeLog-1999 Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
ChangeLog-2000 Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003 Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
ChangeLog-2004 Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
ChangeLog-2005
ChangeLog-2006 Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
ChangeLog-2007 Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
ChangeLog.dataflow
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
DATESTAMP Daily bump. 2008-11-27 00:17:08 +00:00
DEV-PHASE
FSFChangeLog Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
FSFChangeLog.10
FSFChangeLog.11
LANGUAGES
Makefile.in dg-extract-results.sh: New file. 2008-10-24 10:58:44 +02:00
ONEWS
README.Portability
acinclude.m4
aclocal.m4 re PR target/27880 (undefined reference to `_Unwind_GetIPInfo') 2008-11-12 21:37:34 +00:00
addresses.h
alias.c re PR middle-end/37447 (test pr28982b.c fails execution on power4 or later with ira change) 2008-10-12 13:26:24 -07:00
alias.h
alloc-pool.c re PR middle-end/37448 (cannot compile big function) 2008-10-08 02:52:28 +00:00
alloc-pool.h
attribs.c Change attribute((option(...))) to attribute((target(...))); Do not allocate tree nodes on x86 for builtins until we generate code for the ISA; Delete hot/cold functions changing optimization; Make C++ support target specific functions; Add #pragma GCC {push_options,pop_options,reset_options} instead of #pragma GCC {target,optimize} {push,reset,pop} 2008-08-30 23:50:40 +00:00
auto-inc-dec.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
basic-block.h re PR middle-end/29609 (Even with -O0 -g gcc optimizes a goto away and I cannot debug) 2008-10-07 20:48:40 +02:00
bb-reorder.c parse.c (parse_interface): Silence uninitialized var warning. 2008-08-30 10:38:55 +00:00
bitmap.c
bitmap.h
bt-load.c
builtin-attrs.def
builtin-types.def
builtins.c re PR middle-end/37323 (__builtin_apply failures) 2008-11-22 09:28:44 +01:00
builtins.def
c-aux-info.c
c-common.c c-common.c (warn_about_parentheses): Add missing whitespace 2008-11-13 18:47:18 +00:00
c-common.def
c-common.h re PR middle-end/11492 (Bogus warning with -Wsign-compare) 2008-10-29 17:16:46 +00:00
c-config-lang.in
c-convert.c c-tree.h: Add argument to c_objc_common_truthvalue_conversion, parser_build_binary_op. 2008-09-23 14:55:14 +00:00
c-cppbuiltin.c real.h (struct real_format): New member round_towards_zero. 2008-08-12 13:19:40 +00:00
c-decl.c re PR middle-end/11492 (Bogus warning with -Wsign-compare) 2008-10-29 17:16:46 +00:00
c-dump.c
c-errors.c diagnostic.c (pedwarn_at): Rename as pedwarn. 2008-08-21 10:55:13 +00:00
c-format.c Fix PR/25502 2008-10-13 12:32:07 +02:00
c-format.h
c-gimplify.c c-gimplify.c (c_genericize): Don't refer to DECL_ASSEMBLER_NAME before ensuring it's already computed. 2008-10-10 07:20:30 +00:00
c-lang.c
c-lex.c diagnostic.c (pedwarn_at): Rename as pedwarn. 2008-08-21 10:55:13 +00:00
c-objc-common.c
c-objc-common.h c-common.c (c_expand_decl): Remove. 2008-09-09 08:56:58 +00:00
c-omp.c c-decl.c (finish_decl): Pass input_location to build_unary_op. 2008-10-06 21:35:02 +00:00
c-opts.c cpplib.h (struct cpp_options): Add new boolean flag warn_builtin_macro_redefined. 2008-09-18 15:39:08 +00:00
c-parser.c c-parser.c (c_parser_binary_expression): Silence the uninitialized variable warning emitted for binary_loc. 2008-10-17 14:50:07 +00:00
c-pch.c diagnostic.c (inform): Add an explicit location_t parameter. 2008-08-20 13:35:00 +00:00
c-ppoutput.c * c-ppoutput.c (cb_used_define): Do nothing for a builtin node. 2008-09-23 17:47:32 +00:00
c-pragma.c Change attribute((option(...))) to attribute((target(...))); Do not allocate tree nodes on x86 for builtins until we generate code for the ISA; Delete hot/cold functions changing optimization; Make C++ support target specific functions; Add #pragma GCC {push_options,pop_options,reset_options} instead of #pragma GCC {target,optimize} {push,reset,pop} 2008-08-30 23:50:40 +00:00
c-pragma.h
c-pretty-print.c re PR c++/35334 (Broken diagnostic for complex cast) 2008-11-12 09:18:45 +01:00
c-pretty-print.h
c-semantics.c
c-tree.h re PR c/7543 (no warning for always-false "if (!a & 0x4)" bitwise and on boolean value) 2008-10-24 10:09:06 +00:00
c-typeck.c re PR c++/37561 (Revision 140405 caused g++.old-deja/g++.mike/warn1.C) 2008-11-15 10:53:02 +01:00
c.opt re PR middle-end/37908 (atomic NAND op generate wrong code; __sync_nand_and_fetch, __sync_fetch_and_nand) 2008-11-17 12:19:06 +01:00
caller-save.c caller-save.c (insert_one_insn): Take into account REG_INC notes for the liveness computation of the new insn. 2008-11-21 21:19:34 +00:00
calls.c calls.c (expand_call): Pass to REG_PARM_STACK_SPACE the type of the function... 2008-11-26 11:25:38 +01:00
cfg.c
cfganal.c
cfgbuild.c
cfgcleanup.c rtl.h (locator_eq): New decl. 2008-10-09 22:04:10 +02:00
cfgexpand.c cfgexpand.c (expand_gimple_cond): Convert also goto_block and goto_locus of true_edge into RTL locator. 2008-10-08 22:49:23 +02:00
cfghooks.c cfghooks.c (split_block): Set BB_IRREDUCIBLE_LOOP and EDGE_IRREDUCIBLE_LOOP. 2008-11-03 16:17:33 +00:00
cfghooks.h sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
cfglayout.c invoke.texi (-mgen-cell-microcode): Document. 2008-10-13 12:57:31 -07:00
cfglayout.h
cfgloop.c backport: configure: Regenerate. 2008-09-02 16:31:04 +00:00
cfgloop.h backport: configure: Regenerate. 2008-09-02 16:31:04 +00:00
cfgloopanal.c fwprop.c (should_replace_address): Add speed attribute. 2008-08-31 09:44:25 +00:00
cfgloopmanip.c backport: configure: Regenerate. 2008-09-02 16:31:04 +00:00
cfgrtl.c rtl.h (locator_eq): New decl. 2008-10-09 22:04:10 +02:00
cgraph.c cgraph.c (cgraph_function_body_availability): Fix test of externally visible. 2008-11-16 22:31:58 +00:00
cgraph.h re PR debug/27574 (MIssing debug info at -O0 for a local variable in a C++ constructor) 2008-11-12 22:57:44 +01:00
cgraphbuild.c
cgraphunit.c re PR debug/27574 (MIssing debug info at -O0 for a local variable in a C++ constructor) 2008-11-12 22:57:44 +01:00
collect2.c
collect2.h
combine-stack-adj.c
combine.c re PR middle-end/37807 (Exponential compile time with MMX builtins.) 2008-11-10 10:08:15 +01:00
common.opt graphite.c (graphite_apply_transformations): Check for -fgraphite-identity. 2008-10-23 17:00:35 +00:00
conditions.h
config.build
config.gcc config.gcc (extra_headers): For x86 and x86-64, remove gmmintrin.h, add immintrin.h and avxintrin.h. 2008-11-21 06:05:02 -08:00
config.host config.host: Add x-aix to host_xmake_file. 2008-09-14 09:55:29 -04:00
config.in re PR target/27880 (undefined reference to `_Unwind_GetIPInfo') 2008-11-12 21:37:34 +00:00
configure configure.ac: Test m32c-elf-gas for .loc. 2008-11-26 16:03:06 -05:00
configure.ac configure.ac: Test m32c-elf-gas for .loc. 2008-11-26 16:03:06 -05:00
convert.c re PR middle-end/36578 (cast to long double not taken into account when result stored to a double) 2008-10-29 17:05:42 +00:00
convert.h
coretypes.h
coverage.c re PR c++/35483 (GCC on AIX doesn't support dollar in symbols name.) 2008-10-16 07:57:26 -04:00
coverage.h
cppdefault.c
cppdefault.h
cppspec.c
crtstuff.c
cse.c cse.c (fold_rtx): Remove redundant gen_rtx_CONST. 2008-11-11 23:24:05 +00:00
cselib.c
cselib.h
cstamp-h.in
dbgcnt.c
dbgcnt.def sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
dbgcnt.h
dbxout.c * dbxout.c (dbxout_parms): Fetch the inner REG inside a PARALLEL. 2008-09-25 11:52:47 +00:00
dbxout.h
dce.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
dce.h
ddg.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
ddg.h
debug.c re PR fortran/29635 (debug info of modules) 2008-08-29 20:41:19 +02:00
debug.h re PR fortran/29635 (debug info of modules) 2008-08-29 20:41:19 +02:00
defaults.h defaults.h (TARGET_FLOAT_FORMAT): Remove. 2008-08-12 13:27:30 +00:00
df-byte-scan.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
df-core.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
df-problems.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
df-scan.c re PR target/37378 (Revision 139827 causes Divide_X) 2008-10-27 22:37:06 +01:00
df.h re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
dfp.c
dfp.h
diagnostic.c diagnostic.c (error_at): New. 2008-09-03 01:00:04 +00:00
diagnostic.def re PR other/36901 (pedwarn() + -pedantic-errors + -w (inhibit_warnings) should not emit errors) 2008-08-08 23:57:19 +00:00
diagnostic.h re PR other/36901 (pedwarn() + -pedantic-errors + -w (inhibit_warnings) should not emit errors) 2008-08-08 23:57:19 +00:00
dojump.c dojump.c (do_jump): Move below. 2008-09-11 14:45:05 +00:00
dominance.c
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c re PR middle-end/37135 (code size increase for struct assignment) 2008-11-24 13:57:37 +01:00
dse.h
dummy-checksum.c
dwarf.h
dwarf2.h dwarf2.h (DW_OP_GNU_encoded_addr): New. 2008-09-24 15:38:03 -07:00
dwarf2asm.c re PR other/37265 (mt_allocator.cc:646: ICE: in gt_ggc_m_S, at ggc-page.c:1281) 2008-09-09 23:57:41 +00:00
dwarf2asm.h
dwarf2out.c re PR rtl-optimization/36998 (Ada bootstrap broken on i586-*-*) 2008-11-20 22:26:52 +01:00
dwarf2out.h
ebitmap.c
ebitmap.h
emit-rtl.c re PR middle-end/37815 (ICE in vt_add_function_parameters (bootstrap error)) 2008-10-21 13:48:16 -07:00
emit-rtl.h re PR middle-end/37815 (ICE in vt_add_function_parameters (bootstrap error)) 2008-10-21 13:48:16 -07:00
emutls.c
errors.c re PR other/36901 (pedwarn() + -pedantic-errors + -w (inhibit_warnings) should not emit errors) 2008-08-08 23:57:19 +00:00
errors.h re PR other/36901 (pedwarn() + -pedantic-errors + -w (inhibit_warnings) should not emit errors) 2008-08-08 23:57:19 +00:00
et-forest.c
et-forest.h
except.c
except.h
exec-tool.in
explow.c emit-rtl.c (set_reg_attrs_from_value): Fix invalid alignment information passed to mark_reg_pointer. 2008-09-12 13:31:51 +00:00
expmed.c expmed.c (extract_bit_field_1): Also use a temporary and convert_extracted_bit_field when... 2008-11-18 02:08:24 +00:00
expr.c tree.c (build2_stat): Allow non-POINTER_PLUS_EXPRs with non-sizetype offsets if... 2008-11-19 17:38:15 +00:00
expr.h expr.c (MOVE_BY_PIECES_P, [...]): Pass speed operand. 2008-09-01 09:27:39 +00:00
final.c re PR target/37170 (gcc.dg/weak/weak-1.c) 2008-11-22 09:22:52 +01:00
fix-header.c
fixed-value.c
fixed-value.h
fixproto
flags.h sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
fold-const.c re PR target/35366 (gfortran.dg/equiv_7.f90 fails with -m64 -Os on powerpc-apple-darwin9) 2008-11-12 18:01:51 +01:00
fp-test.c
function.c re PR middle-end/37316 (Small structs are not passed correctly on hppa64-*-*) 2008-11-22 09:27:04 +01:00
function.h cgraph.c (cgraph_release_function_body): Plug memory leak on ipa_transforms_to_apply and CFG... 2008-09-11 12:41:36 +00:00
fwprop.c fwprop.c (fwprop_done): Call df_remove_problem. 2008-11-07 13:16:54 -08:00
gbl-ctors.h
gcc.c gcc.c (cc1_options): Fix comment. 2008-11-15 12:43:16 +00:00
gcc.h Add -dumpbase to the switches that take arguments 2008-10-30 22:45:32 +00:00
gccbug.in
gccspec.c
gcov-dump.c
gcov-io.c
gcov-io.h
gcov-iov.c
gcov.c gcov.c (create_file_names): Properly handle UNIX and DOS directory separators. 2008-10-03 12:49:38 +00:00
gcse.c loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. 2008-08-29 10:35:57 +00:00
gdbinit.in backport: configure: Regenerate. 2008-09-02 16:31:04 +00:00
gen-protos.c
genattr.c sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
genattrtab.c
genautomata.c sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
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
gengtype.h
genmddeps.c
genmodes.c
genmultilib
genopinit.c
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
ggc-common.c ggc-common.c (loc_array): Make static. 2008-09-11 12:48:53 +00:00
ggc-none.c
ggc-page.c
ggc-zone.c
ggc.h
gimple-iterator.c
gimple-low.c re PR c++/36631 (attribute always_inline -> sorry, unimplemented: recursive inlining) 2008-11-20 02:47:10 +01:00
gimple-pretty-print.c
gimple.c re PR bootstrap/38100 (gcc fails to compile with (undefined symbol) gimple_check_failed error) 2008-11-13 15:42:39 +01:00
gimple.def
gimple.h re PR bootstrap/38100 (gcc fails to compile with (undefined symbol) gimple_check_failed error) 2008-11-13 15:42:39 +01:00
gimplify.c re PR c++/36631 (attribute always_inline -> sorry, unimplemented: recursive inlining) 2008-11-20 02:47:10 +01:00
glimits.h
global.c re PR middle-end/37790 (limits-fnargs.c takes very long time to compile at -O2) 2008-11-19 21:20:44 +00:00
graph.c
graph.h
graphds.c
graphds.h
graphite.c re PR middle-end/37883 ([graphite] ICE : in scan_tree_for_params, at graphite.c:2274) 2008-11-05 05:04:29 +00:00
graphite.h [multiple changes] 2008-10-15 16:24:15 +00:00
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gthr-aix.h
gthr-dce.h
gthr-gnat.c
gthr-gnat.h
gthr-lynx.h
gthr-mipssde.h
gthr-nks.h
gthr-posix.c gtrh-posix.h: Fix uses of _POSIX_TIMEOUTS per the normal Posix rule that a symbolic constant... 2008-08-28 22:00:46 +00:00
gthr-posix.h gtrh-posix.h: Fix uses of _POSIX_TIMEOUTS per the normal Posix rule that a symbolic constant... 2008-08-28 22:00:46 +00:00
gthr-posix95.h
gthr-rtems.h
gthr-single.h
gthr-solaris.h
gthr-tpf.h
gthr-vxworks.h
gthr-win32.h gthr-win32.h (CONST_CAST2): Really make sure CONST_CAST2 is defined. 2008-09-03 06:07:34 +00:00
gthr.h gthr-posix.h (__gthread_create, [...]): New functions. 2008-08-28 09:20:57 +00:00
haifa-sched.c target.h (struct gcc_target): Update prototypes of needs_block_p and gen_spec_check. 2008-10-14 16:52:19 +04:00
hard-reg-set.h sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
hooks.c fwprop.c (should_replace_address): Add speed attribute. 2008-08-31 09:44:25 +00:00
hooks.h fwprop.c (should_replace_address): Add speed attribute. 2008-08-31 09:44:25 +00:00
host-default.c
hosthooks-def.h
hosthooks.h
hwint.h
ifcvt.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
incpath.c
incpath.h
init-regs.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
input.h
insn-addr.h
insn-notes.def
integrate.c
integrate.h
intl.c
intl.h
ipa-cp.c cgraph.c (cgraph_free_edge): Use sizeof(*e). 2008-09-23 15:08:15 +02:00
ipa-inline.c ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 19:03:23 +02:00
ipa-prop.c cgraph.c (cgraph_free_edge): Use sizeof(*e). 2008-09-23 15:08:15 +02:00
ipa-prop.h ipa-cp.c (ipcp_estimate_growth): Return 0 instead of false. 2008-09-18 19:57:05 +02:00
ipa-pure-const.c re PR middle-end/37448 (cannot compile big function) 2008-09-18 17:28:40 +00:00
ipa-reference.c re PR middle-end/37448 (cannot compile big function) 2008-09-18 17:28:40 +00:00
ipa-reference.h re PR middle-end/37448 (cannot compile big function) 2008-09-18 17:28:40 +00:00
ipa-struct-reorg.c ipa-struct-reorg.c (create_new_alloc_sites): Properly insert the newly created statements. 2008-10-22 14:18:13 +00:00
ipa-struct-reorg.h
ipa-type-escape.c
ipa-type-escape.h
ipa-utils.c re PR middle-end/37448 (cannot compile big function) 2008-09-18 17:28:40 +00:00
ipa-utils.h
ipa.c
ira-build.c invoke.texi (ira-max-loops-num): Change semantics. 2008-11-25 22:52:37 +00:00
ira-color.c invoke.texi (ira-max-loops-num): Change semantics. 2008-11-25 22:52:37 +00:00
ira-conflicts.c re PR middle-end/37790 (limits-fnargs.c takes very long time to compile at -O2) 2008-11-19 21:20:44 +00:00
ira-costs.c ira-costs.c (find_allocno_class_costs): Work out the maximum allocno_costs value of the classees with the lowest... 2008-11-22 09:16:02 +00:00
ira-emit.c re PR bootstrap/37859 (Bootstrap failure on mips64octeon-unknown-linux-gnu) 2008-11-19 21:25:00 +00:00
ira-int.h invoke.texi (ira-max-loops-num): Change semantics. 2008-11-25 22:52:37 +00:00
ira-lives.c ira-lives.c (process_bb_node_lives): Restore EH_RETURN_DATA_REGNO handling. 2008-11-11 18:07:39 +00:00
ira.c invoke.texi (ira-max-loops-num): Change semantics. 2008-11-25 22:52:37 +00:00
ira.h re PR rtl-optimization/37296 (Bootstrap failure compiling libgcc) 2008-09-03 19:49:30 +00:00
jump.c rtlanal.c: Fix uses of "it's" with "its" where appropriate. 2008-08-26 23:27:31 +10:00
lambda-code.c re PR tree-optimization/37686 (Building of CPU2000's bzip2 with peak flags with -mcpu=power4 fails with an ICE.) 2008-10-15 16:13:33 +00:00
lambda-mat.c
lambda-trans.c
lambda.h backport: configure: Regenerate. 2008-09-02 16:31:04 +00:00
langhooks-def.h re PR objc/37460 (NeXT runtime ICEs) 2008-09-17 14:39:13 -07:00
langhooks.c c-common.c (c_expand_decl): Remove. 2008-09-09 08:56:58 +00:00
langhooks.h re PR objc/37460 (NeXT runtime ICEs) 2008-09-17 14:39:13 -07:00
lcm.c
libfuncs.h
libgcc-std.ver
libgcc2.c
libgcc2.h
libgcov.c re PR target/32277 (indir-call-prof fails on ia64-linux-gnu) 2008-10-29 19:46:16 +00:00
limitx.h
limity.h
lists.c sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
local-alloc.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
longlong.h
loop-doloop.c re PR rtl-optimization/37782 (Stage2 ada compiler miscompiled) 2008-11-03 12:01:11 -08:00
loop-init.c sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
loop-invariant.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
loop-iv.c re PR rtl-optimization/32283 (Missed induction variable optimization) 2008-11-20 08:05:12 +00:00
loop-unroll.c loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. 2008-08-29 10:35:57 +00:00
loop-unswitch.c loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. 2008-08-29 10:35:57 +00:00
lower-subreg.c
machmode.def
machmode.h real.h (struct real_format): New member has_sign_dependent_rounding. 2008-08-12 13:25:22 +00:00
main.c
matrix-reorg.c matrix-reorg.c (transform_allocation_sites): Initializers added to avoid the warning. 2008-09-25 11:21:43 +00:00
mcf.c re PR bootstrap/38088 (gcc fails to compile with undefined symbol: __LONG_LONG_MAX__ error) 2008-11-13 11:26:51 +01:00
mips-tdump.c Makefile.in (mips-tfile.o-warn): Don't error out on mips-tfile.c warnings. 2008-09-09 16:36:14 +00:00
mips-tfile.c Makefile.in (mips-tfile.o-warn): Don't error out on mips-tfile.c warnings. 2008-09-09 16:36:14 +00:00
mkconfig.sh
mkmap-flat.awk configure.ac (RPATH_ENVVAR): Use PATH on Windows. 2008-08-31 12:14:25 -06:00
mkmap-symver.awk
mode-classes.def
mode-switching.c
modulo-sched.c sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
omega.c
omega.h
omp-builtins.def
omp-low.c omp-low.c (expand_omp_for_generic): If iter_type has different precision than type and type is a pointer type... 2008-11-03 22:47:44 +01:00
opt-functions.awk Change attribute((option(...))) to attribute((target(...))); Do not allocate tree nodes on x86 for builtins until we generate code for the ISA; Delete hot/cold functions changing optimization; Make C++ support target specific functions; Add #pragma GCC {push_options,pop_options,reset_options} instead of #pragma GCC {target,optimize} {push,reset,pop} 2008-08-30 23:50:40 +00:00
opt-gather.awk
optabs.c re PR middle-end/37908 (atomic NAND op generate wrong code; __sync_nand_and_fetch, __sync_fetch_and_nand) 2008-11-17 12:19:06 +01:00
optabs.h
optc-gen.awk
opth-gen.awk
opts-common.c
opts.c re PR middle-end/37805 (gcc --help=separate) 2008-10-14 14:00:19 +02:00
opts.h re PR middle-end/37576 (-v --help ICEs) 2008-10-07 23:02:21 +02:00
output.h re PR target/37170 (gcc.dg/weak/weak-1.c) 2008-11-22 09:22:52 +01:00
params.c
params.def invoke.texi (ira-max-loops-num): Change semantics. 2008-11-25 22:52:37 +00:00
params.h [multiple changes] 2008-08-26 12:39:58 +00:00
passes.c re PR middle-end/37858 (ICE when "-fdump-ipa-all -dv" is used) 2008-11-03 09:42:10 +01:00
pointer-set.c
pointer-set.h
postreload-gcse.c postreload-gcse.c (eliminate_partially_redundant_loads): Use optimize_bb_for_size_p. 2008-08-31 12:52:07 +00:00
postreload.c fwprop.c (should_replace_address): Add speed attribute. 2008-08-31 09:44:25 +00:00
predict.c re PR tree-optimization/37879 (ICE with "wrong" use of noreturn attribute and optimization) 2008-10-27 21:36:32 +01:00
predict.def cold-attribute-1.c: New testcase. 2008-08-31 11:40:11 +00:00
predict.h
prefix.c
prefix.h
pretty-print.c re PR debug/37156 (Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)) 2008-08-19 13:44:42 +02:00
pretty-print.h
print-rtl.c
print-tree.c * print-tree.c (print_node): Use code instead of TREE_CODE (node). 2008-11-04 21:08:26 +01:00
profile.c re PR c/7543 (no warning for always-false "if (!a & 0x4)" bitwise and on boolean value) 2008-10-24 10:09:06 +00:00
profile.h profile.h: Really add it. 2008-08-18 12:22:36 -07:00
protoize.c
ra-conflict.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
ra.h
read-rtl.c
real.c re PR middle-end/36578 (cast to long double not taken into account when result stored to a double) 2008-10-29 17:05:42 +00:00
real.h re PR middle-end/36578 (cast to long double not taken into account when result stored to a double) 2008-10-29 17:05:42 +00:00
recog.c sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
recog.h sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
reg-notes.def
reg-stack.c reg-stack.c (reg_to_stack): Add missing braces in memset size calculation. 2008-11-06 19:01:18 +01:00
regclass.c [multiple changes] 2008-08-26 12:39:58 +00:00
regmove.c re PR rtl-optimization/37769 (internal compiler error: in reg_overlap_mentioned_for_reload_p, at reload.c:6525) 2008-10-24 23:09:00 +00:00
regrename.c regrename.c (merge_overlapping_regs): Add registers artificially defined at the top of the basic block to the set of... 2008-11-25 21:25:52 +00:00
regs.h [multiple changes] 2008-08-26 12:39:58 +00:00
regstat.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
reload.c rtl.h (simplify_subreg_regno): Declare. 2008-08-28 20:02:54 +00:00
reload.h [multiple changes] 2008-08-26 12:39:58 +00:00
reload1.c re PR target/38208 (gcc.c-torture/compile/20080806-1.c) 2008-11-21 14:47:05 +01:00
reorg.c loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. 2008-08-29 10:35:57 +00:00
resource.c
resource.h
rtl-error.c
rtl-factoring.c
rtl.c sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
rtl.def
rtl.h invoke.texi (-mgen-cell-microcode): Document. 2008-10-13 12:57:31 -07:00
rtlanal.c re PR middle-end/37807 (Exponential compile time with MMX builtins.) 2008-11-10 10:08:15 +01:00
rtlhooks-def.h sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
rtlhooks.c
sbitmap.c
sbitmap.h
scan-decls.c
scan-types.sh
scan.c
scan.h
sched-deps.c rtl.texi (const_double): Remove the "addr" operand. 2008-10-15 18:33:23 +00:00
sched-ebb.c sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
sched-int.h re PR middle-end/37499 (Scheduling pass 2 time increases by order of magnitude) 2008-09-18 12:29:48 +04:00
sched-rgn.c re PR middle-end/37499 (Scheduling pass 2 time increases by order of magnitude) 2008-09-18 12:29:48 +04:00
sched-vis.c sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
sdbout.c sdbout.c (sdbout_one_type): Treat the value type CONST_DECL for enumerals. 2008-10-08 09:56:00 +02:00
sdbout.h
see.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
sel-sched-dump.c sel-sched-dump.c: Surround with #ifdef INSN_SCHEDULING. 2008-09-01 16:38:44 +04:00
sel-sched-dump.h sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
sel-sched-ir.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
sel-sched-ir.h sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
sel-sched.c target.h (struct gcc_target): Update prototypes of needs_block_p and gen_spec_check. 2008-10-14 16:52:19 +04:00
sel-sched.h sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
simplify-rtx.c re PR rtl-optimization/32283 (Missed induction variable optimization) 2008-11-20 08:05:12 +00:00
sort-protos
sparseset.c
sparseset.h
sreal.c
sreal.h
stab.def
stack-ptr-mod.c
statistics.c
statistics.h
stmt.c cgraph.c (cgraph_release_function_body): Plug memory leak on ipa_transforms_to_apply and CFG... 2008-09-11 12:41:36 +00:00
stor-layout.c
stringpool.c * stringpool.c (ggc_alloc_string): Terminate string. 2008-10-03 20:36:17 +00:00
stub-objc.c
sync-builtins.def
sys-protos.h
sys-types.h
system.h
target-def.h tm.texi (TARGET_IRA_COVER_CLASSES): Define. 2008-09-20 09:15:43 +00:00
target.h target.h (struct gcc_target): Update prototypes of needs_block_p and gen_spec_check. 2008-10-14 16:52:19 +04:00
targhooks.c tm.texi (TARGET_IRA_COVER_CLASSES): Define. 2008-09-20 09:15:43 +00:00
targhooks.h tm.texi (TARGET_IRA_COVER_CLASSES): Define. 2008-09-20 09:15:43 +00:00
timevar.c
timevar.def backport: configure: Regenerate. 2008-09-02 16:31:04 +00:00
timevar.h
tlink.c tlink.c: Include "libiberty.h". 2008-11-20 14:21:51 +01:00
toplev.c graphite.c (graphite_apply_transformations): Check for -fgraphite-identity. 2008-10-23 17:00:35 +00:00
toplev.h diagnostic.c (error_at): New. 2008-09-03 01:00:04 +00:00
tracer.c loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. 2008-08-29 10:35:57 +00:00
tree-affine.c
tree-affine.h
tree-browser.c
tree-browser.def
tree-call-cdce.c * tree-call-cdce.c (check_target_format): Accept Motorola formats. 2008-09-14 17:58:14 +00:00
tree-cfg.c tree-ssa-live.c (remove_unused_locals): Mark all edge's goto_block as used. 2008-10-09 10:14:45 +02:00
tree-cfgcleanup.c re PR middle-end/37913 (ICE: Segmentation fault in link_block, cfg.c:153) 2008-10-29 16:19:24 +01:00
tree-chrec.c backport: configure: Regenerate. 2008-09-02 16:31:04 +00:00
tree-chrec.h backport: configure: Regenerate. 2008-09-02 16:31:04 +00:00
tree-complex.c re PR tree-optimization/35737 (ICE with __builtin_setjmp and complex variable) 2008-10-01 07:28:04 -07:00
tree-data-ref.c re PR tree-optimization/37573 (gcc-4.4 regression: incorrect code generation with -O1 -ftree-vectorize) 2008-11-03 12:32:52 +00:00
tree-data-ref.h re PR tree-optimization/37686 (Building of CPU2000's bzip2 with peak flags with -mcpu=power4 fails with an ICE.) 2008-10-15 16:13:33 +00:00
tree-dfa.c
tree-dump.c
tree-dump.h
tree-eh.c loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. 2008-08-29 10:35:57 +00:00
tree-flow-inline.h re PR tree-optimization/37950 (failure in polyhedron benchmark when ftree-parallelize-loops is enabled) 2008-11-16 04:48:25 +00:00
tree-flow.h re PR middle-end/37742 (ICE in vectorizer with restrict pointer) 2008-11-05 12:17:10 +00:00
tree-if-conv.c
tree-inline.c tree-inline.c (tree_inlinable_function_p): Remove tuples debugging hack. 2008-10-21 00:58:10 +02:00
tree-inline.h tree.c (build_function_type_skip_args, [...]): New functions. 2008-08-29 11:31:40 +00:00
tree-into-ssa.c backport: configure: Regenerate. 2008-09-02 16:31:04 +00:00
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c re PR bootstrap/36908 (bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution") 2008-11-03 16:35:13 +00:00
tree-loop-linear.c re PR tree-optimization/37686 (Building of CPU2000's bzip2 with peak flags with -mcpu=power4 fails with an ICE.) 2008-10-15 16:13:33 +00:00
tree-mudflap.c re PR middle-end/35314 (ICE with __builtin_setjmp and -fmudflap) 2008-11-10 14:48:06 +01:00
tree-mudflap.h
tree-nested.c re PR middle-end/30141 (nested function can produce invalid gimple) 2008-09-13 16:29:22 +00:00
tree-nomudflap.c
tree-nrv.c
tree-object-size.c
tree-optimize.c
tree-outof-ssa.c Fix comments and formatrting 2008-09-18 14:13:54 +00:00
tree-parloops.c re PR tree-optimization/38156 (gcc.dg/tree-ssa/update-unswitch-1.c fails when compiled with -ftree-parallelize-loops=4) 2008-11-19 16:08:01 +00:00
tree-pass.h backport: configure: Regenerate. 2008-09-02 16:31:04 +00:00
tree-phinodes.c backport: configure: Regenerate. 2008-09-02 16:31:04 +00:00
tree-predcom.c tree-predcom.c (filter_suitable_components): Free all refs in act->refs vector before calling release_component. 2008-09-15 23:55:05 +02:00
tree-pretty-print.c
tree-profile.c re PR middle-end/32581 (make profiledbootstrap - stageprofile - gcc/ada/a-except.adb:1301: error: control flow in the middle of basic block 20) 2008-09-13 21:39:44 +00:00
tree-scalar-evolution.c re PR middle-end/37379 ([graphite] ICE compiling aermod.f90 with -ffast-math -floop-block -O2 -fgraphite) 2008-11-07 18:03:04 +00:00
tree-scalar-evolution.h re PR middle-end/37375 ([graphite] Parameter detection and scev only take a surrounding loop as border) 2008-09-09 18:39:45 +00:00
tree-sra.c * tree-sra.c (bitfield_overlaps_p): Fix oversight. 2008-11-03 19:55:54 +00:00
tree-ssa-address.c fwprop.c (should_replace_address): Add speed attribute. 2008-08-31 09:44:25 +00:00
tree-ssa-alias-warnings.c
tree-ssa-alias.c re PR middle-end/38151 (structures with _Complex arguments are not passed correctly) 2008-11-25 10:34:11 +00:00
tree-ssa-ccp.c re PR middle-end/37742 (ICE in vectorizer with restrict pointer) 2008-11-05 12:17:10 +00:00
tree-ssa-coalesce.c loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. 2008-08-29 10:35:57 +00:00
tree-ssa-copy.c common.opt (ftree-store-ccp): Mark as preserved for backward compatibility. 2008-08-29 11:43:22 +00:00
tree-ssa-copyrename.c
tree-ssa-dce.c
tree-ssa-dom.c re PR middle-end/37337 (ICE: verify_flow_info failed) 2008-09-08 21:31:18 +02:00
tree-ssa-dse.c
tree-ssa-forwprop.c re PR middle-end/38200 (internal compiler error: in find_func_aliases, at tree-ssa-structalias.c:3905) 2008-11-21 22:59:33 +01:00
tree-ssa-ifcombine.c re PR tree-optimization/37387 (ICE in extract_range_from_binary_expr, at tree-vrp.c:2145) 2008-09-09 10:05:49 +00:00
tree-ssa-live.c tree-ssa-live.c (remove_unused_locals): Mark all edge's goto_block as used. 2008-10-09 10:14:45 +02:00
tree-ssa-live.h
tree-ssa-loop-ch.c tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Check that loop is not cold. 2008-08-29 08:58:52 +00:00
tree-ssa-loop-im.c re PR tree-optimization/36891 (ICE with vector division and -ffast-math and LIM) 2008-09-28 15:48:48 -07:00
tree-ssa-loop-ivcanon.c loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. 2008-08-29 10:35:57 +00:00
tree-ssa-loop-ivopts.c re PR rtl-optimization/32283 (Missed induction variable optimization) 2008-11-20 08:05:12 +00:00
tree-ssa-loop-manip.c
tree-ssa-loop-niter.c re PR rtl-optimization/32283 (Missed induction variable optimization) 2008-11-20 08:05:12 +00:00
tree-ssa-loop-prefetch.c loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. 2008-08-29 10:35:57 +00:00
tree-ssa-loop-unswitch.c tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Check that loop is optimized for speed. 2008-08-31 15:54:54 +00:00
tree-ssa-loop.c graphite.c (graphite_apply_transformations): Check for -fgraphite-identity. 2008-10-23 17:00:35 +00:00
tree-ssa-math-opts.c loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. 2008-08-29 10:35:57 +00:00
tree-ssa-operands.c re PR middle-end/37448 (cannot compile big function) 2008-09-18 17:28:40 +00:00
tree-ssa-operands.h
tree-ssa-phiopt.c
tree-ssa-phiprop.c tree-ssa-uncprop.c (associate_equivalences_with_edges): Avoid entering the weaker equivalence recording. 2008-09-11 21:48:11 +00:00
tree-ssa-pre.c re PR tree-optimization/37542 (PRE doesn't simplify during phi-translation) 2008-11-02 15:26:04 +00:00
tree-ssa-propagate.c dojump.c (do_jump): Move below. 2008-09-11 14:45:05 +00:00
tree-ssa-propagate.h common.opt (ftree-store-ccp): Mark as preserved for backward compatibility. 2008-08-29 11:43:22 +00:00
tree-ssa-reassoc.c gimple.texi: Fix some typos, wrap some long lines, fix some broken wraps with continuations. 2008-10-05 17:13:10 +00:00
tree-ssa-sccvn.c re PR middle-end/29215 (extra store for memcpy) 2008-11-20 22:35:03 +01:00
tree-ssa-sccvn.h re PR tree-optimization/37991 (excessive memory consumption - possible hang) 2008-11-02 13:34:58 +00:00
tree-ssa-sink.c
tree-ssa-structalias.c tree-ssa-structalias.c (intra_create_variable_infos): Make a constraint for the static chain parameter. 2008-11-27 09:45:56 +00:00
tree-ssa-structalias.h
tree-ssa-ter.c re PR middle-end/37567 (tree SSA to normal checking takes abnormally long time) 2008-09-19 17:37:13 +00:00
tree-ssa-threadedge.c tree.h (IS_CONVERT_EXPR_CODE_P): Renamed to 2008-08-18 18:23:47 +02:00
tree-ssa-threadupdate.c loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. 2008-08-29 10:35:57 +00:00
tree-ssa-uncprop.c tree-ssa-uncprop.c (associate_equivalences_with_edges): Avoid entering the weaker equivalence recording. 2008-09-11 21:48:11 +00:00
tree-ssa.c re PR middle-end/37742 (ICE in vectorizer with restrict pointer) 2008-11-05 12:17:10 +00:00
tree-ssanames.c
tree-stdarg.c tree.h (IS_CONVERT_EXPR_CODE_P): Renamed to 2008-08-18 18:23:47 +02:00
tree-stdarg.h
tree-switch-conversion.c re PR tree-optimization/36881 (Creating runtime relocations for code which does not need it) 2008-10-15 08:43:19 +02:00
tree-tailcall.c
tree-vect-analyze.c re PR tree-optimization/38079 (gcc segfaults when using -ftree-vectorizer-verbose=9) 2008-11-12 10:36:03 +00:00
tree-vect-generic.c
tree-vect-patterns.c tree-vectorizer.c (supportable_widening_operation): Support multi-step conversion... 2008-08-19 08:31:41 +00:00
tree-vect-transform.c re PR middle-end/37491 (Revision 140257 causes vectorizer tests failures) 2008-09-30 10:36:22 +00:00
tree-vectorizer.c re PR tree-optimization/37574 (ICE with the vectorizer and GC) 2008-09-26 06:28:01 +00:00
tree-vectorizer.h re PR tree-optimization/37482 (definition in block 51 follows the use for SSA_NAME with -maltivec) 2008-09-22 07:55:39 +00:00
tree-vrp.c re PR middle-end/37285 (ICE while building binutils on ppc) 2008-10-01 15:09:26 +00:00
tree.c tree.c (build2_stat): Allow non-POINTER_PLUS_EXPRs with non-sizetype offsets if... 2008-11-19 17:38:15 +00:00
tree.def tree.def (COMPLEX_TYPE): Constrain element type. 2008-10-22 17:40:29 +00:00
tree.h re PR middle-end/11492 (Bogus warning with -Wsign-compare) 2008-10-29 17:16:46 +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.h
unwind-dw2.c dwarf2.h (DW_OP_GNU_encoded_addr): New. 2008-09-24 15:38:03 -07:00
unwind-dw2.h
unwind-generic.h
unwind-pe.h
unwind-sjlj.c
unwind.inc
value-prof.c re PR c/7543 (no warning for always-false "if (!a & 0x4)" bitwise and on boolean value) 2008-10-24 10:09:06 +00:00
value-prof.h
var-tracking.c re PR middle-end/37815 (ICE in vt_add_function_parameters (bootstrap error)) 2008-10-21 13:48:16 -07:00
varasm.c varasm.c (default_file_start): Suppress ASM_APP_OFF also with -dA and -dP. 2008-11-22 22:19:29 +00:00
varpool.c
varray.c
varray.h
vec.c toplev.c (dump_memory_report): Call dump_vec_loc_statistics. 2008-09-11 12:17:22 +00:00
vec.h toplev.c (dump_memory_report): Call dump_vec_loc_statistics. 2008-09-11 12:17:22 +00:00
vecprim.h sel-sched.h, [...]: New files. 2008-09-01 12:57:00 +04:00
version.c
version.h
vmsdbg.h
vmsdbgout.c re PR fortran/29635 (debug info of modules) 2008-08-29 20:41:19 +02:00
web.c re PR middle-end/37448 (cannot compile big function) 2008-10-11 23:39:21 +00:00
xcoff.h
xcoffout.c
xcoffout.h re PR c++/35483 (GCC on AIX doesn't support dollar in symbols name.) 2008-10-15 08:23:55 -04:00

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.