8sa1-gcc/gcc
Franz Sirl 15a7ee9ff6 objc.exp (objc_target_compile): Add ${rootme} to ld_library_path variable.
2001-06-13  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

        * lib/objc.exp (objc_target_compile): Add ${rootme} to ld_library_path
        variable.

From-SVN: r43351
2001-06-13 21:56:12 +00:00
..
ch Makefile.in (c-parse.o): Depend on diagnostic.h 2001-06-10 13:48:04 +00:00
config h8300.h (OK_FOR_T): Remove. 2001-06-13 17:41:19 +00:00
cp * NEWS: Update release number. 2001-06-13 18:38:01 +00:00
doc contrib.texi: Link to libstdc++'s thanks.html for now. 2001-06-13 15:15:24 +00:00
f BUGS: Remove. 2001-06-13 18:29:38 +00:00
fixinc reorganize inclhacks and apply fix to fixtests.c 2001-05-27 18:21:04 +00:00
ginclude Add Darwin (Mac OS X kernel) native support. 2001-04-12 02:13:00 +00:00
intl * po2tbl.sed.in: Fixed typo. 2001-05-25 17:47:18 -07:00
java re PR java/2299 (Use of += for String arrays produces Segfault during compilation) 2001-06-10 11:45:06 -07:00
objc * objc/objc.gperf: Remove, no longer used. 2001-05-28 23:56:18 +00:00
po POTFILES.in: Comment out config/float-*. 2001-06-11 23:00:39 +00:00
testsuite objc.exp (objc_target_compile): Add ${rootme} to ld_library_path variable. 2001-06-13 21:56:12 +00:00
.cvsignore
ABOUT-GCC-NLS ABOUT-GCC-NLS: Now that gettext 0.10.37 is out, require it instead of the CVS version. 2001-04-22 22:33:45 +00:00
ABOUT-NLS
acconfig.h
aclocal.m4 aclocal.m4: Quote final argument of patsubst. 2001-05-26 04:54:42 +00:00
alias.c tree.def (ARRAY_RANGE_REF): New code. 2001-06-04 09:21:38 -04:00
basic-block.h basic-block.h: Improve comments. 2001-06-08 21:54:11 +00:00
bb-reorder.c IA-64 ABI Exception Handling. 2001-03-28 03:04:51 -08:00
bitmap.c bitmap.c: Change NULL_PTR to NULL or "(rtx*)0". 2001-05-01 12:11:35 +00:00
bitmap.h Standardize header guards. 2001-05-25 18:31:47 -07:00
build-make config.gcc: Don't default xmake_file to ${cpu_type}/x-${cpu_type}. 2001-05-01 17:45:05 +00:00
builtin-types.def builtins.def: Encode additional information, such as names and types, here. 2001-05-25 20:00:59 +00:00
builtins.c builtins.def: Encode additional information, such as names and types, here. 2001-05-25 20:00:59 +00:00
builtins.def builtins.def: Fix definition of __builtin_cosf, it uses float as parameter and return value. 2001-06-05 18:02:56 +02:00
c-aux-info.c c-aux-info.c: NULL_PTR->NULL in calls to `concat'. 2001-04-29 12:43:20 +00:00
c-common.c c-common.h (flag_dump_translation_unit): Remove. 2001-06-05 08:03:45 +00:00
c-common.def
c-common.h c-common.h (flag_dump_translation_unit): Remove. 2001-06-05 08:03:45 +00:00
c-convert.c c-convert.c (convert): When converting to a BOOLEAN_TYPE, avoid passing nested NOP_EXPRs to fold. 2001-04-23 23:55:32 +01:00
c-decl.c c-decl.c (grokdeclarator): Use INTEGRAL_TYPE_P. 2001-06-12 12:15:46 +00:00
c-dump.c c-common.h (flag_dump_translation_unit): Remove. 2001-06-05 08:03:45 +00:00
c-dump.h c-common.h (flag_dump_translation_unit): Remove. 2001-06-05 08:03:45 +00:00
c-errors.c
c-format.c c-format.c (check_format_info_recurse): Handle PLUS_EXPR for format string. 2001-04-25 23:18:20 +02:00
c-lang.c c-common.h (flag_dump_translation_unit): Remove. 2001-06-05 08:03:45 +00:00
c-lex.c c-lex.c (read_escape, read_ucs): Delete. 2001-05-23 19:05:37 +00:00
c-lex.h Standardize header guards. 2001-05-25 18:31:47 -07:00
c-parse.in Makefile.in (c-parse.o): Depend on diagnostic.h 2001-06-10 13:48:04 +00:00
c-pragma.c
c-pragma.h Standardize header guards. 2001-05-25 18:31:47 -07:00
c-semantics.c stmt.c (current_nesting_level): New fn. 2001-06-08 14:12:54 -04:00
c-tree.h c-tree.h (lang_decl): Add pending_sizes fields. 2001-06-05 06:51:02 +00:00
c-typeck.c c-decl.c (grokdeclarator): Use INTEGRAL_TYPE_P. 2001-06-12 12:15:46 +00:00
caller-save.c Use byte offsets in SUBREGs instead of words. 2001-04-03 15:06:12 +00:00
calls.c * calls.c (store_one_arg): Don't divide align by BITS_PER_UNIT. 2001-05-04 21:30:51 -04:00
ChangeLog * NEWS: Remove. 2001-06-13 18:35:53 +00:00
ChangeLog.0
ChangeLog.1
ChangeLog.2
ChangeLog.3
ChangeLog.4
ChangeLog.lib
collect2.c *** empty log message *** 2001-04-27 19:59:53 +00:00
collect2.h Standardize header guards. 2001-05-25 18:31:47 -07:00
combine.c predict.def: New file. 2001-06-09 22:39:25 +00:00
conditions.h
config.gcc * config.gcc: Re-enable bi-arch sparc on Solaris 7 and above. 2001-06-09 20:37:29 +00:00
config.guess
config.in aclocal.m4: Quote final argument of patsubst. 2001-05-26 04:54:42 +00:00
configure revert: configure.in (sparc*-*-*): Check assembler R_SPARC_UA32 support. 2001-06-13 03:10:44 +00:00
configure.frag
configure.in revert: configure.in (sparc*-*-*): Check assembler R_SPARC_UA32 support. 2001-06-13 03:10:44 +00:00
conflict.c
convert.c
convert.h
COPYING
COPYING.LIB
cppdefault.c cppdefault.c (GPLUSPLUS_BACKWARD_INCLUDE_DIR): Add. 2001-04-06 06:13:27 +00:00
cppdefault.h Standardize header guards. 2001-05-25 18:31:47 -07:00
cpperror.c ABOUT-GCC-NLS: Now that gettext 0.10.37 is out, require it instead of the CVS version. 2001-04-22 22:33:45 +00:00
cppexp.c cppexp.c (lex): Use NODE_NAME and NODE_LEN. 2001-05-16 22:02:09 +00:00
cppfiles.c cppfiles.c (remove_component_p): Don't assume lstat/stat will keep errno unchanged on success. 2001-05-22 11:57:21 +00:00
cpphash.c * cpphash.c (alloc_node): Cast pointer. 2001-05-30 21:09:15 +00:00
cpphash.h Standardize header guards. 2001-05-25 18:31:47 -07:00
cppinit.c cppinit.c (print_help): Document -fpreprocessed. 2001-06-09 22:55:49 +00:00
cpplex.c cpplex.c (_cpp_lex_token): Revert patch of 16 May 2001 so that we do accept comments in preprocessed input. 2001-05-30 21:22:00 +00:00
cpplib.c * cpplib.c (run_directive): Set pfile->directive. 2001-05-27 18:06:00 +00:00
cpplib.h Standardize header guards. 2001-05-25 18:31:47 -07:00
cppmacro.c Makefile.in (OBJS, [...]): Update. 2001-05-20 06:26:45 +00:00
cppmain.c Makefile.in (OBJS, [...]): Update. 2001-05-20 06:26:45 +00:00
cppspec.c
cross-make i * libgcc1-test.c, libgcc1.c, config/i386/perform.h: Delete file. 2001-05-17 03:16:18 +00:00
crtstuff.c unwind-dw2-fde.c (__deregister_frame_info): Stubbify in favour of... 2001-05-22 16:01:33 -07:00
cse.c cse.c (fold_rtx): Use simplify_subreg. 2001-05-17 18:46:58 +00:00
cselib.c Make hash values more random 2001-03-28 14:21:18 +00:00
cselib.h
cstamp-h.in
dbxout.c stmt.c (current_nesting_level): New fn. 2001-06-08 14:12:54 -04:00
dbxout.h
dbxstclass.h
dce.c
defaults.h Standardize header guards. 2001-05-25 18:31:47 -07:00
dependence.c
diagnostic.c Makefile.in (c-parse.o): Depend on diagnostic.h 2001-06-10 13:48:04 +00:00
diagnostic.def diagnostic.def: New file. 2001-05-01 08:19:45 +00:00
diagnostic.h Makefile.in (c-parse.o): Depend on diagnostic.h 2001-06-10 13:48:04 +00:00
doloop.c Makefile.in (insn-recog.o): Depend on toplev.h. 2001-04-11 11:36:50 -07:00
dominance.c
doprint.c
doschk.c
dostage2
dostage3
dwarf2.h dwarf2.h (DW_EH_PE_aligned): New. 2001-06-05 18:57:49 -07:00
dwarf2asm.c dwarf2.h (DW_EH_PE_aligned): New. 2001-06-05 18:57:49 -07:00
dwarf2asm.h except.c (eh_data_format_name): Move to ... 2001-05-16 15:42:36 -07:00
dwarf2out.c Makefile.in (c-parse.o): Depend on diagnostic.h 2001-06-10 13:48:04 +00:00
dwarf2out.h IA-64 ABI Exception Handling. 2001-03-28 03:04:51 -08:00
dwarf.h
dwarfout.c dwarf2out.c (DEBUG_ABBREV_SECTION, [...]): Rename from s/DEBUG_//. 2001-05-20 20:14:31 -07:00
dwarfout.h
emit-rtl.c emit-rtl.c (gen_lowpart_common): Do not assume that SFmode and DFmode are one and two words in size. 2001-06-10 22:49:40 +00:00
enquire.c
errors.c
errors.h Standardize header guards. 2001-05-25 18:31:47 -07:00
except.c except.c (get_exception_pointer, [...]): Take a struct function. 2001-06-08 15:57:23 -07:00
except.h except.c (get_exception_pointer, [...]): Take a struct function. 2001-06-08 15:57:23 -07:00
exgettext
explow.c tree.def (ARRAY_RANGE_REF): New code. 2001-06-04 09:21:38 -04:00
expmed.c combine.c (gen_binary): Use swap_commutative_operands_p 2001-05-22 00:40:26 -07:00
expr.c expr.c (store_field): Don't set MEM_ALIAS_SET for a field in a structure at a variable address. 2001-06-12 11:17:09 +00:00
expr.h expr.h (enum libfunc_index): Add LTI_memmove. 2001-04-13 21:39:22 -06:00
final.c function.c (diddle_return_value): Kill code to determine return value before expand_function_end. 2001-06-08 19:52:06 +00:00
fix-header.c Makefile.in (OBJS, [...]): Update. 2001-05-20 06:26:45 +00:00
fixproto
flags.h c-decl.c (init_decl_processing): Don't call start_identifier_warnings. 2001-05-27 21:04:28 +00:00
floatlib.c i * libgcc1-test.c, libgcc1.c, config/i386/perform.h: Delete file. 2001-05-17 03:16:18 +00:00
flow.c basic-block.h: Improve comments. 2001-06-08 21:54:11 +00:00
fold-const.c tree.def (ARRAY_RANGE_REF): New code. 2001-06-04 09:21:38 -04:00
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function.c function.c (diddle_return_value): Kill code to determine return value before expand_function_end. 2001-06-08 19:52:06 +00:00
function.h function.h (virtuals_instantiated): Declare. 2001-04-05 16:13:53 -04:00
future.options
gbl-ctors.h
gcc.c toplev.c (independent_decode_option): Require =' between -aux-info' and filename in the same argument. 2001-06-10 00:31:07 +00:00
gcc.h Standardize header guards. 2001-05-25 18:31:47 -07:00
gcc.hlp
gccbug.in gccbug.in: Fix typo. 2001-06-05 18:38:44 +00:00
gccspec.c
gcov-io.h Standardize header guards. 2001-05-25 18:31:47 -07:00
gcov.c
gcse.c rtlanal.c (operand_preference): Fix preference for objects. 2001-06-04 18:04:36 +00:00
gdbinit.in
gen-protos.c
genattr.c genattr.c, [...]: Wrap generated header in multiple-include guard. 2001-04-02 16:29:32 +00:00
genattrtab.c Makefile.in (reg-stack.o): Depend on reload.h. 2001-04-13 21:10:16 +00:00
gencheck.c genattr.c, [...]: Wrap generated header in multiple-include guard. 2001-04-02 16:29:32 +00:00
gencodes.c genattr.c, [...]: Wrap generated header in multiple-include guard. 2001-04-02 16:29:32 +00:00
genconfig.c genattr.c, [...]: Wrap generated header in multiple-include guard. 2001-04-02 16:29:32 +00:00
genemit.c Makefile.in (insn-recog.o): Depend on toplev.h. 2001-04-11 11:36:50 -07:00
genextract.c
genflags.c genattr.c, [...]: Wrap generated header in multiple-include guard. 2001-04-02 16:29:32 +00:00
gengenrtl.c Use byte offsets in SUBREGs instead of words. 2001-04-03 15:06:12 +00:00
genmultilib
genopinit.c mkconfig.sh: Include insn-flags.h. 2001-03-22 10:48:52 -08:00
genoutput.c Makefile.in (insn-output.o): Depend on $(EXPR_H). 2001-04-11 15:57:31 +00:00
genpeep.c c-lex.c: NULL_PTR -> NULL. 2001-05-02 14:31:45 +00:00
genrecog.c combine.c (simplify_comparison): Update op1 after constant extension. 2001-05-21 23:46:20 -07:00
gensupport.c server.c (load_data, run_shell): Use xmalloc, xrealloc & xcalloc in lieu of malloc, realloc & calloc. 2001-03-10 04:20:03 +00:00
gensupport.h
ggc-callbacks.c
ggc-common.c Compute DECL_ASSEMBLER_NAME lazily. 2001-03-19 23:50:04 +00:00
ggc-none.c configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists. 2001-03-09 20:53:56 +00:00
ggc-page.c ggc-page.c (size_lookup): Increase minimum allocation size to eight bytes. 2001-05-31 05:05:19 +00:00
ggc-simple.c
ggc.h Makefile.in (OBJS, [...]): Update. 2001-05-20 06:26:45 +00:00
glimits.h
global.c global.c (build_insn_chain): Allow ADDR_VEC or ADDR_DIF_VEC after end of last block if... 2001-06-07 16:17:28 -04:00
gmon.c
graph.c
graph.h Standardize header guards. 2001-05-25 18:31:47 -07:00
gstab.h Standardize header guards. 2001-05-25 18:31:47 -07:00
gsyms.h
gsyslimits.h cppinit.c (cpp_post_options): Shut off macro expansion if -fpreprocessed. 2001-05-10 00:07:23 +00:00
gthr-aix.h Standardize header guards. 2001-05-25 18:31:47 -07:00
gthr-dce.h gthr-posix.h (__gthread_active_ptr): Cast function pointer to target type to allow ISO C++ compiler to accept it. 2001-05-30 22:38:43 +00:00
gthr-posix.h (__gthread_objc_init_thread_system): If pthread_key_create fails, it's not clear what the return value is. 2001-06-09 18:05:09 +00:00
gthr-rtems.h Standardize header guards. 2001-05-25 18:31:47 -07:00
gthr-single.h Standardize header guards. 2001-05-25 18:31:47 -07:00
gthr-solaris.h gthr-posix.h (__gthread_active_ptr): Cast function pointer to target type to allow ISO C++ compiler to accept it. 2001-05-30 22:38:43 +00:00
gthr-vxworks.h Standardize header guards. 2001-05-25 18:31:47 -07:00
gthr-win32.h Standardize header guards. 2001-05-25 18:31:47 -07:00
gthr.h Standardize header guards. 2001-05-25 18:31:47 -07:00
haifa-sched.c mkconfig.sh: Include insn-flags.h. 2001-03-22 10:48:52 -08:00
halfpic.c
halfpic.h
hard-reg-set.h Standardize header guards. 2001-05-25 18:31:47 -07:00
hash.c i386.c (ix86_emit_restore_regs_using_mov, [...]): Change bool' parameter to int'. 2001-05-04 14:36:39 +00:00
hash.h i386.c (ix86_emit_restore_regs_using_mov, [...]): Change bool' parameter to int'. 2001-05-04 14:36:39 +00:00
hashtable.c hashtable.c (calc_hash): Fix HASHSTEP definition. 2001-05-20 08:13:32 +00:00
hashtable.h Makefile.in (OBJS, [...]): Update. 2001-05-20 06:26:45 +00:00
hwint.h Standardize header guards. 2001-05-25 18:31:47 -07:00
ifcvt.c ifcvt.c (cond_exec_get_condition): Use reversed_comparison_code. 2001-06-13 11:16:31 -07:00
input.h
insn-addr.h insn-addr.h (INSN_ADDRESSES_NEW): Make insn_uid__ unsigned. 2001-06-03 22:58:08 +00:00
integrate.c except.c (get_exception_pointer, [...]): Take a struct function. 2001-06-08 15:57:23 -07:00
integrate.h integrate.h (struct inline_remap): Add leaf_reg_map table. 2001-05-03 16:14:34 +00:00
intl.c ansidecl.h: All logic from gcc/gansidecl.h moved here. 2001-04-04 00:46:27 +00:00
intl.h
jump.c * jump.c (duplicate_loop_exit_test): Fix loop header heuristics. 2001-06-11 13:49:24 +00:00
LANGUAGES
lcm.c
libgcc2.c libgcc2.c, libgcc2.h: Restore __eprintf. 2001-05-14 02:46:22 +00:00
libgcc2.h Standardize header guards. 2001-05-25 18:31:47 -07:00
libgcc-std.ver Makefile.in: Move _bb and __gcc_bcmp to LIB2FUNCS_ST. 2001-06-13 14:26:03 +00:00
limitx.h
limity.h cppinit.c (cpp_post_options): Shut off macro expansion if -fpreprocessed. 2001-05-10 00:07:23 +00:00
listing
lists.c lists.c (init_EXPR_INSN_LIST_cache): Don't check initialized. 2001-03-07 10:44:17 -08:00
local-alloc.c local-alloc.c (update_equiv_regs): Don't eliminate constant expressions at -O0. 2001-05-28 02:21:28 +00:00
longlong.h i * libgcc1-test.c, libgcc1.c, config/i386/perform.h: Delete file. 2001-05-17 03:16:18 +00:00
loop.c Fix for PR 3128, IA-64 linux kernel miscompile 2001-06-12 19:48:45 -07:00
loop.h loop.h (struct movables): Remove `num'. 2001-05-11 15:54:19 +00:00
machmode.def
machmode.h
main.c ansidecl.h: All logic from gcc/gansidecl.h moved here. 2001-04-04 00:46:27 +00:00
make-l2.com
Makefile.in Makefile.in: Move _bb and __gcc_bcmp to LIB2FUNCS_ST. 2001-06-13 14:26:03 +00:00
makefile.vms
mbchar.c * mbchar.c: Include config.h first. 2001-04-07 22:39:10 +00:00
mbchar.h Standardize header guards. 2001-05-25 18:31:47 -07:00
mips-tdump.c c-lex.c: NULL_PTR -> NULL. 2001-05-02 14:31:45 +00:00
mips-tfile.c mips-tfile.c (copy_object): Always pass indexNil for symbol table index. 2001-06-13 18:07:34 +00:00
mkconfig.sh mkconfig.sh (DEFINES): Handle entries with '='. 2001-03-25 13:23:30 +00:00
mkdeps.c vms.h: Change OBJECT_SUFFIX and EXECUTABLE_SUFFIX to TARGET_OBJECT_SUFFIX and... 2001-04-19 16:28:05 -04:00
mkdeps.h Standardize header guards. 2001-05-25 18:31:47 -07:00
mkinstalldirs
mklibgcc.in i * libgcc1-test.c, libgcc1.c, config/i386/perform.h: Delete file. 2001-05-17 03:16:18 +00:00
mkmap-flat.awk
mkmap-symver.awk
move-if-change
ONEWS
optabs.c combine.c (gen_binary): Use swap_commutative_operands_p 2001-05-22 00:40:26 -07:00
output.h output.h (dump_flow_info, [...]): Delete redundant prototypes. 2001-04-18 03:25:37 +00:00
params.c
params.def invoke.texi (Optimize Options): Add documentation for --param max-delay-slot-insn-search' and --param... 2001-05-01 18:51:06 +00:00
params.h Standardize header guards. 2001-05-25 18:31:47 -07:00
patch-apollo-includes
predict.c predict.def (PRED_CALL, [...]): New. 2001-06-10 08:01:57 +00:00
predict.def loop.c: Include predict.h 2001-06-12 10:22:22 +00:00
predict.h predict.def: New file. 2001-06-09 22:39:25 +00:00
prefix.c c-aux-info.c: NULL_PTR->NULL in calls to `concat'. 2001-04-29 12:43:20 +00:00
prefix.h Standardize header guards. 2001-05-25 18:31:47 -07:00
print-rtl.c print-rtl.c (xspaces): Remove. 2001-06-05 20:32:41 +00:00
print-tree.c print-tree.c (print_node): Don't print "regdecl" when bit doesn't mean that; use proper names instead. 2001-06-02 06:56:44 -04:00
profile.c collect2.c (main): Use concat in lieu of xmalloc/sprintf. 2001-04-23 00:36:28 +00:00
protoize.c system.h: Include symcat.h. 2001-03-27 15:31:46 +00:00
README-fixinc reorganize inclhacks and apply fix to fixtests.c 2001-05-27 18:21:04 +00:00
README.C4X
README.Portability
real.c
real.h Standardize header guards. 2001-05-25 18:31:47 -07:00
recog.c damn me, 2001-06-12 17:54:39 +00:00
recog.h
reg-stack.c bitmap.c: Change NULL_PTR to NULL or "(rtx*)0". 2001-05-01 12:11:35 +00:00
regclass.c regclass.c (scan_one_insn): Update REG_N_REFS when optimizing handling of two-address insns. 2001-05-09 13:40:49 +00:00
regmove.c regmove.c (regmove_optimize): Suppress the optimization for unchanging destination register. 2001-05-11 22:08:04 +02:00
regrename.c regrename.c (regrename_optimize): frame pointer register can use a few hardregs. 2001-05-19 09:59:52 +04:00
regs.h Use byte offsets in SUBREGs instead of words. 2001-04-03 15:06:12 +00:00
reload1.c reload1.c (reload): Revert Schmidt's change so all USEs are not deleted during reload. 2001-06-06 03:32:54 +00:00
reload.c reload.c (reload_inner_reg_of_subreg): Return 1 for PLUS. 2001-06-03 21:58:24 -04:00
reload.h Makefile.in (toplev.o, [...]): Depend on reload.h 2001-04-13 16:41:16 +00:00
reorg.c mkconfig.sh: Include insn-flags.h. 2001-03-22 10:48:52 -08:00
resource.c Use byte offsets in SUBREGs instead of words. 2001-04-03 15:06:12 +00:00
resource.h
rtl.c rtl.c (read_string): Break out from ... 2001-05-22 09:42:41 -07:00
rtl.def IA-64 ABI Exception Handling. 2001-03-28 03:04:51 -08:00
rtl.h predict.def: New file. 2001-06-09 22:39:25 +00:00
rtlanal.c rtlanal.c (rtx_unsable_p): ADDRESSOF is stable. 2001-06-04 18:16:34 +00:00
sbitmap.c * sbitmap.c (sbitmap_copy): Call memcpy, not bcopy. 2001-03-27 03:37:03 +00:00
sbitmap.h Standardize header guards. 2001-05-25 18:31:47 -07:00
scan-decls.c Makefile.in: Exterminate all references to assert.h. 2001-05-11 17:03:02 +00:00
scan-types.sh
scan.c
scan.h
sched-deps.c sched-deps.c (sched_analyze_insn): Force volatile memory reads to be output before a branch. 2001-05-20 13:03:15 -07:00
sched-ebb.c
sched-int.h
sched-rgn.c
sched-vis.c Use byte offsets in SUBREGs instead of words. 2001-04-03 15:06:12 +00:00
sdbout.c dbxout.c, [...]: Always include gstab.h, not system stab.h. 2001-05-01 01:58:32 +00:00
sdbout.h
SERVICE
sibcall.c sibcall.c (skip_unreturned_value): New function. 2001-06-08 12:24:30 +00:00
simplify-rtx.c simplify-rtx.c (simplify_subreg): Allow volatile memory to be subregged in case we don't have move instruction. 2001-06-12 15:25:16 +00:00
sort-protos
ssa.c Makefile.in (ssa.o, regclass.o): Depend on $(EXPR_H). 2001-04-13 16:34:41 +00:00
ssa.h
stab.def
stack.h
stmt.c stmt.c (current_nesting_level): New fn. 2001-06-08 14:12:54 -04:00
stor-layout.c tree.h (struct record_layout_info_s): New field unpadded_align. 2001-06-02 07:14:06 -04:00
stringpool.c c-decl.c (init_decl_processing): Don't call start_identifier_warnings. 2001-05-27 21:04:28 +00:00
sys-protos.h Makefile.in: Exterminate all references to assert.h. 2001-05-11 17:03:02 +00:00
sys-types.h
system.h Standardize header guards. 2001-05-25 18:31:47 -07:00
timevar.c configure.in: Probe for times, clock, struct tms, and clock_t. 2001-04-20 23:06:55 +00:00
timevar.def
timevar.h Standardize header guards. 2001-05-25 18:31:47 -07:00
tlink.c i386.c (ix86_emit_restore_regs_using_mov, [...]): Change bool' parameter to int'. 2001-05-04 14:36:39 +00:00
toplev.c Revert this patch: 2001-06-13 03:21:48 +00:00
toplev.h Makefile.in (c-parse.o): Depend on diagnostic.h 2001-06-10 13:48:04 +00:00
tradcif.y toplev.h (fatal_error): Add ATTRIBUTE_NORETURN. 2001-03-28 19:24:11 +00:00
tradcpp.c cppinit.c (cpp_post_options): Shut off macro expansion if -fpreprocessed. 2001-05-10 00:07:23 +00:00
tradcpp.h Standardize header guards. 2001-05-25 18:31:47 -07:00
tree.c tree.def (ARRAY_RANGE_REF): New code. 2001-06-04 09:21:38 -04:00
tree.def Update comments for ARRAY_RANGE_REF 2001-06-05 06:27:44 -04:00
tree.h stmt.c (current_nesting_level): New fn. 2001-06-08 14:12:54 -04:00
tsystem.h Standardize header guards. 2001-05-25 18:31:47 -07:00
typeclass.h
unprotoize.c
unroll.c unroll.c (initial_reg_note_copy): Use PUT_REG_NOTE_KIND and REG_NOTE_KIND, not PUT_MODE and GET_MODE. 2001-06-12 04:42:46 +00:00
unwind-dw2-fde.c unwind-dw2-fde.c (__deregister_frame_info): Don't play games with alias attribute. 2001-06-11 13:15:44 -07:00
unwind-dw2-fde.h unwind-dw2-fde.c (__deregister_frame_info): Stubbify in favour of... 2001-05-22 16:01:33 -07:00
unwind-dw2.c except.c (dw2_build_landing_pads): Use word_mode, not Pmode, as ncessary. 2001-05-20 00:35:24 +00:00
unwind-pe.h unwind-pe.h: Conditionally qualify references to abort with std::. 2001-06-09 17:55:10 +00:00
unwind-sjlj.c unwind-sjlj.c (_Unwind_GetDataRelBase): New. 2001-05-15 20:08:28 -07:00
unwind.h defaults.h (ASM_PREFERRED_EH_DATA_FORMAT): New. 2001-05-11 23:03:20 -07:00
unwind.inc except.c (dw2_build_landing_pads): Use word_mode, not Pmode, as ncessary. 2001-05-20 00:35:24 +00:00
varasm.c tree.def (ARRAY_RANGE_REF): New code. 2001-06-04 09:21:38 -04:00
varray.c
varray.h Standardize header guards. 2001-05-25 18:31:47 -07:00
version.c Daily bump. 2001-06-13 07:18:21 +00:00
version.h Standardize header guards. 2001-05-25 18:31:47 -07:00
vmsconfig.com
xcoffout.c dbxout.c, [...]: Always include gstab.h, not system stab.h. 2001-05-01 01:58:32 +00:00
xcoffout.h xcoffout.h (DBX_OUTPUT_GCC_MARKER): Do not emit any marker. 2001-05-25 18:08:30 -04:00

Copyright (C) 2000 Free Software Foundation, Inc.

This file is intended to contain a few notes about writing C code
within GCC so that it compiles without error on the full range of
compilers GCC needs to be able to compile on.

The problem is that many ISO-standard constructs are not accepted by
either old or buggy compilers, and we keep getting bitten by them.
This knowledge until know has been sparsely spread around, so I
thought I'd collect it in one useful place.  Please add and correct
any problems as you come across them.

I'm going to start from a base of the ISO C89 standard, since that is
probably what most people code to naturally.  Obviously using
constructs introduced after that is not a good idea.

The first section of this file deals strictly with portability issues,
the second with common coding pitfalls.


			Portability Issues
			==================

Unary +
-------

K+R C compilers and preprocessors have no notion of unary '+'.  Thus
the following code snippet contains 2 portability problems.

int x = +2;  /* int x = 2;  */
#if +1       /* #if 1  */
#endif


Pointers to void
----------------

K+R C compilers did not have a void pointer, and used char * as the
pointer to anything.  The macro PTR is defined as either void * or
char * depending on whether you have a standards compliant compiler or
a K+R one.  Thus

  free ((void *) h->value.expansion);

should be written

  free ((PTR) h->value.expansion);

Further, an initial investigation indicates that pointers to functions
returning void are okay.  Thus the example given by "Calling functions
through pointers to functions" below appears not to cause a problem.


String literals
---------------

Some SGI compilers choke on the parentheses in:-

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.

K+R C did not allow concatenation of string literals like

  "This is a " "single string literal".

Moreover, 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.


signed keyword
--------------

The signed keyword did not exist in K+R compilers; it was introduced
in ISO C89, so you cannot use it.  In both K+R and standard C,
unqualified char and bitfields may be signed or unsigned.  There is no
way to portably declare signed chars or signed bitfields.

All other arithmetic types are signed unless you use the 'unsigned'
qualifier.  For instance, it is safe to write

  short paramc;

instead of

  signed short paramc;

If you have an algorithm that depends on signed char or signed
bitfields, you must find another way to write it before it can be
integrated into GCC.


Function prototypes
-------------------

You need to provide a function prototype for every function before you
use it, and functions must be defined K+R style.  The function
prototype should use the PARAMS macro, which takes a single argument.
Therefore the parameter list must be enclosed in parentheses.  For
example,

int myfunc PARAMS ((double, int *));

int
myfunc (var1, var2)
	double var1;
	int *var2;
{
  ...
}

You also need to use PARAMS when referring to function protypes in
other circumstances, for example see "Calling functions through
pointers to functions" below.

Variable-argument functions are best described by example:-

void cpp_ice PARAMS ((cpp_reader *, const char *msgid, ...));

void
cpp_ice VPARAMS ((cpp_reader *pfile, const char *msgid, ...))
{  
#ifndef ANSI_PROTOTYPES
  cpp_reader *pfile;
  const char *msgid;
#endif
  va_list ap;
  
  VA_START (ap, msgid);
  
#ifndef ANSI_PROTOTYPES
  pfile = va_arg (ap, cpp_reader *);
  msgid = va_arg (ap, const char *);
#endif

  ...
  va_end (ap);
}

For the curious, here are the definitions of the above macros.  See
ansidecl.h for the definitions of the above macros and more.

#define PARAMS(paramlist)  paramlist  /* ISO C.  */
#define VPARAMS(args)   args

#define PARAMS(paramlist)  ()         /* K+R C.  */
#define VPARAMS(args)   (va_alist) va_dcl

One aspect of using K+R style function declarations, is you cannot
have arguments whose types are char, short, or float, since without
prototypes (ie, K+R rules), these types are promoted to int, int, and
double respectively.

Calling functions through pointers to functions
-----------------------------------------------

K+R C compilers require parentheses around the dereferenced function
pointer expression in the call, whereas ISO C relaxes the syntax.  For
example

typedef void (* cl_directive_handler) PARAMS ((cpp_reader *, const char *));
      *p->handler (pfile, p->arg);

needs to become

      (*p->handler) (pfile, p->arg);


Macros
------

The rules under K+R C and ISO C for achieving stringification and
token pasting are quite different.  Therefore some macros have been
defined which will get it right depending upon the compiler.

  CONCAT2(a,b) CONCAT3(a,b,c) and CONCAT4(a,b,c,d)

will paste the tokens passed as arguments.  You must not leave any
space around the commas.  Also,

  STRINGX(x)

will stringify an argument; to get the same result on K+R and ISO
compilers x should not have spaces around it.


Passing structures by value
---------------------------

Avoid passing structures by value, either to or from functions.  It
seems some K+R compilers handle this differently or not at all.


Enums
-----

In K+R C, you have to cast enum types to use them as integers, and
some compilers in particular give lots of warnings for using an enum
as an array index.


Bitfields
---------

See also "signed keyword" above.  In K+R C only unsigned int bitfields
were defined (i.e. unsigned char, unsigned short, unsigned long.
Using plain int/short/long was not allowed).


free and realloc
----------------

Some implementations crash upon attempts to free or realloc the null
pointer.  Thus if mem might be null, you need to write

  if (mem)
    free (mem);


Reserved Keywords
-----------------

K+R C has "entry" as a reserved keyword, so you should not use it for
your variable names.


Type promotions
---------------

K+R used unsigned-preserving rules for arithmetic expresssions, while
ISO uses value-preserving.  This means an unsigned char compared to an
int is done as an unsigned comparison in K+R (since unsigned char
promotes to unsigned) while it is signed in ISO (since all of the
values in unsigned char fit in an int, it promotes to int).

Trigraphs
---------

You weren't going to use them anyway, but trigraphs were not defined
in K+R C, and some otherwise ISO C compliant compilers do not accept
them.


Suffixes on Integer Constants
-----------------------------

K+R C did not accept a 'u' suffix on integer constants.  If you want
to declare a constant to be be unsigned, you must use an explicit
cast.

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(a, b)
      int a, b;
  {
    ...
  }

that function is expected to return int, *not* void.  GCC will warn
about this.  K+R C has no problem with 'void' as a return type, so you
need not worry about that.

Implicit function declarations always have return type int.  So if you
correct the above definition to

  void
  operate(a, b)
      int a, 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.