gcc/gcc
Jose E. Marchesi bd0a61befc bpf: mark/remove unused arguments and remove an unused function
This patch does a little bit of cleanup by removing some unused
arguments, or marking them as unused.  It also removes the function
ctfc_debuginfo_early_finish_p and the corresponding hook macro
definition, which are not used by GCC.

gcc/
	* config/bpf/bpf.c (bpf_handle_preserve_access_index_attribute):
	Mark arguments `args' and flags' as unused.
	(bpf_core_newdecl): Remove unused local `newdecl'.
	(bpf_core_newdecl): Remove unused argument `loc'.
	(ctfc_debuginfo_early_finish_p): Remove unused function.
	(TARGET_CTFC_DEBUGINFO_EARLY_FINISH_P): Remove definition.
	(bpf_core_walk): Do not pass a location to bpf_core_newdecl.
2021-12-06 21:57:53 +01:00
..
ada Daily bump. 2021-12-03 00:17:04 +00:00
analyzer Daily bump. 2021-12-02 00:16:33 +00:00
c Daily bump. 2021-12-01 00:17:04 +00:00
c-family Daily bump. 2021-12-04 00:16:46 +00:00
common RISC-V: Add implied defines of Zk, Zkn and Zks 2021-12-04 00:10:35 +08:00
config bpf: mark/remove unused arguments and remove an unused function 2021-12-06 21:57:53 +01:00
cp Daily bump. 2021-12-05 00:16:28 +00:00
d Daily bump. 2021-12-03 00:17:04 +00:00
doc x86: Add -mmove-max=bits and -mstore-max=bits 2021-12-03 09:57:06 -08:00
fortran Daily bump. 2021-12-05 00:16:28 +00:00
ginclude
go Daily bump. 2021-11-30 00:16:44 +00:00
jit Daily bump. 2021-11-28 00:16:20 +00:00
lto Daily bump. 2021-11-19 00:16:34 +00:00
objc Daily bump. 2021-12-06 00:16:21 +00:00
objcp Daily bump. 2021-11-30 00:16:44 +00:00
po Daily bump. 2021-12-01 00:17:04 +00:00
rtl-ssa
testsuite tree-optimization/103581 - fix masked gather on x86 2021-12-06 16:17:05 +01:00
ABOUT-GCC-NLS
acinclude.m4
aclocal.m4
addresses.h
adjust-alignment.c
alias.c
alias.h
align.h
alloc-pool.c
alloc-pool.h
array-traits.h
asan.c
asan.h
attr-fnspec.h
attribs.c x86: Speed up target attribute handling by using a cache 2021-12-03 11:07:44 +01:00
attribs.h x86: Speed up target attribute handling by using a cache 2021-12-03 11:07:44 +01:00
auto-inc-dec.c
auto-profile.c
auto-profile.h
backend.h
BASE-VER
basic-block.h
bb-reorder.c
bb-reorder.h
bitmap.c
bitmap.h
btfout.c
builtin-attrs.def
builtin-types.def
builtins.c vect: Make reduction code handle calls 2021-11-30 09:52:24 +00:00
builtins.def
builtins.h vect: Make reduction code handle calls 2021-11-30 09:52:24 +00:00
caller-save.c
calls.c
calls.h
ccmp.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
ccmp.h
cfg-flags.def
cfg.c
cfg.h
cfganal.c Remove unreachable gcc_unreachable () at the end of functions 2021-11-29 11:18:35 +01:00
cfganal.h
cfgbuild.c
cfgbuild.h
cfgcleanup.c Introduce REG_SET_EMPTY_P 2021-11-25 14:23:44 +01:00
cfgcleanup.h
cfgexpand.c Remove never looping loop in label_rtx_for_bb 2021-11-25 14:23:44 +01:00
cfgexpand.h
cfghooks.c Improve -fprofile-report 2021-11-28 19:25:33 +01:00
cfghooks.h Improve -fprofile-report 2021-11-28 19:25:33 +01:00
cfgloop.c Reduce scope of a few 'class loop *loop' variables 2021-11-24 21:38:11 +01:00
cfgloop.h
cfgloopanal.c
cfgloopmanip.c
cfgloopmanip.h
cfgrtl.c Avoid some -Wunreachable-code-ctrl 2021-11-30 08:23:26 +01:00
cfgrtl.h
cgraph.c Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
cgraph.h Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
cgraphbuild.c
cgraphclones.c Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
cgraphunit.c Remove dead code and function 2021-11-25 14:23:44 +01:00
ChangeLog Daily bump. 2021-12-06 00:16:21 +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-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
ChangeLog.dataflow
ChangeLog.gimple-classes
ChangeLog.graphite
ChangeLog.jit
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
cif-code.def
collect2-aix.c
collect2-aix.h
collect2.c
collect2.h
collect-utils.c
collect-utils.h
color-macros.h
combine-stack-adj.c
combine.c
common.md
common.opt Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
compare-elim.c
conditions.h
config.build
config.gcc build: Implement --with-multilib-list for avr target 2021-12-02 21:53:13 -05:00
config.host
config.in configure, Darwin: Check ld64 support for -platform-version. 2021-11-15 19:35:10 +00:00
configure build: Implement --with-multilib-list for avr target 2021-12-02 21:53:13 -05:00
configure.ac build: Implement --with-multilib-list for avr target 2021-12-02 21:53:13 -05:00
context.c
context.h
convert.c
convert.h
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
coretypes.h
coroutine-builtins.def
coroutine-passes.cc
coverage.c Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
coverage.h
cppbuiltin.c
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c
cse.c cse: Make sure duplicate elements are not entered into the equivalence set [PR103404] 2021-12-06 10:16:22 +00:00
cselib.c
cselib.h
cstamp-h.in
ctfc.c
ctfc.h
ctfout.c
data-streamer-in.c
data-streamer-out.c
data-streamer.c
data-streamer.h
DATESTAMP Daily bump. 2021-12-06 00:16:21 +00:00
dbgcnt.c
dbgcnt.def
dbgcnt.h
dbxout.c
dbxout.h
dce.c
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h
DEV-PHASE
df-core.c
df-problems.c
df-scan.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h
diagnostic-event-id.h
diagnostic-format-json.cc
diagnostic-metadata.h
diagnostic-path.h
diagnostic-show-locus.c
diagnostic-spec.c Use 'location_hash' for 'gcc/diagnostic-spec.h:nowarn_map' 2021-11-15 17:57:54 +01:00
diagnostic-spec.h Use 'location_hash' for 'gcc/diagnostic-spec.h:nowarn_map' 2021-11-15 17:57:54 +01:00
diagnostic-url.h
diagnostic.c
diagnostic.def
diagnostic.h
digraph.cc
digraph.h
dojump.c
dojump.h
dominance.c
dominance.h
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c
dump-context.h
dumpfile.c
dumpfile.h
dwarf2asm.c
dwarf2asm.h
dwarf2cfi.c
dwarf2ctf.c
dwarf2ctf.h
dwarf2out.c simplify-rtx: Punt on simplify_associative_operation with large operands [PR102356] 2021-12-01 10:16:57 +01:00
dwarf2out.h
early-remat.c
edit-context.c
edit-context.h
emit-rtl.c
emit-rtl.h
errors.c
errors.h
escaped_string.h
et-forest.c
et-forest.h
except.c
except.h
exec-tool.in
explow.c
explow.h
expmed.c
expmed.h
expr.c Avoid some -Wunreachable-code-ctrl 2021-11-30 08:23:26 +01:00
expr.h
fibonacci_heap.c
fibonacci_heap.h
file-find.c
file-find.h
file-prefix-map.c Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
file-prefix-map.h Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
final.c
fixed-value.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
fixed-value.h
flag-types.h
flags.h
fold-const-call.c Remove unreachable gcc_unreachable () at the end of functions 2021-11-29 11:18:35 +01:00
fold-const-call.h
fold-const.c c++: constexpr, fold, weak redecl, fp/0 [PR103310] 2021-12-01 13:24:36 -05:00
fold-const.h c++: constexpr, fold, weak redecl, fp/0 [PR103310] 2021-12-01 13:24:36 -05:00
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function-abi.cc
function-abi.h
function-tests.c
function.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
function.h
fwprop.c
gcc-ar.c
gcc-main.c
gcc-plugin.h
gcc-rich-location.c
gcc-rich-location.h
gcc-symtab.h
gcc.c darwin, d: Support outfile substitution for libphobos 2021-12-01 19:49:44 +01:00
gcc.h
gcov-counter.def
gcov-dump.c
gcov-io.c
gcov-io.h
gcov-tool.c
gcov.c
gcse-common.c
gcse-common.h
gcse.c
gcse.h
gdbasan.in
gdbhooks.py
gdbinit.in
gen-pass-instances.awk
genattr-common.c
genattr.c
genattrtab.c
genautomata.c
gencfn-macros.c
gencheck.c
genchecksum.c
gencodes.c
genconditions.c
genconfig.c
genconstants.c
genemit.c
genenums.c
generic-match-head.c
generic-match.h
genextract.c
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-parse.c
gengtype-state.c pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
gengtype.c pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
gengtype.h pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
genhooks.c
genmatch.c
genmddeps.c
genmddump.c
genmodes.c
genmultilib
genopinit.c vect: Pass mode to gather/scatter tests 2021-11-30 09:52:27 +00:00
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
gentarget-def.c
genversion.c
ggc-common.c pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
ggc-internal.h
ggc-none.c
ggc-page.c
ggc-tests.c
ggc.h pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
gimple-array-bounds.cc Avoid pathological function redeclarations when checking access sizes [PR102759]. 2021-11-17 15:09:23 -07:00
gimple-array-bounds.h
gimple-builder.c
gimple-builder.h
gimple-expr.c
gimple-expr.h
gimple-fold.c Canonicalize argument order for commutative functions 2021-11-30 09:52:25 +00:00
gimple-fold.h
gimple-harden-conditionals.cc harden conds: detach without decls 2021-11-20 02:51:27 -03:00
gimple-if-to-switch.cc
gimple-isel.cc
gimple-iterator.c
gimple-iterator.h
gimple-laddress.c
gimple-loop-interchange.cc
gimple-loop-jam.c tree-optimization/103361 - fix unroll-and-jam direction vector handling 2021-11-23 11:04:34 +01:00
gimple-loop-versioning.cc
gimple-low.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
gimple-low.h
gimple-match-head.c Canonicalize argument order for commutative functions 2021-11-30 09:52:25 +00:00
gimple-match.h vect: Make reduction code handle calls 2021-11-30 09:52:24 +00:00
gimple-predicate-analysis.cc Restore can_be_invalidated_p semantics to before refactoring 2021-11-29 09:20:09 +01:00
gimple-predicate-analysis.h
gimple-predict.h
gimple-pretty-print.c
gimple-pretty-print.h
gimple-range-cache.cc Use dominators to reduce cache-flling. 2021-12-06 13:27:10 -05:00
gimple-range-cache.h Use dominators to reduce cache-flling. 2021-12-06 13:27:10 -05:00
gimple-range-edge.cc ranger: Add shortcuts for single-successor blocks 2021-12-06 18:29:31 +00:00
gimple-range-edge.h
gimple-range-fold.cc Always track arguments, even when ignoring equiv params. 2021-11-30 09:07:21 -05:00
gimple-range-fold.h
gimple-range-gori.cc ranger: Add shortcuts for single-successor blocks 2021-12-06 18:29:31 +00:00
gimple-range-gori.h Add BB option for outgoing_edge_range_p and may_reocmpute_p. 2021-12-06 13:14:53 -05:00
gimple-range-path.cc path solver: Use only one ssa_global_cache. 2021-12-01 17:11:12 +01:00
gimple-range-path.h path solver: Use only one ssa_global_cache. 2021-12-01 17:11:12 +01:00
gimple-range-tests.cc
gimple-range-trace.cc
gimple-range-trace.h
gimple-range.cc Also pre-process PHIs in range-of-stmt. 2021-12-01 09:10:41 -05:00
gimple-range.h Directly resolve range_of_stmt dependencies. 2021-11-24 09:03:07 -05:00
gimple-ssa-backprop.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
gimple-ssa-evrp-analyze.c
gimple-ssa-evrp-analyze.h
gimple-ssa-evrp.c
gimple-ssa-isolate-paths.c
gimple-ssa-nonnull-compare.c
gimple-ssa-split-paths.c
gimple-ssa-sprintf.c
gimple-ssa-store-merging.c Remove unreachable gcc_unreachable () at the end of functions 2021-11-29 11:18:35 +01:00
gimple-ssa-strength-reduction.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
gimple-ssa-warn-access.cc Avoid pathological function redeclarations when checking access sizes [PR102759]. 2021-11-17 15:09:23 -07:00
gimple-ssa-warn-access.h
gimple-ssa-warn-alloca.c
gimple-ssa-warn-restrict.c
gimple-ssa-warn-restrict.h
gimple-ssa.h
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple-walk.c
gimple-walk.h
gimple-warn-recursion.c Implement -Winfinite-recursion [PR88232]. 2021-11-23 15:36:03 -07:00
gimple.c
gimple.def
gimple.h vect: Use generalised accessors to build SLP nodes 2021-11-30 09:52:28 +00:00
gimplify-me.c
gimplify-me.h
gimplify.c middle-end: Skip initialization of opaque type variables [PR103127] 2021-12-01 13:22:36 -06:00
gimplify.h
glimits.h
godump.c
graph.c
graph.h
graphds.c
graphds.h
graphite-dependences.c
graphite-isl-ast-to-gimple.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
graphite-optimize-isl.c
graphite-poly.c
graphite-scop-detection.c
graphite-sese-to-poly.c
graphite.c
graphite.h
graphviz.cc
graphviz.h
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.c
hard-reg-set.h
hash-map-tests.c
hash-map-traits.h
hash-map.h
hash-set-tests.c
hash-set.h
hash-table.c
hash-table.h
hash-traits.h
highlev-plugin-common.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hw-doloop.c
hw-doloop.h
hwint.c
hwint.h
ifcvt.c [PR103028] test ifcvt trap_if seq more strictly after reload 2021-12-04 00:17:16 -03:00
ifcvt.h
inchash.c
inchash.h
incpath.c
incpath.h
init-regs.c
input.c
input.h
insn-addr.h
insn-notes.def
int-vector-builder.h
internal-fn.c middle-end/103271 - avoid VLA init of register 2021-12-02 13:35:19 +01:00
internal-fn.def vect: Add support for fmax and fmin reductions 2021-11-30 09:52:25 +00:00
internal-fn.h vect: Make reduction code handle calls 2021-11-30 09:52:24 +00:00
intl.c
intl.h
ipa-comdats.c
ipa-cp.c Remove forgotten early return in ipa_value_range_from_jfunc 2021-11-25 23:58:48 +01:00
ipa-devirt.c
ipa-fnsummary.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
ipa-fnsummary.h
ipa-free-lang-data.cc
ipa-icf-gimple.c
ipa-icf-gimple.h
ipa-icf.c
ipa-icf.h
ipa-inline-analysis.c
ipa-inline-transform.c
ipa-inline.c
ipa-inline.h
ipa-modref-tree.c i386, ipa-modref: Comment spelling fix 2021-12-04 11:09:33 +01:00
ipa-modref-tree.h Remove duplicated param valud in modref tree 2021-11-23 16:36:01 +01:00
ipa-modref.c Minor ipa-modref tweaks 2021-11-26 13:54:41 +01:00
ipa-modref.h tree-optimization/103168 - Improve VN of pure function calls 2021-11-24 12:40:36 +01:00
ipa-param-manipulation.c ipa-param-manip: Be careful about a reallocating hash_map 2021-11-30 15:35:47 +01:00
ipa-param-manipulation.h ipa: Teach IPA-CP transformation about IPA-SRA modifications (PR 103227) 2021-11-25 18:16:31 +01:00
ipa-polymorphic-call.c
ipa-predicate.c
ipa-predicate.h
ipa-profile.c
ipa-prop.c ipa: Fix CFG fix-up in IPA-CP transform phase (PR 103441) 2021-11-27 01:01:46 +01:00
ipa-prop.h ipa: Teach IPA-CP transformation about IPA-SRA modifications (PR 103227) 2021-11-25 18:16:31 +01:00
ipa-pure-const.c Fix looping flag discovery in ipa-pure-const 2021-11-21 00:35:22 +01:00
ipa-ref.c
ipa-ref.h
ipa-reference.c
ipa-reference.h
ipa-split.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
ipa-sra.c ipa-sra: Check also ECF_LOOPING_CONST_OR_PURE when evaluating calls 2021-11-30 18:45:21 +01:00
ipa-utils.c
ipa-utils.h
ipa-visibility.c
ipa.c IPA: Provide a mechanism to register static DTORs via cxa_atexit. 2021-11-15 19:48:56 +00:00
ira-build.c
ira-color.c [PR103437] Make backup code for overflow conditional 2021-12-02 12:39:05 -05:00
ira-conflicts.c
ira-costs.c
ira-emit.c
ira-int.h
ira-lives.c
ira.c
ira.h
is-a.h
iterator-utils.h
json.cc
json.h
jump.c
langhooks-def.h
langhooks.c
langhooks.h c++: improve print_node of PTRMEM_CST 2021-11-16 10:20:30 -05:00
LANGUAGES
lcm.c
lcm.h
libfuncs.h
limitx.h
limity.h
lists.c
lock-and-run.sh
loop-doloop.c
loop-init.c Reduce scope of a few 'class loop *loop' variables 2021-11-24 21:38:11 +01:00
loop-invariant.c Reduce scope of a few 'class loop *loop' variables 2021-11-24 21:38:11 +01:00
loop-iv.c
loop-unroll.c
loop-unroll.h
lower-subreg.c
lower-subreg.h
lra-assigns.c
lra-coalesce.c
lra-constraints.c
lra-eliminations.c
lra-int.h
lra-lives.c
lra-remat.c
lra-spills.c
lra.c
lra.h
lto-cgraph.c Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
lto-compress.c
lto-compress.h
lto-opts.c Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
lto-section-in.c
lto-section-names.h
lto-section-out.c
lto-streamer-in.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
lto-streamer-out.c
lto-streamer.c
lto-streamer.h
lto-wrapper.c
machmode.def
machmode.h
main.c
Makefile.in gcc: Fix "argument list too long" from install-plugins 2021-12-02 22:00:04 -05:00
match.pd Final value replacement improvements for until-wrap loops. 2021-12-01 19:58:40 +00:00
mcf.c
mem-stats-traits.h
mem-stats.h
memmodel.h
memory-block.cc
memory-block.h
mkconfig.sh
mode-classes.def
mode-switching.c
modulo-sched.c
multiple_target.c
mux-utils.h
obstack-utils.h
omp-builtins.def
omp-expand.c openmp: Regimplify operands of GIMPLE_COND in a few more places [PR103208] 2021-11-16 10:19:22 +01:00
omp-expand.h
omp-general.c openmp: Fix up handling of kind(host) and kind(nohost) in ACCEL_COMPILERs [PR103384] 2021-11-24 10:30:32 +01:00
omp-general.h Make OpenACC orphan gang reductions errors 2021-11-30 12:58:45 +01:00
omp-low.c Make OpenACC orphan gang reductions errors 2021-11-30 12:58:45 +01:00
omp-low.h
omp-oacc-kernels-decompose.cc
omp-oacc-neuter-broadcast.cc
omp-offload.c [OpenACC] Remove erroneous "Orphan reductions cannot have gang partitioning" handling 2021-11-30 12:59:14 +01:00
omp-offload.h
omp-simd-clone.c
omp-simd-clone.h
ONEWS
opt-functions.awk
opt-gather.awk
opt-include.awk
opt-problem.cc
opt-problem.h
opt-read.awk
opt-suggestions.c
opt-suggestions.h
optabs-libfuncs.c
optabs-libfuncs.h
optabs-query.c vect: Pass mode to gather/scatter tests 2021-11-30 09:52:27 +00:00
optabs-query.h vect: Pass mode to gather/scatter tests 2021-11-30 09:52:27 +00:00
optabs-tree.c
optabs-tree.h
optabs.c
optabs.def vect: Add support for fmax and fmin reductions 2021-11-30 09:52:25 +00:00
optabs.h
optc-gen.awk
optc-save-gen.awk
opth-gen.awk
optinfo-emit-json.cc
optinfo-emit-json.h
optinfo.cc
optinfo.h
opts-common.c
opts-diagnostic.h
opts-global.c Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
opts.c Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
opts.h
ordered-hash-map-tests.cc
ordered-hash-map.h
output.h pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
params.opt
pass_manager.h
passes.c Improve -fprofile-report 2021-11-28 19:25:33 +01:00
passes.def Implement -Winfinite-recursion [PR88232]. 2021-11-23 15:36:03 -07:00
plugin.c
plugin.def
plugin.h
pointer-query.cc Avoid pathological function redeclarations when checking access sizes [PR102759]. 2021-11-17 15:09:23 -07:00
pointer-query.h Avoid pathological function redeclarations when checking access sizes [PR102759]. 2021-11-17 15:09:23 -07:00
poly-int-types.h
poly-int.h
postreload-gcse.c
postreload.c
predict.c Reduce scope of a few 'class loop *loop' variables 2021-11-24 21:38:11 +01:00
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl-function.c
print-rtl.c
print-rtl.h
print-tree.c c++: improve print_node of PTRMEM_CST 2021-11-16 10:20:30 -05:00
print-tree.h
profile-count.c
profile-count.h
profile.c Implement -fprofile-prefix-map. 2021-12-02 14:13:09 +01:00
profile.h
range-op.cc Remove can_throw_non_call_exceptions special case from operator_div::wi_fold. 2021-11-30 11:23:27 +01:00
range-op.h
range.cc
range.h
read-md.c
read-md.h
read-rtl-function.c Fix RTL FE issue with premature return 2021-11-29 16:18:45 +01:00
read-rtl-function.h
read-rtl.c
README.Portability
real.c
real.h
realmpfr.c
realmpfr.h
recog.c
recog.h
ree.c
reg-notes.def
reg-stack.c
regcprop.c
regcprop.h
reginfo.c
regrename.c
regrename.h
regs.h
regset.h Introduce REG_SET_EMPTY_P 2021-11-25 14:23:44 +01:00
regstat.c
reload1.c
reload.c Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
reload.h
reorg.c
resource.c
resource.h
rtl-error.c
rtl-error.h
rtl-iter.h
rtl-ssa.h
rtl-tests.c
rtl.c
rtl.def
rtl.h simplify-rtx: Punt on simplify_associative_operation with large operands [PR102356] 2021-12-01 10:16:57 +01:00
rtlanal.c
rtlanal.h
rtlhash.c
rtlhash.h
rtlhooks-def.h
rtlhooks.c
rtx-vector-builder.c
rtx-vector-builder.h
run-rtl-passes.c
run-rtl-passes.h
sancov.c
sanitizer.def
sanopt.c
sbitmap.c
sbitmap.h
sched-deps.c Avoid some -Wunreachable-code-ctrl 2021-11-30 08:23:26 +01:00
sched-ebb.c
sched-int.h
sched-rgn.c
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c Avoid some -Wunreachable-code-ctrl 2021-11-30 08:23:26 +01:00
sel-sched-ir.h Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
sel-sched.c
sel-sched.h
selftest-diagnostic.c
selftest-diagnostic.h
selftest-rtl.c
selftest-rtl.h
selftest-run-tests.c
selftest.c
selftest.h
sese.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
sese.h
shortest-paths.h
shrink-wrap.c
shrink-wrap.h
signop.h
simplify-rtx.c simplify-rtx: Punt on simplify_associative_operation with large operands [PR102356] 2021-12-01 10:16:57 +01:00
sort.cc
sparseset.c
sparseset.h
spellcheck-tree.c
spellcheck-tree.h
spellcheck.c
spellcheck.h
splay-tree-utils.cc
splay-tree-utils.h
splay-tree-utils.tcc
sreal.c
sreal.h
ssa-iterators.h Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
ssa.h
stab.def
stack-ptr-mod.c
statistics.c
statistics.h
stmt.c
stmt.h
stor-layout.c
stor-layout.h
store-motion.c
streamer-hooks.c
streamer-hooks.h
stringpool.c
stringpool.h
substring-locations.c
substring-locations.h
symbol-summary.h
symtab-clones.cc
symtab-clones.h
symtab-thunks.cc
symtab-thunks.h
symtab.c Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
sync-builtins.def
system.h
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target-insns.def
target.def Add TARGET_IFUNC_REF_LOCAL_OK 2021-12-03 05:12:30 -08:00
target.h
targhooks.c
targhooks.h
timevar.c
timevar.def
timevar.h timevar: Add auto_cond_timevar class 2021-11-23 20:25:47 -05:00
toplev.c
toplev.h
tracer.c
tracer.h
trans-mem.c
trans-mem.h
tree-affine.c
tree-affine.h
tree-call-cdce.c
tree-cfg.c Improve -fprofile-report 2021-11-28 19:25:33 +01:00
tree-cfg.h
tree-cfgcleanup.c
tree-cfgcleanup.h
tree-chrec.c Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
tree-chrec.h
tree-complex.c
tree-core.h pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
tree-data-ref.c tree-optimization/103361 - fix unroll-and-jam direction vector handling 2021-11-23 11:04:34 +01:00
tree-data-ref.h
tree-dfa.c
tree-dfa.h
tree-diagnostic-path.cc
tree-diagnostic.c
tree-diagnostic.h
tree-dump.c
tree-dump.h
tree-eh.c middle-end/103248 - fix RDIV_EXPR handling with fixed point 2021-11-19 09:35:57 +01:00
tree-eh.h
tree-emutls.c
tree-hash-traits.h
tree-hasher.h
tree-if-conv.c Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
tree-if-conv.h
tree-inline.c inliner: Remove unused transform_lang_insert_block hook 2021-11-23 11:03:44 +01:00
tree-inline.h inliner: Remove unused transform_lang_insert_block hook 2021-11-23 11:03:44 +01:00
tree-into-ssa.c Replace more DEBUG_EXPR_DECL creations with build_debug_expr_decl 2021-11-16 10:45:46 +01:00
tree-into-ssa.h
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c Reduce scope of a few 'class loop *loop' variables 2021-11-24 21:38:11 +01:00
tree-nested.c
tree-nested.h
tree-nrv.c
tree-object-size.c tree-optimization/103456 - Record only successes from object_sizes_set 2021-12-01 13:57:50 +05:30
tree-object-size.h
tree-outof-ssa.c
tree-outof-ssa.h
tree-parloops.c
tree-parloops.h
tree-pass.h Implement -Winfinite-recursion [PR88232]. 2021-11-23 15:36:03 -07:00
tree-phinodes.c
tree-phinodes.h
tree-predcom.c
tree-pretty-print.c
tree-pretty-print.h
tree-profile.c
tree-scalar-evolution.c
tree-scalar-evolution.h
tree-sra.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-sra.h
tree-ssa-address.c
tree-ssa-address.h
tree-ssa-alias-compare.h
tree-ssa-alias.c Avoid some -Wunreachable-code-ctrl 2021-11-30 08:23:26 +01:00
tree-ssa-alias.h
tree-ssa-ccp.c Enhance optimize_atomic_bit_test_and to handle truncation. 2021-11-24 09:00:58 +08:00
tree-ssa-ccp.h
tree-ssa-coalesce.c
tree-ssa-coalesce.h
tree-ssa-copy.c
tree-ssa-dce.c tree-optimization/103458 - avoid creating new loops in CD-DCE 2021-11-29 09:20:27 +01:00
tree-ssa-dce.h
tree-ssa-dom.c
tree-ssa-dom.h
tree-ssa-dse.c Improve bytewise DSE 2021-11-23 10:57:14 +01:00
tree-ssa-dse.h tree-optimization/103277 - do abnormal cleanup after call DSE 2021-11-18 10:02:17 +01:00
tree-ssa-forwprop.c
tree-ssa-ifcombine.c
tree-ssa-live.c
tree-ssa-live.h
tree-ssa-loop-ch.c
tree-ssa-loop-im.c tree-optimization/102436 - restore loop store motion 2021-11-19 09:35:21 +01:00
tree-ssa-loop-ivcanon.c
tree-ssa-loop-ivopts.c ivopts: Improve code generated for very simple loops. 2021-11-26 17:22:10 +00:00
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.c
tree-ssa-loop-manip.h
tree-ssa-loop-niter.c Final value replacement improvements for until-wrap loops. 2021-12-01 19:58:40 +00:00
tree-ssa-loop-niter.h
tree-ssa-loop-prefetch.c
tree-ssa-loop-split.c
tree-ssa-loop-unswitch.c
tree-ssa-loop.c
tree-ssa-loop.h
tree-ssa-math-opts.c Tweak tree-ssa-math-opts.c to solve PR target/102117. 2021-11-21 11:40:08 +00:00
tree-ssa-math-opts.h
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phiopt.c middle-end: Fix failures with bitclear patterns on signed values 2021-11-24 06:39:05 +00:00
tree-ssa-phiprop.c
tree-ssa-pre.c Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
tree-ssa-propagate.c
tree-ssa-propagate.h
tree-ssa-reassoc.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-ssa-reassoc.h
tree-ssa-sccvn.c tree-optimization/103168 - Improve VN of pure function calls 2021-11-24 12:40:36 +01:00
tree-ssa-sccvn.h
tree-ssa-scopedtables.c
tree-ssa-scopedtables.h
tree-ssa-sink.c Remove can_throw_non_call_exceptions special case from operator_div::wi_fold. 2021-11-30 11:23:27 +01:00
tree-ssa-strlen.c Avoid assuming maximum string length is constant [PR102960]. 2021-11-16 09:18:25 -07:00
tree-ssa-strlen.h
tree-ssa-structalias.c
tree-ssa-tail-merge.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-ssa-ter.c
tree-ssa-ter.h
tree-ssa-threadbackward.c
tree-ssa-threadedge.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-ssa-threadedge.h
tree-ssa-threadupdate.c
tree-ssa-threadupdate.h
tree-ssa-uncprop.c
tree-ssa-uninit.c
tree-ssa.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-ssa.h
tree-ssanames.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-ssanames.h
tree-stdarg.c
tree-stdarg.h
tree-streamer-in.c
tree-streamer-out.c
tree-streamer.c
tree-streamer.h
tree-switch-conversion.c
tree-switch-conversion.h
tree-tailcall.c
tree-vect-data-refs.c vect: Support gather loads with SLP 2021-11-30 09:52:29 +00:00
tree-vect-generic.c
tree-vect-loop-manip.c Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." 2021-11-19 15:29:35 +01:00
tree-vect-loop.c tree-optimization/103489 - fix ICE when bool pattern recog fails 2021-11-30 15:01:25 +01:00
tree-vect-patterns.c vect: Make reduction code handle calls 2021-11-30 09:52:24 +00:00
tree-vect-slp-patterns.c middle-end: Handle FMA_CONJ correctly after SLP layout update. 2021-11-19 15:12:38 +00:00
tree-vect-slp.c tree-optimization/103544 - SLP reduction chain as SLP reduction issue 2021-12-06 12:53:43 +01:00
tree-vect-stmts.c tree-optimization/103581 - fix masked gather on x86 2021-12-06 16:17:05 +01:00
tree-vector-builder.c
tree-vector-builder.h
tree-vectorizer.c Reduce scope of a few 'class loop *loop' variables 2021-11-24 21:38:11 +01:00
tree-vectorizer.h sve: combine nested if predicates 2021-12-03 15:25:44 +00:00
tree-vrp.c Remove more stray returns and gcc_unreachable ()s 2021-11-30 15:05:12 +01:00
tree-vrp.h
tree.c middle-end: move bitmask match.pd pattern and update tests 2021-12-01 08:40:25 +00:00
tree.def
tree.h Remove unreachable gcc_unreachable () at the end of functions 2021-11-29 11:18:35 +01:00
treestruct.def
tristate.cc
tristate.h
tsan.c
tsan.h
tsystem.h
typeclass.h
typed-splay-tree.c
typed-splay-tree.h
ubsan.c
ubsan.h
unique-ptr-tests.cc
valtrack.c
valtrack.h
value-pointer-equiv.cc
value-pointer-equiv.h
value-prof.c
value-prof.h
value-query.cc
value-query.h
value-range-equiv.cc
value-range-equiv.h
value-range.cc ranger: Optimise irange_union 2021-12-06 18:29:30 +00:00
value-range.h
value-relation.cc
value-relation.h
var-tracking.c
varasm.c Add TARGET_IFUNC_REF_LOCAL_OK 2021-12-03 05:12:30 -08:00
varasm.h Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
varpool.c Turn -fsemantic-interposition to optimization flag 2021-11-18 18:42:35 +01:00
vec-perm-indices.c Avoid some -Wunreachable-code-ctrl 2021-11-30 08:23:26 +01:00
vec-perm-indices.h
vec.c Remove unreachable returns 2021-11-29 11:17:22 +01:00
vec.h
vector-builder.h
vmsdbg.h
vmsdbgout.c
vr-values.c
vr-values.h
vtable-verify.c
vtable-verify.h
warning-control.cc
web.c
wide-int-bitmask.h
wide-int-print.cc
wide-int-print.h
wide-int.cc
wide-int.h
xcoff.h
xcoffout.c
xcoffout.h

Copyright (C) 2000-2021 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
---------------

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.