gcc/gcc
Petar Jovanovic 8d92d2743c mips.h (CRT_CALL_STATIC_FUNCTION): Fix the macro to use la/jalr instead of jal.
gcc/ChangeLog:

2015-04-21  Petar Jovanovic  <petar.jovanovic@rt-rk.com>

	* config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Fix the macro to use
	la/jalr instead of jal.

gcc/testsuite/ChangeLog:

2015-04-21  Petar Jovanovic  <petar.jovanovic@rt-rk.com>

	* gcc.target/mips/call-from-init.c: New test.
	* gcc.target/mips/mips.exp: Add section_start to mips_option_groups.

From-SVN: r222589
2015-04-29 16:28:52 -04:00
..
ada Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1. 2015-04-27 15:59:06 -07:00
c Add OMP_STANDALONE_CLAUSES. 2015-04-29 17:44:41 +02:00
c-family re PR c/64610 (No -Wbool-compare warning on "(0 != a) >= 0") 2015-04-29 18:13:44 +00:00
common [AArch64] Increase static buffer size in aarch64_rewrite_selected_cpu 2015-04-21 08:14:22 +00:00
config mips.h (CRT_CALL_STATIC_FUNCTION): Fix the macro to use la/jalr instead of jal. 2015-04-29 16:28:52 -04:00
cp Add OMP_STANDALONE_CLAUSES. 2015-04-29 17:44:41 +02:00
doc extend.texi (Declaring Attributes of Functions): Split into subsections by target. 2015-04-28 16:15:59 -04:00
fortran interface.c (gfc_compare_types): Check for unlimited polymorphism flag in the correct position indepent of the... 2015-04-28 21:03:01 +02:00
ginclude
go Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1. 2015-04-27 15:59:06 -07:00
java remove need for store_values_directly 2015-04-18 18:13:18 +00:00
jit Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1. 2015-04-27 15:59:06 -07:00
lto remove need for store_values_directly 2015-04-18 18:13:18 +00:00
objc Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1. 2015-04-27 15:59:06 -07:00
objcp Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1. 2015-04-27 15:59:06 -07:00
po * fr.po: Update. 2015-04-28 22:21:24 +01:00
testsuite mips.h (CRT_CALL_STATIC_FUNCTION): Fix the macro to use la/jalr instead of jal. 2015-04-29 16:28:52 -04:00
ABOUT-GCC-NLS
acinclude.m4
aclocal.m4
addresses.h
alias.c always define HAVE_epilogue 2015-04-28 04:45:12 +00:00
alias.h
alloc-pool.c
alloc-pool.h
asan.c Allow wildcards in -fsanitize-sections. 2015-04-22 11:44:26 +00:00
asan.h asan.c (set_sanitized_sections): New function. 2015-04-17 07:51:02 +00:00
attribs.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
attribs.h
auto-inc-dec.c
auto-profile.c
auto-profile.h
BASE-VER * BASE-VER: Set to 6.0.0. 2015-04-12 21:46:43 +02:00
basic-block.h
bb-reorder.c always define HAVE_simple_return and HAVE_return 2015-04-28 04:44:09 +00:00
bb-reorder.h
bitmap.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
bitmap.h
bt-load.c
builtin-attrs.def
builtin-types.def
builtins.c add default definition of EH_RETURN_DATA_REGNO 2015-04-22 00:44:08 +00:00
builtins.def
builtins.h
caller-save.c remove more ifdefs for HAVE_cc0 2015-04-22 00:45:06 +00:00
calls.c remove #if ARGS_GROW_DOWNWARD 2015-04-28 04:47:09 +00:00
calls.h
ccmp.c
ccmp.h
cfg-flags.def
cfg.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
cfg.h
cfganal.c
cfganal.h
cfgbuild.c
cfgbuild.h
cfgcleanup.c remove more ifdefs for HAVE_cc0 2015-04-22 00:45:06 +00:00
cfgcleanup.h
cfgexpand.c cfgexpand.c (expand_gimple_stmt_1): Use ops.code. 2015-04-23 08:30:04 +00:00
cfgexpand.h
cfghooks.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
cfghooks.h cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
cfgloop.c cfgexpand.c (expand_gimple_stmt_1): Use ops.code. 2015-04-23 08:30:04 +00:00
cfgloop.h
cfgloopanal.c
cfgloopmanip.c
cfgloopmanip.h
cfgrtl.c always define HAVE_epilogue 2015-04-28 04:45:12 +00:00
cfgrtl.h
cgraph.c
cgraph.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
cgraphbuild.c
cgraphclones.c
cgraphunit.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
ChangeLog mips.h (CRT_CALL_STATIC_FUNCTION): Fix the macro to use la/jalr instead of jal. 2015-04-29 16:28:52 -04: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
cilk.h
cilkplus.def
collect2-aix.c
collect2-aix.h
collect2.c
collect2.h
collect-utils.c
collect-utils.h
combine-stack-adj.c
combine.c [combine][obvious] Use std::swap instead of manually swapping 2015-04-27 14:56:10 +00:00
common.md
common.opt asan.c (set_sanitized_sections): New function. 2015-04-17 07:51:02 +00:00
compare-elim.c
conditions.h Re: [PATCH 02/12] remove some ifdef HAVE_cc0. 2015-04-23 10:34:58 +00:00
config.build
config.gcc re PR target/63503 ([AArch64] A57 executes fused multiply-add poorly in some situations) 2015-04-28 08:10:44 +00:00
config.host [AArch64] Implement -m{cpu,tune,arch}=native using only /proc/cpuinfo 2015-04-24 14:52:47 +00:00
config.in re PR target/65810 (powerpc64 alignment of r2 insufficient for loading long-double constants) 2015-04-28 13:17:19 +09:30
configure re PR target/65810 (powerpc64 alignment of r2 insufficient for loading long-double constants) 2015-04-28 13:17:19 +09:30
configure.ac re PR target/65810 (powerpc64 alignment of r2 insufficient for loading long-double constants) 2015-04-28 13:17:19 +09:30
context.c
context.h
convert.c
convert.h
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
coretypes.h
coverage.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
coverage.h
cppbuiltin.c
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c re PR rtl-optimization/34503 (Issues with constant/copy propagation implementation in gcse.c) 2015-04-24 04:49:34 +00:00
cse.c add default for NO_FUNCTION_CSE 2015-04-28 04:40:00 +00:00
cselib.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
cselib.h
cstamp-h.in
data-streamer-in.c
data-streamer-out.c
data-streamer.c
data-streamer.h
DATESTAMP Daily bump. 2015-04-29 00:16:15 +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 always define ARGS_GROW_DOWNWARD 2015-04-28 04:46:20 +00:00
DEV-PHASE
df-core.c df-core.c (df_finish_pass): Iterate over df->problems_by_index[] and use df_remove_problem rather than... 2015-04-21 10:23:25 +00:00
df-problems.c remove more ifdefs for HAVE_cc0 2015-04-22 00:45:06 +00:00
df-scan.c always define HAVE_epilogue 2015-04-28 04:45:12 +00:00
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h
diagnostic.c
diagnostic.def
diagnostic.h
dojump.c
dojump.h
dominance.c
dominance.h
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
dumpfile.c
dumpfile.h
dwarf2asm.c
dwarf2asm.h
dwarf2cfi.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
dwarf2out.c add default for PCC_BITFIELD_TYPE_MATTERS 2015-04-28 04:42:04 +00:00
dwarf2out.h
emit-rtl.c reduce conditional compilation for HARD_FRAME_POINTER_IS_FRAME_POINTER 2015-04-22 00:44:54 +00:00
emit-rtl.h function.h (struct emit_status): Delete x_first_insn, x_last_insn and sequence_stack. 2015-04-15 15:35:44 +09:30
errors.c
errors.h
et-forest.c
et-forest.h
except.c cfgexpand.c (expand_gimple_stmt_1): Use ops.code. 2015-04-23 08:30:04 +00:00
except.h
exec-tool.in
explow.c
explow.h
expmed.c [expmed] Properly account for the cost and latency of shift+add ops when synthesizing mults 2015-04-21 12:56:39 +00:00
expmed.h
expr.c expr.c (expand_assignment): Force an address offset computation into a register before changing its mode. 2015-04-14 16:12:34 +00:00
expr.h
fibonacci_heap.h
file-find.c
file-find.h
final.c Give proper type and size to named cold partitions. 2015-04-27 09:44:35 -07:00
fixed-value.c
fixed-value.h
flag-types.h
flags.h
fold-const.c Handle internal_fn in operand_equal_p 2015-04-17 09:26:50 +00:00
fold-const.h
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function.c re PR middle-end/65911 (r222508 breaks clang-tblgen) 2015-04-28 10:09:43 +00:00
function.h Fix fdump-passes 2015-04-15 18:43:32 +00:00
fwprop.c
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 gcov.c (find_source): Fix miswording in error message. 2015-04-11 12:08:26 +00:00
gcse-common.c
gcse-common.h
gcse.c remove more ifdefs for HAVE_cc0 2015-04-22 00:45:06 +00:00
gcse.h
gdbasan.in
gdbhooks.py
gdbinit.in
gen-pass-instances.awk
genattr-common.c
genattr.c
genattrtab.c
genautomata.c
gencheck.c
genchecksum.c
gencodes.c
genconditions.c
genconfig.c always define HAVE_cc0 2015-04-22 00:44:27 +00:00
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
gengtype.c
gengtype.h
genhooks.c
genmatch.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
genmddeps.c
genmddump.c
genmodes.c
genmultilib
genopinit.c
genoutput.c
genpeep.c
genpreds.c re PR target/65689 ([AArch64] S constraint fails for inline asm at -O0) 2015-04-17 18:43:28 +02:00
genrecog.c Makefile.in (build/genrecog.o): Depend on inchash.h. 2015-04-29 13:32:59 +00:00
gensupport.c gensupport.c (std_preds): Add missing codes to address_operand entry. 2015-04-28 07:46:40 +00:00
gensupport.h
ggc-common.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
ggc-internal.h
ggc-none.c
ggc-page.c
ggc.h
gimple-builder.c
gimple-builder.h
gimple-expr.c
gimple-expr.h
gimple-fold.c re PR tree-optimization/65650 (CCP does not propgate copies) 2015-04-21 12:52:43 +00:00
gimple-fold.h gimple-fold.h (gimple_build): Remove optional valueize arguments. 2015-04-20 13:23:59 +00:00
gimple-iterator.c Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
gimple-iterator.h Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
gimple-low.c
gimple-low.h
gimple-match-head.c re PR tree-optimization/65650 (CCP does not propgate copies) 2015-04-21 12:52:43 +00:00
gimple-match.h re PR tree-optimization/65650 (CCP does not propgate copies) 2015-04-21 12:52:43 +00:00
gimple-pretty-print.c
gimple-pretty-print.h
gimple-ssa-isolate-paths.c
gimple-ssa-strength-reduction.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
gimple-ssa.h
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple-walk.c gimple-walk.c #include TLC 2015-04-29 12:45:31 +02:00
gimple-walk.h
gimple.c
gimple.def
gimple.h
gimplify-me.c
gimplify-me.h
gimplify.c Add OMP_STANDALONE_CLAUSES. 2015-04-29 17:44:41 +02:00
gimplify.h Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
glimits.h
godump.c
graph.c
graph.h
graphds.c
graphds.h
graphite-blocking.c
graphite-dependences.c
graphite-interchange.c
graphite-isl-ast-to-gimple.c
graphite-isl-ast-to-gimple.h
graphite-optimize-isl.c
graphite-poly.c
graphite-poly.h
graphite-scop-detection.c graphite-scop-detection.c: Do not include cp/cp-tree.h. 2015-04-14 12:33:57 +00:00
graphite-scop-detection.h
graphite-sese-to-poly.c
graphite-sese-to-poly.h
graphite.c
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.c make some HAVE_cc0 code always compiled 2015-04-22 00:44:37 +00:00
hard-reg-set.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
hash-map.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
hash-set.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
hash-table.c
hash-table.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
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
ifcvt.h
inchash.c inchash.h, inchash.c: Include bconfig.h for build objects. 2015-04-29 13:32:34 +00:00
inchash.h inchash.h, inchash.c: Include bconfig.h for build objects. 2015-04-29 13:32:34 +00:00
incpath.c
incpath.h
init-regs.c
input.c
input.h re PR c/61534 (Wlogical-op should not warn when either operand comes from macro expansion) 2015-04-24 11:49:52 +00:00
insn-addr.h
insn-notes.def
internal-fn.c Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00:00
internal-fn.def Mark ifn_va_arg as ECF_LEAF 2015-04-26 07:13:13 +00:00
internal-fn.h
intl.c
intl.h
ipa-chkp.c
ipa-chkp.h
ipa-comdats.c ipa-comdats.c (propagate_comdat_group): Walk through thunks. 2015-04-08 13:45:20 +00:00
ipa-cp.c ipa-cp.c (ipcp_driver): Relase prev_edge. 2015-04-13 06:27:57 +00:00
ipa-devirt.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
ipa-icf-gimple.c re PR ipa/65765 (Compiling Firefox with GCC 5 leads to broken javascript engine on x86-64) 2015-04-15 13:47:44 +02:00
ipa-icf-gimple.h
ipa-icf.c * ipa-icf.c (icf_handled_component_p): Remove redundant tests. 2015-04-27 10:10:47 +00:00
ipa-icf.h ipa-icf.c (sem_function::equals_wpa): Compare thunk info. 2015-04-24 00:58:25 +00:00
ipa-inline-analysis.c
ipa-inline-transform.c re PR middle-end/65743 (LTO+FDO build of Firefox crashes at startup) 2015-04-12 05:44:52 +00:00
ipa-inline.c ipa-inline.c (can_inline_edge_p): Allow inlining of functions with same attributes. 2015-04-17 08:50:08 +02:00
ipa-inline.h
ipa-polymorphic-call.c
ipa-profile.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
ipa-prop.c re PR middle-end/65743 (LTO+FDO build of Firefox crashes at startup) 2015-04-12 05:44:52 +00:00
ipa-prop.h
ipa-pure-const.c
ipa-ref.c
ipa-ref.h
ipa-reference.c Fix IPA memory leaks. 2015-04-17 13:56:15 +00:00
ipa-reference.h
ipa-split.c tree-chkp.h (chkp_insert_retbnd_call): New. 2015-04-08 10:44:59 +00:00
ipa-utils.c
ipa-utils.h
ipa-visibility.c
ipa.c
ira-build.c
ira-color.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
ira-conflicts.c
ira-costs.c ira-costs.c (record_operand_costs): Fix typo (remove redundant code). 2015-04-23 00:43:30 +00:00
ira-emit.c
ira-int.h
ira-lives.c add default definition of EH_RETURN_DATA_REGNO 2015-04-22 00:44:08 +00:00
ira.c remove more ifdefs for HAVE_cc0 2015-04-22 00:45:06 +00:00
ira.h
is-a.h
jump.c remove some ifdef HAVE_cc0 2015-04-22 00:44:15 +00:00
langhooks-def.h
langhooks.c
langhooks.h
LANGUAGES
lcm.c
lcm.h
libfuncs.h
limitx.h
limity.h
lists.c
lock-and-run.sh
loop-doloop.c
loop-init.c cfgexpand.c (expand_gimple_stmt_1): Use ops.code. 2015-04-23 08:30:04 +00:00
loop-invariant.c make some HAVE_cc0 code always compiled 2015-04-22 00:44:37 +00:00
loop-iv.c loop-iv.c (canon_condition): Generalize to all types of integer constant. 2015-04-29 11:12:17 +00:00
loop-unroll.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
loop-unroll.h
lower-subreg.c
lower-subreg.h
lra-assigns.c re PR target/65710 (Thumb1 ICE caused by no register to spill) 2015-04-10 19:38:55 +00:00
lra-coalesce.c
lra-constraints.c make some HAVE_cc0 code always compiled 2015-04-22 00:44:37 +00:00
lra-eliminations.c re PR rtl-optimization/65805 (Chromium gets miscompiled) 2015-04-19 23:48:24 +00:00
lra-int.h re PR target/65710 (Thumb1 ICE caused by no register to spill) 2015-04-09 19:40:09 +00:00
lra-lives.c add default definition of EH_RETURN_DATA_REGNO 2015-04-22 00:44:08 +00:00
lra-remat.c re PR debug/65678 (internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:909) 2015-04-07 15:01:07 +00:00
lra-spills.c re PR rtl-optimization/65805 (Chromium gets miscompiled) 2015-04-19 23:48:24 +00:00
lra.c re PR target/65710 (Thumb1 ICE caused by no register to spill) 2015-04-09 19:40:09 +00:00
lra.h
lto-cgraph.c
lto-compress.c
lto-compress.h
lto-opts.c
lto-section-in.c
lto-section-names.h
lto-section-out.c
lto-streamer-in.c
lto-streamer-out.c
lto-streamer.c
lto-streamer.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
lto-wrapper.c
machmode.def
machmode.h
main.c
Makefile.in Makefile.in (build/genrecog.o): Depend on inchash.h. 2015-04-29 13:32:59 +00:00
match.pd re PR other/63387 (Optimize pairs of isnan() calls into a single isunordered()) 2015-04-14 08:49:16 +00:00
mcf.c
mkconfig.sh
mode-classes.def
mode-switching.c
modulo-sched.c
omega.c
omega.h
omp-builtins.def
omp-low.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
omp-low.h
ONEWS
opt-functions.awk
opt-gather.awk
opt-include.awk
opt-read.awk
optabs.c always define HAVE_cc0 2015-04-22 00:44:27 +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 asan.c (set_sanitized_sections): New function. 2015-04-17 07:51:02 +00:00
opts.c
opts.h
output.h Properly handle uninitialized common symbol 2015-04-17 09:23:24 -07:00
params.c
params.def
params.h
pass_manager.h
passes.c Fix fdump-passes 2015-04-15 18:43:32 +00:00
passes.def Move pass_stdarg to after pass_dce in pass_all_optimizations 2015-04-29 09:13:49 +00:00
plugin.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
plugin.def
plugin.h
postreload-gcse.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
postreload.c make some HAVE_cc0 code always compiled 2015-04-22 00:44:37 +00:00
predict.c
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c
print-rtl.h
print-tree.c
print-tree.h
profile.c
profile.h
read-md.c
read-md.h
read-rtl.c
README.Portability
real.c
real.h
realmpfr.c
realmpfr.h
recog.c remove some ifdef HAVE_cc0 2015-04-22 00:44:15 +00:00
recog.h remove some ifdef HAVE_cc0 2015-04-22 00:44:15 +00:00
ree.c
reg-notes.def
reg-stack.c
regcprop.c
regcprop.h
reginfo.c reduce conditional compilation for HARD_FRAME_POINTER_IS_FRAME_POINTER 2015-04-22 00:44:54 +00:00
regrename.c add default for HARD_REGNO_RENAME_OK 2015-04-28 04:40:43 +00:00
regrename.h
regs.h
regset.h
regstat.c
reload1.c reduce conditional compilation for HARD_FRAME_POINTER_IS_FRAME_POINTER 2015-04-22 00:44:54 +00:00
reload.c make some HAVE_cc0 code always compiled 2015-04-22 00:44:37 +00:00
reload.h
reorg.c always define HAVE_epilogue 2015-04-28 04:45:12 +00:00
resource.c add default for EPILOGUE_USES 2015-04-28 04:43:12 +00:00
resource.h
rtl-chkp.c
rtl-chkp.h
rtl-error.c
rtl-error.h
rtl-iter.h Update copyright years. 2015-01-05 13:33:28 +01:00
rtl.c
rtl.def
rtl.h
rtlanal.c remove more ifdef HAVE_cc0 2015-04-22 00:44:20 +00:00
rtlhash.c
rtlhash.h
rtlhooks-def.h
rtlhooks.c
sanitizer.def
sanopt.c
sbitmap.c
sbitmap.h
sched-deps.c remove more ifdefs for HAVE_cc0 2015-04-22 00:45:06 +00:00
sched-ebb.c
sched-int.h
sched-rgn.c make some HAVE_cc0 code always compiled 2015-04-22 00:44:37 +00:00
sched-vis.c
sdbout.c
sdbout.h
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c
sel-sched-ir.h
sel-sched.c add default for HARD_REGNO_RENAME_OK 2015-04-28 04:40:43 +00:00
sel-sched.h
sese.c
sese.h
shrink-wrap.c always define HAVE_simple_return and HAVE_return 2015-04-28 04:44:09 +00:00
shrink-wrap.h always define HAVE_simple_return and HAVE_return 2015-04-28 04:44:09 +00:00
signop.h
simplify-rtx.c [simplify-rtx][trivial] Use std::swap instead of manually swapping 2015-04-27 13:45:26 +00:00
sparseset.c
sparseset.h
sreal.c
sreal.h
ssa-iterators.h
stab.def
stack-ptr-mod.c
statistics.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
statistics.h
stmt.c re PR target/65689 ([AArch64] S constraint fails for inline asm at -O0) 2015-04-17 18:43:28 +02:00
stmt.h
stor-layout.c re PR c++/65734 (Yet another case of lost alignment by stor_layout) 2015-04-28 10:43:48 -04:00
stor-layout.h
store-motion.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
streamer-hooks.c
streamer-hooks.h
stringpool.c
stringpool.h
symbol-summary.h
symtab.c
sync-builtins.def
system.h
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target.def
target.h
targhooks.c remove #if ARGS_GROW_DOWNWARD 2015-04-28 04:47:09 +00:00
targhooks.h
timevar.c
timevar.def
timevar.h
tlink.c
toplev.c always define HAVE_epilogue 2015-04-28 04:45:12 +00:00
toplev.h
tracer.c
trans-mem.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
trans-mem.h
tree-affine.c
tree-affine.h
tree-browser.c
tree-browser.def
tree-call-cdce.c Fix example in header comment in tree-call-cdce.c 2015-04-28 08:46:37 +00:00
tree-cfg.c stor-layout.c (self_referential_component_ref_p): New predicate. 2015-04-27 10:29:07 +00:00
tree-cfg.h Add gimple_find_sub_bbs 2015-04-17 09:26:33 +00:00
tree-cfgcleanup.c
tree-cfgcleanup.h
tree-chkp-opt.c
tree-chkp.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
tree-chkp.h tree-chkp.h (chkp_insert_retbnd_call): New. 2015-04-08 10:44:59 +00:00
tree-chrec.c
tree-chrec.h
tree-complex.c
tree-core.h
tree-data-ref.c
tree-data-ref.h
tree-dfa.c
tree-dfa.h
tree-diagnostic.c
tree-diagnostic.h
tree-dump.c
tree-dump.h
tree-eh.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-eh.h
tree-emutls.c
tree-hasher.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-if-conv.c
tree-inline.c cfghooks.h (create_basic_block): Replace with two overloads for RTL and GIMPLE. 2015-04-21 11:40:46 +00:00
tree-inline.h
tree-into-ssa.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-into-ssa.h
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c
tree-nested.c
tree-nested.h
tree-nrv.c
tree-object-size.c
tree-object-size.h
tree-outof-ssa.c
tree-outof-ssa.h
tree-parloops.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-parloops.h
tree-pass.h Postpone expanding va_arg until pass_stdarg 2015-04-17 09:26:59 +00: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 remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-address.c
tree-ssa-address.h
tree-ssa-alias.c
tree-ssa-alias.h
tree-ssa-ccp.c re PR c++/65851 (ice in set_lattice_value at tree-ssa-cc p.c:535) 2015-04-28 07:26:41 +00:00
tree-ssa-coalesce.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-coalesce.h
tree-ssa-copy.c
tree-ssa-copyrename.c
tree-ssa-dce.c
tree-ssa-dom.c * tree-ssa-dom.c (record_equality); Fix comment typos. 2015-04-28 17:18:27 -06:00
tree-ssa-dom.h
tree-ssa-dse.c
tree-ssa-forwprop.c
tree-ssa-ifcombine.c
tree-ssa-live.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-live.h
tree-ssa-loop-ch.c re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-loop-im.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-loop-ivcanon.c
tree-ssa-loop-ivopts.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.c
tree-ssa-loop-manip.h
tree-ssa-loop-niter.c
tree-ssa-loop-niter.h
tree-ssa-loop-prefetch.c
tree-ssa-loop-unswitch.c
tree-ssa-loop.c
tree-ssa-loop.h
tree-ssa-math-opts.c
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phiopt.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-phiprop.c
tree-ssa-pre.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-propagate.c tree-ssa-ccp.c (likely_value): See if we have operands that are marked as never simulate again and return... 2015-04-16 07:55:57 +00:00
tree-ssa-propagate.h
tree-ssa-reassoc.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-sccvn.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-sccvn.h
tree-ssa-scopedtables.c re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-scopedtables.h re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-sink.c
tree-ssa-strlen.c
tree-ssa-structalias.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-tail-merge.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-ssa-ter.c
tree-ssa-ter.h
tree-ssa-threadedge.c re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-threadedge.h re PR tree-optimization/47679 (Strange uninitialized warning after SRA) 2015-04-17 13:24:17 -06:00
tree-ssa-threadupdate.c re PR tree-optimization/65658 (Jump threading too pessimistic when optimizing for size) 2015-04-20 13:35:50 -06:00
tree-ssa-threadupdate.h
tree-ssa-uncprop.c
tree-ssa-uninit.c
tree-ssa.c
tree-ssa.h
tree-ssanames.c
tree-ssanames.h
tree-stdarg.c Evaluate side-effects in expand_ifn_va_arg_1 2015-04-28 06:05:14 +00:00
tree-stdarg.h
tree-streamer-in.c
tree-streamer-out.c
tree-streamer.c
tree-streamer.h
tree-switch-conversion.c
tree-tailcall.c tree-tailcall.c (suitable_for_tail_opt_p, [...]): Remove unneeded forward declarations. 2015-04-22 10:20:32 +02:00
tree-vect-data-refs.c tree-vect-data-refs.c (vect_analyze_group_access): Properly compute GROUP_SIZE for basic-block SLP. 2015-04-29 08:15:52 +00:00
tree-vect-generic.c
tree-vect-loop-manip.c
tree-vect-loop.c
tree-vect-patterns.c
tree-vect-slp.c tree-vect-data-refs.c (vect_analyze_group_access): Properly compute GROUP_SIZE for basic-block SLP. 2015-04-29 08:15:52 +00:00
tree-vect-stmts.c re PR fortran/62283 (basic-block vectorization fails) 2015-04-28 08:30:44 +00:00
tree-vectorizer.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
tree-vectorizer.h tree-vect-slp.c (vect_find_first_load_in_slp_instance): Remove. 2015-04-23 08:43:10 +00:00
tree-vrp.c re PR tree-optimization/65875 (ICE: Segmentation fault) 2015-04-27 13:26:12 +02:00
tree.c re PR c++/50800 (Internal compiler error in finish_member_declarations, possibly related to may_alias attribute) 2015-04-24 15:11:45 -04:00
tree.def
tree.h Add OMP_STANDALONE_CLAUSES. 2015-04-29 17:44:41 +02:00
treestruct.def
tsan.c
tsan.h
tsystem.h
typeclass.h
ubsan.c re PR tree-optimization/65709 (Bad code for LZ4 decompression with -O3 on x86_64) 2015-04-09 21:51:08 +02:00
ubsan.h
valtrack.c re PR debug/65678 (internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:909) 2015-04-07 16:35:18 +02:00
valtrack.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
value-prof.c
value-prof.h
var-tracking.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
varasm.c re PR bootstrap/65910 (r222473 breaks x86_64 darwin bootstrap) 2015-04-28 13:16:19 -04:00
varasm.h Give proper type and size to named cold partitions. 2015-04-27 09:44:35 -07:00
varpool.c
vec.c
vec.h vec.h (vec): Make splice arguments const. 2015-04-27 09:55:21 +00:00
version.c
version.h
vmsdbg.h
vmsdbgout.c
vtable-verify.c remove need for store_values_directly 2015-04-18 18:13:18 +00:00
vtable-verify.h remove need for store_values_directly 2015-04-18 18:13:18 +00:00
web.c
wide-int-print.cc
wide-int-print.h
wide-int.cc
wide-int.h
xcoff.h
xcoffout.c
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.