gcc/gcc
Emmanuel Briot bd0a4cabe3 2009-04-29 Emmanuel Briot <briot@adacore.com>
* gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
	prj-part.ads, prj.adb, prj.ads, clean.adb, prj-dect.adb, prj-dect.ads,
	prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads, prj-makr.adb
	(Set_In_Configuration, In_Configuration): Removed.
	Replaced by an extra parameter Is_Config_File in several parameter to
	avoid global variables to store the state of the parser.

From-SVN: r146955
2009-04-29 14:10:28 +02:00
..
ada 2009-04-29 Emmanuel Briot <briot@adacore.com> 2009-04-29 14:10:28 +02:00
config bfin.c (bfin_optimize_loop): Unify handling of problematic last insns. 2009-04-29 10:55:25 +00:00
cp revert: re PR c++/35652 (offset warning should be given in the front-end) 2009-04-28 14:56:47 +10:00
doc config.gcc (powerpc*-*-* | rs6000-*-*): Add rs6000/option-defaults.h to tm_file. 2009-04-28 19:59:57 +01:00
fortran re PR fortran/39946 (PROCEDURE statements: interface with RESULT variable) 2009-04-28 18:27:27 +02:00
ginclude Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
java collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
objc collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
objcp ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
po * gcc.pot: Regenerate. 2009-04-22 17:31:16 +01:00
testsuite re PR middle-end/39941 (ice in passes.c:execute_todo()) 2009-04-29 10:39:26 +00:00
ABOUT-GCC-NLS ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
acinclude.m4 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
aclocal.m4
addresses.h
alias.c Expand from SSA. 2009-04-26 19:35:04 +00:00
alias.h
alloc-pool.c
alloc-pool.h
attribs.c
auto-inc-dec.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
BASE-VER
basic-block.h Expand from SSA. 2009-04-26 19:35:04 +00:00
bb-reorder.c
bitmap.c
bitmap.h hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
bt-load.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
builtin-attrs.def
builtin-types.def
builtins.c revert: re PR c++/35652 (offset warning should be given in the front-end) 2009-04-28 14:56:47 +10:00
builtins.def builtins.def (va_start, [...]): Fix my previous commit. 2009-04-15 14:07:55 +00:00
c-aux-info.c
c-common.c revert: re PR c++/35652 (offset warning should be given in the front-end) 2009-04-28 14:56:47 +10:00
c-common.def
c-common.h revert: re PR c++/35652 (offset warning should be given in the front-end) 2009-04-28 14:56:47 +10:00
c-config-lang.in
c-convert.c
c-cppbuiltin.c
c-decl.c re PR c/39581 (VLA types at file scope wrongly rejected) 2009-04-26 18:00:04 +01:00
c-dump.c
c-errors.c
c-format.c gcc_diag-1.c (foo): Don't check that %E produces a warning. 2009-04-23 08:44:55 +00:00
c-format.h
c-gimplify.c re PR c/39712 (type mismatch in address expression) 2009-04-11 07:32:52 +00:00
c-lang.c
c-lex.c re PR c++/13358 (long long and C++ do not mix well) 2009-04-20 22:12:52 +00:00
c-objc-common.c
c-objc-common.h
c-omp.c combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
c-opts.c re PR c++/13358 (long long and C++ do not mix well) 2009-04-20 22:12:52 +00:00
c-parser.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
c-pch.c
c-ppoutput.c
c-pragma.c hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
c-pragma.h
c-pretty-print.c
c-pretty-print.h
c-semantics.c re PR c/19771 (VLA deallocation) 2009-04-19 21:19:54 +01:00
c-tree.h re PR c/39556 (statics in C99 inline functions later declared extern) 2009-04-26 14:40:19 +01:00
c-typeck.c revert: re PR c++/35652 (offset warning should be given in the front-end) 2009-04-28 14:56:47 +10:00
c.opt re PR c++/13358 (long long and C++ do not mix well) 2009-04-20 22:12:52 +00:00
caller-save.c
calls.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
cfg.c
cfganal.c
cfgbuild.c cfghooks.c (tidy_fallthru_edges): Remove find_basic_blocks references from comments. 2009-04-22 04:48:34 +00:00
cfgcleanup.c
cfgexpand.c ssaexpand.h (struct ssaexpand): Member 'values' is a bitmap. 2009-04-27 12:16:00 +00:00
cfghooks.c cfghooks.c (tidy_fallthru_edges): Remove find_basic_blocks references from comments. 2009-04-22 04:48:34 +00:00
cfghooks.h
cfglayout.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
cfglayout.h
cfgloop.c
cfgloop.h ipa-pure-const.c (struct funct_state_d): New fields state_previously_known, looping_previously_known... 2009-04-26 23:35:27 +00:00
cfgloopanal.c
cfgloopmanip.c
cfgrtl.c Expand from SSA. 2009-04-26 19:35:04 +00:00
cgraph.c cgraph.c (cgraph_create_edge, [...]): Set proper cfun. 2009-04-19 13:27:28 +00:00
cgraph.h hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
cgraphbuild.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
cgraphunit.c toplev.c (compile_file): Move call to coverage_finish ... 2009-04-19 13:52:03 -04:00
ChangeLog bfin.c (bfin_optimize_loop): Unify handling of problematic last insns. 2009-04-29 10:55:25 +00:00
ChangeLog-1997 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-1998 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-1999 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-2000 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-2001 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-2002 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-2003 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-2004 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-2005 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-2006 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-2007 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog-2008 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog.dataflow ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog.lib ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog.ptr ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog.tree-ssa ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
ChangeLog.tuples ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
cif-code.def
collect2.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
collect2.h
combine-stack-adj.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
combine.c combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
common.opt dbgcnt.def (cprop1, [...]): Remove 2009-04-27 17:21:27 +00:00
conditions.h
config.build
config.gcc config.gcc (powerpc*-*-* | rs6000-*-*): Add rs6000/option-defaults.h to tm_file. 2009-04-28 19:59:57 +01:00
config.host
config.in re PR inline-asm/39590 (inline asm %z on amd64 says "ll" instead of "q") 2009-04-25 10:10:51 +02:00
configure re PR inline-asm/39590 (inline asm %z on amd64 says "ll" instead of "q") 2009-04-25 10:10:51 +02:00
configure.ac re PR inline-asm/39590 (inline asm %z on amd64 says "ll" instead of "q") 2009-04-25 10:10:51 +02:00
convert.c
convert.h
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
coretypes.h tree.c (list_equal_p): New function. 2009-04-25 18:27:19 +00:00
coverage.c
coverage.h
cppdefault.c
cppdefault.h
cppspec.c
crtstuff.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
cse.c dbgcnt.def (cprop1, [...]): Remove 2009-04-27 17:21:27 +00:00
cselib.c re PR rtl-optimization/39794 (Miscompile with -O2 -funroll-loops) 2009-04-24 08:58:02 +02:00
cselib.h hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
cstamp-h.in
DATESTAMP Daily bump. 2009-04-29 00:17:05 +00:00
dbgcnt.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
dbgcnt.def dbgcnt.def (cprop1, [...]): Remove 2009-04-27 17:21:27 +00:00
dbgcnt.h
dbxout.c tree.h (DECL_BY_REFERENCE): Note that it is also valid for !TREE_STATIC VAR_DECLs. 2009-04-26 20:44:59 +02:00
dbxout.h
dce.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
dce.h
ddg.c
ddg.h
debug.c debug.h (set_name): Declare. 2009-04-15 17:40:25 -04:00
debug.h debug.h (set_name): Add comment. 2009-04-28 11:06:16 -04:00
defaults.h defaults.h (GO_IF_MODE_DEPENDENT_ADDRESS): Provide empty default. 2009-04-22 07:49:46 +00:00
DEV-PHASE
df-byte-scan.c
df-core.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
df-problems.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
df-scan.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
df.h collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
dfp.c
dfp.h
diagnostic.c diagnostic.c (diagnostic_report_diagnostic): Do not warn about loaded plugins for DK_ERROR and DK_WARNING. 2009-04-14 23:41:28 -04:00
diagnostic.def ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
diagnostic.h
dojump.c
dominance.c basic-block.h (get_all_dominated_blocks): Declare. 2009-04-20 14:01:52 +00:00
domwalk.c
domwalk.h
double-int.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
double-int.h
dse.c re PR rtl-optimization/39794 (Miscompile with -O2 -funroll-loops) 2009-04-24 08:58:02 +02:00
dse.h
dummy-checksum.c
dwarf2.h combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
dwarf2asm.c
dwarf2asm.h
dwarf2out.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
dwarf2out.h
dwarf.h
ebitmap.c
ebitmap.h
emit-rtl.c Expand from SSA. 2009-04-26 19:35:04 +00:00
emit-rtl.h
emutls.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
errors.c Makefile.in: Update dependencies. 2009-04-22 16:01:29 +00:00
errors.h Makefile.in: Update dependencies. 2009-04-22 16:01:29 +00:00
et-forest.c
et-forest.h
except.c tree.c (list_equal_p): New function. 2009-04-25 18:27:19 +00:00
except.h tree.c (list_equal_p): New function. 2009-04-25 18:27:19 +00:00
exec-tool.in
explow.c
expmed.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
expr.c Expand from SSA. 2009-04-26 19:35:04 +00:00
expr.h target.h (struct gcc_target): Add case_values_threshold field. 2009-04-25 08:34:27 +04:00
final.c dbgcnt.def (cprop1, [...]): Remove 2009-04-27 17:21:27 +00:00
fixed-value.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
fixed-value.h hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
flags.h
fold-const.c re PR middle-end/39937 (Revision 146831 failed SPEC CPU 2006) 2009-04-28 15:27:09 +00:00
fp-test.c
FSFChangeLog ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
FSFChangeLog.10 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
FSFChangeLog.11 ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
function.c hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
function.h hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
fwprop.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
gbl-ctors.h gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Use __SIZE_TYPE__ instead of unsigned long. 2009-04-13 12:11:48 +02:00
gcc-plugin.h Makefile.in (REVISION_s): Always include quotes. 2009-04-17 16:03:48 +00:00
gcc.c gcc.c (LINK_COMMAND_SPEC): Link with gcov with -fprofile-generate=. 2009-04-22 17:44:53 +00:00
gcc.h
gccbug.in
gccspec.c
gcov-dump.c
gcov-io.c
gcov-io.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gcov-iov.c
gcov.c
gcse.c dbgcnt.def (cprop1, [...]): Remove 2009-04-27 17:21:27 +00:00
gdbinit.in ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
genattr.c
genattrtab.c
genautomata.c Makefile.in: Update dependencies. 2009-04-22 16:01:29 +00:00
gencheck.c
genchecksum.c
gencodes.c
genconditions.c
genconfig.c
genconstants.c
genemit.c
genextract.c
genflags.c
gengenrtl.c
gengtype-lex.l hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
gengtype-parse.c gengtype-parse.c (parse_error): Add newline after message. 2009-04-24 09:46:47 -04:00
gengtype.c
gengtype.h
genmddeps.c
genmodes.c
genmultilib
genopinit.c i386.md (cmpcc): New. 2009-04-09 10:57:03 +00:00
genoutput.c
genpeep.c
genpreds.c genpreds.c (write_enum_constraint_num): Output definition of CONSTRAINT_NUM_DEFINED_P macro. 2009-04-24 23:35:16 +00:00
genrecog.c genrecog.c (validate_pattern): Do not warn for VOIDmode CALLs as the source of a set operation. 2009-04-25 14:51:34 +10:00
gensupport.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
gensupport.h
ggc-common.c
ggc-none.c
ggc-page.c
ggc-zone.c
ggc.h
gimple-iterator.c
gimple-low.c tree-pass.h (pass_del_ssa, [...]): Remove decls. 2009-04-26 22:09:50 +00:00
gimple-pretty-print.c
gimple.c Makefile.in: Update dependencies. 2009-04-22 16:01:29 +00:00
gimple.def
gimple.h collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
gimplify.c re PR c/39928 (gimplify_expr failure) 2009-04-27 15:50:05 +00:00
glimits.h ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
graph.c
graph.h
graphds.c
graphds.h
graphite.c
graphite.h
gsstruct.def
gstab.h ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
gsyms.h ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
gsyslimits.h
gthr-aix.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-dce.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-gnat.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-gnat.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-lynx.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-mipssde.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-nks.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-posix95.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-posix.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-posix.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-rtems.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-single.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-solaris.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-tpf.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr-vxworks.h gthr-vxworks.h (struct __gthread_once_t): Add alignment and padding for PPC. 2009-04-22 10:53:53 +00:00
gthr-win32.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
gthr.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
haifa-sched.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
hard-reg-set.h
hooks.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
hooks.h collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
host-default.c
hosthooks-def.h
hosthooks.h
hwint.h
ifcvt.c
incpath.c
incpath.h
init-regs.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
input.h
insn-addr.h
insn-notes.def
integrate.c hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
integrate.h
intl.c
intl.h
ipa-cp.c
ipa-inline.c ipa-inline.c (cgraph_decide_inlining_of_small_function): Dump ... 2009-04-13 21:29:01 +00:00
ipa-prop.c combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
ipa-prop.h
ipa-pure-const.c ipa-pure-const.c (struct funct_state_d): New fields state_previously_known, looping_previously_known... 2009-04-26 23:35:27 +00:00
ipa-reference.c cgraph.c (cgraph_make_edge, [...]): Set nothrow flag. 2009-04-18 18:39:52 +00:00
ipa-reference.h
ipa-struct-reorg.c tree-cfg.c (verify_gimple_assign_binary): Allow POINTER_PLUS_EXPR-like PLUS_EXPR for vectors. 2009-04-16 14:53:32 +00:00
ipa-struct-reorg.h
ipa-type-escape.c
ipa-type-escape.h
ipa-utils.c toplev.c (compile_file): Move call to coverage_finish ... 2009-04-19 13:52:03 -04:00
ipa-utils.h cgraph.c (cgraph_make_edge, [...]): Set nothrow flag. 2009-04-18 18:39:52 +00:00
ipa.c cgraph.h (cgraph_node_ptr): New type for vector functions. 2009-04-20 09:27:15 -04:00
ira-build.c
ira-color.c re PR rtl-optimization/39762 (IRA ICE with -msoft-float) 2009-04-16 15:15:48 +00:00
ira-conflicts.c re PR rtl-optimization/39914 (96% performance regression in floating point code; part of the problem started 2009/03/12-13) 2009-04-28 18:18:17 +02:00
ira-costs.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
ira-emit.c re PR rtl-optimization/39762 (IRA ICE with -msoft-float) 2009-04-16 15:15:48 +00:00
ira-int.h re PR rtl-optimization/39762 (IRA ICE with -msoft-float) 2009-04-16 15:15:48 +00:00
ira-lives.c re PR rtl-optimization/39762 (IRA ICE with -msoft-float) 2009-04-16 15:15:48 +00:00
ira.c ira.c (setup_cover_and_important_classes): Add enum cast. 2009-04-24 17:55:51 -07:00
ira.h
jump.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
lambda-code.c
lambda-mat.c
lambda-trans.c
lambda.h
langhooks-def.h
langhooks.c combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
langhooks.h
LANGUAGES ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
lcm.c
libfuncs.h
libgcc2.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
libgcc2.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
libgcc-std.ver ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
libgcov.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
limitx.h ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
limity.h
lists.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
longlong.h
loop-doloop.c
loop-init.c
loop-invariant.c
loop-iv.c loop-iv.c (simple_rhs_p): Allow expressions that are function_invariant_p. 2009-04-24 11:05:59 +00:00
loop-unroll.c
loop-unswitch.c
lower-subreg.c
machmode.def
machmode.h Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
main.c re PR other/31567 (cc1, cc1plus, etc. don't support @file mechanism) 2009-04-17 17:11:46 -04:00
Makefile.in Expand from SSA. 2009-04-26 19:35:04 +00:00
matrix-reorg.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
mcf.c combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
mips-tdump.c
mips-tfile.c
mkconfig.sh
mkmap-flat.awk
mkmap-symver.awk
mode-classes.def
mode-switching.c
modulo-sched.c
omega.c combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
omega.h
omp-builtins.def
omp-low.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
ONEWS ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
opt-functions.awk
opt-gather.awk
optabs.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
optabs.h i386.md (cmpcc): New. 2009-04-09 10:57:03 +00:00
optc-gen.awk
opth-gen.awk hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
opts-common.c
opts.c re PR testsuite/39710 (gcc.misc-tests/help.exp doesn't work when configured with --enable-checking=assert) 2009-04-26 08:18:48 +00:00
opts.h
output.h hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
params.c
params.def invoke.texi (max_gcse_passes): Remove documentation. 2009-04-12 19:43:46 +00:00
params.h invoke.texi (max_gcse_passes): Remove documentation. 2009-04-12 19:43:46 +00:00
passes.c dbgcnt.def (cprop1, [...]): Remove 2009-04-27 17:21:27 +00:00
plugin-version.c Makefile.in (REVISION_s): Always include quotes. 2009-04-17 16:03:48 +00:00
plugin.c Makefile.in (REVISION_s): Always include quotes. 2009-04-17 16:03:48 +00:00
plugin.h common.opt (fhelp): Add Var(help_flag). 2009-04-16 14:31:45 +00:00
pointer-set.c
pointer-set.h
postreload-gcse.c
postreload.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
predict.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c
print-tree.c tree.h (SSA_NAME_VALUE): Remove. 2009-04-28 08:50:19 +00:00
profile.c
profile.h
read-rtl.c
README.Portability
real.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
real.h hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
recog.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
recog.h
reg-notes.def
reg-stack.c
reginfo.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
regmove.c combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
regrename.c
regs.h
regstat.c
reload1.c combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
reload.c combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
reload.h
reorg.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
resource.c re PR rtl-optimization/39938 (build broke for cris-elf with dbr_schedule change) 2009-04-28 21:29:58 +00:00
resource.h
rtl-error.c
rtl.c
rtl.def
rtl.h Expand from SSA. 2009-04-26 19:35:04 +00:00
rtlanal.c rtlanal.c (alloc_reg_note): New function, broken out of add_reg_note. 2009-04-16 16:08:04 +00:00
rtlhooks-def.h
rtlhooks.c
sbitmap.c
sbitmap.h
sched-deps.c
sched-ebb.c
sched-int.h
sched-rgn.c
sched-vis.c
sdbout.c sdbout.c (sdbout_symbol): Pass VOIDmode to eliminate_regs. 2009-04-22 01:50:03 +00:00
sdbout.h
see.c
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c 20071210-2.c: New testcase. 2009-04-28 14:01:52 +04:00
sel-sched-ir.h 20071210-2.c: New testcase. 2009-04-28 14:01:52 +04:00
sel-sched.c 20071210-2.c: New testcase. 2009-04-28 14:01:52 +04:00
sel-sched.h
simplify-rtx.c simplify-rtx.c (simplify_binary_operation_1, case AND): Result is zero if no overlap in nonzero bits between the operands. 2009-04-24 16:19:36 +00:00
sparseset.c
sparseset.h
sreal.c
sreal.h
ssaexpand.h ssaexpand.h (struct ssaexpand): Member 'values' is a bitmap. 2009-04-27 12:16:00 +00:00
stab.def
stack-ptr-mod.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
statistics.c
statistics.h
stmt.c re PR c/39889 (Bogus -Wunused-value warning) 2009-04-26 20:51:07 +02:00
stor-layout.c
stringpool.c hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
stub-objc.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
sync-builtins.def
system.h
target-def.h collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
target.h collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
targhooks.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
targhooks.h collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
timevar.c
timevar.def dbgcnt.def (cprop1, [...]): Remove 2009-04-27 17:21:27 +00:00
timevar.h df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
tlink.c
toplev.c toplev.c (print_version): Update GMP version string calculation. 2009-04-29 04:19:38 +00:00
toplev.h dbgcnt.def (cprop1, [...]): Remove 2009-04-27 17:21:27 +00:00
tracer.c
tree-affine.c
tree-affine.h
tree-browser.c
tree-browser.def
tree-call-cdce.c
tree-cfg.c tree-cfg.c (verify_types_in_gimple_reference): Add require_lvalue parameter. 2009-04-29 10:37:14 +00:00
tree-cfgcleanup.c tree-eh.c (tree_remove_unreachable_handlers): Handle shared labels. 2009-04-25 09:02:05 +00:00
tree-chrec.c
tree-chrec.h
tree-complex.c combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
tree-data-ref.c collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. 2009-04-27 20:25:48 +00:00
tree-data-ref.h
tree-dfa.c tree-flow-inline.h (function_ann): Remove. 2009-04-27 08:26:40 +00:00
tree-dump.c Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
tree-dump.h Fix enum conversions which are invalid in C++: 2009-04-20 19:35:00 +00:00
tree-eh.c tree.c (list_equal_p): New function. 2009-04-25 18:27:19 +00:00
tree-flow-inline.h tree-flow-inline.h (function_ann): Remove. 2009-04-27 08:26:40 +00:00
tree-flow.h tree.h (SSA_NAME_VALUE): Remove. 2009-04-28 08:50:19 +00:00
tree-if-conv.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
tree-inline.c re PR java/38374 (constant pool references have wrong types in ADDR_EXPR) 2009-04-27 11:18:38 +00:00
tree-inline.h
tree-into-ssa.c tree-into-ssa.c (regs_to_rename, [...]): Remove. 2009-04-27 11:15:53 +00:00
tree-iterator.c tree-iterator.c (expr_only): Remove. 2009-04-18 11:47:22 +00:00
tree-iterator.h tree-iterator.c (tsi_split_statement_list_after, [...]): Remove. 2009-04-16 18:50:07 +00:00
tree-loop-distribution.c omp-low.c (lower_rec_input_clauses): Build correct address expressions. 2009-04-15 16:12:01 +00:00
tree-loop-linear.c
tree-mudflap.c Expand from SSA. 2009-04-26 19:35:04 +00:00
tree-mudflap.h
tree-nested.c tree-nested.c (get_nonlocal_vla_type): If not optimizing, call note_nonlocal_vla_type for nonlocal VLAs. 2009-04-26 20:47:54 +02:00
tree-nomudflap.c Update copyright year. Committed without a ChangeLog entry. 2009-04-26 03:51:54 +00:00
tree-nrv.c Expand from SSA. 2009-04-26 19:35:04 +00:00
tree-object-size.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
tree-optimize.c tree-pass.h (pass_del_ssa, [...]): Remove decls. 2009-04-26 22:09:50 +00:00
tree-outof-ssa.c re PR middle-end/39922 (Revision 146817 caused many regressions on trunk) 2009-04-28 12:22:47 +00:00
tree-parloops.c
tree-pass.h dbgcnt.def (cprop1, [...]): Remove 2009-04-27 17:21:27 +00:00
tree-phinodes.c
tree-predcom.c
tree-pretty-print.c tree-pretty-print.c (dump_generic_node): Add break after TREE_BINFO handler. 2009-04-17 17:28:01 -04:00
tree-profile.c omp-low.c (lower_rec_input_clauses): Build correct address expressions. 2009-04-15 16:12:01 +00:00
tree-scalar-evolution.c hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
tree-scalar-evolution.h
tree-sra.c tree-sra.c (sra_build_assignment): Don't use into_ssa mode, mark new temporaries for renaming 2009-04-26 17:11:22 +00:00
tree-ssa-address.c hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
tree-ssa-alias.c tree-ssa-alias.c (refs_may_alias_p_1): Do not use TBAA for decl-vs-decl disambiguation. 2009-04-17 15:35:13 +00:00
tree-ssa-alias.h hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
tree-ssa-ccp.c re PR middle-end/39824 (ice in fold-const.c) 2009-04-22 15:41:48 +00:00
tree-ssa-coalesce.c Expand from SSA. 2009-04-26 19:35:04 +00:00
tree-ssa-copy.c
tree-ssa-copyrename.c Expand from SSA. 2009-04-26 19:35:04 +00:00
tree-ssa-dce.c
tree-ssa-dom.c tree.h (SSA_NAME_VALUE): Remove. 2009-04-28 08:50:19 +00:00
tree-ssa-dse.c
tree-ssa-forwprop.c tree-ssa-forwprop.c (get_prop_dest_stmt): Clean up tuplification. 2009-04-17 18:16:51 +00:00
tree-ssa-ifcombine.c
tree-ssa-live.c Expand from SSA. 2009-04-26 19:35:04 +00:00
tree-ssa-live.h ssaexpand.h (struct ssaexpand): Member 'values' is a bitmap. 2009-04-27 12:16:00 +00:00
tree-ssa-loop-ch.c
tree-ssa-loop-im.c
tree-ssa-loop-ivcanon.c ipa-pure-const.c (struct funct_state_d): New fields state_previously_known, looping_previously_known... 2009-04-26 23:35:27 +00:00
tree-ssa-loop-ivopts.c
tree-ssa-loop-manip.c
tree-ssa-loop-niter.c ipa-pure-const.c (struct funct_state_d): New fields state_previously_known, looping_previously_known... 2009-04-26 23:35:27 +00:00
tree-ssa-loop-prefetch.c
tree-ssa-loop-unswitch.c
tree-ssa-loop.c
tree-ssa-math-opts.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
tree-ssa-operands.c gimple.c (gimple_copy): Do not clear addresses_taken bitmap. 2009-04-16 13:23:13 +00:00
tree-ssa-operands.h hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
tree-ssa-phiopt.c
tree-ssa-phiprop.c re PR middle-end/39827 (ICE (segfault) when compiling gcc/varasm.c (in notice_global_symbol)) 2009-04-21 09:58:38 +00:00
tree-ssa-pre.c re PR middle-end/39941 (ice in passes.c:execute_todo()) 2009-04-29 10:39:26 +00:00
tree-ssa-propagate.c tree.h (SSA_NAME_VALUE): Remove. 2009-04-28 08:50:19 +00:00
tree-ssa-propagate.h tree-ssa-propagate.c (stmt_makes_single_load): Remove. 2009-04-16 18:48:16 +00:00
tree-ssa-reassoc.c
tree-ssa-sccvn.c tree-ssa-pre.c (eliminate): When replacing a PHI node carry out a necessary conversion. 2009-04-15 14:18:22 +00:00
tree-ssa-sccvn.h
tree-ssa-sink.c
tree-ssa-structalias.c tree-ssa-structalias.c (get_constraint_for_component_ref): Handle component references view-converting an invariant address. 2009-04-17 19:58:16 +00:00
tree-ssa-ter.c ssaexpand.h (struct ssaexpand): Member 'values' is a bitmap. 2009-04-27 12:16:00 +00:00
tree-ssa-threadedge.c tree.h (SSA_NAME_VALUE): Remove. 2009-04-28 08:50:19 +00:00
tree-ssa-threadupdate.c
tree-ssa-uncprop.c
tree-ssa.c Expand from SSA. 2009-04-26 19:35:04 +00:00
tree-ssanames.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
tree-stdarg.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
tree-stdarg.h
tree-switch-conversion.c re PR tree-optimization/39845 (ICE: in make_decl_rtl, at varasm.c:1304) 2009-04-22 11:30:04 +00:00
tree-tailcall.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
tree-vect-data-refs.c tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Use REPORT_VECTORIZED_LOCATIONS instead REPORT_VECTORIZED_LOOPS. 2009-04-28 08:08:25 +00:00
tree-vect-generic.c df.h: Include "timevar.h". 2009-04-17 05:40:46 +00:00
tree-vect-loop-manip.c tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Use REPORT_VECTORIZED_LOCATIONS instead REPORT_VECTORIZED_LOOPS. 2009-04-28 08:08:25 +00:00
tree-vect-loop.c tree-vect-loop.c (get_initial_def_for_induction): Use correct types for pointer increment. 2009-04-29 08:10:15 +00:00
tree-vect-patterns.c tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Use REPORT_VECTORIZED_LOCATIONS instead REPORT_VECTORIZED_LOOPS. 2009-04-28 08:08:25 +00:00
tree-vect-slp.c tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Use REPORT_VECTORIZED_LOCATIONS instead REPORT_VECTORIZED_LOOPS. 2009-04-28 08:08:25 +00:00
tree-vect-stmts.c tree-vect-stmts.c (vect_get_vec_def_for_operand): Fix type error. 2009-04-28 12:16:22 +00:00
tree-vectorizer.c tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Use REPORT_VECTORIZED_LOCATIONS instead REPORT_VECTORIZED_LOOPS. 2009-04-28 08:08:25 +00:00
tree-vectorizer.h tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Use REPORT_VECTORIZED_LOCATIONS instead REPORT_VECTORIZED_LOOPS. 2009-04-28 08:08:25 +00:00
tree-vrp.c tree.h (SSA_NAME_VALUE): Remove. 2009-04-28 08:50:19 +00:00
tree.c tree.c (list_equal_p): New function. 2009-04-25 18:27:19 +00:00
tree.def expr.c (handled_component_p): Move ... 2009-04-20 14:11:34 +00:00
tree.h tree.h (SSA_NAME_VALUE): Remove. 2009-04-28 08:50:19 +00:00
treestruct.def
tsystem.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
typeclass.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-c.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-compat.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-compat.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-dw2-fde-compat.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-dw2-fde-darwin.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-dw2-fde-glibc.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-dw2-fde.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-dw2-fde.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-dw2.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-dw2.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-generic.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-pe.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind-sjlj.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
unwind.inc Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
value-prof.c
value-prof.h
var-tracking.c combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
varasm.c hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
varpool.c
varray.c
varray.h hashtab.h: Update GTY annotations to new syntax 2009-04-22 14:29:36 -04:00
vec.c
vec.h combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. 2009-04-24 15:31:38 +00:00
vecprim.h
version.c ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
version.h
vmsdbg.h
vmsdbgout.c debug.h (set_name): Declare. 2009-04-15 17:40:25 -04:00
web.c
xcoff.h ABOUT-GCC-NLS, [...]: Add copyright and license notices. 2009-04-21 20:03:23 +01:00
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.