gcc/gcc
Martin Sebor c85158dec6 re PR c/67882 (surprising offsetof result on an invalid array member without diagnostic)
PR c++-common/67882

	* c-family/c-common.h (fold_offsetof_1): Add argument.
	* c-family/c-common.c (fold_offsetof_1): Diagnose more invalid
	offsetof expressions that reference elements past the end of
	an array.

        * c-c++-common/builtin-offsetof-2.c: New test.

From-SVN: r229717
2015-11-03 11:53:19 -07:00
..
ada decl.c: Reorder #include's and remove duplicates. 2015-10-29 15:27:20 +00:00
c OpenACC atomic directive 2015-11-03 12:28:22 +01:00
c-family re PR c/67882 (surprising offsetof result on an invalid array member without diagnostic) 2015-11-03 11:53:19 -07:00
common
config [AARCH64][PATCH 1/3] Implementing the variants of the vmulx_ NEON intrinsic 2015-11-03 10:58:27 +00:00
cp OpenACC atomic directive 2015-11-03 12:28:22 +01:00
doc Makefile.in (OBJS): Add multiple_target.o. 2015-10-30 18:17:43 +00:00
fortran OpenACC atomic directive 2015-11-03 12:28:22 +01:00
ginclude
go mksysinfo.sh: Make sure that CLONE_NEWUSER is defined. 2015-11-03 15:07:47 +00:00
java Allow real_format to be passed to more real.h functions 2015-10-30 13:45:42 +00:00
jit decl.c: Reorder #include's and remove duplicates. 2015-10-29 15:27:20 +00:00
lto decl.c: Reorder #include's and remove duplicates. 2015-10-29 15:27:20 +00:00
objc decl.c: Reorder #include's and remove duplicates. 2015-10-29 15:27:20 +00:00
objcp decl.c: Reorder #include's and remove duplicates. 2015-10-29 15:27:20 +00:00
po
testsuite re PR c/67882 (surprising offsetof result on an invalid array member without diagnostic) 2015-11-03 11:53:19 -07:00
ABOUT-GCC-NLS
acinclude.m4
aclocal.m4
addresses.h
alias.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
alias.h
alloc-pool.c
alloc-pool.h alloc-pool.h (base_pool_allocator): Use placement new. 2015-10-26 09:48:32 +00:00
asan.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
asan.h
attribs.c Makefile.in (OBJS): Add multiple_target.o. 2015-10-30 18:17:43 +00:00
attribs.h Makefile.in (OBJS): Add multiple_target.o. 2015-10-30 18:17:43 +00:00
auto-inc-dec.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
auto-profile.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
auto-profile.h
backend.h
BASE-VER
basic-block.h
bb-reorder.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
bb-reorder.h
bitmap.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
bitmap.h
bt-load.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
builtin-attrs.def
builtin-types.def
builtins.c Move constant folds for maths functions to new file 2015-11-02 16:34:16 +00:00
builtins.def OpenACC atomic directive 2015-11-03 12:28:22 +01:00
builtins.h Move constant folds for maths functions to new file 2015-11-02 16:34:16 +00:00
caller-save.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
calls.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
calls.h
ccmp.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ccmp.h
cfg-flags.def
cfg.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cfg.h cfg.c (free_edge): Add function argument and use it instead of cfun. 2015-10-27 08:56:03 +00:00
cfganal.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cfganal.h
cfgbuild.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cfgbuild.h
cfgcleanup.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cfgcleanup.h
cfgexpand.c defer mark_addressable calls during expand till the end of expand 2015-11-03 03:57:07 +00:00
cfgexpand.h
cfghooks.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cfghooks.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
cfgloop.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cfgloop.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
cfgloopanal.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cfgloopmanip.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cfgloopmanip.h
cfgrtl.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cfgrtl.h
cgraph.c cgraph.c: Include context.h for offloading. 2015-10-30 15:15:17 -07:00
cgraph.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
cgraphbuild.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cgraphclones.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cgraphunit.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ChangeLog Remove superfluous gcc/ prefixes 2015-11-03 17:25:24 +00:00
ChangeLog-1997
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog.dataflow
ChangeLog.gimple-classes
ChangeLog.graphite
ChangeLog.jit
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
chkp-builtins.def
cif-code.def
cilk-builtins.def
cilk-common.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cilk.h
cilkplus.def
collect2-aix.c
collect2-aix.h
collect2.c
collect2.h
collect-utils.c
collect-utils.h
combine-stack-adj.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
combine.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
common.md
common.opt common.opt (fchecking): New flag controlling flag_checking. 2015-10-28 10:07:03 +00:00
compare-elim.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
conditions.h
config.build
config.gcc config.gcc: Handle --enable-fdpic. 2015-10-27 13:36:47 +00:00
config.host
config.in
configure Add BUILD_NO_PIE_CFLAGS and BUILD_NO_PIE_FLAG 2015-10-29 05:29:43 -07:00
configure.ac Add BUILD_NO_PIE_CFLAGS and BUILD_NO_PIE_FLAG 2015-10-29 05:29:43 -07:00
context.c
context.h
convert.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
convert.h
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
coretypes.h
coverage.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
coverage.h
cppbuiltin.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cse.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cselib.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
cselib.h
cstamp-h.in
data-streamer-in.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
data-streamer-out.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
data-streamer.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
data-streamer.h
DATESTAMP Daily bump. 2015-11-03 00:16:12 +00:00
dbgcnt.c
dbgcnt.def
dbgcnt.h
dbxout.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
dbxout.h
dce.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
dce.h
ddg.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ddg.h
debug.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
debug.h
defaults.h
DEV-PHASE
df-core.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
df-problems.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
df-scan.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
df.h
dfp.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
dfp.h Allow real_format to be passed to more real.h functions 2015-10-30 13:45:42 +00:00
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
diagnostic-show-locus.c
diagnostic.c [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
diagnostic.def
diagnostic.h
dojump.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
dojump.h
dominance.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
dominance.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
domwalk.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
domwalk.h
double-int.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
double-int.h
dse.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
dumpfile.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
dumpfile.h
dwarf2asm.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
dwarf2asm.h
dwarf2cfi.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
dwarf2out.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
dwarf2out.h
emit-rtl.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
emit-rtl.h
errors.c
errors.h
et-forest.c [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
et-forest.h
except.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
except.h
exec-tool.in
explow.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
explow.h
expmed.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
expmed.h
expr.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
expr.h
fibonacci_heap.h
file-find.c
file-find.h
final.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
fixed-value.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
fixed-value.h
flag-types.h
flags.h
fold-const-call.c Move constant folds for maths functions to new file 2015-11-02 16:34:16 +00:00
fold-const-call.h Move constant folds for maths functions to new file 2015-11-02 16:34:16 +00:00
fold-const.c Move constant folds for maths functions to new file 2015-11-02 16:34:16 +00:00
fold-const.h Share code from fold_array_ctor_reference with fold. 2015-10-30 19:03:14 +00:00
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
function.h function.h (MINIMUM_METHOD_BOUNDARY): New macro. 2015-10-26 10:50:37 +01:00
fwprop.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gcc-ar.c
gcc-main.c
gcc-plugin.h
gcc-symtab.h
gcc.c
gcc.h
gcov-counter.def
gcov-dump.c
gcov-io.c
gcov-io.h
gcov-iov.c
gcov-tool.c
gcov.c
gcse-common.c
gcse-common.h
gcse.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gcse.h
gdbasan.in
gdbhooks.py
gdbinit.in
gen-pass-instances.awk
genattr-common.c
genattr.c
genattrtab.c
genautomata.c [PATCH 6/9] ENABLE_CHECKING refactoring: generators 2015-10-29 10:28:40 -06:00
gencheck.c
genchecksum.c
gencodes.c
genconditions.c [PATCH 6/9] ENABLE_CHECKING refactoring: generators 2015-10-29 10:28:40 -06:00
genconfig.c
genconstants.c
genemit.c
genenums.c
generic-match-head.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
generic-match.h
genextract.c [PATCH 6/9] ENABLE_CHECKING refactoring: generators 2015-10-29 10:28:40 -06:00
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-parse.c
gengtype-state.c
gengtype.c [PATCH 6/9] ENABLE_CHECKING refactoring: generators 2015-10-29 10:28:40 -06:00
gengtype.h [PATCH 6/9] ENABLE_CHECKING refactoring: generators 2015-10-29 10:28:40 -06:00
genhooks.c
genmatch.c Move cexp simplifications to match.pd 2015-10-26 09:18:30 +00:00
genmddeps.c
genmddump.c
genmodes.c
genmultilib
genopinit.c
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
gentarget-def.c
ggc-common.c ggc-common.c : Restore needed header for checking=release. 2015-10-31 10:57:33 +00:00
ggc-internal.h
ggc-none.c
ggc-page.c [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
ggc.h
gimple-builder.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimple-builder.h
gimple-expr.c gimple-expr.c (useless_type_conversion_p): Reinstate type canonical check for aggregate types and beef up comment for mode... 2015-11-03 17:19:30 +00:00
gimple-expr.h defer mark_addressable calls during expand till the end of expand 2015-11-03 03:57:07 +00:00
gimple-fold.c Share code from fold_array_ctor_reference with fold. 2015-10-30 19:03:14 +00:00
gimple-fold.h
gimple-iterator.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimple-iterator.h
gimple-laddress.c
gimple-low.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimple-low.h
gimple-match-head.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimple-match.h
gimple-predict.h
gimple-pretty-print.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimple-pretty-print.h
gimple-ssa-backprop.c
gimple-ssa-isolate-paths.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimple-ssa-strength-reduction.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimple-ssa.h
gimple-streamer-in.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimple-streamer-out.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimple-streamer.h
gimple-walk.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimple-walk.h
gimple.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimple.def
gimple.h internal-fn.c (expand_UNIQUE): New. 2015-10-27 20:16:04 +00:00
gimplify-me.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimplify-me.h
gimplify.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
gimplify.h
glimits.h
godump.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
graph.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
graph.h
graphds.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
graphds.h
graphite-dependences.c
graphite-isl-ast-to-gimple.c [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
graphite-isl-ast-to-gimple.h
graphite-optimize-isl.c isl schedule tree 2015-10-27 15:58:05 +00:00
graphite-poly.c alias.c: Reorder #include statements and remove duplicates. 2015-10-29 13:57:32 +00:00
graphite-poly.h
graphite-scop-detection.c [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
graphite-scop-detection.h
graphite-sese-to-poly.c [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
graphite-sese-to-poly.h
graphite.c cfg.c (free_edge): Add function argument and use it instead of cfun. 2015-10-27 08:56:03 +00:00
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
hard-reg-set.h
hash-map-traits.h
hash-map.h
hash-set.h
hash-table.c
hash-table.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
hash-traits.h
highlev-plugin-common.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hw-doloop.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
hw-doloop.h
hwint.c
hwint.h
ifcvt.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ifcvt.h
inchash.c
inchash.h
incpath.c alias.c: Reorder #include statements and remove duplicates. 2015-10-29 13:57:32 +00:00
incpath.h
init-regs.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
input.c
input.h
insn-addr.h
insn-notes.def
internal-fn.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
internal-fn.def internal-fn.def (IFN_GOACC_DIM_SIZE, [...]): New. 2015-10-27 23:46:39 +00:00
internal-fn.h internal-fn.def (IFN_GOACC_DIM_SIZE, [...]): New. 2015-10-27 23:46:39 +00:00
intl.c
intl.h
ipa-chkp.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-chkp.h
ipa-comdats.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-cp.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-devirt.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-icf-gimple.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-icf-gimple.h
ipa-icf.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-icf.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
ipa-inline-analysis.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-inline-transform.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-inline.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-inline.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
ipa-polymorphic-call.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-profile.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-prop.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-prop.h
ipa-pure-const.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-ref.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-ref.h
ipa-reference.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-reference.h
ipa-split.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-utils.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa-utils.h
ipa-visibility.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ipa.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ira-build.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ira-color.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ira-conflicts.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ira-costs.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ira-emit.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ira-int.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
ira-lives.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ira.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ira.h
is-a.h
jump.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
langhooks-def.h
langhooks.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
langhooks.h
LANGUAGES
lcm.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lcm.h
libfuncs.h
limitx.h
limity.h
lists.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lock-and-run.sh
loop-doloop.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
loop-init.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
loop-invariant.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
loop-iv.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
loop-unroll.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
loop-unroll.h
lower-subreg.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lower-subreg.h
lra-assigns.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lra-coalesce.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lra-constraints.c Add contains_symbol_ref_p 2015-10-30 23:56:32 +03:00
lra-eliminations.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lra-int.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
lra-lives.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lra-remat.c re PR rtl-optimization/68106 (c-c++-common/torture/builtin-arith-overflow-11.c FAILs with -flra-remat @ aarch64) 2015-10-30 17:45:16 +00:00
lra-spills.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lra.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lra.h
lto-cgraph.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lto-compress.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lto-compress.h
lto-opts.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lto-section-in.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lto-section-names.h
lto-section-out.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lto-streamer-in.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lto-streamer-out.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lto-streamer.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
lto-streamer.h
lto-wrapper.c
machmode.def
machmode.h
main.c
Makefile.in Move constant folds for maths functions to new file 2015-11-02 16:34:16 +00:00
match.pd Fix X - (X / Y) * Y in match.pd. 2015-10-29 15:39:09 +00:00
mcf.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
mem-stats-traits.h
mem-stats.h
memory-block.cc
memory-block.h
mkconfig.sh
mode-classes.def
mode-switching.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
modulo-sched.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
multiple_target.c multiple_target.c (create_dispatcher_calls): Add target check on ifunc. 2015-11-03 12:02:53 +00:00
omp-builtins.def
omp-low.c OpenACC atomic directive 2015-11-03 12:28:22 +01:00
omp-low.h
ONEWS
opt-functions.awk
opt-gather.awk
opt-include.awk
opt-read.awk
optabs-libfuncs.c
optabs-libfuncs.h
optabs-query.c
optabs-query.h
optabs-tree.c
optabs-tree.h
optabs.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
optabs.def
optabs.h
optc-gen.awk
optc-save-gen.awk
opth-gen.awk
opts-common.c
opts-diagnostic.h
opts-global.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
opts.c
opts.h
output.h
params-enum.h
params-list.h
params.c
params.def
params.h
pass_manager.h
passes.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
passes.def Makefile.in (OBJS): Add multiple_target.o. 2015-10-30 18:17:43 +00:00
plugin.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
plugin.def
plugin.h
postreload-gcse.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
postreload.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
predict.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
pretty-print.h
print-rtl.c
print-rtl.h
print-tree.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
print-tree.h
profile.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
profile.h
read-md.c
read-md.h
read-rtl.c
README.Portability
real.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
real.h Allow real_format to be passed to more real.h functions 2015-10-30 13:45:42 +00:00
realmpfr.c Move constant folds for maths functions to new file 2015-11-02 16:34:16 +00:00
realmpfr.h Move constant folds for maths functions to new file 2015-11-02 16:34:16 +00:00
recog.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
recog.h
ree.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
reg-notes.def
reg-stack.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
regcprop.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
regcprop.h
reginfo.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
regrename.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
regrename.h
regs.h
regset.h
regstat.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
reload1.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
reload.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
reload.h
reorg.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
resource.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
resource.h
rtl-chkp.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
rtl-chkp.h
rtl-error.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
rtl-error.h
rtl-iter.h
rtl.c
rtl.def
rtl.h Add contains_symbol_ref_p 2015-10-30 23:56:32 +03:00
rtlanal.c Add contains_symbol_ref_p 2015-10-30 23:56:32 +03:00
rtlhash.c
rtlhash.h
rtlhooks-def.h
rtlhooks.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sanitizer.def
sanopt.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sbitmap.c
sbitmap.h
sched-deps.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sched-ebb.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sched-int.h
sched-rgn.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sdbout.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sdbout.h
sel-sched-dump.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sel-sched-dump.h
sel-sched-ir.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sel-sched-ir.h
sel-sched.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sel-sched.h
sese.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sese.h
shrink-wrap.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
shrink-wrap.h
signop.h
simplify-rtx.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sparseset.c
sparseset.h
sreal.c
sreal.h
ssa-iterators.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
ssa.h
stab.def
stack-ptr-mod.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
statistics.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
statistics.h
stmt.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
stmt.h
stor-layout.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
stor-layout.h
store-motion.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
streamer-hooks.c
streamer-hooks.h
stringpool.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
stringpool.h
symbol-summary.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
symtab.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
sync-builtins.def
system.h
target-def.h
target-globals.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
target-globals.h
target-hooks-macros.h
target-insns.def internal-fn.def (IFN_GOACC_DIM_SIZE, [...]): New. 2015-10-27 23:46:39 +00:00
target.def internal-fn.def (IFN_GOACC_DIM_SIZE, [...]): New. 2015-10-27 23:46:39 +00:00
target.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
targhooks.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
targhooks.h target-insns.def (oacc_fork, oacc_join): Define. 2015-10-27 22:16:19 +00:00
timevar.c common.opt (fchecking): New flag controlling flag_checking. 2015-10-28 10:07:03 +00:00
timevar.def
timevar.h
tlink.c
toplev.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
toplev.h
tracer.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
trans-mem.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
trans-mem.h
tree-affine.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-affine.h
tree-call-cdce.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-cfg.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-cfg.h cfg.c (free_edge): Add function argument and use it instead of cfun. 2015-10-27 08:56:03 +00:00
tree-cfgcleanup.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-cfgcleanup.h
tree-chkp-opt.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-chkp.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-chkp.h
tree-chrec.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-chrec.h
tree-complex.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-core.h
tree-data-ref.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-data-ref.h
tree-dfa.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-dfa.h
tree-diagnostic.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-diagnostic.h
tree-dump.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-dump.h
tree-eh.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-eh.h
tree-emutls.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-hash-traits.h
tree-hasher.h
tree-if-conv.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-inline.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-inline.h
tree-into-ssa.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-into-ssa.h
tree-iterator.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-iterator.h
tree-loop-distribution.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-nested.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-nested.h
tree-nrv.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-object-size.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-object-size.h
tree-outof-ssa.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-outof-ssa.h
tree-parloops.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-parloops.h
tree-pass.h Makefile.in (OBJS): Add multiple_target.o. 2015-10-30 18:17:43 +00:00
tree-phinodes.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-phinodes.h
tree-predcom.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-pretty-print.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-pretty-print.h
tree-profile.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-scalar-evolution.c Revert: tree-scalar-evolution.c: Handle LSHIFT by constant 2015-11-02 12:39:31 +00:00
tree-scalar-evolution.h
tree-sra.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-address.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-address.h
tree-ssa-alias.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-alias.h
tree-ssa-ccp.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-coalesce.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-coalesce.h
tree-ssa-copy.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-dce.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-dom.c alias.c: Reorder #include statements and remove duplicates. 2015-10-29 13:57:32 +00:00
tree-ssa-dom.h
tree-ssa-dse.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-forwprop.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-ifcombine.c ifcombine: factor out inner block viability test 2015-11-03 00:31:18 +00:00
tree-ssa-live.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-live.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
tree-ssa-loop-ch.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-loop-im.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-loop-ivcanon.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-loop-ivopts.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-loop-manip.h [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE 2015-10-27 19:05:53 -06:00
tree-ssa-loop-niter.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-loop-niter.h cfg.c (free_edge): Add function argument and use it instead of cfun. 2015-10-27 08:56:03 +00:00
tree-ssa-loop-prefetch.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-loop-unswitch.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-loop.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-loop.h
tree-ssa-math-opts.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-operands.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-operands.h
tree-ssa-phionlycprop.c
tree-ssa-phiopt.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-phiprop.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-pre.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-propagate.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-propagate.h
tree-ssa-reassoc.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-sccvn.c alias.c: Reorder #include statements and remove duplicates. 2015-10-29 13:57:32 +00:00
tree-ssa-sccvn.h
tree-ssa-scopedtables.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-scopedtables.h [PATCH] Remove unnecessary invalidation support in threading 2015-10-29 14:37:01 -06:00
tree-ssa-sink.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-strlen.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-structalias.c Rename make_restrict_var_constraints to make_param_constraints 2015-11-02 23:23:28 +00:00
tree-ssa-tail-merge.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-ter.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-ter.h
tree-ssa-threadbackward.c [PATCH][PR tree-optimization/67892] Use FSM threader to handle backedges 2015-10-29 10:20:06 -06:00
tree-ssa-threadbackward.h [PATCH][PR tree-optimization/67892] Use FSM threader to handle backedges 2015-10-29 10:20:06 -06:00
tree-ssa-threadedge.c [PATCH] Remove unnecessary invalidation support in threading 2015-10-29 14:37:01 -06:00
tree-ssa-threadedge.h
tree-ssa-threadupdate.c [PATCH] Avoid more irreducible loops in FSM threader 2015-11-02 16:25:06 -07:00
tree-ssa-threadupdate.h
tree-ssa-uncprop.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa-uninit.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssa.c [PR68083] don't introduce undefined behavior in ifcombine 2015-11-03 00:30:07 +00:00
tree-ssa.h [PR68083] don't introduce undefined behavior in ifcombine 2015-11-03 00:30:07 +00:00
tree-ssanames.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-ssanames.h cfg.c (free_edge): Add function argument and use it instead of cfun. 2015-10-27 08:56:03 +00:00
tree-stdarg.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-stdarg.h
tree-streamer-in.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-streamer-out.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-streamer.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-streamer.h
tree-switch-conversion.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-tailcall.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-vect-data-refs.c tree-vect-data-refs.c (vect_analyze_data_refs): Do not collect data references here. 2015-11-03 15:59:17 +00:00
tree-vect-generic.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-vect-loop-manip.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-vect-loop.c tree-vect-data-refs.c (vect_analyze_data_refs): Do not collect data references here. 2015-11-03 15:59:17 +00:00
tree-vect-patterns.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-vect-slp.c tree-vect-data-refs.c (vect_analyze_data_refs): Do not collect data references here. 2015-11-03 15:59:17 +00:00
tree-vect-stmts.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree-vectorizer.c tree-vect-data-refs.c (vect_analyze_data_refs): Do not collect data references here. 2015-11-03 15:59:17 +00:00
tree-vectorizer.h tree-vect-data-refs.c (vect_analyze_data_refs): Do not collect data references here. 2015-11-03 15:59:17 +00:00
tree-vrp.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tree.def [PR c/64765, c/64880] Support OpenACC Combined Directives in C, C++ 2015-10-27 09:39:15 +01:00
tree.h [PR c/64765, c/64880] Support OpenACC Combined Directives in C, C++ 2015-10-27 09:39:15 +01:00
treestruct.def
tsan.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
tsan.h
tsystem.h
typeclass.h
typed-splay-tree.h
ubsan.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
ubsan.h
valtrack.c
valtrack.h
value-prof.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
value-prof.h cfg.c (free_edge): Add function argument and use it instead of cfun. 2015-10-27 08:56:03 +00:00
var-tracking.c Add contains_symbol_ref_p 2015-10-30 23:56:32 +03:00
varasm.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
varasm.h
varpool.c cgraph.c: Include context.h for offloading. 2015-10-30 15:15:17 -07:00
vec.c
vec.h
version.c
version.h
vmsdbg.h
vmsdbgout.c [PATCH] Fix vms targets 2015-11-01 22:27:14 -07:00
vtable-verify.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
vtable-verify.h
web.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
wide-int-print.cc alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
wide-int-print.h
wide-int.cc alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
wide-int.h
xcoff.h
xcoffout.c alias.c: Remove unused headers. 2015-10-30 15:48:59 +00:00
xcoffout.h

Copyright (C) 2000-2015 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 now 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.


Avoid unnecessary test before free
----------------------------------

Since SunOS 4 stopped being a reasonable portability target,
(which happened around 2007) there has been no need to guard
against "free (NULL)".  Thus, any guard like the following
constitutes a redundant test:

  if (P)
    free (P);

It is better to avoid the test.[*]
Instead, simply free P, regardless of whether it is NULL.

[*] However, if your profiling exposes a test like this in a
performance-critical loop, say where P is nearly always NULL, and
the cost of calling free on a NULL pointer would be prohibitively
high, consider using __builtin_expect, e.g., like this:

  if (__builtin_expect (ptr != NULL, 0))
    free (ptr);



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.