Changes for GCC version 2.4.1, from 2.4.0. In addition to applying these diffs, edit the file objc/README by hand to insert a newline at the end. diff -rc2P gcc-2.4.0/ChangeLog gcc-2.4.1/ChangeLog *** gcc-2.4.0/ChangeLog Mon May 17 14:44:43 1993 --- gcc-2.4.1/ChangeLog Wed May 26 02:08:06 1993 *************** *** 1,2 **** --- 1,302 ---- + Wed May 26 00:34:33 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Version 2.4.1 released. + + * c-lex.c (readescape): Don't complain for \% unless pedantic. + + * config/mips/mips.h (ASM_SPEC): If -noasmopt, pass -O0. + * config/mips/iris3.h: Likewise. + + * config/mips/iris4loser.h: New file. + * config/mips/iris4gl.h: New file. + * configure (mips-sgi-iris4loser): New alternative. + + Tue May 25 18:05:50 1993 Jim Wilson (wilson@sphagnum.cygnus.com) + + * dbxout.c (dbxout_block) [DBX_BLOCKS_FUNCTION_RELATIVE]: + Get function name from DECL_RTL not from DECL_ASSEMBLER_NAME. + * config/sparc/sol2.h (ASM_OUTPUT_SOURCE_LINE): Likewise. + + * m68k/sun3.h (FUNCTION_VALUE, FUNCTION_VALUEX): Ifdef out. + + * c-typeck.c (convert_for_assignment): When allowing mixing of + signed and unsigned pointers, compare unsigned types not type sizes. + + Tue May 25 00:08:42 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * nextstep.h (INCLUDE_DEFAULTS): Delete /NextDeveloper/Headers/ansi + and /NextDeveloper/Headers/bsd. + + * regclass.c (regclass): Fix paren error. + + * c-decl.c (finish_decl): If type is laid out, but decl is not, + call layout_decl. + + * protoize.c (include_defaults): Update to match cccp.c. + * Makefile.in (stamp-proto): + Pass LOCAL_INCLUDE_DIR based on local_prefix. + + * stmt.c (expand_asm_operands): Detect constants as outputs. + + Mon May 24 18:25:23 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * collect2.c (main): Use TARGET-gcc, not gcc-TARGET. + + * reload1.c (delete_output_reload): Don't delete output reload + if cannot_omit_stores is set for that pseudo. + (reload): Init and clear cannot_omit_stores. + (eliminate_regs): Set cannot_omit_stores. + + * configure (i[34]86-*-sco3.2v4*): Test --with-stabs, not --with-gas. + + Mon May 24 14:10:59 1993 Jim Wilson (wilson@sphagnum.cygnus.com) + + * integrate.c (expand_inline_function): Set MEM_IN_STRUCT_P for + return value if needed. + + Mon May 24 13:10:07 1993 Brendan Kehoe (brendan@lisa.cygnus.com) + + * cp-call.c (convert_harshness): Don't dereference a null parm. + + * cp-method.c (dump_init): Don't try to print out the first operand + of a TARGET_EXPR if it's not there. + + Mon May 24 10:13:26 1993 Mike Stump (mrs@poseidon.cygnus.com) + + * expr.c (expand_expr): Finish Tue Aug 18 23:07:33 1992 change. It + didn't handle the target != 0 case, now it does. + + Mon May 24 00:30:50 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * expr.c (expand_expr, TARGET_EXPR case): + Handle case where DECL_RTL is nonzero. + + * configure (i[34]86-*-isc*): Use install-headers-cpio. + + * genopinit.c (optabs): Add backslashes to prevent SCCS confusion. + * config/m68k/tower-as.h (CONSTRUCTOR_NAME_FORMAT): Likewise. + + * combine.c (subst): For subreg-of-constant, don't gen_lowpart + if it's a big-endian machine and constant is multi-word. + + * gstddef.h (size_t) [__GNUG__]: Don't typedef it if it's + already defined as a macro. + + * config/i386/x-aix (CLIB): Defined. + * config/i386/aix386.h (STARTFILE_SPEC, LINK_SPEC): New overrides. + * config/i386/xm-aix.h: Undef TRUE and FALSE before #include. + * config/i386/aix386ng.h (STARTFILE_SPEC, LINK_SPEC): Don't use + crtbegin.o, crtend.o, crtn.o, libp.a. Use gcrt0.0, not gcrt1.o. + (ENDFILE_SPEC): Use crtn.o. + (CPP_PREDEFINES): Delete _AIX, AIX, and _I386. Add ps2, unix. + (CPP_SPEC): Add _AIX, _I386, _MBCS. Handle -posix. + (ASM_SPEC): Turned off. + * config/i386/t-aix: New file. + * configure (i[34]86-ibm-aix*): Use t-aix if using gas. + + * config/i386/sco4.h (ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE): + New override definitions. + + * toplev.c (compile_file): Undo previous changes (that were to call + assemble_zeros whenever DBX_DEBUGGING_INFO is defined). + + Sun May 23 16:31:38 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config/nextstep.h (INCLUDE_DEFAULTS): Fix missing comma. + + * config/i386/x-aix (FIXINCLUDES): Defined. + * fixinc.ps2: New file. + + Sun May 23 14:51:06 1993 Kresten Krab Thorup (krab@iesd.auc.dk) + + * objc/objc.h (objc_protocol): New field `class_pointer'. + + * objc/init.c (__objc_init_protocols): Call recursively + on super protocols. Make local var `proto_class' static. + + Sun May 23 00:49:17 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Makefile.in (BISONFLAGS): Remove -v since output file names are long. + + * reload1.c (choose_reload_regs): If inheriting a spill reg, + and reload_out has a wider mode, just copy from that spill reg, + don't use it for the reload. + + * reload.c (push_reload): Fix NULL arg in last change. + + * config/m88k/x-tekXD88 (AR_FLAGS): Defined. + + Sat May 22 14:49:59 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config/mips/mips.h (ASM_SPEC): If -noasmopt, don't pass -O2. + * config/mips/iris3.h: Likewise. + + * config/nextstep.h (INCLUDE_DEFAULTS): Put /usr/include/bsd last. + + * config/alpha/alpha.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): + Use hex if infinite, nan, or minus zero. + + * real.c (target_isnan): Use GET_REAL macro to get argument. + (ereal_to_int): Fix potentially wrong-endian argument passed to eisnan. + + Fri May 21 14:24:01 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config/nextstep.h (INCLUDE_DEFAULTS): Add /usr/include/bsd. + + * cccp.c (default_include): Put TOOL_INCLUDE_DIR after + LOCAL_INCLUDE_DIR in non-cross case. + + * real.c (emdnorm): Fix typo affecting roundoff behavior in XFmode. + + * config/m68k/amix.h (CPP_PREDEFINES): Add -D__svr4__. + (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_INTERNAL_LABEL): + New override definitions. + + * collect2.c (main) [CROSS_COMPILE]: Use TARGET-TOOL for full_... + + * collect2.c (main): For -debug, if ..._file_name is a null pointer, + say so instead of crashing. + + * m68k.md (cmpxf2 recognizer): Test SGS_CMP_ORDER, not HPUX_ASM. + + * c-common.c (constant_expression_warning) + (overflow_warning, convert_and_check): Change pedwarn to warning. + + * reload.c (push_reload): When IN is a subreg of a multiword reg + that uses a funny number of registers, and SUBREG_WORD is nonzero, + and IN must match an output, reload both the reg and the subreg. + + * protoize.c (add_symbol, unexpand_if_needed, abspath): + Supply missing arg to savestring. + + * Makefile.in (info, dvi): New targets. + + Fri May 21 10:28:41 1993 Brendan Kehoe (brendan@lisa.cygnus.com) + + * cp-pt.c (subst): Don't use a method's arguments unless it has some. + + Fri May 21 11:51:20 1993 Kresten Krab Thorup (krab@iesd.auc.dk) + + * objc/sarray.h (sarray_get): Add #ifdef case for + !defined(PRECOMPUTE_SELECTORS) and OBJC_SPARSE2. + * objc/sarray.c (sarray_at_put): Likewise. + + Fri May 21 00:51:10 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * configure (mips-*-ultrix*): Renamed from mips-dec-ultrix*. + + Thu May 20 23:16:43 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * reload1.c (choose_reload_regs): Handle earlyclobbers + when inheriting from reg_last_reload_reg. + + Thu May 20 13:59:16 1993 Doug Evans (dje@canuck.cygnus.com) + + * Makefile.in (install-dir): Fix syntax, make tooldir before assertdir. + + Thu May 20 08:52:30 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * gstddef.h [_ANSI_H_]: Handle __need_size_t and __need_wchar_t. + + * fixincludes (Fixing CTRL): Reject CTRL or _CTRL following digit. + + * enquire.c (F_check): Check NO_LONG_DOUBLE_IO. + + Wed May 19 23:18:55 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config/i386/x-isc3 (X_CFLAGS): Delete -DPOSIX_JC. + + * real.c (e24toe, e53toe, e64toe): Fix sign in conversions + of -infinity. Do eclear before einfin. + + Wed May 19 15:37:20 1993 Jim Wilson (wilson@sphagnum.cygnus.com) + + * va-sparc.h (va_dcl): Restore accidentally deleted __builtin_va_alist + declaration. + + * objc-act.c (handle_class_ref): Call assemble_constant_align + before output_constant. + * varasm.c (assemble_constant_align): New function. + + Wed May 19 13:40:01 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config/i860/x-sysv4 (X_CFLAGS): Deleted. + + * configure (i[34]86-*-isc*): If version is 3, use x-isc3. + * config/i386/x-isc3: New file. + + Mon May 19 21:47:49 1993 Jeff Law (law@snake.cs.utah.edu) + + * Fix calling convention for indirect calls on the PA. + * calls.c (expand_call): Declare and set current_call_is_indirect. + (emit_library_call, emit_library_call_value): Likewise. + * function.c (assign_parms): Likewise. + * pa.h (TARGET_SHARED_LIBS): Define as 1. + (FUNCTION_ARG): If this is a call through a function pointer, then + the caller passes all arguments in general registers. + + * pa.h (FUNCTION_ARG_REGNO_P): Account for registers which may + be unavailable on particular cpu models. Fix indentation. + + Wed May 19 13:13:42 1993 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * loop.c (scan_loop): Treat pseudo duplicated for exit tests just + like we treat user vars in seeing if we can move a SET. + + * combine.c (set_nonzero_bits_and_sign_copies, nonzero_bits): + If we have a positive constant that is negative in the mode + it is being used in, treat it as negative. + * rs6000.h, alpha.h (SHORT_IMMEDIATES_SIGN_EXTEND): Define. + + * emit-rtl.c (operand_subword): Reject cases when BITS_PER_WORD + is greater than HOST_BITS_PER_INT unless OP is const0_rtx. + + Tue May 18 16:31:06 1993 Torbjorn Granlund (tege@nada.kth.se) + + * pa.h (INITIALIZE_TRAMPOLINE): Make 2:nd flush, end_addr, + at the last real insn in the trampoline. + + Tue May 18 13:35:43 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Makefile.in (assertdir): use $(tooldir)/include for this. + (install-dir): Always create assertdir and tooldir. + + * config/arm/arm.md (add/asl recognizer): Use space, not #, after asl. + Shuffle operands differently. + + * objc-act.c (synth_module_prologue): Set TREE_PUBLIC in umsg_decl. + + * Makefile.in (infodir): New variable. + (install-dir): Create that dir. + (install-info): New rule. + (install-normal): Depend on install-info. + + * fixincludes: Use $file. rather than $file.sed + when $file is or might be more than 10 characters long. + + * config/i386/isc.h (LIB_SPEC): Handle -posix before -shlib. + + * config/mips/x-sony: New file. + * configure (mips-sony-bsd*): Use x-sony. + + * Makefile.in (local_prefix): Do not default from $(prefix). + + Tue May 18 09:28:02 1993 Chris Smith (csmith@convex.com) + + * convex.c (replace_pushes, emit_ap_optimizations): Delete. + + Mon May 17 18:07:53 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * fixinc.svr4 (ieeefp.h): Delete definitions of __mips and __m68k. + + Mon May 17 17:00:00 1993 DJ Delorie (dj@ctron.com) + + * configure.bat: Fix sed for version.c to handle both with + and without spaces correctly (MS-DOS). + + Mon May 17 12:26:55 1993 Jim Wilson (wilson@sphagnum.cygnus.com) + + * rtl.c (init_rtl): Correct number of 'w's in CONST_DOUBLE format. + Mon May 17 00:07:50 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) *************** *** 80,85 **** Sat May 15 00:38:22 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) - * reload1.c (reload): Don't start 2-group unless it could be finished. - * va-mips.h (va_arg) [__MIPSEB__]: After incrementing, subtract the rounded size, not the size proper. --- 380,383 ---- *************** *** 92,97 **** Sat May 15 06:18:43 1993 James Van Artsdalen (james at bigtex.cactus.org) ! * reload1.c (reload): Don't start a group if a register needed to ! close the group is fixed. Sat May 15 12:23:58 1993 Torbjorn Granlund (tege@nada.kth.se) --- 390,394 ---- Sat May 15 06:18:43 1993 James Van Artsdalen (james at bigtex.cactus.org) ! * reload1.c (reload): Don't start 2-group unless it could be finished. Sat May 15 12:23:58 1993 Torbjorn Granlund (tege@nada.kth.se) diff -rc2P gcc-2.4.0/INSTALL gcc-2.4.1/INSTALL *** gcc-2.4.0/INSTALL Sun May 16 20:52:44 1993 --- gcc-2.4.1/INSTALL Wed May 26 00:56:33 1993 *************** *** 212,217 **** `i386-ibm-aix' ! You need to use a version of GAS that you can get from ! `tranle@intellicorp.com'. `i386-sequent' --- 212,217 ---- `i386-ibm-aix' ! You need to use GAS version 2.1 or later, and and LD from GNU ! binutils version 2.2 or later. `i386-sequent' *************** *** 395,403 **** `Makefile' by adding some text to the template file `Makefile.in'. The additional text comes from files in the ! `config' directory, named `t-TARGET' and `h-HOST'. If these files do not exist, it means nothing needs to be added for a given target or host. ! 4. Make sure the Bison parser generator is installed. (This is unnecessary if the Bison output files `c-parse.c' and `cexp.c' are more recent than `c-parse.y' and `cexp.y' and you do not plan to --- 395,416 ---- `Makefile' by adding some text to the template file `Makefile.in'. The additional text comes from files in the ! `config' directory, named `t-TARGET' and `x-HOST'. If these files do not exist, it means nothing needs to be added for a given target or host. ! 4. The standard directory for installing the compiler's passes and ! run-time support in `/usr/local/lib'. If you want to install it ! somewhere else, specify the option `--prefix=DIR' when you run ! `configure'. DIR is a directory name to use instead of ! `/usr/local' for all purposes with one exception: the directory ! `/usr/local/include' is searched for header files no matter where ! you install the compiler. ! ! 5. Specify `--local-prefix=DIR' if you want the compiler to search ! directory `DIR/include' for header files *instead* of ! `/usr/local/include'. (This is for systems that have different ! conventions for where to put site-specific things.) ! ! 6. Make sure the Bison parser generator is installed. (This is unnecessary if the Bison output files `c-parse.c' and `cexp.c' are more recent than `c-parse.y' and `cexp.y' and you do not plan to *************** *** 407,411 **** output for `c-parse.c'. ! 5. Build the compiler. Just type `make LANGUAGES=c' in the compiler directory. --- 420,424 ---- output for `c-parse.c'. ! 7. Build the compiler. Just type `make LANGUAGES=c' in the compiler directory. *************** *** 422,428 **** Ignore any warnings you may see about "statement not reached" in ! `insn-emit.c'; they are normal. Any other compilation errors may ! represent bugs in the port to your machine or operating system, and ! should be investigated and reported. Some commercial compilers fail to compile GNU CC because they have --- 435,443 ---- Ignore any warnings you may see about "statement not reached" in ! `insn-emit.c'; they are normal. Also, warnings about "unknown ! escape sequence" are normal in `genopinit.c' and perhaps some ! other files. Any other compilation errors may represent bugs in ! the port to your machine or operating system, and should be ! investigated and reported. Some commercial compilers fail to compile GNU CC because they have *************** *** 439,446 **** components have been built. ! 6. If you are building a cross-compiler, stop here. *Note Cross-Compiler::. ! 7. Move the first-stage object files and executables into a subdirectory with this command: --- 454,461 ---- components have been built. ! 8. If you are building a cross-compiler, stop here. *Note Cross-Compiler::. ! 9. Move the first-stage object files and executables into a subdirectory with this command: *************** *** 451,455 **** `rm -r stage1'. ! 8. If you have chosen a configuration for GNU CC which requires other GNU tools (such as GAS or the GNU linker) instead of the standard system tools, install the required tools in the `stage1' --- 466,470 ---- `rm -r stage1'. ! 10. If you have chosen a configuration for GNU CC which requires other GNU tools (such as GAS or the GNU linker) instead of the standard system tools, install the required tools in the `stage1' *************** *** 462,466 **** come before the standard system tools. ! 9. Recompile the compiler with itself, with this command: make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O" --- 477,481 ---- come before the standard system tools. ! 11. Recompile the compiler with itself, with this command: make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O" *************** *** 489,493 **** make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O -msoft-float" ! 10. If you wish to test the compiler by compiling it with itself one more time, install any other necessary GNU tools (such as GAS or the GNU linker) in the `stage2' subdirectory as you did in the --- 504,508 ---- make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O -msoft-float" ! 12. If you wish to test the compiler by compiling it with itself one more time, install any other necessary GNU tools (such as GAS or the GNU linker) in the `stage2' subdirectory as you did in the *************** *** 530,534 **** ignore, so you will not be able to compare on the Alpha. ! 11. Install the compiler driver, the compiler's passes and run-time support with `make install'. Use the same value for `CC', `CFLAGS' and `LANGUAGES' that you used when compiling the files --- 545,549 ---- ignore, so you will not be able to compare on the Alpha. ! 13. Install the compiler driver, the compiler's passes and run-time support with `make install'. Use the same value for `CC', `CFLAGS' and `LANGUAGES' that you used when compiling the files *************** *** 569,573 **** some other compiler.) ! 12. Install the Objective C library (if you have built the Objective C compiler). Here is the command to do this: --- 584,588 ---- some other compiler.) ! 14. Install the Objective C library (if you have built the Objective C compiler). Here is the command to do this: *************** *** 574,578 **** make install-libobjc CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" ! 13. If you're going to use C++, it's likely that you need to also install the libg++ distribution. It should be available from the same place where you got the GNU C distribution. Just as GNU C --- 589,593 ---- make install-libobjc CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" ! 15. If you're going to use C++, it's likely that you need to also install the libg++ distribution. It should be available from the same place where you got the GNU C distribution. Just as GNU C *************** *** 581,594 **** libraries, etc., are available in the libg++ distribution. - If you cannot install the compiler's passes and run-time support in - `/usr/local/lib', you can alternatively use the `-B' option to specify - a prefix by which they may be found. The compiler concatenates the - prefix with the names `cpp', `cc1' and `libgcc.a'. Thus, you can put - the files in a directory `/usr/foo/gcc' and specify `-B/usr/foo/gcc/' - when you run GNU CC. - - Also, you can specify an alternative default directory for these - files by setting the Make variable `libdir' when you make GNU CC. - Compilation in a Separate Directory =================================== --- 596,599 ---- *************** *** 970,973 **** --- 975,979 ---- $ library gnu_cc:[000000]gcclib/delete=(new,eprintf) + $ library gnu_cc:[000000]gcclib/delete=L_* $ library libgcc2/extract=*/output=libgcc2.obj $ library gnu_cc:[000000]gcclib libgcc2.obj *************** *** 974,980 **** The first command simply removes old modules that will be replaced ! with modules from libgcc2. If the VMS librarian complains about ! those modules not being present, simply ignore the message and ! continue on with the next command. Whenever you update the compiler on your system, you should also --- 980,989 ---- The first command simply removes old modules that will be replaced ! with modules from `libgcc2' under different module names. The ! modules `new' and `eprintf' may not actually be present in your ! `gcclib.olb'--if the VMS librarian complains about those modules ! not being present, simply ignore the message and continue on with ! the next command. The second command removes the modules that ! came from the previous version of the library `libgcc2.c'. Whenever you update the compiler on your system, you should also *************** *** 1141,1143 **** --- 1150,1239 ---- OSF/rose object file format instead of ECOFF. Normally, you would not select this configuration. + + On Irix version 4.0.5F, and perhaps on some other versions as well, + there is an assembler bug that reorders instructions incorrectly. To + work around it, specify the target configuration `mips-sgi-irix4loser'. + This configuration inhibits assembler optimization. + + You can turn off assembler optimization in a compiler configured with + target `mips-sgi-irix4' using the `-noasmopt' option. This compiler + option passes the option `-O0' to the assembler, to inhibit reordering. + + The `-noasmopt' option can be useful for testing whether a problem + is due to erroneous assembler reordering. Even if a problem does not go + away with `-noasmopt', it may still be due to assembler + reordering--perhaps GNU CC itself was miscompiled as a result. + + We know this is inconvenient, but it's the best that can be done at + the last minute. + + `collect2' + ========== + + Many target systems do not have support in the assembler and linker + for "constructors"--initialization functions to be called before the + official "start" of `main'. On such systems, GNU CC uses a utility + called `collect2' to arrange to call these functions at start time. + + The program `collect2' works by linking the program once and looking + through the linker output file for symbols with particular names + indicating they are constructor functions. If it finds any, it creates + a new temporary `.c' file containing a table of them, compiles it, and + links the program a second time including that file. + + The actual calls to the constructors are carried out by a subroutine + called `__main', which is called (automatically) at the beginning of + the body of `main' (provided `main' was compiled with GNU CC). + + The program `collect2' is installed as `ld' in the directory where + the passes of the compiler are installed. When `collect2' needs to + find the *real* `ld', it tries the following file names: + + * `gld' in the directories listed in the compiler's search + directories. + + * `gld' in the directories listed in the environment variable `PATH'. + + * `real-ld' in the compiler's search directories. + + * `real-ld' in `PATH'. + + * `ld' in `PATH'. + + "The compiler's search directories" means all the directories where + `gcc' searches for passes of the compiler. This includes directories + that you specify with `-B'. + + Cross compilers search a little differently: + + * `gld' in the compiler's search directories. + + * `TARGET-gld' in `PATH'. + + * `real-ld' in the compiler's search directories. + + * `TARGET-real-ld' in `PATH'. + + * `TARGET-ld' in `PATH'. + + `collect2' does not search for `ld' using the compiler's search + directories, because if it did, it would find itself--not the real + `ld'--and this could lead to infinite recursion. However, the + directory where `collect2' is installed might happen to be in `PATH'. + That could lead `collect2' to invoke itself anyway. when looking for + `ld'. + + To prevent this, `collect2' explicitly avoids running `ld' using the + file name under which `collect2' itself was invoked. In fact, it + remembers up to two such names--in case one copy of `collect2' finds + another copy (or version) of `collect2' installed as `ld' in a second + place in the search path. + + If two file names to avoid are not sufficient, you may still + encounter an infinite recursion of `collect2' processes. When this + happens. check all the files installed as `ld' in any of the + directories searched, and straighten out the situation. + + (In a future version, we will probably change `collect2' to avoid + any reinvocation of a file from which any parent `collect2' was run.) diff -rc2P gcc-2.4.0/Makefile.in gcc-2.4.1/Makefile.in *** gcc-2.4.0/Makefile.in Mon May 17 14:24:14 1993 --- gcc-2.4.1/Makefile.in Tue May 25 10:49:58 1993 *************** *** 53,57 **** CC = cc BISON = bison ! BISONFLAGS = -v AR = ar OLDAR_FLAGS = qc --- 53,57 ---- CC = cc BISON = bison ! BISONFLAGS = AR = ar OLDAR_FLAGS = qc *************** *** 142,146 **** # gcc as the native cc, `local_prefix' may not be `prefix' which is # `/usr'. ! local_prefix = $(prefix) # Directory in which to put host dependent programs and libraries exec_prefix = $(prefix) --- 142,147 ---- # gcc as the native cc, `local_prefix' may not be `prefix' which is # `/usr'. ! # NOTE: local_prefix *should not* default from prefix. ! local_prefix = /usr/local # Directory in which to put host dependent programs and libraries exec_prefix = $(prefix) *************** *** 154,158 **** includedir = $(local_prefix)/include # assertdir is overridden in cross-make. ! assertdir = $(includedir) # Extension (if any) to put in installed man-page filename. manext = .1 --- 155,162 ---- includedir = $(local_prefix)/include # assertdir is overridden in cross-make. ! # (But this currently agrees with what is in cross-make.) ! assertdir = $(tooldir)/include ! # where the info files go ! infodir = $(prefix)/info # Extension (if any) to put in installed man-page filename. manext = .1 *************** *** 1253,1257 **** -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \ -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \ ! -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \ -DSTD_PROTO_DIR=\"$(libsubdir)\" \ -DUNPROTOIZE $(srcdir)/protoize.c --- 1257,1261 ---- -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \ -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \ ! -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \ -DSTD_PROTO_DIR=\"$(libsubdir)\" \ -DUNPROTOIZE $(srcdir)/protoize.c *************** *** 1262,1266 **** -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \ -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \ ! -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \ -DSTD_PROTO_DIR=\"$(libsubdir)\" \ $(srcdir)/protoize.c --- 1266,1270 ---- -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \ -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \ ! -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \ -DSTD_PROTO_DIR=\"$(libsubdir)\" \ $(srcdir)/protoize.c *************** *** 1387,1391 **** # Remake the info files. ! doc: $(srcdir)/cpp.info $(srcdir)/gcc.info $(srcdir)/cpp.info: cpp.texi --- 1391,1396 ---- # Remake the info files. ! doc: info ! info: $(srcdir)/cpp.info $(srcdir)/gcc.info $(srcdir)/cpp.info: cpp.texi *************** *** 1399,1402 **** --- 1404,1409 ---- $(MAKEINFO) `echo $(srcdir)/gcc.texi | sed 's,^\./,,'` + dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi + # This works with GNU Make's default rule. $(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \ *************** *** 1511,1515 **** # Copy the compiler files into directories where they will be run. ! install-normal: install-common $(INSTALL_HEADERS) install-libgcc install-man # Do nothing while making gcc with a cross-compiler. The person who --- 1518,1523 ---- # Copy the compiler files into directories where they will be run. ! install-normal: install-common $(INSTALL_HEADERS) install-libgcc install-man \ ! install-info # Do nothing while making gcc with a cross-compiler. The person who *************** *** 1545,1554 **** -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi ! -if [ -f gcc-cross ] ; \ ! then \ ! if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi ; \ ! if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi ; \ ! else true; \ ! fi # We don't use mkdir -p to create the parents of mandir, # because some systems don't support it. --- 1553,1559 ---- -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi ! -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi ! -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi ! -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi # We don't use mkdir -p to create the parents of mandir, # because some systems don't support it. *************** *** 1615,1618 **** --- 1620,1630 ---- -rm -f $(libsubdir)/cpp $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp + + # Install the info files. + install-info: doc + -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info* + cd $(srcdir); for f in cpp.info* gcc.info*; \ + do $(INSTALL_DATA) $$f $(infodir)/$$f; done + -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info* # Install the man pages. diff -rc2P gcc-2.4.0/NEWS gcc-2.4.1/NEWS *** gcc-2.4.0/NEWS --- gcc-2.4.1/NEWS Mon May 24 19:20:52 1993 *************** *** 0 **** --- 1,134 ---- + Noteworthy GCC changes in version 2.4: + + * On each target, the default is now to return short structures + compatibly with the "usual" compiler on that target. + + For most targets, this means the default is to return all structures + in memory, like long structures, in whatever way is used on that + target. Use -freg-struct-return to enable returning short structures + (and unions) in registers. + + This change means that newly compiled binaries are incompatible with + binaries compiled with previous versions of GCC. + + On some targets, GCC is itself the usual compiler. On these targets, + the default way to return short structures is still in registers. + Use -fpcc-struct-return to tell GCC to return them in memory. + + * There is now a floating point emulator which can imitate the way all + supported target machines do floating point arithmetic. + + This makes it possible to have cross compilation to and from the VAX, + and between machines of different endianness. However, this works + only when the target machine description is updated to use the new + facilities, and not all have been updated. + + This also makes possible support for longer floating point types. + GCC 2.4 supports extended format on the 68K if you use `long double', + for targets that have a 68881. (When we have run time library + routines for extended floating point, then `long double' will use + extended format on all 68K targets.) + + We expect to support extended floating point on the i386 and Sparc in + future versions. + + * Building GCC now automatically fixes the system's header files. + This should require no attention. + + * GCC now installs an unsigned data type as size_t when it fixes the + header files (on all but a handful of old target machines). + Therefore, the bug that size_t failed to be unsigned is fixed. + + * Building and installation are now completely separate. + All new files are constructed during the build process; + installation just copies them. + + * New targets supported: Clipper, Hitachi SH, Hitachi 8300, and Sparc + Lite. + + * A totally new and much better Objective C run time system is included. + + * Objective C supports many new features. Alas, I can't describe them + since I don't use that language; however, they are the same ones + supported in recent versions of the NeXT operating system. + + * The builtin functions __builtin_apply_args, __builtin_apply and + __builtin_return let you record the arguments and returned + value of a function without knowing their number or type. + + * The builtin string variables __FUNCTION__ and __PRETTY_FUNCTION__ + give the name of the function in the source, and a pretty-printed + version of the name. The two are the same in C, but differ in C++. + + * Casts to union types do not yield lvalues. + + * ## before an empty rest argument discards the preceding sequence + of non-whitespace characters from the macro definition. + (This feature is subject to change.) + + + New features specific to C++: + + * The manual contains a new section ``Common Misunderstandings with + GNU C++'' that C++ users should read. + + * #pragma interface and #pragma implementation let you use the same + C++ source file for both interface and implementation. + However, this mechanism is still in transition. + + * Named returned values let you avoid an extra constructor call + when a function result has a class type. + + * The C++ operators ? yield min and max, respectively. + + * C++ gotos can exit a block safely even if the block has + aggregates that require destructors. + + * gcc defines the macro __GNUG__ when compiling C++ programs. + + * GNU C++ now correctly distinguishes between the prefix and postfix + forms of overloaded operator ++ and --. To avoid breaking old + code, if a class defines only the prefix form, the compiler + accepts either ++obj or obj++, unless -pedantic is used. + + * If you are using version 2.3 of libg++, you need to rebuild it with + `make CC=gcc' to avoid mismatches in the definition of `size_t'. + + + Newly documented compiler options: + + -fnostartfiles + Omit the standard system startup files when linking. + + -fvolatile-global + Consider memory references to extern and global data items to + be volatile. + + -idirafter DIR + Add DIR to the second include path. + + -iprefix PREFIX + Specify PREFIX for later -iwithprefix options. + + -iwithprefix DIR + Add PREFIX/DIR to the second include path. + + -mv8 + Emit Sparc v8 code (with integer multiply and divide). + -msparclite + Emit Sparclite code (roughly v7.5). + + -print-libgcc-file-name + Search for the libgcc.a file, print its absolute file name, and exit. + + -Woverloaded-virtual + Warn when a derived class function declaration may be an error + in defining a C++ virtual function. + + -Wtemplate-debugging + When using templates in a C++ program, warn if debugging is + not yet fully available. + + +eN + Control how C++ virtual function definitions are used + (like cfront 1.x). diff -rc2P gcc-2.4.0/README gcc-2.4.1/README *** gcc-2.4.0/README Mon May 17 14:47:34 1993 --- gcc-2.4.1/README Wed May 26 05:05:54 1993 *************** *** 1,3 **** ! This directory contains the version 2.4.0 release of the GNU C compiler. It includes all of the support for compiling C++ and Objective C, including a run-time library for Objective C. --- 1,3 ---- ! This directory contains the version 2.4.1 release of the GNU C compiler. It includes all of the support for compiling C++ and Objective C, including a run-time library for Objective C. diff -rc2P gcc-2.4.0/README.X11 gcc-2.4.1/README.X11 *** gcc-2.4.0/README.X11 Mon Jan 4 23:56:42 1993 --- gcc-2.4.1/README.X11 Mon May 24 21:09:22 1993 *************** *** 1,17 **** How to compile X11R5 (patch level 11) with GCC version 2: The patches include support for building the shared libraries with GCC 2 on ! the Sparc and 68k machines. NOTE: Such shared libraries DO NOT WORK with executables previously linked using Sun CC! This is because neither those executables nor the gcc-compiled shared libraries contain ! libgcc.a. The shared libraries do work with executables linked using GCC (running the Sun linker, of course) because GCC tells the linker to link in libgcc.a. Because of these limitations the default behavior is ! to NOT build the shared libraries with gcc. If you want the gcc-compiled ! shared libraries turn on "Gcc2BuildLibs" in site.def ! If you want to build a shared library that works with executables ! linked with Sun CC, you will have to arrange to include libgcc.a in ! the shared libraries. The instructions below do not handle this. Sun forgot to include a static version of libdl.a with some versions --- 1,262 ---- + [This file contains two alternative recipes for compiling X11 with GCC. + The first alternative puts libgcc.a into the shared X library; the second + does not. Neither alternative works on all kinds of systems. + It may be that when using GCC 2.4, both alternatives work okay on + relatively recent Sparc systems. The first alternative is likely + not to work on a Sun 3 without hardware floating point.] + + How to compile X11R5 (patch level 11) with GCC version 2: + + The patches include support for building the shared libraries with GCC + 2 on the Sparc and 68k machines. This version includes the necessary + parts of libgcc.a in the shared library for X, in case functions in + that library need it. Thus the default behavior is now to build + everything, including the libraries, with gcc. + + If you build the shared library this way, it may not work with + executables made with older versions of GCC (2.3.3 and earlier). + If that happens, relink those executables with the latest GCC. + IF YOU THINK YOU MIGHT COMPILE X FOR SOLARIS 2, then you really don't + need this patch: get /contrib/R5.SunOS5.patch.tar.Z from + export.lcs.mit.edu instead. It has everything you need to do the + build for Solaris 2, sets you up to everything with GCC, and is + backward compatible with Sunos 4.*. Get the the README + (/contrib/R5.SunOS5.patch.README at export) for more info. + + If you see undefined symbols _dlopen, _dlsym, or _dlclose when linking + with -lX11, compile and link against the file mit/util/misc/dlsym.c in + the MIT X11R5 distribution. Alternatively, do dynamic linking + by using a non-GNU ld. + + mit/config/Imake.tmpl -- Do not set -fstrength-reduce if we have GCC 2. + If -fstrength-reduce (or any other -f option) is a major win, then it + will most likely be turned on by -O2 optimization. + + mit/config/sunLib.rules -- If HasGcc and GccVersion > 1 are true, then + use gcc -fpic to generate PIC code. Make sure that gcc does not use + gas (the GNU assembler) when compiling PIC code; gas does not assemble + it correctly. + + ***If you have gas installed where gcc uses it by default, you might have + to add -B/bin/ to the PositionIndependentCFlags.*** + + mit/config/site.def -- Define GccVersion to be 2. + + mit/config/sun.cf -- When compiling with GCC 2, use -O2 optimization. + + mit/config/sunLib.rules -- When compiling with GCC 2, use -fpic for + position independent code generation. + + mit/rgb/Imakefile -- No longer need to compile some modules with + cc on the Sparc since GCC 2 produces proper -fpcc-struct-return code. + + mit/server/os/Imakefile -- Likewise. + + mit/server/ddx/sun/Imakefile -- When compiling with GCC 2, some modules + should be compiled with -fvolatile. + + mit/clients/twm/Imakefile -- Fix bad decls of malloc, realloc in gram.c. + + mit/lib/X/Imakefile -- Make libgcc.a a required lib for libX11.so + + *** mit/clients/twm/Imakefile Mon May 17 22:05:22 1993 + --- new/clients/twm/Imakefile Mon May 17 22:28:46 1993 + *************** + *** 32,41 **** + --- 32,48 ---- + ComplexProgramTarget(twm) + InstallNonExecFile(system.twmrc,$(TWMDIR)) + + + #if HasGcc && GccVersion > 1 && defined (SunArchitecture) + gram.h gram.c: gram.y + yacc $(YFLAGS) gram.y + + sed -e 's/^extern char \*malloc(), \*realloc();//g' y.tab.c >gram.c + + $(MV) y.tab.h gram.h + + #else + + gram.h gram.c: gram.y + + yacc $(YFLAGS) gram.y + $(MV) y.tab.c gram.c + $(MV) y.tab.h gram.h + + #endif + + clean:: + $(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c + *** mit/config/Imake.tmpl Mon May 17 22:02:57 1993 + --- new/config/Imake.tmpl Mon May 17 22:15:06 1993 + *************** + *** 500,506 **** + --- 500,510 ---- + #endif + #ifndef CcCmd + #if HasGcc + + #if GccVersion > 1 + + #define CcCmd gcc -fpcc-struct-return + + #else + #define CcCmd gcc -fstrength-reduce -fpcc-struct-return + + #endif + #else + #define CcCmd cc + #endif + *** mit/config/site.def Mon May 17 22:02:44 1993 + --- new/config/site.def Mon May 17 22:22:28 1993 + *************** + *** 25,31 **** + + #ifdef BeforeVendorCF + + ! /* #define HasGcc YES */ + + #endif /* BeforeVendorCF */ + + --- 25,33 ---- + + #ifdef BeforeVendorCF + + ! #define HasGcc YES + ! /* GccVersion > 1 implies building shared libraries with gcc */ + ! #define GccVersion 2 + + #endif /* BeforeVendorCF */ + + *** mit/config/sun.cf Mon May 17 22:03:02 1993 + --- new/config/sun.cf Mon May 17 22:24:55 1993 + *************** + *** 41,49 **** + --- 41,55 ---- + + #if HasGcc + + + #if GccVersion > 1 + + #define OptimizedCDebugFlags -O2 + + #else + + #define OptimizedCDebugFlags -O + #define SharedLibraryCcCmd cc + #define ExtraLoadFlags -B/usr/bin/ + #define AllocateLocalDefines /**/ + + #endif + + + + .c.o: + $(CC) -c $(CFLAGS) $*.c + *** mit/config/sunLib.rules Mon May 17 22:02:46 1993 + --- new/config/sunLib.rules Mon May 17 22:19:06 1993 + *************** + *** 23,29 **** + --- 23,33 ---- + #define SharedLibraryLoadFlags -assert pure-text + #endif + #ifndef PositionIndependentCFlags + + #if defined(HasGcc) && GccVersion > 1 + + #define PositionIndependentCFlags -fpic + + #else + #define PositionIndependentCFlags -pic + + #endif + #endif + + /* + *** mit/lib/X/Imakefile Mon May 17 22:05:03 1993 + --- new/lib/X/Imakefile Mon May 17 22:32:26 1993 + *************** + *** 9,14 **** + --- 9,31 ---- + #define MotifBC NO + #endif + + + #if defined(SunArchitecture) + + #if SystemV4 + + #if HasGcc + + REQUIREDLIBS= -lgcc -lc + + #else + + REQUIREDLIBS= -lc + + #endif + + #else + + #if HasGcc && GccVersion > 1 + + XCOMM Hack to fix gcc 2 ``-nostdlib'' deficiency on SunOS 4.x + + REQUIREDLIBS= `gcc -v 2>&1 | awk '{print $$4}' | sed -e 's/specs$$/libgcc.a/'` + + #else + + REQUIREDLIBS= + + #endif + + #endif + + #endif + + + #ifndef BuildXimp + #define BuildXimp NO + #endif + *** mit/rgb/Imakefile Mon May 17 22:05:31 1993 + --- new/rgb/Imakefile Mon May 17 22:25:30 1993 + *************** + *** 17,23 **** + #if !(defined(SGIArchitecture) || SystemV4) + DBMLIB = -ldbm + #endif + ! #if defined(SparcArchitecture) && HasGcc + CC = cc + CCOPTIONS = /**/ + EXTRA_LOAD_FLAGS = /**/ + --- 17,23 ---- + #if !(defined(SGIArchitecture) || SystemV4) + DBMLIB = -ldbm + #endif + ! #if defined(SparcArchitecture) && HasGcc && GccVersion <= 1 + CC = cc + CCOPTIONS = /**/ + EXTRA_LOAD_FLAGS = /**/ + *** mit/server/ddx/sun/Imakefile Mon May 17 22:05:57 1993 + --- new/server/ddx/sun/Imakefile Mon May 17 22:27:23 1993 + *************** + *** 43,48 **** + --- 43,53 ---- + LinkFile(sunGX.o,sunGX.o.dist) + #endif + + + #if HasGcc && GccVersion > 1 + + SpecialObjectRule(sunCG2C.o,sunCG2C.c,-fvolatile) + + SpecialObjectRule(sunCG2M.o,sunCG2M.c,-fvolatile) + + #endif + + + sunInitExtMono.o: $(ICONFIGFILES) + ObjectFromSpecialSource(sunInitExtMono,../mi/miinitext,-UPEXEXT) + ObjectFromSpecialSource(sunInitMono,sunInit,-DMONO_ONLY) + *** mit/server/os/Imakefile Mon May 17 22:05:46 1993 + --- new/server/os/Imakefile Mon May 17 22:26:02 1993 + *************** + *** 132,138 **** + SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES)) + SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES)) + SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES)) + ! #if defined(SparcArchitecture) && HasGcc + oscolor.o: $(ICONFIGFILES) + $(RM) $@ + cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c + --- 132,138 ---- + SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES)) + SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES)) + SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES)) + ! #if defined(SparcArchitecture) && HasGcc && GccVersion <= 1 + oscolor.o: $(ICONFIGFILES) + $(RM) $@ + cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c + + + [This is the older version] + How to compile X11R5 (patch level 11) with GCC version 2: The patches include support for building the shared libraries with GCC 2 on ! the Sparc and 68k machines. ! ! NOTE: Such shared libraries built with GCC version 2.3 DID NOT WORK with executables previously linked using Sun CC! This is because neither those executables nor the gcc-compiled shared libraries contain ! libgcc.a. The shared libraries did work with executables linked using GCC (running the Sun linker, of course) because GCC tells the linker to link in libgcc.a. Because of these limitations the default behavior is ! to NOT build the shared libraries with gcc. ! It is possible that changes in GCC 2.4 have eliminated the problem, ! and that such a shared library would now work with all executables. ! If you want the gcc-compiled shared libraries turn on "Gcc2BuildLibs" ! in site.def. If you try this, please tell bug-gcc@prep.ai.mit.edu ! whether it works. Sun forgot to include a static version of libdl.a with some versions diff -rc2P gcc-2.4.0/SERVICE gcc-2.4.1/SERVICE *** gcc-2.4.0/SERVICE Mon May 17 14:47:51 1993 --- gcc-2.4.1/SERVICE Wed May 26 05:06:13 1993 *************** *** 362,366 **** Entered: 10 Feb 92  ! Ron Guilmette 396 Ano Nuevo Ave. #216 Sunnyvale, CA 94086 --- 362,366 ---- Entered: 10 Feb 92  ! Ron Guilmette 396 Ano Nuevo Ave. #216 Sunnyvale, CA 94086 diff -rc2P gcc-2.4.0/alloca.c gcc-2.4.1/alloca.c *** gcc-2.4.0/alloca.c Mon May 17 14:47:53 1993 --- gcc-2.4.1/alloca.c Wed May 26 05:06:15 1993 *************** *** 43,50 **** #endif /* emacs */ - #ifdef emacs - #define free xfree - #endif - /* If your stack is a linked list of frames, you have to provide an "address metric" ADDRESS_FUNCTION macro. */ --- 43,46 ---- *************** *** 65,69 **** --- 61,78 ---- #define NULL 0 + /* Different portions of Emacs need to call different versions of + malloc. The Emacs executable needs alloca to call xmalloc, because + ordinary malloc isn't protected from input signals. On the other + hand, the utilities in lib-src need alloca to call malloc; some of + them are very simple, and don't have an xmalloc routine. + + Non-Emacs programs expect this to call use xmalloc. + + Callers below should use malloc. */ + + #ifndef emacs + #define malloc xmalloc extern pointer xmalloc (); + #endif /* Define STACK_DIRECTION if you know the direction of stack *************** *** 182,186 **** { ! register pointer new = xmalloc (sizeof (header) + size); /* Address of header. */ --- 191,195 ---- { ! register pointer new = malloc (sizeof (header) + size); /* Address of header. */ diff -rc2P gcc-2.4.0/c-common.c gcc-2.4.1/c-common.c *** gcc-2.4.0/c-common.c Wed May 5 16:48:25 1993 --- gcc-2.4.1/c-common.c Fri May 21 15:31:23 1993 *************** *** 348,352 **** if (TREE_CODE (value) == INTEGER_CST && TREE_CONSTANT_OVERFLOW (value)) { ! pedwarn ("overflow in constant expression"); /* Suppress duplicate warnings. */ TREE_CONSTANT_OVERFLOW (value) = 0; --- 348,356 ---- if (TREE_CODE (value) == INTEGER_CST && TREE_CONSTANT_OVERFLOW (value)) { ! /* ??? This is a warning, not a pedwarn, in 2.4, ! because it happens in contexts that are not ! "constant expressions" in ANSI C. ! Fix the problem differently in 2.5. */ ! warning ("overflow in constant expression"); /* Suppress duplicate warnings. */ TREE_CONSTANT_OVERFLOW (value) = 0; *************** *** 367,371 **** if (TREE_CODE (value) == INTEGER_CST && TREE_CONSTANT_OVERFLOW (value)) { ! pedwarn ("integer overflow in expression"); TREE_CONSTANT_OVERFLOW (value) = 0; } --- 371,379 ---- if (TREE_CODE (value) == INTEGER_CST && TREE_CONSTANT_OVERFLOW (value)) { ! /* ??? This is a warning, not a pedwarn, in 2.4, ! because it happens in contexts that are not ! "constant expressions" in ANSI C. ! Fix the problem differently in 2.5. */ ! warning ("integer overflow in expression"); TREE_CONSTANT_OVERFLOW (value) = 0; } *************** *** 413,417 **** else if (TREE_CONSTANT_OVERFLOW (t)) { ! pedwarn ("overflow in implicit constant conversion"); TREE_CONSTANT_OVERFLOW (t) = 0; } --- 421,429 ---- else if (TREE_CONSTANT_OVERFLOW (t)) { ! /* ??? This is a warning, not a pedwarn, in 2.4, ! because it happens in contexts that are not ! "constant expressions" in ANSI C. ! Fix the problem differently in 2.5. */ ! warning ("overflow in implicit constant conversion"); TREE_CONSTANT_OVERFLOW (t) = 0; } diff -rc2P gcc-2.4.0/c-decl.c gcc-2.4.1/c-decl.c *** gcc-2.4.0/c-decl.c Tue May 11 12:12:32 1993 --- gcc-2.4.1/c-decl.c Tue May 25 12:25:40 1993 *************** *** 3433,3436 **** --- 3433,3440 ---- { if (DECL_SIZE (decl) == 0 + && TYPE_SIZE (TREE_TYPE (decl)) != 0) + layout_decl (decl, 0); + + if (DECL_SIZE (decl) == 0 && (TREE_STATIC (decl) ? diff -rc2P gcc-2.4.0/c-lex.c gcc-2.4.1/c-lex.c *** gcc-2.4.0/c-lex.c Tue May 4 12:45:19 1993 --- gcc-2.4.1/c-lex.c Wed May 26 02:17:58 1993 *************** *** 1013,1016 **** --- 1013,1018 ---- case '{': case '[': + /* `\%' is used to prevent SCCS from getting confused. */ + case '%': if (pedantic) pedwarn ("non-ANSI escape sequence `\\%c'", c); diff -rc2P gcc-2.4.0/c-typeck.c gcc-2.4.1/c-typeck.c *** gcc-2.4.0/c-typeck.c Fri May 14 13:13:42 1993 --- gcc-2.4.1/c-typeck.c Wed May 26 00:30:03 1993 *************** *** 4187,4195 **** if (TYPE_MAIN_VARIANT (ttl) == void_type_node || TYPE_MAIN_VARIANT (ttr) == void_type_node ! || comp_target_types (type, rhstype) ! || (!pedantic /* Unless pedantic, mix signed and unsigned. */ ! && TREE_CODE (ttl) == INTEGER_TYPE ! && TREE_CODE (ttr) == INTEGER_TYPE ! && TYPE_PRECISION (ttl) == TYPE_PRECISION (ttr))) { if (pedantic --- 4187,4191 ---- if (TYPE_MAIN_VARIANT (ttl) == void_type_node || TYPE_MAIN_VARIANT (ttr) == void_type_node ! || comp_target_types (type, rhstype)) { if (pedantic *************** *** 4230,4235 **** else if (unsigned_type (TYPE_MAIN_VARIANT (ttl)) == unsigned_type (TYPE_MAIN_VARIANT (ttr))) ! warn_for_assignment ("pointer targets in %s differ in signedness", ! get_spelling (errtype), funname, parmnum); else warn_for_assignment ("%s from incompatible pointer type", --- 4226,4234 ---- else if (unsigned_type (TYPE_MAIN_VARIANT (ttl)) == unsigned_type (TYPE_MAIN_VARIANT (ttr))) ! { ! if (pedantic) ! warn_for_assignment ("pointer targets in %s differ in signedness", ! get_spelling (errtype), funname, parmnum); ! } else warn_for_assignment ("%s from incompatible pointer type", diff -rc2P gcc-2.4.0/calls.c gcc-2.4.1/calls.c *** gcc-2.4.0/calls.c Mon Apr 19 15:21:46 1993 --- gcc-2.4.1/calls.c Thu May 20 01:05:12 1993 *************** *** 474,477 **** --- 474,479 ---- /* Nonzero if a reg parm has been scanned. */ int reg_parm_seen; + /* Nonzero if this is an indirect function call. */ + int current_call_is_indirect = 0; /* Nonzero if we must avoid push-insns in the args for this call. *************** *** 733,737 **** --- 735,748 ---- name = IDENTIFIER_POINTER (DECL_NAME (fndecl)); + /* On some machines (such as the PA) indirect calls have a different + calling convention than normal calls. FUNCTION_ARG in the target + description can look at current_call_is_indirect to determine which + calling convention to use. */ + current_call_is_indirect = (fndecl == 0); #if 0 + = TREE_CODE (TREE_OPERAND (exp, 0)) == NON_LVALUE_EXPR ? 1 : 0; + #endif + + #if 0 /* Unless it's a call to a specific function that isn't alloca, if it has one argument, we must assume it might be alloca. */ *************** *** 2008,2011 **** --- 2019,2024 ---- int no_queue = 0; rtx use_insns; + /* library calls are never indirect calls. */ + int current_call_is_indirect = 0; va_start (p); *************** *** 2262,2265 **** --- 2275,2280 ---- rtx value; rtx mem_value = 0; + /* library calls are never indirect calls. */ + int current_call_is_indirect = 0; va_start (p); diff -rc2P gcc-2.4.0/cccp.c gcc-2.4.1/cccp.c *** gcc-2.4.0/cccp.c Sun May 2 19:55:44 1993 --- gcc-2.4.1/cccp.c Fri May 21 19:13:17 1993 *************** *** 560,569 **** { TOOL_INCLUDE_DIR, 0}, #else /* not CROSS_COMPILE */ - /* Until we are really clear on what people will use this dir for - in a native compiler, it's not clear where in the order it belongs. */ - { TOOL_INCLUDE_DIR, 0}, /* This should be /use/local/include and should come before the fixincludes-fixed header files. */ { LOCAL_INCLUDE_DIR, 0}, /* This is the dir for fixincludes. Put it just before the files that we fix. */ --- 560,569 ---- { TOOL_INCLUDE_DIR, 0}, #else /* not CROSS_COMPILE */ /* This should be /use/local/include and should come before the fixincludes-fixed header files. */ { LOCAL_INCLUDE_DIR, 0}, + /* This is here ahead of GCC_INCLUDE_DIR because assert.h goes here. + Likewise, behind LOCAL_INCLUDE_DIR, where glibc puts its assert.h. */ + { TOOL_INCLUDE_DIR, 0}, /* This is the dir for fixincludes. Put it just before the files that we fix. */ diff -rc2P gcc-2.4.0/collect2.c gcc-2.4.1/collect2.c *** gcc-2.4.0/collect2.c Tue Apr 13 16:37:38 1993 --- gcc-2.4.1/collect2.c Mon May 24 23:06:45 1993 *************** *** 791,833 **** full_ld_suffix = xcalloc (strlen (ld_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_ld_suffix, ld_suffix); strcat (full_ld_suffix, "-"); ! strcat (full_ld_suffix, target_machine); full_real_ld_suffix = xcalloc (strlen (real_ld_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_real_ld_suffix, real_ld_suffix); strcat (full_real_ld_suffix, "-"); ! strcat (full_real_ld_suffix, target_machine); full_gld_suffix = xcalloc (strlen (gld_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_gld_suffix, gld_suffix); strcat (full_gld_suffix, "-"); ! strcat (full_gld_suffix, target_machine); full_nm_suffix = xcalloc (strlen (nm_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_nm_suffix, nm_suffix); strcat (full_nm_suffix, "-"); ! strcat (full_nm_suffix, target_machine); full_gnm_suffix = xcalloc (strlen (gnm_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_gnm_suffix, gnm_suffix); strcat (full_gnm_suffix, "-"); ! strcat (full_gnm_suffix, target_machine); full_strip_suffix = xcalloc (strlen (strip_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_strip_suffix, strip_suffix); strcat (full_strip_suffix, "-"); ! strcat (full_strip_suffix, target_machine); full_gstrip_suffix = xcalloc (strlen (gstrip_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_gstrip_suffix, gstrip_suffix); strcat (full_gstrip_suffix, "-"); ! strcat (full_gstrip_suffix, target_machine); #endif /* CROSS_COMPILE */ --- 791,833 ---- full_ld_suffix = xcalloc (strlen (ld_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_ld_suffix, target_machine); strcat (full_ld_suffix, "-"); ! strcat (full_ld_suffix, ld_suffix); full_real_ld_suffix = xcalloc (strlen (real_ld_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_real_ld_suffix, target_machine); strcat (full_real_ld_suffix, "-"); ! strcat (full_real_ld_suffix, real_ld_suffix); full_gld_suffix = xcalloc (strlen (gld_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_gld_suffix, target_machine); strcat (full_gld_suffix, "-"); ! strcat (full_gld_suffix, gld_suffix); full_nm_suffix = xcalloc (strlen (nm_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_nm_suffix, target_machine); strcat (full_nm_suffix, "-"); ! strcat (full_nm_suffix, nm_suffix); full_gnm_suffix = xcalloc (strlen (gnm_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_gnm_suffix, target_machine); strcat (full_gnm_suffix, "-"); ! strcat (full_gnm_suffix, gnm_suffix); full_strip_suffix = xcalloc (strlen (strip_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_strip_suffix, target_machine); strcat (full_strip_suffix, "-"); ! strcat (full_strip_suffix, strip_suffix); full_gstrip_suffix = xcalloc (strlen (gstrip_suffix) + strlen (target_machine) + 2, 1); ! strcpy (full_gstrip_suffix, target_machine); strcat (full_gstrip_suffix, "-"); ! strcat (full_gstrip_suffix, gstrip_suffix); #endif /* CROSS_COMPILE */ *************** *** 837,841 **** ld_file_name = find_a_file (&cpath, gld_suffix); /* Search the ordinary system bin directories ! for `gld' (if native linking) or `gld-TARGET' (if cross). */ if (ld_file_name == 0) ld_file_name = find_a_file (&path, full_gld_suffix); --- 837,841 ---- ld_file_name = find_a_file (&cpath, gld_suffix); /* Search the ordinary system bin directories ! for `gld' (if native linking) or `TARGET-gld' (if cross). */ if (ld_file_name == 0) ld_file_name = find_a_file (&path, full_gld_suffix); *************** *** 854,858 **** there as `ld'. */ /* Search the ordinary system bin directories ! for `ld' (if native linking) or `ld-TARGET' (if cross). */ if (ld_file_name == 0) ld_file_name = find_a_file (&path, full_ld_suffix); --- 854,858 ---- there as `ld'. */ /* Search the ordinary system bin directories ! for `ld' (if native linking) or `TARGET-ld' (if cross). */ if (ld_file_name == 0) ld_file_name = find_a_file (&path, full_ld_suffix); *************** *** 888,893 **** #ifdef CROSS_COMPILE c_file_name = xcalloc (sizeof ("gcc-") + strlen (target_machine) + 1, 1); ! strcpy (c_file_name, "gcc-"); ! strcat (c_file_name, target_machine); #else c_file_name = "gcc"; --- 888,893 ---- #ifdef CROSS_COMPILE c_file_name = xcalloc (sizeof ("gcc-") + strlen (target_machine) + 1, 1); ! strcpy (c_file_name, target_machine); ! strcat (c_file_name, "-gcc"); #else c_file_name = "gcc"; *************** *** 1010,1019 **** { char *ptr; ! fprintf (stderr, "ld_file_name = %s\n", ld_file_name); ! fprintf (stderr, "c_file_name = %s\n", c_file_name); ! fprintf (stderr, "nm_file_name = %s\n", nm_file_name); ! fprintf (stderr, "strip_file_name = %s\n", strip_file_name); ! fprintf (stderr, "c_file = %s\n", c_file); ! fprintf (stderr, "o_file = %s\n", o_file); ptr = getenv ("COLLECT_GCC_OPTIONS"); --- 1010,1025 ---- { char *ptr; ! fprintf (stderr, "ld_file_name = %s\n", ! (ld_file_name ? ld_file_name : "not found")); ! fprintf (stderr, "c_file_name = %s\n", ! (c_file_name ? c_file_name : "not found")); ! fprintf (stderr, "nm_file_name = %s\n", ! (nm_file_name ? nm_file_name : "not found")); ! fprintf (stderr, "strip_file_name = %s\n", ! (strip_file_name ? strip_file_name : "not found")); ! fprintf (stderr, "c_file = %s\n", ! (c_file ? c_file : "not found")); ! fprintf (stderr, "o_file = %s\n", ! (o_file ? o_file : "not found")); ptr = getenv ("COLLECT_GCC_OPTIONS"); diff -rc2P gcc-2.4.0/combine.c gcc-2.4.1/combine.c *** gcc-2.4.0/combine.c Sat May 15 10:42:41 1993 --- gcc-2.4.1/combine.c Mon May 24 04:02:21 1993 *************** *** 693,698 **** && SUBREG_REG (SET_DEST (set)) == x)) { reg_nonzero_bits[REGNO (x)] ! |= nonzero_bits (SET_SRC (set), nonzero_bits_mode); num = num_sign_bit_copies (SET_SRC (set), GET_MODE (x)); if (reg_sign_bit_copies[REGNO (x)] == 0 --- 693,721 ---- && SUBREG_REG (SET_DEST (set)) == x)) { + rtx src = SET_SRC (set); + + #ifdef SHORT_IMMEDIATES_SIGN_EXTEND + /* If X is narrower than a word and SRC is a non-negative + constant that would appear negative in the mode of X, + sign-extend it for use in reg_nonzero_bits because some + machines (maybe most) will actually do the sign-extension + and this is the conservative approach. + + ??? For 2.5, try to tighten up the MD files in this regard + instead of this kludge. */ + + if (GET_MODE_BITSIZE (GET_MODE (x)) < BITS_PER_WORD + && GET_CODE (src) == CONST_INT + && INTVAL (src) > 0 + && 0 != (INTVAL (src) + & ((HOST_WIDE_INT) 1 + << GET_MODE_BITSIZE (GET_MODE (x))))) + src = GEN_INT (INTVAL (src) + | ((HOST_WIDE_INT) (-1) + << GET_MODE_BITSIZE (GET_MODE (x)))); + #endif + reg_nonzero_bits[REGNO (x)] ! |= nonzero_bits (src, nonzero_bits_mode); num = num_sign_bit_copies (SET_SRC (set), GET_MODE (x)); if (reg_sign_bit_copies[REGNO (x)] == 0 *************** *** 3063,3068 **** } if (CONSTANT_P (SUBREG_REG (x)) && subreg_lowpart_p (x) ! && GET_MODE_SIZE (mode) < GET_MODE_SIZE (op0_mode)) return gen_lowpart_for_combine (mode, SUBREG_REG (x)); --- 3086,3099 ---- } + /* If we want a subreg of a constant, at offset 0, + take the low bits. On a little-endian machine, that's + always valid. On a big-endian machine, it's valid + only if the constant's mode fits in one word. */ if (CONSTANT_P (SUBREG_REG (x)) && subreg_lowpart_p (x) ! && GET_MODE_SIZE (mode) < GET_MODE_SIZE (op0_mode) ! #if WORDS_BIG_ENDIAN ! && GET_MODE_BITSIZE (op0_mode) <= BITS_PER_WORD ! #endif ! ) return gen_lowpart_for_combine (mode, SUBREG_REG (x)); *************** *** 6223,6228 **** tem = get_last_value (x); if (tem) ! return nonzero_bits (tem, mode); else if (nonzero_sign_valid && reg_nonzero_bits[REGNO (x)]) return reg_nonzero_bits[REGNO (x)] & nonzero; --- 6254,6282 ---- tem = get_last_value (x); + if (tem) ! { ! #ifdef SHORT_IMMEDIATES_SIGN_EXTEND ! /* If X is narrower than MODE and TEM is a non-negative ! constant that would appear negative in the mode of X, ! sign-extend it for use in reg_nonzero_bits because some ! machines (maybe most) will actually do the sign-extension ! and this is the conservative approach. ! ! ??? For 2.5, try to tighten up the MD files in this regard ! instead of this kludge. */ ! ! if (GET_MODE_BITSIZE (GET_MODE (x)) < mode_width ! && GET_CODE (tem) == CONST_INT ! && INTVAL (tem) > 0 ! && 0 != (INTVAL (tem) ! & ((HOST_WIDE_INT) 1 ! << GET_MODE_BITSIZE (GET_MODE (x))))) ! tem = GEN_INT (INTVAL (tem) ! | ((HOST_WIDE_INT) (-1) ! << GET_MODE_BITSIZE (GET_MODE (x)))); ! #endif ! return nonzero_bits (tem, mode); ! } else if (nonzero_sign_valid && reg_nonzero_bits[REGNO (x)]) return reg_nonzero_bits[REGNO (x)] & nonzero; *************** *** 6231,6234 **** --- 6285,6297 ---- case CONST_INT: + #ifdef SHORT_IMMEDIATES_SIGN_EXTEND + /* If X is negative in MODE, sign-extend the value. */ + if (INTVAL (x) > 0 + && 0 != (INTVAL (x) + & ((HOST_WIDE_INT) 1 << GET_MODE_BITSIZE (GET_MODE (x))))) + return (INTVAL (x) + | ((HOST_WIDE_INT) (-1) << GET_MODE_BITSIZE (GET_MODE (x)))); + #endif + return INTVAL (x); diff -rc2P gcc-2.4.0/config/alpha/alpha.h gcc-2.4.1/config/alpha/alpha.h *** gcc-2.4.0/config/alpha/alpha.h Sun Apr 4 10:07:42 1993 --- gcc-2.4.1/config/alpha/alpha.h Sat May 22 15:42:59 1993 *************** *** 1230,1233 **** --- 1230,1236 ---- #define BYTE_LOADS_SIGN_EXTEND + /* Define if loading short immediate values into registers sign extends. */ + #define SHORT_IMMEDIATES_SIGN_EXTEND + /* We aren't doing ANYTHING about debugging for now. */ /* #define SDB_DEBUGGING_INFO */ *************** *** 1465,1481 **** /* This is how to output an assembler line defining a `double' constant. */ ! #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ ! do { char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \ ! fprintf (FILE, "\t.t_floating %s\n", dstr); \ ! } while (0) /* This is how to output an assembler line defining a `float' constant. */ ! #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ ! do { char dstr[30]; \ ! REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \ ! fprintf (FILE, "\t.s_floating %s\n", dstr); \ ! } while (0) /* This is how to output an assembler line defining an `int' constant. */ --- 1468,1509 ---- /* This is how to output an assembler line defining a `double' constant. */ ! #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ ! { \ ! if (REAL_VALUE_ISINF (VALUE) \ ! || REAL_VALUE_ISNAN (VALUE) \ ! || REAL_VALUE_MINUS_ZERO (VALUE)) \ ! { \ ! long t[2]; \ ! REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \ ! fprintf (FILE, "\t.quad 0x%lx%08lx\n", \ ! t[1] & 0xffffffff, t[0] & 0xffffffff); \ ! } \ ! else \ ! { \ ! char str[30]; \ ! REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", str); \ ! fprintf (FILE, "\t.t_floating %s\n", str); \ ! } \ ! } /* This is how to output an assembler line defining a `float' constant. */ ! #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ ! { \ ! if (REAL_VALUE_ISINF (VALUE) \ ! || REAL_VALUE_ISNAN (VALUE) \ ! || REAL_VALUE_MINUS_ZERO (VALUE)) \ ! { \ ! long t; \ ! REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \ ! fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff); \ ! } \ ! else \ ! { \ ! char str[30]; \ ! REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \ ! fprintf (FILE, "\t.s_floating %s\n", str); \ ! } \ ! } /* This is how to output an assembler line defining an `int' constant. */ diff -rc2P gcc-2.4.0/config/arm/arm.md gcc-2.4.1/config/arm/arm.md *** gcc-2.4.0/config/arm/arm.md Thu May 13 19:01:21 1993 --- gcc-2.4.1/config/arm/arm.md Tue May 18 18:07:32 1993 *************** *** 1290,1295 **** int shift = int_log2 (INTVAL (operands[4])); operands[4] = GEN_INT (shift); ! arm_output_asm_insn (\"add\\t%0, %2, %3, asl#%4\", operands); ! operands[2] = operands[0]; return output_add_immediate (operands); }") --- 1290,1296 ---- int shift = int_log2 (INTVAL (operands[4])); operands[4] = GEN_INT (shift); ! arm_output_asm_insn (\"add\\t%0, %2, %3, asl %4\", operands); ! operands[2] = operands[1]; ! operands[1] = operands[0]; return output_add_immediate (operands); }") diff -rc2P gcc-2.4.0/config/convex/convex.c gcc-2.4.1/config/convex/convex.c *** gcc-2.4.0/config/convex/convex.c Sat May 15 11:44:31 1993 --- gcc-2.4.1/config/convex/convex.c Tue May 18 12:25:53 1993 *************** *** 623,844 **** replace_arg_pushes () { ! end_sequence (); ! replace_arg_pushes_1 (); ! start_sequence (); } - replace_arg_pushes_1 () - { - rtx insn, argblock; - int size; - int n; - - /* Look back to see if we are at the return at the end of the function. */ - n = 0; - for (insn = get_last_insn (); ; insn = PREV_INSN (insn)) - if (! insn || ++n > 5) - return; - else if (GET_CODE (insn) == NOTE - && NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_END) - break; - - /* Yes, we are. Find the max stack depth used by fixable arg pushes. */ - size = replace_pushes (0); - - /* Allocate block in frame to hold all arg lists. */ - argblock = assign_stack_local (BLKmode, size, STACK_BOUNDARY); - - /* Replace pushes with stores into the block. */ - replace_pushes (plus_constant (XEXP (argblock, 0), size)); - } - - int - replace_pushes (arg_addr) - rtx arg_addr; - { - struct slot_info { rtx insn; int offs; int size; }; - #define MAXSLOTS 1024 - struct slot_info slots[MAXSLOTS]; - rtx insn, pattern, dest; - enum machine_mode mode; - int offs, minoffs; - int nslot, islot; - int args_size, slots_size; - - nslot = 0; - offs = 0; - minoffs = 0; - - for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) - switch (GET_CODE (insn)) - { - case INSN: - pattern = PATTERN (insn); - if (GET_CODE (pattern) == SET) - { - dest = SET_DEST (pattern); - mode = GET_MODE (dest); - if (push_operand (dest, mode)) - { - offs -= - slots[nslot].size = PUSH_ROUNDING (GET_MODE_SIZE (mode)); - slots[nslot].offs = offs; - slots[nslot].insn = insn; - nslot++; - } - else if (dest == stack_pointer_rtx) - { - rtx src = SET_SRC (pattern); - if (GET_CODE (src) == PLUS - && XEXP (src, 0) == stack_pointer_rtx - && GET_CODE (XEXP (src, 1)) == CONST_INT) - { - offs -= - slots[nslot].size = - INTVAL (XEXP (src, 1)); - slots[nslot].offs = 0; - slots[nslot].insn = insn; - nslot++; - } - else - { - slots[nslot].size = 0; - slots[nslot].offs = 0; - slots[nslot].insn = 0; - nslot++; - } - } - else if (reg_mentioned_p (stack_pointer_rtx, pattern)) - { - slots[nslot].size = 0; - slots[nslot].offs = 0; - slots[nslot].insn = 0; - nslot++; - } - else if (reg_mentioned_p (virtual_stack_dynamic_rtx, pattern) - || reg_mentioned_p (virtual_outgoing_args_rtx, pattern)) - { - slots[nslot].size = 0; - slots[nslot].offs = 0; - slots[nslot].insn = 0; - nslot++; - } - } - else - if (reg_mentioned_p (stack_pointer_rtx, pattern) - || reg_mentioned_p (virtual_stack_dynamic_rtx, pattern) - || reg_mentioned_p (virtual_outgoing_args_rtx, pattern) - || reg_mentioned_p (frame_pointer_rtx, pattern)) - abort (); - - break; - - case CALL_INSN: - { - pattern = PATTERN (insn); - if (GET_CODE (pattern) != PARALLEL) - abort (); - pattern = XVECEXP (pattern, 0, 0); - if (GET_CODE (pattern) == SET) - pattern = SET_SRC (pattern); - if (GET_CODE (pattern) != CALL) - abort (); - args_size = INTVAL (XEXP (pattern, 1)); - - slots_size = 0; - for (islot = nslot; islot > 0; islot--) - { - if (slots[islot - 1].insn == 0) - break; - if (slots_size >= args_size) - break; - slots_size += slots[islot - 1].size; - } - - if (slots_size != args_size) - { - offs += args_size; - if (offs > 0) - offs = 0; - slots[nslot].size = 0; - slots[nslot].offs = 0; - slots[nslot].insn = 0; - nslot++; - - if (arg_addr) - { - /* add insn to pop arg list if left on stack */ - rtx pop_size = XVECEXP (PATTERN (insn), 0, 2); - if (pop_size != const0_rtx) - emit_insn_after (gen_addsi3 (stack_pointer_rtx, - stack_pointer_rtx, - pop_size), - insn); - insn = NEXT_INSN (insn); - } - break; - } - - /* Record size of arg block */ - if (offs < minoffs) - minoffs = offs; - - /*printf ("call %d, args", INSN_UID (insn));*/ - if (arg_addr) - { - /* store arg block + offset as arg list address for call */ - XVECEXP (PATTERN (insn), 0, 3) = plus_constant (arg_addr, offs); - - /* rewrite arg instructions to use block */ - while (nslot > islot) - { - nslot--; - /*printf (" insn %d size %d offs %d", - INSN_UID(slots[nslot].insn), - slots[nslot].size, - slots[nslot].offs);*/ - - if (slots[nslot].offs == 0) - delete_insn (slots[nslot].insn); - else - { - rtx pattern = PATTERN (slots[nslot].insn); - enum machine_mode mode = GET_MODE (SET_DEST (pattern)); - if (GET_MODE_SIZE (mode) < GET_MODE_SIZE (SImode)) - { - SET_SRC (pattern) = - gen_lowpart (SImode, SET_SRC (pattern)); - SET_DEST (pattern) = - gen_rtx (MEM, SImode, - plus_constant (arg_addr, - slots[nslot].offs)); - } - else - SET_DEST (pattern) = - gen_rtx (MEM, mode, - plus_constant (arg_addr, - slots[nslot].offs)); - } - } - /*printf ("\n");*/ - } - - nslot = islot; - - offs += args_size; - if (offs > 0) - abort (); - } - break; - - case CODE_LABEL: - case JUMP_INSN: - case BARRIER: - nslot = offs = 0; - } - - /*printf ("min offset %d\n", minoffs);*/ - return -minoffs; - } - /* Output the insns needed to do a call. operands[] are 0 - MEM, the place to call --- 623,629 ---- replace_arg_pushes () { ! /* Doesn't work yet. */ } /* Output the insns needed to do a call. operands[] are 0 - MEM, the place to call *************** *** 845,849 **** 1 - CONST_INT, the number of bytes in the arg list 2 - CONST_INT, the number of arguments ! 3 - address of the arg list. */ --- 630,635 ---- 1 - CONST_INT, the number of bytes in the arg list 2 - CONST_INT, the number of arguments ! 3 - CONST_INT, the number of bytes to pop ! 4 - address of the arg list. */ *************** *** 852,859 **** rtx insn, *operands; { ! /*if (operands[3] == stack_pointer_rtx) ! output_asm_insn ("mov sp,ap"); else ! output_asm_insn ("ldea %a4,ap", operands);*/ if (TARGET_ARGCOUNT) --- 638,645 ---- rtx insn, *operands; { ! if (operands[4] == stack_pointer_rtx) ! output_asm_insn ("mov sp,ap", operands); else ! abort (); if (TARGET_ARGCOUNT) *************** *** 862,869 **** output_asm_insn ("calls %0", operands); ! /*output_asm_insn ("ld.w 12(fp),ap");*/ ! /*if (operands[3] == stack_pointer_rtx && operands[1] != const0_rtx) ! output_asm_insn ("add.w %1,sp", operands);*/ return ""; --- 648,655 ---- output_asm_insn ("calls %0", operands); ! output_asm_insn ("ld.w 12(fp),ap", operands); ! if (operands[4] == stack_pointer_rtx && operands[3] != const0_rtx) ! output_asm_insn ("add.w %3,sp", operands); return ""; *************** *** 871,1017 **** ! /* Here after reloading, before the second scheduling pass. ! Insert explicit AP moves. */ emit_ap_optimizations () { ! end_sequence (); ! insert_ap_loads (); ! start_sequence (); } - #define LABEL_DEAD_AP(INSN) ((INSN)->volatil) - - insert_ap_loads () - { - rtx insn, pattern, src; - int ap_is_live, doagain; - - /* Check that code_label->volatil is not being used for something else */ - - for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) - if (GET_CODE (insn) == CODE_LABEL) - if (LABEL_DEAD_AP (insn)) - abort (); - - ap_is_live = 0; - - do - { - doagain = 0; - for (insn = get_last_insn (); insn; insn = PREV_INSN (insn)) - switch (GET_CODE (insn)) - { - case INSN: - pattern = PATTERN (insn); - if (! ap_is_live) - { - if (reg_mentioned_p (arg_pointer_rtx, pattern)) - ap_is_live = 1; - } - break; - - case CALL_INSN: - pattern = PATTERN (insn); - if (XVECEXP (pattern, 0, 2) != const0_rtx) - ap_is_live = reg_mentioned_p (arg_pointer_rtx, pattern); - break; - - case CODE_LABEL: - if (! ap_is_live) - { - if (! LABEL_DEAD_AP (insn)) - doagain = 1; - LABEL_DEAD_AP (insn) = 1; - } - break; - - case JUMP_INSN: - pattern = PATTERN (insn); - if (GET_CODE (pattern) == RETURN) - ap_is_live = 0; - else if (JUMP_LABEL (insn)) - { - if (simplejump_p (insn)) - ap_is_live = ! LABEL_DEAD_AP (JUMP_LABEL (insn)); - else if (! ap_is_live && condjump_p (insn)) - ap_is_live = ! LABEL_DEAD_AP (JUMP_LABEL (insn)); - else - ap_is_live = 1; - } - else - ap_is_live = 1; - break; - - case BARRIER: - ap_is_live = 0; - break; - } - } while (doagain); - - ap_is_live = 0; - - for (insn = get_last_insn (); insn; insn = PREV_INSN (insn)) - switch (GET_CODE (insn)) - { - case INSN: - pattern = PATTERN (insn); - if (! ap_is_live) - { - if (reg_mentioned_p (arg_pointer_rtx, pattern)) - ap_is_live = 1; - } - break; - - case CALL_INSN: - pattern = PATTERN (insn); - if (XVECEXP (pattern, 0, 2) != const0_rtx) - { - rtx arg_addr = XVECEXP (pattern, 0, 3); - emit_insn_before (gen_movsi (arg_pointer_rtx, arg_addr), insn); - if (ap_is_live) - emit_insn_after (gen_movsi (arg_pointer_rtx, - gen_rtx (MEM, SImode, - gen_rtx (PLUS, Pmode, - frame_pointer_rtx, - GEN_INT (12)))), - insn); - XVECEXP (pattern, 0, 3) = const0_rtx; - insn = PREV_INSN (insn); - ap_is_live = 0; - } - break; - - case CODE_LABEL: - if (ap_is_live != ! LABEL_DEAD_AP (insn)) - abort (); - break; - - case JUMP_INSN: - pattern = PATTERN (insn); - if (GET_CODE (pattern) == RETURN) - ap_is_live = 0; - else if (JUMP_LABEL (insn)) - { - if (simplejump_p (insn)) - ap_is_live = ! LABEL_DEAD_AP (JUMP_LABEL (insn)); - else if (! ap_is_live && condjump_p (insn)) - ap_is_live = ! LABEL_DEAD_AP (JUMP_LABEL (insn)); - else - ap_is_live = 1; - } - else - ap_is_live = 1; - break; - - case BARRIER: - ap_is_live = 0; - break; - } - - /* Clear code-label flag recording dead ap's. */ - - for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) - if (GET_CODE (insn) == CODE_LABEL) - LABEL_DEAD_AP (insn) = 0; - } --- 657,665 ---- ! /* Here after reloading, before the second scheduling pass. */ emit_ap_optimizations () { ! /* Removed for now. */ } diff -rc2P gcc-2.4.0/config/convex/fixinc.convex gcc-2.4.1/config/convex/fixinc.convex *** gcc-2.4.0/config/convex/fixinc.convex --- gcc-2.4.1/config/convex/fixinc.convex Tue May 18 12:21:06 1993 *************** *** 0 **** --- 1,416 ---- + + # This is a shell archive. Remove anything before this line, + # then unpack it by saving it in a file and typing "sh file". + # + # Wrapped by on Fri Mar 12 08:41:28 CST 1993 + # Contents: include/ include/limits.h include/math.h include/stddef.h + # include/stdlib.h + + echo mkdir - include + mkdir include + chmod u=rwx,g=rwx,o=rx include + + echo x - include/limits.h + sed 's/^@//' > "include/limits.h" <<'@//E*O*F include/limits.h//' + #ifndef _LIMITS_H + #define _LIMITS_H + + #include_next + + /* Minimum and maximum values a `char' can hold. */ + #ifdef __CHAR_UNSIGNED__ + #undef CHAR_MIN + #define CHAR_MIN 0 + #undef CHAR_MAX + #define CHAR_MAX 255 + #endif + + #endif /* _LIMITS_H */ + @//E*O*F include/limits.h// + chmod u=rw,g=rw,o=r include/limits.h + + echo x - include/math.h + sed 's/^@//' > "include/math.h" <<'@//E*O*F include/math.h//' + #ifndef _MATH_H + #define _MATH_H + + #include_next + + #undef HUGE_VAL + + #if _IEEE_FLOAT_ + #define HUGE_VAL 1.79769313486231570e+308 + #else + #define HUGE_VAL 8.98846567431157854e+307 + #endif + + #if __OPTIMIZE__ && ! __NO_INLINE + + #define frexp(x,y) __inline_frexp ((x), (y)) + #define ldexp(x,y) __inline_ldexp ((x), (y)) + #define irint(x) __inline_irint (x) + #define frexpf(x,y) __inline_frexpf ((x), (y)) + #define ldexpf(x,y) __inline_ldexpf ((x), (y)) + #define irintf(x) __inline_irintf (x) + + #if __convex_c2__ || __convex_c32__ || __convex_c34__ || __convex_c38__ + + #define atan(x) __inline_atan (x) + #define ceil(x) __inline_ceil (x) + #define cos(x) __inline_cos (x) + #define exp(x) __inline_exp (x) + #define floor(x) __inline_floor (x) + #define log(x) __inline_log (x) + #define log10(x) __inline_log10 (x) + #define modf(x,y) __inline_modf ((x), (y)) + #define rint(x) __inline_rint (x) + #define sin(x) __inline_sin (x) + #define sqrt(x) __inline_sqrt (x) + + #define atanf(x) __inline_atanf (x) + #define ceilf(x) __inline_ceilf (x) + #define cosf(x) __inline_cosf (x) + #define expf(x) __inline_expf (x) + #define floorf(x) __inline_floorf (x) + #define logf(x) __inline_logf (x) + #define log10f(x) __inline_log10f (x) + #define modff(x,y) __inline_modff ((x), (y)) + #define rintf(x) __inline_rintf (x) + #define sinf(x) __inline_sinf (x) + #define sqrtf(x) __inline_sqrtf (x) + + #endif /* __convex_c[23*]__ */ + + #endif /* __OPTIMIZE__ */ + + static __inline__ __const__ double __inline_atan (double x) + { + double z; + __asm__ ("atan.d %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ float __inline_atanf (float x) + { + float z; + __asm__ ("atan.s %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ double __inline_cos (double x) + { + double z; + __asm__ ("cos.d %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ float __inline_cosf (float x) + { + float z; + __asm__ ("cos.s %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ double __inline_exp (double x) + { + double z; + __asm__ ("exp.d %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ float __inline_expf (float x) + { + float z; + __asm__ ("exp.s %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ double __inline_log (double x) + { + double z; + __asm__ ("ln.d %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ float __inline_logf (float x) + { + float z; + __asm__ ("ln.s %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ double __inline_sin (double x) + { + double z; + __asm__ ("sin.d %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ float __inline_sinf (float x) + { + float z; + __asm__ ("sin.s %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ double __inline_sqrt (double x) + { + double z; + __asm__ ("sqrt.d %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ float __inline_sqrtf (float x) + { + float z; + __asm__ ("sqrt.s %0" : "=d" (z) : "0" (x)); + return z; + } + + static __inline__ __const__ double __inline_ceil (double x) + { + double z; + __asm__ ("frint.d %1,%0" : "=d" (z) : "d" (x)); + if (z < x) z += 1.0; + return z; + } + + static __inline__ __const__ float __inline_ceilf (float x) + { + float z; + __asm__ ("frint.s %1,%0" : "=d" (z) : "d" (x)); + if (z < x) z += 1.0F; + return z; + } + + static __inline__ __const__ double __inline_floor (double x) + { + double z; + __asm__ ("frint.d %1,%0" : "=d" (z) : "d" (x)); + if (z > x) z -= 1.0; + return z; + } + + static __inline__ __const__ float __inline_floorf (float x) + { + float z; + __asm__ ("frint.s %1,%0" : "=d" (z) : "d" (x)); + if (z > x) z -= 1.0F; + return z; + } + + static __inline__ __const__ double __inline_log10 (double x) + { + return 0.43429448190325182765 * __inline_log (x); + } + + static __inline__ __const__ float __inline_log10f (float x) + { + return 0.43429448190325182765F * __inline_logf (x); + } + + static __inline__ double __inline_modf (double x, double *np) + { + double intpart; + __asm__ ("frint.d %1,%0" : "=d" (intpart) : "d" (x)); + *np = intpart; + return x - intpart; + } + + static __inline__ float __inline_modff (float x, float *np) + { + float intpart; + __asm__ ("frint.s %1,%0" : "=d" (intpart) : "d" (x)); + *np = intpart; + return x - intpart; + } + + static __inline__ double __inline_frexp (double x, int *np) + { + union u { double d; unsigned long long ll; } u; + if ((u.d = x) == 0) + *np = 0; + else + { + #if _IEEE_FLOAT_ + *np = ((u.ll >> 52) & 03777) - 01776; + u.ll = (u.ll & 0x800fffffffffffffLL) | 0x3fe0000000000000LL; + #else + *np = ((u.ll >> 52) & 03777) - 02000; + u.ll = (u.ll & 0x800fffffffffffffLL) | 0x4000000000000000LL; + #endif + } + return u.d; + } + + static __inline__ float __inline_frexpf (float x, int *np) + { + union u { float f; unsigned int i; } u; + if ((u.f = x) == 0) + *np = 0; + else + { + #if _IEEE_FLOAT_ + *np = ((u.i >> 23) & 0377) - 0176; + u.i = (u.i & 0x807fffff) | 0x3f000000; + #else + *np = ((u.i >> 23) & 0377) - 0200; + u.i = (u.i & 0x807fffff) | 0x40000000; + #endif + } + return u.f; + } + + static __inline__ double __inline_ldexp (double x, int n) + { + extern int errno; + union { double d; long long ll; unsigned sexp : 12; } u; + if ((u.d = x) != 0) + { + int exp = n + (u.sexp & 03777); + long long nn = (long long) n << 52; + #if _IEEE_FLOAT_ + if (exp <= 0) + u.ll &= 0x8000000000000000LL, errno = 34; + else if (exp > 03776) + u.ll = u.ll & 0x8000000000000000LL | 0x7fefffffffffffffLL, errno = 34; + #else + if (exp <= 0) + u.ll = 0, errno = 34; + else if (exp > 03777) + u.ll |= 0x7fffffffffffffffLL, errno = 34; + #endif + else + u.ll += nn; + } + return u.d; + } + + static __inline__ float __inline_ldexpf (float x, int n) + { + extern int errno; + union { float f; int i; unsigned sexp : 9; } u; + if ((u.f = x) != 0) + { + int exp = n + (u.sexp & 0377); + int nn = n << 23; + #if _IEEE_FLOAT_ + if (exp <= 0) + u.i &= 0x80000000, errno = 34; + else if (exp > 0376) + u.i = u.i & 0x80000000 | 0x7f7fffff, errno = 34; + #else + if (exp <= 0) + u.i = 0, errno = 34; + else if (exp > 0377) + u.i |= 0x7fffffff, errno = 34; + #endif + else + u.i += nn; + } + return u.f; + } + + static __inline__ __const__ double __inline_rint (double x) + { + double z; + union { double d; unsigned long long ll; } u; + u.d = x; + #if _IEEE_FLOAT_ + u.ll = (u.ll & 0x8000000000000000LL) | 0x3fe0000000000000LL; + #else + u.ll = (u.ll & 0x8000000000000000LL) | 0x4000000000000000LL; + #endif + __asm__ ("frint.d %1,%0" : "=d" (z) : "d" (x + u.d)); + return z; + } + + static __inline__ __const__ float __inline_rintf (float x) + { + float z; + union { float f; unsigned int i; } u; + u.f = x; + #if _IEEE_FLOAT_ + u.i = (u.i & 0x80000000) | 0x3f000000; + #else + u.i = (u.i & 0x80000000) | 0x40000000; + #endif + __asm__ ("frint.s %1,%0" : "=d" (z) : "d" (x + u.f)); + return z; + } + + static __inline__ __const__ int __inline_irint (double x) + { + union { double d; unsigned long long ll; } u; + u.d = x; + #if _IEEE_FLOAT_ + u.ll = (u.ll & 0x8000000000000000LL) | 0x3fe0000000000000LL; + #else + u.ll = (u.ll & 0x8000000000000000LL) | 0x4000000000000000LL; + #endif + return x + u.d; + } + + static __inline__ __const__ int __inline_irintf (float x) + { + union { float f; unsigned int i; } u; + u.f = x; + #if _IEEE_FLOAT_ + u.i = (u.i & 0x80000000) | 0x3f000000; + #else + u.i = (u.i & 0x80000000) | 0x40000000; + #endif + return x + u.f; + } + + #endif /* _MATH_H */ + @//E*O*F include/math.h// + chmod u=rw,g=rw,o=r include/math.h + + echo x - include/stddef.h + sed 's/^@//' > "include/stddef.h" <<'@//E*O*F include/stddef.h//' + #ifndef _STDDEF_H + #define _STDDEF_H + + #ifndef __WCHAR_T + #define __WCHAR_T + + #ifdef __GNUG__ + /* In C++, wchar_t is a distinct basic type, + and we can expect __wchar_t to be defined by cc1plus. */ + typedef __wchar_t wchar_t; + #else + /* In C, cpp tells us which type to make an alias for. */ + typedef __WCHAR_TYPE__ wchar_t; + #endif + + #endif /* __WCHAR_T */ + + #include_next + + #endif /* _STDDEF_H */ + @//E*O*F include/stddef.h// + chmod u=rw,g=rw,o=r include/stddef.h + + echo x - include/stdlib.h + sed 's/^@//' > "include/stdlib.h" <<'@//E*O*F include/stdlib.h//' + #ifndef _STDLIB_H + #define _STDLIB_H + + #if _CONVEX_SOURCE + + #define alloca __non_builtin_alloca + #include_next + #undef alloca + + #else + + #include_next + + #endif /* _CONVEX_SOURCE */ + + #endif /* _STDLIB_H */ + @//E*O*F include/stdlib.h// + chmod u=rw,g=rw,o=r include/stdlib.h + + exit 0 diff -rc2P gcc-2.4.0/config/i386/aix386.h gcc-2.4.1/config/i386/aix386.h *** gcc-2.4.0/config/i386/aix386.h Thu Feb 18 20:40:42 1993 --- gcc-2.4.1/config/i386/aix386.h Mon May 24 02:42:40 1993 *************** *** 19,23 **** --- 19,42 ---- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + /* + * This configuration file is for gcc with gas-2.x and gnu ld 2.x + * with aix ps/2 1.3.x. + */ + #include "i386/aix386ng.h" + + /* Use crt1.o as a startup file and crtn.o as a closing file. + And add crtbegin.o and crtend.o for ctors and dtors */ + + #undef STARTFILE_SPEC + #define STARTFILE_SPEC \ + "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} crtbegin.o%s" + #undef ENDFILE_SPEC + #define ENDFILE_SPEC \ + "crtend.o%s crtn.o%s" + + /* Removed the -K flags because the gnu ld does not handle it */ + #undef LINK_SPEC + #define LINK_SPEC "%{T*} %{z:-lm}" /* Define a few machine-specific details of the implementation of diff -rc2P gcc-2.4.0/config/i386/aix386ng.h gcc-2.4.1/config/i386/aix386ng.h *** gcc-2.4.0/config/i386/aix386ng.h Sun Dec 27 17:36:45 1992 --- gcc-2.4.1/config/i386/aix386ng.h Mon May 24 02:42:34 1993 *************** *** 33,41 **** /* Use crt1.o as a startup file and crtn.o as a closing file. */ ! #define STARTFILE_SPEC \ ! "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} crtbegin.o%s" ! #define LIB_SPEC "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} -lc \ ! crtend.o%s crtn.o%s" /* Special flags for the linker. I don't know what they do. */ --- 33,40 ---- /* Use crt1.o as a startup file and crtn.o as a closing file. */ ! #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}" ! #define ENDFILE_SPEC "crtn.o%s" ! #define LIB_SPEC "%{shlib:-lc_s} -lc" /* Special flags for the linker. I don't know what they do. */ *************** *** 45,54 **** /* Specify predefined symbols in preprocessor. */ ! #define CPP_PREDEFINES "-D_I386 -Di386 -DAIX -D_AIX" /* special flags for the aix assembler to generate the short form for all qualifying forward reference */ ! #define ASM_SPEC "-s2" #undef ASM_FILE_START --- 44,58 ---- /* Specify predefined symbols in preprocessor. */ ! #define CPP_PREDEFINES "-Dps2 -Dunix -Di386" + #define CPP_SPEC \ + "%{posix:-D_POSIX_SOURCE}%{!posix:-DAIX} -D_I386 -D_AIX -D_MBCS" + /* special flags for the aix assembler to generate the short form for all qualifying forward reference */ ! /* The buggy /bin/as of aix ps/2 1.2.x cannot always handle it. */ ! #if 0 #define ASM_SPEC "-s2" + #endif /* 0 */ #undef ASM_FILE_START diff -rc2P gcc-2.4.0/config/i386/isc.h gcc-2.4.1/config/i386/isc.h *** gcc-2.4.0/config/i386/isc.h Tue Dec 1 03:47:45 1992 --- gcc-2.4.1/config/i386/isc.h Tue May 18 15:25:19 1993 *************** *** 15,19 **** /* Library spec */ #undef LIB_SPEC ! #define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc -lg" /* ISC 2.2 uses `char' for `wchar_t'. */ --- 15,19 ---- /* Library spec */ #undef LIB_SPEC ! #define LIB_SPEC "%{shlib:-lc_s} %{posix:-lcposix} -lc -lg" /* ISC 2.2 uses `char' for `wchar_t'. */ diff -rc2P gcc-2.4.0/config/i386/sco4.h gcc-2.4.1/config/i386/sco4.h *** gcc-2.4.0/config/i386/sco4.h Sun Dec 27 16:30:54 1992 --- gcc-2.4.1/config/i386/sco4.h Mon May 24 01:40:12 1993 *************** *** 80,81 **** --- 80,98 ---- %{scointl:-D_M_INTERNAT -DM_INTERNAT} \ %{traditional:-D_KR -D_SVID -D_NO_PROTOTYPE}}}}" + + /* Assembler bugs are suspected in floating constants. + So output them as hex. */ + + #undef ASM_OUTPUT_DOUBLE + #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ + do { long l[2]; \ + REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ + fprintf (FILE, "%s 0x%x,0x%x\n", ASM_LONG, l[0], l[1]); \ + } while (0) + + #undef ASM_OUTPUT_FLOAT + #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ + do { long l; \ + REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ + fprintf ((FILE), "%s 0x%x\n", ASM_LONG, l); \ + } while (0) diff -rc2P gcc-2.4.0/config/i386/t-aix gcc-2.4.1/config/i386/t-aix *** gcc-2.4.0/config/i386/t-aix --- gcc-2.4.1/config/i386/t-aix Mon May 24 02:42:31 1993 *************** *** 0 **** --- 1,8 ---- + # target: IBM AIX PS/2 1.3.0 with gas-2.x and gnu ld 2.x + # The one that comes with the system is POSIX-compliant. + LIMITS_H = + + # For aix ps/2 we build crtbegin.o and crtend.o which serve to add begin and + # end labels to the .ctors and .dtors section when we link using gcc. + + EXTRA_PARTS=crtbegin.o crtend.o diff -rc2P gcc-2.4.0/config/i386/x-aix gcc-2.4.1/config/i386/x-aix *** gcc-2.4.0/config/i386/x-aix Sun Dec 27 21:29:41 1992 --- gcc-2.4.1/config/i386/x-aix Mon May 24 02:42:43 1993 *************** *** 1,2 **** --- 1,15 ---- # There is an alloca in -lbsd, but it is limited to 32K ALLOCA = alloca.o + + # If you are running out of memory while compiling gcc, with the standard + # /bin/cc uncomment MALLOCLIB line. That version of malloc is slower but + # has less overhead than the one in libc. + #MALLOCLIB = -lmalloc + + # Uncomment out the next line if you want to link with the shareable libc_s. + #CLIB_S = -lc_s + + CLIB = -lld $(MALLOCLIB) $(CLIB_S) + + # Use a special fixincludes file to avoid munging types.h. + FIXINCLUDES = fixinc.ps2 diff -rc2P gcc-2.4.0/config/i386/x-isc3 gcc-2.4.1/config/i386/x-isc3 *** gcc-2.4.0/config/i386/x-isc3 --- gcc-2.4.1/config/i386/x-isc3 Wed May 19 23:18:52 1993 *************** *** 0 **** --- 1,5 ---- + CLIB = -lPW + # One person said it needs -DPOSIX_JC, but daa@CERF.NET says no. + X_CFLAGS = -D_SYSV3 + ENQUIRE_LDFLAGS = $(LDFLAGS) + INSTALL_HEADERS_DIR = install-headers-cpio diff -rc2P gcc-2.4.0/config/i386/xm-aix.h gcc-2.4.1/config/i386/xm-aix.h *** gcc-2.4.0/config/i386/xm-aix.h Sun Jan 10 21:39:12 1993 --- gcc-2.4.1/config/i386/xm-aix.h Mon May 24 02:42:37 1993 *************** *** 20,23 **** --- 20,26 ---- #define USG + #undef TRUE + #undef FALSE + #include "i386/xm-i386.h" diff -rc2P gcc-2.4.0/config/i860/x-sysv4 gcc-2.4.1/config/i860/x-sysv4 *** gcc-2.4.0/config/i860/x-sysv4 Sat May 15 00:38:43 1993 --- gcc-2.4.1/config/i860/x-sysv4 Wed May 19 17:25:33 1993 *************** *** 43,45 **** CCLIBFLAGS=-Bstatic -dn -gg - X_CFLAGS=-static -g -O2 --- 43,44 ---- diff -rc2P gcc-2.4.0/config/m68k/amix.h gcc-2.4.1/config/m68k/amix.h *** gcc-2.4.0/config/m68k/amix.h Tue Jan 5 03:45:52 1993 --- gcc-2.4.1/config/m68k/amix.h Fri May 21 16:05:48 1993 *************** *** 37,41 **** #undef CPP_PREDEFINES #define CPP_PREDEFINES \ ! "-Dm68k -Dunix -DAMIX -Amachine(m68k) -Acpu(m68k) -Asystem(unix) -Alint(off)" /* At end of a switch table, define LDnnn iff the symbol LInnn was defined. --- 37,41 ---- #undef CPP_PREDEFINES #define CPP_PREDEFINES \ ! "-Dm68k -Dunix -DAMIX -D__svr4__ -Amachine(m68k) -Acpu(m68k) -Asystem(unix) -Alint(off)" /* At end of a switch table, define LDnnn iff the symbol LInnn was defined. *************** *** 122,123 **** --- 122,142 ---- putc ('\n', (FILE)); \ } + + /* Override these for the sake of an assembler bug: the Amix + assembler can't handle .LC0@GOT syntax. This pollutes the final + table for shared librarys but what's a poor soul to do; sigh... RFH */ + + #undef ASM_GENERATE_INTERNAL_LABEL + #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ + if (flag_pic && !strcmp(PREFIX,"LC")) \ + sprintf (LABEL, "*%s%%%d", PREFIX, NUM); \ + else \ + sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM) + + #undef ASM_OUTPUT_INTERNAL_LABEL + #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ + if (flag_pic && !strcmp(PREFIX,"LC")) \ + asm_fprintf (FILE, "%s%%%d:\n", PREFIX, NUM); \ + else \ + asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM) + diff -rc2P gcc-2.4.0/config/m68k/m68k.md gcc-2.4.1/config/m68k/m68k.md *** gcc-2.4.0/config/m68k/m68k.md Sun May 9 10:47:01 1993 --- gcc-2.4.1/config/m68k/m68k.md Fri May 21 16:02:26 1993 *************** *** 5292,5296 **** { cc_status.flags = CC_IN_68881; ! #ifdef HPUX_ASM if (REG_P (operands[0])) { --- 5292,5296 ---- { cc_status.flags = CC_IN_68881; ! #ifdef SGS_CMP_ORDER if (REG_P (operands[0])) { diff -rc2P gcc-2.4.0/config/m68k/sun3.h gcc-2.4.1/config/m68k/sun3.h *** gcc-2.4.0/config/m68k/sun3.h Wed May 12 22:44:36 1993 --- gcc-2.4.1/config/m68k/sun3.h Tue May 25 23:56:01 1993 *************** *** 164,167 **** --- 164,170 ---- #define TARGET_MEM_FUNCTIONS + /* This is not a good idea. It prevents interoperation between + files compiled with -m68881 and those compiled with -msoft-float. */ + #if 0 #define FUNCTION_VALUEX(MODE) \ gen_rtx (REG, (MODE), \ *************** *** 172,175 **** --- 175,179 ---- #undef FUNCTION_VALUE #define FUNCTION_VALUE(VALTYPE,FUNC) FUNCTION_VALUEX (TYPE_MODE (VALTYPE)) + #endif /* 0 */ /* This is how to output an assembler line defining a `double' constant. */ diff -rc2P gcc-2.4.0/config/m68k/tower-as.h gcc-2.4.1/config/m68k/tower-as.h *** gcc-2.4.0/config/m68k/tower-as.h Fri May 14 12:28:49 1993 --- gcc-2.4.1/config/m68k/tower-as.h Mon May 24 12:52:18 1993 *************** *** 640,644 **** /* The usual definitions don't work because neither $ nor . is allowed. */ ! #define CONSTRUCTOR_NAME_FORMAT "_GLOBAL_%%I%%%s" /* Define a few machine-specific details --- 640,644 ---- /* The usual definitions don't work because neither $ nor . is allowed. */ ! #define CONSTRUCTOR_NAME_FORMAT "_GLOBAL_%%I\%%%s" /* Define a few machine-specific details diff -rc2P gcc-2.4.0/config/m88k/x-tekXD88 gcc-2.4.1/config/m88k/x-tekXD88 *** gcc-2.4.0/config/m88k/x-tekXD88 Sat May 8 23:06:13 1993 --- gcc-2.4.1/config/m88k/x-tekXD88 Sun May 23 00:49:15 1993 *************** *** 7,8 **** --- 7,12 ---- # Green Hills C on the Tektronix XD88 does not provide alloca. ALLOCA=alloca.o + + # rc is cleaner, but the ar program sometimes crashes. + # This is a workaround. + AR_FLAGS=qc diff -rc2P gcc-2.4.0/config/mips/iris3.h gcc-2.4.1/config/mips/iris3.h *** gcc-2.4.0/config/mips/iris3.h Tue May 11 17:08:19 1993 --- gcc-2.4.1/config/mips/iris3.h Sun May 23 01:24:58 1993 *************** *** 46,50 **** %{pipe: %e-pipe is not supported.} \ %{mips1} %{mips2} %{mips3} \ ! %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K} \ %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ --- 46,51 ---- %{pipe: %e-pipe is not supported.} \ %{mips1} %{mips2} %{mips3} \ ! %{noasmopt:-O0} \ ! %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K} \ %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ diff -rc2P gcc-2.4.0/config/mips/iris4gl.h gcc-2.4.1/config/mips/iris4gl.h *** gcc-2.4.0/config/mips/iris4gl.h --- gcc-2.4.1/config/mips/iris4gl.h Wed May 26 00:41:23 1993 *************** *** 0 **** --- 1,17 ---- + /* Like iris4-gdb.h, but always inhibits assembler optimization. + Use this via mips-sgi-iris4loser if you need it. */ + + #include "mips/iris4-gdb.h" + + #undef ASM_SPEC + #define ASM_SPEC "\ + %{!mgas: \ + %{!mrnames: %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}}} \ + %{pipe: %e-pipe is not supported.} \ + %{mips1} %{mips2} %{mips3} \ + %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K} \ + %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ + %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \ + %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \ + %{gcoff:-g} %{gstabs0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}} \ + %{G*}" diff -rc2P gcc-2.4.0/config/mips/iris4loser.h gcc-2.4.1/config/mips/iris4loser.h *** gcc-2.4.0/config/mips/iris4loser.h --- gcc-2.4.1/config/mips/iris4loser.h Wed May 26 00:39:19 1993 *************** *** 0 **** --- 1,17 ---- + /* Like iris4.h, but always inhibits assembler optimization. + Use this via mips-sgi-iris4loser if you need it. */ + + #include "mips/iris4.h" + + #undef ASM_SPEC + #define ASM_SPEC "\ + %{!mgas: \ + %{!mrnames: %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}}} \ + %{pipe: %e-pipe is not supported.} \ + %{mips1} %{mips2} %{mips3} \ + %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K} \ + %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ + %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \ + %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \ + %{gcoff:-g} %{gstabs0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}} \ + %{G*}" diff -rc2P gcc-2.4.0/config/mips/mips.h gcc-2.4.1/config/mips/mips.h *** gcc-2.4.0/config/mips/mips.h Tue May 11 17:08:25 1993 --- gcc-2.4.1/config/mips/mips.h Wed May 26 00:36:03 1993 *************** *** 550,554 **** %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} \ ! %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K} \ %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ --- 550,555 ---- %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} \ ! %{noasmopt:-O0} \ ! %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K} \ %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ diff -rc2P gcc-2.4.0/config/mips/x-sony gcc-2.4.1/config/mips/x-sony *** gcc-2.4.0/config/mips/x-sony --- gcc-2.4.1/config/mips/x-sony Tue May 18 14:23:09 1993 *************** *** 0 **** --- 1,18 ---- + # Make internal tables bigger. + OLDCC= -Wf,-XNg1500,-XNh1500 -Olimit 3000 $(OPT) + + # Define CC and OLDCC as the same, so that the tests: + # if [ x"$(OLDCC)" = x"$(CC)" ] ... + # + # will succeed (if OLDCC != CC, it is assumed that GCC is + # being used in secondary stage builds). We need to pass + # the -Wf,-XNg1500 option so the compiler can compile the + # G++ file cp-parse.c. Otherwise it complains about + # too many case statements. The -Olimit is so the user + # can use -O2. Down with fixed size tables! + + CC = $(OLDCC) + OPT = -O1 + + # This is so we can link collect2 running native. + CLIB = -lmld diff -rc2P gcc-2.4.0/config/nextstep.h gcc-2.4.1/config/nextstep.h *** gcc-2.4.0/config/nextstep.h Sat May 1 16:37:41 1993 --- gcc-2.4.1/config/nextstep.h Tue May 25 18:10:53 1993 *************** *** 1,3 **** ! /* next.h -- operating system specific defines to be used when targeting GCC for NeXTSTEP. Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. --- 1,3 ---- ! /* nextstep.h -- operating system specific defines to be used when targeting GCC for NeXTSTEP. Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. *************** *** 31,36 **** { LOCAL_INCLUDE_DIR, 0}, \ { "/NextDeveloper/Headers", 0}, \ - { "/NextDeveloper/Headers/ansi", 0}, \ - { "/NextDeveloper/Headers/bsd", 0}, \ { "/LocalDeveloper/Headers", 0}, \ { "/LocalDeveloper/Headers/ansi", 0}, \ --- 31,34 ---- *************** *** 38,41 **** --- 36,40 ---- { "/NextDeveloper/2.0CompatibleHeaders", 0}, \ { STANDARD_INCLUDE_DIR, 0}, \ + { "/usr/include/bsd", 0}, \ { 0, 0} \ } diff -rc2P gcc-2.4.0/config/pa/pa.h gcc-2.4.1/config/pa/pa.h *** gcc-2.4.0/config/pa/pa.h Mon May 17 13:45:46 1993 --- gcc-2.4.1/config/pa/pa.h Thu May 20 01:09:40 1993 *************** *** 58,62 **** Older linkers and assemblers might not support this. */ ! #define TARGET_SHARED_LIBS (target_flags & 8) /* Force all function calls to indirect addressing via a register. This --- 58,62 ---- Older linkers and assemblers might not support this. */ ! #define TARGET_SHARED_LIBS 1 /* was (target_flags & 8) */ /* Force all function calls to indirect addressing via a register. This *************** *** 721,727 **** /* 1 if N is a possible register number for function argument passing. */ ! #define FUNCTION_ARG_REGNO_P(N) (((N) >= 23 && (N) <= 26) || \ ! ((N) >= 32 && (N) <= 35) || \ ! ((N) >= 44 && (N) <= 51)) /* Define a data type for recording info about an argument list --- 721,728 ---- /* 1 if N is a possible register number for function argument passing. */ ! #define FUNCTION_ARG_REGNO_P(N) \ ! (((N) >= 23 && (N) <= 26) \ ! || ((N) >= 32 && (N) <= 35 && ! TARGET_SNAKE) \ ! || ((N) >= 44 && (N) <= 51 && TARGET_SNAKE)) /* Define a data type for recording info about an argument list *************** *** 775,780 **** is pushed. ! Arguments passed in registers are either 1 or 2 words long. */ #define FUNCTION_ARG_PADDING(MODE, TYPE) function_arg_padding ((MODE), (TYPE)) --- 776,786 ---- is pushed. ! Arguments passed in registers are either 1 or 2 words long. + The caller must make a distinction between calls to explicitly named + functions and calls through pointers to functions -- the conventions + are different! Calls through pointers to functions only use general + registers for the first four argument words. */ + #define FUNCTION_ARG_PADDING(MODE, TYPE) function_arg_padding ((MODE), (TYPE)) *************** *** 783,791 **** ? gen_rtx (REG, (MODE), \ (FUNCTION_ARG_SIZE ((MODE), (TYPE)) > 1 \ ! ? ((MODE) == DFmode \ ? ((CUM) ? (TARGET_SNAKE ? 50 : 35) \ : (TARGET_SNAKE ? 46 : 33)) \ : ((CUM) ? 23 : 25)) \ ! : ((MODE) == SFmode \ ? (TARGET_SNAKE ? 44 + 2 * (CUM) : 32 + (CUM)) \ : (27 - (CUM) - FUNCTION_ARG_SIZE ((MODE), (TYPE))))))\ --- 789,799 ---- ? gen_rtx (REG, (MODE), \ (FUNCTION_ARG_SIZE ((MODE), (TYPE)) > 1 \ ! ? ((! (TARGET_SHARED_LIBS && current_call_is_indirect) \ ! && (MODE) == DFmode) \ ? ((CUM) ? (TARGET_SNAKE ? 50 : 35) \ : (TARGET_SNAKE ? 46 : 33)) \ : ((CUM) ? 23 : 25)) \ ! : ((! (TARGET_SHARED_LIBS && current_call_is_indirect) \ ! && (MODE) == SFmode) \ ? (TARGET_SNAKE ? 44 + 2 * (CUM) : 32 + (CUM)) \ : (27 - (CUM) - FUNCTION_ARG_SIZE ((MODE), (TYPE))))))\ *************** *** 1008,1012 **** they do not accept integer displacements. */ \ start_addr = force_reg (SImode, (TRAMP)); \ ! end_addr = force_reg (SImode, plus_constant (start_addr, TRAMPOLINE_SIZE));\ emit_insn (gen_cacheflush (start_addr, end_addr)); \ } --- 1016,1020 ---- they do not accept integer displacements. */ \ start_addr = force_reg (SImode, (TRAMP)); \ ! end_addr = force_reg (SImode, plus_constant ((TRAMP), 8)); \ emit_insn (gen_cacheflush (start_addr, end_addr)); \ } diff -rc2P gcc-2.4.0/config/rs6000/rs6000.h gcc-2.4.1/config/rs6000/rs6000.h *** gcc-2.4.0/config/rs6000/rs6000.h Wed Mar 31 14:59:52 1993 --- gcc-2.4.1/config/rs6000/rs6000.h Wed May 19 18:07:47 1993 *************** *** 1194,1197 **** --- 1194,1200 ---- the rest of the bigs in the register. */ #define BYTE_LOADS_ZERO_EXTEND + + /* Define if loading short immediate values into registers sign extends. */ + #define SHORT_IMMEDIATES_SIGN_EXTEND /* The RS/6000 uses the XCOFF format. */ diff -rc2P gcc-2.4.0/config/sparc/sol2.h gcc-2.4.1/config/sparc/sol2.h *** gcc-2.4.0/config/sparc/sol2.h Thu Feb 18 20:21:45 1993 --- gcc-2.4.1/config/sparc/sol2.h Tue May 25 23:43:42 1993 *************** *** 146,150 **** fprintf (file, ".stabn 68,0,%d,.LM%d-%s\n.LM%d:\n", \ line, sym_lineno, \ ! IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)),\ sym_lineno); \ sym_lineno += 1; } --- 146,150 ---- fprintf (file, ".stabn 68,0,%d,.LM%d-%s\n.LM%d:\n", \ line, sym_lineno, \ ! XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0), \ sym_lineno); \ sym_lineno += 1; } diff -rc2P gcc-2.4.0/configure gcc-2.4.1/configure *** gcc-2.4.0/configure Fri May 14 16:47:04 1993 --- gcc-2.4.1/configure Wed May 26 00:41:30 1993 *************** *** 56,63 **** # Default prefix to /usr/local. prefix=/usr/local ! # Default this separately to /usr/local. ! # It should change only if the user insists. ! # The purpose of this is to make sure that certain dirs in /usr/local ! # are used REGARDLESS of where GCC is installed. # DO NOT make this use $prefix! local_prefix=/usr/local --- 56,65 ---- # Default prefix to /usr/local. prefix=/usr/local ! ! # local_prefix specifies where to find the directory /usr/local/include ! # We don't use $(prefix) for this ! # because we always want GCC to search /usr/local/include ! # even if GCC is installed somewhere other than /usr/local. ! # Think THREE TIMES before specifying any other value for this! # DO NOT make this use $prefix! local_prefix=/usr/local *************** *** 371,375 **** broken_install=yes install_headers_dir=install-headers-cpio ! if [ x$gas = xyes ] || [ x$stabs = xyes ] then tm_file=i386/sco4dbx.h --- 373,377 ---- broken_install=yes install_headers_dir=install-headers-cpio ! if [ x$stabs = xyes ] then tm_file=i386/sco4dbx.h *************** *** 398,402 **** cpu_type=i386 xm_file=i386/xm-isc.h ! xmake_file=i386/x-isc if [ x$gas = xyes ] then --- 400,412 ---- cpu_type=i386 xm_file=i386/xm-isc.h ! case $machine in ! i[34]86-*-isc3*) ! xmake_file=i386/x-isc3 ! ;; ! *) ! xmake_file=i386/x-isc ! ;; ! esac ! echo $xmake_file if [ x$gas = xyes ] then *************** *** 413,416 **** --- 423,427 ---- tmake_file=i386/t-isc fi + install_headers_dir=install-headers-cpio broken_install=yes ;; *************** *** 420,423 **** --- 431,435 ---- then tm_file=i386/aix386.h + tmake_file=i386/t-aix else tm_file=i386/aix386ng.h *************** *** 876,879 **** --- 888,909 ---- use_collect2=yes ;; + mips-sgi-irix4loser*) # Mostly like a MIPS. + if [ x$stabs = xyes ]; then + tm_file=mips/iris4gl.h + else + tm_file=mips/iris4loser.h + fi + xm_file=mips/xm-iris4.h + broken_install=yes + xmake_file=mips/x-iris + if [ x$gas = xyes ] + then + tmake_file=mips/t-mips-gas + fi + if [ x$gnu_ld != xyes ] + then + use_collect2=yes + fi + ;; mips-sgi-irix4*) # Mostly like a MIPS. if [ x$stabs = xyes ]; then *************** *** 912,916 **** fi ;; ! mips-dec-ultrix*) # Decstation. if [ x$stabs = xyes ]; then tm_file=mips/ultrix-gdb.h --- 942,946 ---- fi ;; ! mips-*-ultrix*) # Decstation. if [ x$stabs = xyes ]; then tm_file=mips/ultrix-gdb.h *************** *** 968,971 **** --- 998,1002 ---- use_collect2=yes fi + xmake_file=mips/x-sony ;; mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0. diff -rc2P gcc-2.4.0/configure.bat gcc-2.4.1/configure.bat *** gcc-2.4.0/configure.bat Fri Apr 9 17:40:05 1993 --- gcc-2.4.1/configure.bat Mon May 17 18:07:27 1993 *************** *** 18,22 **** echo "target=go32 ">> config.sed echo "/^version=/ c\ ">> config.sed ! sed -e "s/[^\"]*\"/version=/" -e "s/\ .*//" version.c >> config.sed echo "s/CC = cc/CC = gcc/ ">> config.sed echo "s/:\$/: \$/g ">> config.sed --- 18,22 ---- echo "target=go32 ">> config.sed echo "/^version=/ c\ ">> config.sed ! sed -e "s/.*\"\([^ \"]*\)[ \"].*/version=\1/" version.c >> config.sed echo "s/CC = cc/CC = gcc/ ">> config.sed echo "s/:\$/: \$/g ">> config.sed diff -rc2P gcc-2.4.0/cp-call.c gcc-2.4.1/cp-call.c *** gcc-2.4.0/cp-call.c Thu May 6 20:24:03 1993 --- gcc-2.4.1/cp-call.c Mon May 24 16:06:26 1993 *************** *** 358,362 **** dig it a little, so a non-const reference is preferred over this one. (mrs) */ ! if (TREE_READONLY (ttl) && ! TREE_READONLY (parm)) penalty = 2; else --- 358,362 ---- dig it a little, so a non-const reference is preferred over this one. (mrs) */ ! if (parm && TREE_READONLY (ttl) && ! TREE_READONLY (parm)) penalty = 2; else diff -rc2P gcc-2.4.0/cp-method.c gcc-2.4.1/cp-method.c *** gcc-2.4.0/cp-method.c Tue Apr 27 02:06:59 1993 --- gcc-2.4.1/cp-method.c Mon May 24 15:27:31 1993 *************** *** 820,825 **** builds a general TARGET_EXPR, there's no way to represent that it initializes anything other that the parameter slot for the ! default argument. */ ! dump_init (TREE_OPERAND (t, 1)); return; --- 820,827 ---- builds a general TARGET_EXPR, there's no way to represent that it initializes anything other that the parameter slot for the ! default argument. Note we may have cleared out the first ! operand in expand_expr, so don't go killing ourselves. */ ! if (TREE_OPERAND (t, 1)) ! dump_init (TREE_OPERAND (t, 1)); return; diff -rc2P gcc-2.4.0/cp-pt.c gcc-2.4.1/cp-pt.c *** gcc-2.4.0/cp-pt.c Sun May 9 19:27:54 1993 --- gcc-2.4.1/cp-pt.c Fri May 21 10:28:29 1993 *************** *** 1206,1211 **** IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (method))); #endif ! ! if (! TREE_PERMANENT (DECL_ARGUMENTS (method))) /* @@ Is this early enough? Might we want to do this instead while processing the expansion? */ --- 1206,1211 ---- IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (method))); #endif ! if (DECL_ARGUMENTS (method) ! && ! TREE_PERMANENT (DECL_ARGUMENTS (method))) /* @@ Is this early enough? Might we want to do this instead while processing the expansion? */ diff -rc2P gcc-2.4.0/dbxout.c gcc-2.4.1/dbxout.c *** gcc-2.4.0/dbxout.c Thu May 13 18:22:16 1993 --- gcc-2.4.1/dbxout.c Tue May 25 23:43:21 1993 *************** *** 2349,2353 **** #if DBX_BLOCKS_FUNCTION_RELATIVE fputc ('-', asmfile); ! assemble_name (asmfile, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl))); #endif fprintf (asmfile, "\n"); --- 2349,2353 ---- #if DBX_BLOCKS_FUNCTION_RELATIVE fputc ('-', asmfile); ! assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); #endif fprintf (asmfile, "\n"); *************** *** 2382,2386 **** #if DBX_BLOCKS_FUNCTION_RELATIVE fputc ('-', asmfile); ! assemble_name (asmfile, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl))); #endif fprintf (asmfile, "\n"); --- 2382,2386 ---- #if DBX_BLOCKS_FUNCTION_RELATIVE fputc ('-', asmfile); ! assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); #endif fprintf (asmfile, "\n"); diff -rc2P gcc-2.4.0/emit-rtl.c gcc-2.4.1/emit-rtl.c *** gcc-2.4.0/emit-rtl.c Thu Apr 1 02:30:52 1993 --- gcc-2.4.1/emit-rtl.c Wed May 19 13:13:13 1993 *************** *** 1,4 **** /* Emit RTL for the GNU C-Compiler expander. ! Copyright (C) 1987, 1988, 1992 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,4 ---- /* Emit RTL for the GNU C-Compiler expander. ! Copyright (C) 1987, 1988, 1992, 1993 Free Software Foundation, Inc. This file is part of GNU CC. *************** *** 996,1008 **** At this point, i == 0 means the low-order word. ! Note that it must be that BITS_PER_WORD <= HOST_BITS_PER_INT. ! This is because if it were greater, it could only have been two ! times greater since we do not support making wider constants. In ! that case, it MODE would have already been the proper size and ! it would have been handled above. This means we do not have to ! worry about the case where we would be returning a CONST_DOUBLE. */ if (GET_MODE_CLASS (mode) != MODE_INT ! || (GET_CODE (op) != CONST_INT && GET_CODE (op) != CONST_DOUBLE)) return 0; --- 996,1009 ---- At this point, i == 0 means the low-order word. ! We do not want to handle the case when BITS_PER_WORD <= HOST_BITS_PER_INT ! in general. However, if OP is (const_int 0), we can just return ! it for any word. */ + if (op == const0_rtx) + return op; + if (GET_MODE_CLASS (mode) != MODE_INT ! || (GET_CODE (op) != CONST_INT && GET_CODE (op) != CONST_DOUBLE) ! || BITS_PER_WORD > HOST_BITS_PER_INT) return 0; diff -rc2P gcc-2.4.0/enquire.c gcc-2.4.1/enquire.c *** gcc-2.4.0/enquire.c Sat Feb 27 17:18:50 1993 --- gcc-2.4.1/enquire.c Thu May 20 17:58:21 1993 *************** *** 27,30 **** --- 27,32 ---- (f_define): Use ordinary constants for long double if it's same width as double. Make __convert_long_double_i unsigned. + Richard Stallman, May 93: + In F_check, check NO_LONG_DOUBLE_IO. COMPILING *************** *** 2147,2151 **** sometimes you've got to be cruel to be kind. */ - Long_double new1; Number val, new, diff; double rem; --- 2149,2152 ---- *************** *** 2154,2157 **** --- 2155,2169 ---- char *f2; + #ifdef NO_LONG_DOUBLE_IO + double new1; + /* On the Sun 3, sscanf clobbers 4 words, + which leads to a crash when this function tries to return. */ + f2= "%le"; /* Input */ + /* It is no use checking long doubles if we can't + read and write them. */ + if (sizeof (Number) > sizeof(double)) + return; + #else + Long_double new1; if (sizeof(double) == sizeof(Long_double)) { /* Assume they're the same, and use non-stdc format */ *************** *** 2162,2165 **** --- 2174,2178 ---- f2= "%Le"; } + #endif val= val1; rep= f_rep(precision, (Long_double) val); diff -rc2P gcc-2.4.0/expr.c gcc-2.4.1/expr.c *** gcc-2.4.0/expr.c Sat May 15 16:10:37 1993 --- gcc-2.4.1/expr.c Mon May 24 15:24:43 1993 *************** *** 5099,5102 **** --- 5099,5114 ---- The function we call will perform the cleanup in this case. */ + /* If we have already assigned it space, use that space, + not target that we were passed in, as our target + parameter is only a hint. */ + if (DECL_RTL (slot) != 0) + { + target = DECL_RTL (slot); + /* If we have already expanded the slot, so don't do + it again. (mrs) */ + if (TREE_OPERAND (exp, 1) == NULL_TREE) + return target; + } + DECL_RTL (slot) = target; } diff -rc2P gcc-2.4.0/fixinc.ps2 gcc-2.4.1/fixinc.ps2 *** gcc-2.4.0/fixinc.ps2 --- gcc-2.4.1/fixinc.ps2 Sun May 23 16:30:44 1993 *************** *** 0 **** --- 1,1107 ---- + #! /bin/sh + # This is a modified version of fixincludes that fixes + # a bug encountered on AIX for the PS/2. + # This version might be better on all systems, but at this moment + # (making 2.4.1) I don't want to risk that change. -- rms. + + # Install modified versions of certain ANSI-incompatible system header files + # which are fixed to work correctly with ANSI C + # and placed in a directory that GNU C will search. + + # See README-fixinc for more information. + + # Directory where gcc sources (and sometimes special include files) live. + # fixincludes doesn't use this, but fixinc.svr4 does, and I want to make + # sure somebody doesn't try to use arg3 for something incompatible. -- gumby + SRCDIR=${3-${SRCDIR-.}} + + # Directory containing the original header files. + # (This was named INCLUDES, but that conflicts with a name in Makefile.in.) + INPUT=${2-${INPUT-/usr/include}} + + # Directory in which to store the results. + LIB=${1?"fixincludes: output directory not specified"} + + # Define PWDCMD as a command to use to get the working dir + # in the form that we want. + PWDCMD=pwd + case "`pwd`" in + //*) + # On an Apollo, discard everything before `/usr'. + PWDCMD="eval pwd | sed -e 's,.*/usr/,/usr/,'" + ;; + esac + + # Original directory. + ORIGDIR=`${PWDCMD}` + + # Make sure it exists. + if [ ! -d $LIB ]; then + mkdir $LIB || exit 1 + fi + + # Make LIB absolute only if needed to avoid problems with the amd. + case $LIB in + /*) + ;; + *) + cd $LIB; LIB=`${PWDCMD}` + ;; + esac + + # Make SRCDIR absolute only if needed to avoid problems with the amd. + cd $ORIGDIR + case $SRCDIR in + /*) + ;; + *) + cd $SRCDIR; SRCDIR=`${PWDCMD}` + ;; + esac + + # Fail if no arg to specify a directory for the output. + if [ x$1 = x ] + then echo fixincludes: no output directory specified + exit 1 + fi + + echo Building fixed headers in ${LIB} + + # Determine whether this system has symbolic links. + if ln -s X $LIB/ShouldNotExist 2>/dev/null; then + rm -f $LIB/ShouldNotExist + LINKS=true + else + LINKS=false + fi + + echo Finding directories and links to directories + cd ${INPUT} + # Find all directories and all symlinks that point to directories. + # Put the list in $files. + # Each time we find a symlink, add it to newdirs + # so that we do another find within the dir the link points to. + # Note that $files may have duplicates in it; + # later parts of this file are supposed to ignore them. + dirs="." + levels=2 + while [ -n "$dirs" ] && [ $levels -gt 0 ] + do + levels=`expr $levels - 1` + newdirs= + for d in $dirs + do + echo " Searching $INPUT/$d" + if [ "$d" != . ] + then + d=$d/. + fi + + # Find all directories under $d, relative to $d, excluding $d itself. + files="$files `find $d -type d -print | \ + sed -e '/\/\.$/d' -e '/^\.$/d'`" + # Find all links to directories. + # Using `-exec test -d' in find fails on some systems, + # and trying to run test via sh fails on others, + # so this is the simplest alternative left. + # First find all the links, then test each one. + theselinks= + $LINKS && \ + theselinks=`find $d -type l -print` + for d1 in $theselinks --dummy-- + do + # If the link points to a directory, + # add that dir to $newdirs + if [ -d $d1 ] + then + newdirs="$newdirs $d1" + fi + done + done + + files="$files $newdirs" + dirs="$newdirs" + done + + dirs= + echo "All directories (including links to directories):" + echo $files + + for file in $files; do + rm -rf $LIB/$file + if [ ! -d $LIB/$file ] + then mkdir $LIB/$file + fi + done + mkdir $LIB/root + + # treetops gets an alternating list + # of old directories to copy + # and the new directories to copy to. + treetops="${INPUT} ${LIB}" + + if $LINKS; then + echo 'Making symbolic directory links' + for file in $files; do + dest=`ls -ld $file | sed -n 's/.*-> //p'` + if [ "$dest" ]; then + cwd=`${PWDCMD}` + # In case $dest is relative, get to $file's dir first. + cd ${INPUT} + cd `echo ./$file | sed -n 's&[^/]*$&&p'` + # Check that the target directory exists. + # Redirections changed to avoid bug in sh on Ultrix. + (cd $dest) > /dev/null 2>&1 + if [ $? = 0 ]; then + cd $dest + # X gets the dir that the link actually leads to. + x=`${PWDCMD}` + # If a link points to ., make a similar link to . + if [ $x = $INPUT ]; then + echo $file '->' . ': Making link' + rm -fr ${LIB}/$file > /dev/null 2>&1 + ln -s . ${LIB}/$file > /dev/null 2>&1 + # If link leads back into ${INPUT}, + # make a similar link here. + elif expr $x : "${INPUT}/.*" > /dev/null; then + # Y gets the actual target dir name, relative to ${INPUT}. + y=`echo $x | sed -n "s&${INPUT}/&&p"` + echo $file '->' $y ': Making link' + rm -fr ${LIB}/$file > /dev/null 2>&1 + ln -s ${LIB}/$y ${LIB}/$file > /dev/null 2>&1 + else + # If the link is to a dir $target outside ${INPUT}, + # repoint the link at ${INPUT}/root$target + # and process $target into ${INPUT}/root$target + # treat this directory as if it actually contained the files. + echo $file '->' root$x ': Making link' + if [ -d $LIB/root$x ] + then true + else + dirname=root$x/ + dirmade=. + cd $LIB + while [ x$dirname != x ]; do + component=`echo $dirname | sed -e 's|/.*$||'` + mkdir $component >/dev/null 2>&1 + cd $component + dirmade=$dirmade/$component + dirname=`echo $dirname | sed -e 's|[^/]*/||'` + done + fi + # Duplicate directory structure created in ${LIB}/$file in new + # root area. + for file2 in $files; do + case $file2 in + $file/./*) + dupdir=${LIB}/root$x/`echo $file2 | sed -n "s|^${file}/||p"` + echo "Duplicating ${file}'s ${dupdir}" + if [ -d ${dupdir} ] + then true + else + mkdir ${dupdir} + fi + ;; + *) + ;; + esac + done + rm -fr ${LIB}/$file > /dev/null 2>&1 + ln -s ${LIB}/root$x ${LIB}/$file > /dev/null 2>&1 + treetops="$treetops $x ${LIB}/root$x" + fi + fi + cd $cwd + fi + done + fi + + set x $treetops + shift + while [ $# != 0 ]; do + # $1 is an old directory to copy, and $2 is the new directory to copy to. + cd ${INPUT} + cd $1 + # The same dir can appear more than once in treetops. + # There's no need to scan it more than once. + if [ -f $2/DONE ] + then + files= + else + touch $2/DONE + echo Fixing directory $1 into $2 + # Check .h files which are symlinks as well as those which are files. + # A link to a header file will not be processed by anything but this. + if $LINKS; then + files=`find . -name '*.h' \( -type f -o -type l \) -print` + else + files=`find . -name '*.h' -type f -print` + fi + echo Checking header files + fi + # Note that BSD43_* are used on recent MIPS systems. + for file in $files; do + # This call to egrep is essential, since checking a file with egrep + # is much faster than actually trying to fix it. + # It is also essential that most files *not* match! + # Thus, matching every #endif is unacceptable. + # But the argument to egrep must be kept small, or many versions of egrep + # won't be able to handle it. + # + # We use the pattern [!-.0-~] instead of [^/ ] to match a noncomment + # following #else or #endif because some buggy egreps think [^/] matches + # newline, and they thus think `#else ' matches `#e[ndiflse]*[ ]+[^/ ]'. + # + # We use the pattern [^a-zA-Z0-9_][_a-ce-km-z][a-z0-9] to match an identifier + # following #if or #elif that is not surrounded by __. The `a-ce-km-z' + # in this pattern lacks `d' and `l'; this means we don't worry about + # identifiers starting with `d' or `l'. This is OK, since none of the + # identifiers below start with `d' or `l'. It also greatly improves + # performance, since many files contain lines of the form `#if ... defined ...' + # or `#if lint'. + if egrep '//|[ _]_IO|CTRL|^#define.NULL|^#e[nl][ds][ief]*[ ]+[!-.0-~]|^#[el]*if.*[^a-zA-Z0-9_][_a-ce-km-z][a-z0-9]' $file >/dev/null; then + if [ -r $file ]; then + cp $file $2/$file >/dev/null 2>&1 \ + || echo "Can't copy $file" + chmod +w $2/$file + chmod a+r $2/$file + # Here is how the sed commands in braces work. + # (It doesn't work to put the comments inside the sed commands.) + # Surround each word with spaces, to simplify matching below. + # ANSIfy each pre-ANSI machine-dependent symbol + # by surrounding it with __ __. + # Remove the spaces that we inserted around each word. + sed -e ' + :loop + /\\$/ N + /\\$/ b loop + s%^\([ ]*#[ ]*endif[ ]*\)\([^/ ].*\)$%\1/* \2 */% + s%^\([ ]*#[ ]*else[ ]*\)\([^/ ].*\)$%\1/* \2 */% + /\/\/[^*]/ s|//\(.*\)$|/*\1*/| + /[ ]_IO[A-Z]*[ ]*(/ s/\(_IO[A-Z]*[ ]*(\)\(.\),/\1'\''\2'\'',/ + /[ ]BSD43__IO[A-Z]*[ ]*(/ s/(\(.\),/('\''\1'\'',/ + /#define._IO/ s/'\''\([cgx]\)'\''/\1/g + /#define.BSD43__IO/ s/'\''\([cgx]\)'\''/\1/g + /[^A-Z0-9_]CTRL[ ]*(/ s/\([^'\'']\))/'\''\1'\'')/ + /[^A-Z0-9]_CTRL[ ]*(/ s/\([^'\'']\))/'\''\1'\'')/ + /#define.CTRL/ s/'\''\([cgx]\)'\''/\1/g + /#define._CTRL/ s/'\''\([cgx]\)'\''/\1/g + /#define.BSD43_CTRL/ s/'\''\([cgx]\)'\''/\1/g + /#[el]*if/{ + s/[a-zA-Z0-9_][a-zA-Z0-9_]*/ & /g + + s/ bsd4\([0-9]\) / __bsd4\1__ /g + s/ _*i386 / __i386__ /g + s/ is68k / __is68k__ /g + s/ m68k / __m68k__ /g + s/ mc680\([0-9]\)0 / __mc680\10__ /g + s/ news\([0-9]*\) / __news\1__ /g + s/ ns32000 / __ns32000__ /g + s/ pyr / __pyr__ /g + s/ sony_news / __sony_news__ /g + s/ sparc / __sparc__ /g + s/ sun\([a-z0-9]*\) / __sun\1__ /g + s/ unix / __unix__ /g + s/ vax / __vax__ /g + + s/ \([a-zA-Z0-9_][a-zA-Z0-9_]*\) /\1/g + } + /^#define.NULL[ ]/ i\ + #undef NULL + ' $2/$file > $2/$file. + mv $2/$file. $2/$file + if cmp $file $2/$file >/dev/null 2>&1; then + rm $2/$file + else + echo Fixed $file + fi + fi + fi + done + shift; shift + done + + cd ${INPUT} + + # Install the proper definition of size_t in header files that it comes from. + for file in sys/types.h sys/stdtypes.h; + do + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file comment + # Extract the definition of SIZE_TYPE, if any. + # (This file must be called something.c). + echo "#include \"tm.h\" + gobblegobble SIZE_TYPE" > ${LIB}/types.c + foo=`cd ${LIB}; cc -E -I${ORIGDIR} -I${SRCDIR} -I${SRCDIR}/config types.c | grep gobblegobble | sed -e "s/gobblegobble[ ]*//"` + rm -f ${LIB}/types.c + # Default to our preferred type. + if [ "$foo" = SIZE_TYPE ]; then foo="unsigned long int"; else foo=`echo $foo | sed -e 's/^.*"\(.*\)".*$/\1/'`; fi + sed -e "s/typedef[ ][ ]*[a-z_][ a-z_]*[ ]size_t/typedef $foo size_t/" ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + done + + # Fix one other error in this file: a mismatched quote not inside a C comment. + file=sundev/vuid_event.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/sundev 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file comment + sed -e "s/doesn't/does not/" ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix these Sun OS files to avoid an invalid identifier in an #ifdef. + file=sunwindow/win_cursor.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + # mkdir ${LIB}/sunwindow 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + fi + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e "s/ecd.cursor/ecd_cursor/" ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + file=sunwindow/win_lock.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + # mkdir ${LIB}/sunwindow 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + fi + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e "s/ecd.cursor/ecd_cursor/" ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix this Sun file to avoid interfering with stddef.h. + file=sys/stdtypes.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e '/size_t.*;/i\ + #ifndef _GCC_SIZE_T\ + #define _GCC_SIZE_T' \ + -e '/size_t.*;/a\ + #endif' \ + -e '/ptrdiff_t.*;/i\ + #ifndef _GCC_PTRDIFF_T\ + #define _GCC_PTRDIFF_T' \ + -e '/ptrdiff_t.*;/a\ + #endif' \ + -e '/wchar_t.*;/i\ + #ifndef _GCC_WCHAR_T\ + #define _GCC_WCHAR_T' \ + -e '/wchar_t.*;/a\ + #endif' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix this file to avoid interfering with stddef.h, but don't mistakenly + # match e.g. ssize_t present in AIX for the ps/2. + file=sys/types.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e '/[ ]size_t;/i\ + #ifndef _GCC_SIZE_T\ + #define _GCC_SIZE_T' \ + -e '/[ ]size_t;/a\ + #endif' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix an error in this file: the #if says _cplusplus, not the double + # underscore __cplusplus that it should be + file=tinfo.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/rpcsvc 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, __cplusplus macro + sed -e 's/[ ]_cplusplus/ __cplusplus/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix an error in this file: a missing semi-colon at the end of the statsswtch + # structure definition. + file=rpcsvc/rstat.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/rpcsvc 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, definition of statsswtch + sed -e 's/boottime$/boottime;/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Fix an error in this file: a missing semi-colon at the end of the nodeent + # structure definition. + file=netdnet/dnetdb.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/netdnet 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, definition of nodeent + sed -e 's/char.*na_addr *$/char *na_addr;/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Check for bad #ifdef line (in Ultrix 4.1) + file=sys/file.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, bad \#ifdef line + sed -e 's/#ifdef KERNEL/#if defined(KERNEL)/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Remove nested comments created by #endifs in a comment (Ultrix 4.1) + # Only needed if commenting out junk after #endif. + file=signal.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, nested comments + sed -e 's/#endif.*/#endif/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Check for superfluous `static' (in Ultrix 4.2) + file=machine/cpu.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/machine 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, superfluous static + sed -e 's/^static struct tlb_pid_state/struct tlb_pid_state/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + else + # This file has an alternative name, mips/cpu.h. Fix that name, too. + if cmp machine/cpu.h mips/cpu.h > /dev/null 2>& 1; then + mkdir ${LIB}/mips 2>&- + ln ${LIB}/$file ${LIB}/mips/cpu.h + fi + fi + fi + + # Incorrect sprintf declaration in X11/Xmu.h + file=X11/Xmu.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/X11 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file sprintf declaration + sed -e 's,^extern char \* sprintf();$,#ifndef __STDC__\ + extern char * sprintf();\ + #endif /* !defined __STDC__ */,' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Incorrect sprintf declaration in X11/Xmu/Xmu.h + # (It's not clear whether the right file name is this or X11/Xmu.h.) + file=X11/Xmu/Xmu.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/X11/Xmu 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file sprintf declaration + sed -e 's,^extern char \* sprintf();$,#ifndef __STDC__\ + extern char * sprintf();\ + #endif /* !defined __STDC__ */,' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm ${LIB}/$file + fi + fi + + # Check for missing ';' in struct + file=netinet/ip.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/netinet 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e '/^struct/,/^};/s/}$/};/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix the CAT macro in SunOS memvar.h. + file=pixrect/memvar.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/pixrect 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e '/^#define.CAT(a,b)/ i\ + #ifdef __STDC__ \ + #define CAT(a,b) a##b\ + #else + /^#define.CAT(a,b)/ a\ + #endif + ' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Check for yet more missing ';' in struct (in SunOS 4.0.x) + file=rpcsvc/rusers.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/rpcsvc 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e '/^struct/,/^};/s/_cnt$/_cnt;/' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix return type of exit and abort in on SunOS 4.1. + file=stdlib.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/int abort/void abort/g' \ + -e 's/int free/void free/g' \ + -e 's/char \* calloc/void \* calloc/g' \ + -e 's/char \* malloc/void \* malloc/g' \ + -e 's/char \* realloc/void \* realloc/g' \ + -e 's/int exit/void exit/g' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix return type of free and {c,m,re}alloc in on SunOS 4.1. + file=malloc.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/typedef[ ]char \* malloc_t/typedef void \* malloc_t/g' \ + -e 's/int[ ][ ]*free/void free/g' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + + # Fix bogus comment in on SunOS 4.1. + file=locale.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's%#endif / \*%#endif /\* %g' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix bogus #ifdef in on SunOS 4.1. + file=hsfs/hsfs_spec.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/hsfs 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' \ + ${LIB}/$file > ${LIB}/${file}. + rm -f ${LIB}/$file; mv ${LIB}/${file}. ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix bogus #ifdef in on SunOS 4.1. + file=hsfs/hsnode.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/hsfs 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/\#ifdef __i386__ || __sun4c__/\#if __i386__ || __sun4c__/g' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix bogus #ifdef in on SunOS 4.1. + file=hsfs/iso_spec.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/hsfs 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file + sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Incorrect #include in Sony News-OS 3.2. + file=machine/machparam.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/machine 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, incorrect \#include + sed -e 's@"../machine/endian.h"@@' \ + ${LIB}/$file > ${LIB}/${file}. + rm -f ${LIB}/$file; mv ${LIB}/${file}. ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Multiline comment after typedef on IRIX 4.0.1. + file=sys/types.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + mkdir ${LIB}/sys 2>/dev/null + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, comment in the middle of \#ifdef + sed -e 's@type of the result@type of the result */@' \ + -e 's@of the sizeof@/* of the sizeof@' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix line in IRIX 4.0.1 header file. The sed script turns + # #define EM_CTRL (CUTIOC|0x1) + # into + # #define EM_CTRL (CUTIOC|0x'1') + file=sys/t3270reg.h + if [ -r ${LIB}/$file ]; then + echo Fixing $file, overeager sed script + sed -e "s/0x'1'/0x1/" ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Turning // comments into /* */ comments trashes this IRIX 4.0.1 + # header file, which embeds // comments inside multi-line /* */ + # comments. If this looks like the IRIX header file, we refix it by + # just throwing away the // comments. + file=fam.h + if [ -r ${LIB}/$file ]; then + if egrep indigo.esd ${LIB}/$file > /dev/null; then + echo Fixing $file, overeager sed script + rm ${LIB}/$file + sed -e 's|//.*$||g' $file > ${LIB}/$file + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + fi + + # Another IRIX 4.0.1 header file contains the string "//" + file=elf_abi.h + if [ -r ${LIB}/$file ]; then + echo Fixing $file, overeager sed script + sed -e 's|"/\*"\*/|"//"|' ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Fix non-ANSI memcpy declaration that conflicts with gcc's builtin + # declaration on Sun OS 4.x. We must only fix this on Sun OS 4.x, because + # many other systems have similar text but correct versions of the file. + # To ensure only Sun's is fixed, we grep for a likely unique string. + file=memory.h + if [ -r $file ] && egrep '/\* @\(#\)memory\.h 1\.[2-4] 8./../.. SMI; from S5R2 1\.2 \*/' $file > /dev/null; then + if [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + if [ -r ${LIB}/$file ]; then + echo Replacing $file + cat > ${LIB}/$file << EOF + /* This file was generated by fixincludes */ + #ifndef __memory_h__ + #define __memory_h__ + + #ifdef __STDC__ + extern void *memccpy(); + extern void *memchr(); + extern void *memcpy(); + extern void *memset(); + #else + extern char *memccpy(); + extern char *memchr(); + extern char *memcpy(); + extern char *memset(); + #endif /* __STDC__ */ + + extern int memcmp(); + + #endif /* __memory_h__ */ + EOF + fi + fi + + # parameters not const on DECstation Ultrix V4.0. + file=stdio.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, non-const arg + sed -e 's@perror( char \*__s );@perror( const char *__s );@' \ + -e 's@fputs( char \*__s,@fputs( const char *__s,@' \ + -e 's@fopen( char \*__filename, char \*__type );@fopen( const char *__filename, const char *__type );@' \ + -e 's@fwrite( void \*__ptr,@fwrite( const void *__ptr,@' \ + -e 's@fscanf( FILE \*__stream, char \*__format,@fscanf( FILE *__stream, const char *__format,@' \ + -e 's@scanf( char \*__format,@scanf( const char *__format,@' \ + -e 's@sscanf( char \*__s, char \*__format,@sscanf( const char *__s, const char *__format,@' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # parameters conflict with C++ new on rs/6000 + file=stdio.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, parameter name conflicts + sed -e 's@rename(const char \*old, const char \*new)@rename(const char *_old, const char *_new)@' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Don't use or define the name va_list in stdio.h. + # This is for ANSI and also to interoperate properly with gvarargs.h. + file=stdio.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, use of va_list + # Arrange for stdio.h to use stdarg.h to define __gnuc_va_list + (echo "#define __need___va_list" + echo "#include ") > ${LIB}/${file}.sed + # Use __gnuc_va_list in arg types in place of va_list. + # On 386BSD use __gnuc_va_list instead of _VA_LIST_. We're hoping the + # trailing parentheses and semicolon save all other systems from this. + # Define __va_list__ (something harmless and unused) instead of va_list. + # Don't claim to have defined va_list. + sed -e 's@ va_list @ __gnuc_va_list @' \ + -e 's@ va_list)@ __gnuc_va_list)@' \ + -e 's@ _VA_LIST_));@ __gnuc_va_list));@' \ + -e 's@ va_list@ __va_list__@' \ + -e 's@\*va_list@*__va_list__@' \ + -e 's@VA_LIST@DUMMY_VA_LIST@' \ + ${LIB}/$file >> ${LIB}/${file}.sed + + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # Cancel out ansi_compat.h on Ultrix. Replace it with empty file. + file=ansi_compat.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + if grep -s ULTRIX $file; then + echo "/* This file intentionally left blank. */" > $LIB/$file + fi + fi + + # parameter to atof not const on DECstation Ultrix V4.0. + # also get rid of bogus inline definitions in HP-UX 8.0 + file=math.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + echo Fixing $file, non-const arg + sed -e 's@atof( char \*__nptr );@atof( const char *__nptr );@' \ + -e 's@inline int abs(int d) { return (d>0)?d:-d; }@@' \ + -e 's@inline double abs(double d) { return fabs(d); }@@' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi + fi + + # In limits.h, put #ifndefs around things that are supposed to be defined + # in float.h to avoid redefinition errors if float.h is included first. + # On HP/UX this patch does not work, because on HP/UX limits.h uses + # multi line comments and the inserted #endif winds up inside the + # comment. Fortunately, HP/UX already uses #ifndefs in limits.h; if + # we find a #ifndef FLT_MIN we assume that all the required #ifndefs + # are there, and we do not add them ourselves. + file=limits.h + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null + fi + + if [ -r ${LIB}/$file ]; then + if egrep 'ifndef[ ]+FLT_MIN' ${LIB}/$file >/dev/null; then + true + else + echo Fixing $file + sed -e '/[ ]FLT_MIN[ ]/i\ + #ifndef FLT_MIN'\ + -e '/[ ]FLT_MIN[ ]/a\ + #endif'\ + -e '/[ ]FLT_MAX[ ]/i\ + #ifndef FLT_MAX'\ + -e '/[ ]FLT_MAX[ ]/a\ + #endif'\ + -e '/[ ]FLT_DIG[ ]/i\ + #ifndef FLT_DIG'\ + -e '/[ ]FLT_DIG[ ]/a\ + #endif'\ + -e '/[ ]DBL_MIN[ ]/i\ + #ifndef DBL_MIN'\ + -e '/[ ]DBL_MIN[ ]/a\ + #endif'\ + -e '/[ ]DBL_MAX[ ]/i\ + #ifndef DBL_MAX'\ + -e '/[ ]DBL_MAX[ ]/a\ + #endif'\ + -e '/[ ]DBL_DIG[ ]/i\ + #ifndef DBL_DIG'\ + -e '/[ ]DBL_DIG[ ]/a\ + #endif'\ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + fi + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + echo Deleting ${LIB}/$file\; no fixes were needed. + rm -f ${LIB}/$file + fi + fi + + # These two files on SunOS 4 are included by other files + # in the same directory, using "...". So we must make sure they exist + # in the same directory as the other fixed files. + if [ -r ${INPUT}/multimedia/audio_errno.h ] + then + ln -s ${INPUT}/multimedia/audio_errno.h ${LIB}/multimedia 2>/dev/null + fi + if [ -r ${INPUT}/multimedia/audio_hdr.h ] + then + ln -s ${INPUT}/multimedia/audio_hdr.h ${LIB}/multimedia 2>/dev/null + fi + + # These files on Ultrix 4.2 put comments around instances of #endif + # __mips. When the sed expression turns that into #endif /* __mips */ + # the comment ends prematurely. + for file in sys/audit.h sys/signal.h; do + if [ -r ${LIB}/${file} ]; then + echo Fixing $file, early comment termination + sed -e 's|^#endif /\*.*\*/|#endif|g' ${LIB}/${file} > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + fi + done + + echo 'Removing unneeded directories:' + cd $LIB + files=`find . -type d -print | sort -r` + for file in $files; do + rmdir $LIB/$file > /dev/null 2>&1 + done + + if $LINKS; then + echo 'Making internal symbolic non-directory links' + cd ${INPUT} + files=`find . -type l -print` + for file in $files; do + dest=`ls -ld $file | sed -n 's/.*-> //p'` + if expr "$dest" : '[^/].*' > /dev/null; then + target=${LIB}/`echo file | sed "s|[^/]*\$|$dest|"` + if [ -f $target ]; then + ln -s $dest ${LIB}/$file >/dev/null 2>&1 + fi + fi + done + fi + + echo 'Cleaning up DONE files.' + cd $LIB + find . -name DONE -exec rm -f {} ';' + + exit 0 diff -rc2P gcc-2.4.0/fixinc.svr4 gcc-2.4.1/fixinc.svr4 *** gcc-2.4.0/fixinc.svr4 Mon May 17 14:18:50 1993 --- gcc-2.4.1/fixinc.svr4 Mon May 17 17:34:06 1993 *************** *** 529,533 **** # tend to conflict with the compiler's own definition of this symbol. (We # will use the compiler's definition.) ! # Likewise __sparc, for Solaris, and __i860, and (this is a guess) __m88k. file=ieeefp.h --- 529,534 ---- # tend to conflict with the compiler's own definition of this symbol. (We # will use the compiler's definition.) ! # Likewise __sparc, for Solaris, and __i860, and a few others ! # (guessing it is necessary for all of them). file=ieeefp.h *************** *** 548,551 **** --- 549,553 ---- sed -e '/#define[ ]*__i386 /d' -e '/#define[ ]*__sparc /d' \ -e '/#define[ ]*__i860 /d' -e '/#define[ ]*__m88k /d' \ + -e '/#define[ ]*__mips /d' -e '/#define[ ]*__m68k /d' \ /tmp/$base > /tmp/$base.sed if cmp $file_to_fix /tmp/$base.sed >/dev/null 2>&1; then \ diff -rc2P gcc-2.4.0/fixincludes gcc-2.4.1/fixincludes *** gcc-2.4.0/fixincludes Sun May 9 17:57:55 1993 --- gcc-2.4.1/fixincludes Sun May 23 17:51:49 1993 *************** *** 278,283 **** /#define._IO/ s/'\''\([cgx]\)'\''/\1/g /#define.BSD43__IO/ s/'\''\([cgx]\)'\''/\1/g ! /[^A-Z_]CTRL[ ]*(/ s/\([^'\'']\))/'\''\1'\'')/ ! /[^A-Z]_CTRL[ ]*(/ s/\([^'\'']\))/'\''\1'\'')/ /#define.CTRL/ s/'\''\([cgx]\)'\''/\1/g /#define._CTRL/ s/'\''\([cgx]\)'\''/\1/g --- 278,283 ---- /#define._IO/ s/'\''\([cgx]\)'\''/\1/g /#define.BSD43__IO/ s/'\''\([cgx]\)'\''/\1/g ! /[^A-Z0-9_]CTRL[ ]*(/ s/\([^'\'']\))/'\''\1'\'')/ ! /[^A-Z0-9]_CTRL[ ]*(/ s/\([^'\'']\))/'\''\1'\'')/ /#define.CTRL/ s/'\''\([cgx]\)'\''/\1/g /#define._CTRL/ s/'\''\([cgx]\)'\''/\1/g *************** *** 304,309 **** /^#define.NULL[ ]/ i\ #undef NULL ! ' $2/$file > $2/$file.sed ! mv $2/$file.sed $2/$file if cmp $file $2/$file >/dev/null 2>&1; then rm $2/$file --- 304,309 ---- /^#define.NULL[ ]/ i\ #undef NULL ! ' $2/$file > $2/$file. ! mv $2/$file. $2/$file if cmp $file $2/$file >/dev/null 2>&1; then rm $2/$file *************** *** 735,740 **** echo Fixing $file sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' \ ! ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file if cmp $file ${LIB}/$file >/dev/null 2>&1; then rm -f ${LIB}/$file --- 735,740 ---- echo Fixing $file sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' \ ! ${LIB}/$file > ${LIB}/${file}. ! rm -f ${LIB}/$file; mv ${LIB}/${file}. ${LIB}/$file if cmp $file ${LIB}/$file >/dev/null 2>&1; then rm -f ${LIB}/$file *************** *** 792,797 **** echo Fixing $file, incorrect \#include sed -e 's@"../machine/endian.h"@@' \ ! ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file if cmp $file ${LIB}/$file >/dev/null 2>&1; then rm -f ${LIB}/$file --- 792,797 ---- echo Fixing $file, incorrect \#include sed -e 's@"../machine/endian.h"@@' \ ! ${LIB}/$file > ${LIB}/${file}. ! rm -f ${LIB}/$file; mv ${LIB}/${file}. ${LIB}/$file if cmp $file ${LIB}/$file >/dev/null 2>&1; then rm -f ${LIB}/$file diff -rc2P gcc-2.4.0/function.c gcc-2.4.1/function.c *** gcc-2.4.0/function.c Thu May 6 13:09:59 1993 --- gcc-2.4.1/function.c Thu May 20 00:55:47 1993 *************** *** 2705,2708 **** --- 2705,2711 ---- int varargs_setup = 0; rtx conversion_insns = 0; + /* FUNCTION_ARG may look at this variable. Since this is not + expanding a call it will always be zero in this function. */ + int current_call_is_indirect = 0; /* Nonzero if the last arg is named `__builtin_va_alist', diff -rc2P gcc-2.4.0/g++int.texi gcc-2.4.1/g++int.texi *** gcc-2.4.0/g++int.texi Fri Feb 5 13:39:52 1993 --- gcc-2.4.1/g++int.texi Tue May 18 16:25:17 1993 *************** *** 39,42 **** --- 39,133 ---- where the grammar doesn't even properly accept them yet. + @node Routines + @section Routines + + This section describes some of the routines used in the C++ front-end. + + build_vtable and prepare_fresh_vtable is used only within the cp-class.c + file, and only in finish_struct and modify_vtable_entries. + + build_vtable, prepare_fresh_vtable, and finish_struct are the only + routines that set DECL_VPARENT. + + finish_struct can steal the virtual function table from parents, this + prohibits related_vslot from working. When finish_struct steals, we + know that get_binfo (DECL_FIELD_CONTEXT (CLASSTYPE_VFIELD (t)), t, 0) + will get the related binfo. + + layout_basetypes does something with the VIRTUALS. + + Supposedly (according to Tiemann) most of the breadth first searching + done, like in get_base_distance and in get_binfo was not because of any + design decision. I have since found out the at least one part of the + compiler needs the notion of depth first binfo searching, I am going to + try and convert the whole thing, it should just work. The term + left-most refers to the depth first left-most node. It uses + MAIN_VARIENT == type as the condition to get left-most, because the + things that have BINFO_OFFSET of zero are shared and will have + themselves as their own MAIN_VARIENTs. The non-shared right ones, are + copies of the left-most one, hence if it is it's own MAIN_VARIENT, we + know it IS a left-most one, if it is not, it is a non-left-most one. + + get_base_distance's path and distance matters in it's use in: + prepare_fresh_vtable (the code is probably wrong), init_vfields depends + upon distance probably in a safe way, build_offset_ref might use partial + paths to do further lookups, hack_identifier is probably not properly + checking visibility. + + get_first_matching_virtual probably should check for get_base_distance + returning -2. + + resolve_offset_ref should be called in a more deterministic manner. + Right now, it is called in some random contexts, like for arguments at + build_method_call time, default_conversion time, convert_arguments time, + build_unary_op time, build_c_cast time, build_modify_expr time, + convert_for_assignment time, and convert_for_initialization time. + + But, there are still more contexts it needs to be called in, on was the + ever simple: + + if (obj.*pmi != 7) + ... + + Seems that the problems were due to the fact that TREE_TYPE of the + OFFSET_REF was not a OFFSET_TYPE, but rather the type of the thingy + (like INTEGER_TYPE). This problem was fixed by changing + default_conversion to check TREE_CODE (x), instead of only checking + TREE_CODE (TREE_TYPE (x)) to see if it was OFFSET_TYPE. + + @node Glossary + @section Glossary + + @item binfo + The main data structure in the compiler used to represent the + inheritance relationships between classes. The data in the binfo can be + accessed by the BINFO_ accessor macros. + + @item vtable + @item virtual function table + + The virtual function table holds information used in virtual function + dispatching. In the compiler, they are usually referred to as vtables, + or vtbls. The first index is not used in the normal way, I believe it + is probably used for the virtual destructor. + + See also vfield and virtual function table pointer. + + @item vfield + + vfields can be thought of as the base information needed to build + vtables. For every vtable that exists for a class, there is a vfield. + See also vtable and virtual function table pointer. When a type is used + as a base class to another type, the virtual function table for the + derived class can be based upon the vtable for the base class, just + extended to include the additional virtual methods declared in the + derived class. + + @item virtual function table pointer + + These are FIELD_DECLs that are pointer types that point to vtables. See + also vtable and vfield. + + @node Macros @section Macros *************** *** 51,54 **** --- 142,147 ---- @item BINFO_BASETYPES A vector of additional binfos for the types inherited by this basetype. + The binfos are fully unshared (except for virtual bases, in which + case the binfo structure is shared). If this basetype describes type D as inherited in C, *************** *** 56,69 **** then this vector contains binfos for inheritance of E and F by C. - ??? This could probably be done by just allocating the - base types at the end of this TREE_VEC (instead of using - another TREE_VEC). This would simplify the calculation - of how many basetypes a given type had. - Has values of: ! TREE_VEC @item BINFO_OFFSET The offset where this basetype appears in its containing type. --- 149,184 ---- then this vector contains binfos for inheritance of E and F by C. Has values of: ! TREE_VECs ! ! ! @item BINFO_INHERITANCE_CHAIN ! Temporarily used to represent specific inheritances. It usually points ! to the binfo associated with the lesser derived type, but it can be ! reversed by reverse_path. For example: ! ! Z ZbY least derived ! | ! Y YbX ! | ! X Xb most derived ! ! TYPE_BINFO (X) == Xb ! BINFO_INHERITANCE_CHAIN (Xb) == YbX ! BINFO_INHERITANCE_CHAIN (Yb) == ZbY ! BINFO_INHERITANCE_CHAIN (Zb) == 0 ! ! Not sure is the above is really true, get_base_distance has is point ! towards the most derived type, opposite from above. + Set by build_vbase_path, recursive_bounded_basetype_p, + get_base_distance, lookup_field, lookup_fnfields, and reverse_path. + What things can this be used on: + + TREE_VECs that are binfos + + @item BINFO_OFFSET The offset where this basetype appears in its containing type. *************** *** 86,97 **** @item BINFO_VTABLE ! Points to the virtual function table associated with this binfo. See ! also TYPE_BINFO_VTABLE. ! Can be used on: TREE_VECs that are binfos @item BLOCK_SUPERCONTEXT In the outermost scope of each function, it points to the FUNCTION_DECL --- 201,217 ---- @item BINFO_VTABLE ! Used to find the VAR_DECL that is the virtual function table associated ! with this binfo. See also TYPE_BINFO_VTABLE. To get the virtual ! function table pointer, see CLASSTYPE_VFIELD. ! What things can this be used on: TREE_VECs that are binfos + Has values of: + + VAR_DECLs that are virtual function tables + @item BLOCK_SUPERCONTEXT In the outermost scope of each function, it points to the FUNCTION_DECL *************** *** 133,143 **** Has values of: ! TREE_VEC @item DECL_CLASS_CONTEXT ! Identifys the context that the _DECL was found in. See also ! DECL_CONTEXT. For virtual function vtables, it points to the type ! associated with the virtual function table. The difference between this and DECL_CONTEXT, is that for virtuals --- 253,277 ---- Has values of: ! TREE_VECs + @item CLASSTYPE_VFIELD + Seems to be in the process of being renamed TYPE_VFIELD. Use on types + to get the main virtual function table pointer. To get the virtual + function table use BINFO_VTABLE (TYPE_BINFO ()). + + Has values of: + + FIELD_DECLs that are virtual function table pointers + + What things can this be used on: + + RECORD_TYPEs + + @item DECL_CLASS_CONTEXT ! Identifys the context that the _DECL was found in. For virtual function ! tables, it points to the type associated with the virtual function ! table. See also DECL_CONTEXT, DECL_FIELD_CONTEXT and DECL_FCONTEXT. The difference between this and DECL_CONTEXT, is that for virtuals *************** *** 162,180 **** Has values of: ! RECORD_TYPE, or UNION_TYPE. What things can this be used on: ! TYPE_DECLs, *_DECLs @item DECL_CONTEXT ! Identifys the context that the _DECL was found in. See also ! DECL_CLASS_CONTEXT. Can be used on virtual function tables to find the ! type associated with the virtual function table. Has values of: ! RECORD_TYPE --- 296,338 ---- Has values of: ! RECORD_TYPEs, or UNION_TYPEs What things can this be used on: ! TYPE_DECLs, _DECLs @item DECL_CONTEXT ! Identifys the context that the _DECL was found in. Can be used on ! virtual function tables to find the type associated with the virtual ! function table, but since they are FIELD_DECLs, DECL_FIELD_CONTEXT is a ! better access method. Internally the same as DECL_FIELD_CONTEXT, so ! don't us both. See also DECL_FIELD_CONTEXT, DECL_FCONTEXT and ! DECL_CLASS_CONTEXT. ! ! Has values of: ! ! RECORD_TYPEs ! ! ! What things can this be used on: ! ! VAR_DECLs that are virtual function tables ! _DECLs + + @item DECL_FIELD_CONTEXT + Identifys the context that the FIELD_DECL was found in. Internally the + same as DECL_CONTEXT, so don't us both. See also DECL_CONTEXT, + DECL_FCONTEXT and DECL_CLASS_CONTEXT. + Has values of: ! RECORD_TYPEs ! ! What things can this be used on: ! ! FIELD_DECLs that are virtual function pointers ! FIELD_DECLs *************** *** 184,188 **** Has values of: ! IDENTIFIER_NODE What things can this be used on: --- 342,346 ---- Has values of: ! IDENTIFIER_NODEs What things can this be used on: *************** *** 195,200 **** Has values of: ! 0 for things that don't have names. ! IDENTIFIER_NODE for TYPE_DECLs. --- 353,358 ---- Has values of: ! 0 for things that don't have names ! IDENTIFIER_NODEs for TYPE_DECLs *************** *** 231,235 **** What things can this be used on: ! FIELD_DECLs and VAR_DECLs. --- 389,393 ---- What things can this be used on: ! FIELD_DECLs and VAR_DECLs *************** *** 236,244 **** @item DECL_VPARENT Used to point to the parent type of the vtable if there is one, else it ! is just the type associated with the vtable. What things can this be used on: ! VAR_DECLs and FIELD_DECLs that are virtual tables. Has values of: --- 394,404 ---- @item DECL_VPARENT Used to point to the parent type of the vtable if there is one, else it ! is just the type associated with the vtable. Because of the sharing of ! virtual function tables that goes on, this slot is not very useful, and ! is in fact, not used in the compiler at all. It can be removed. What things can this be used on: ! VAR_DECLs that are virtual function tables Has values of: *************** *** 248,255 **** --- 408,433 ---- @item DECL_FCONTEXT + Used to find the first baseclass in which this FIELD_DECL is defined. + See also DECL_CONTEXT, DECL_FIELD_CONTEXT and DECL_CLASS_CONTEXT. + + How it is used: + + Used when writing out debugging information about vfield and + vbase decls. + What things can this be used on: + FIELD_DECLs that are virtual function pointers FIELD_DECLs + + @item DECL_REFERENCE_SLOT + Used to hold the initialize for the reference. + + What things can this be used on: + + PARM_DECLs and VAR_DECLs that have a reference type + + @item DECL_VINDEX Used for FUNCTION_DECLs in two different ways. Before the structure *************** *** 258,262 **** FUNCTION_DECL will replace as a virtual function. When the class is laid out, this pointer is changed to an INTEGER_CST node which is ! suitable for use as an index into the virtual function table. DECL_VINDEX may be a TREE_LIST, that would seem to be a list of --- 436,443 ---- FUNCTION_DECL will replace as a virtual function. When the class is laid out, this pointer is changed to an INTEGER_CST node which is ! suitable to find an index into the virtual function table. See ! get_vtable_entry as to how one can find the right index into the virtual ! function table. The first index 0, of a virtual function table it not ! used in the normal way, so the first real index is 1. DECL_VINDEX may be a TREE_LIST, that would seem to be a list of *************** *** 267,270 **** --- 448,456 ---- + What things can this be used on: + + FUNCTION_DECLs + + @findex DECL_SOURCE_FILE @item DECL_SOURCE_FILE *************** *** 273,277 **** Has values of: ! "" on TYPE_DECLs to mean the typedef is built in. --- 459,463 ---- Has values of: ! "" on TYPE_DECLs to mean the typedef is built in *************** *** 282,294 **** Has values of: ! 0 for an undefined label. ! 0 for TYPE_DECLs that are internally generated. ! 0 for FUNCTION_DECLs for functions generated by the compiler. ! (not yet, but should be.) 0 for ``magic'' arguments to functions, that the user has no ! control over. --- 468,480 ---- Has values of: ! 0 for an undefined label ! 0 for TYPE_DECLs that are internally generated ! 0 for FUNCTION_DECLs for functions generated by the compiler ! (not yet, but should be) 0 for ``magic'' arguments to functions, that the user has no ! control over *************** *** 297,301 **** Has values of: ! 0 for unused labels. --- 483,487 ---- Has values of: ! 0 for unused labels *************** *** 304,307 **** --- 490,499 ---- + @item TREE_COMPLEXITY + They seem a kludge way to track recursion, poping, and pushing. They only + appear in cp-decl.c and cp-decl2.c, so the are a good candidate for + proper fixing, and removal. + + @item TREE_PRIVATE Set for FIELD_DECLs by finish_struct. But not uniformly set. *************** *** 322,325 **** --- 514,529 ---- + @item TYPE_BINFO + Used to get the binfo for the type. + + Has values of: + + TREE_VECs that are binfos + + What things can this be used on: + + RECORD_TYPEs + + @item TYPE_BINFO_BASETYPES See also BINFO_BASETYPES. *************** *** 344,348 **** Has values of: ! VAR_DECLs or FIELD_DECLs that are virtual function tables. --- 548,552 ---- Has values of: ! VAR_DECLs that are virtual function tables *************** *** 365,369 **** ENUM_TYPEs ! How is it used: Used by dwarfout.c to fetch the name of structs, unoins and enums --- 569,573 ---- ENUM_TYPEs ! How it is used: Used by dwarfout.c to fetch the name of structs, unoins and enums *************** *** 376,381 **** ! @item TYPE_METHOD ! Related to CLASSTYPE_METHOD_VEC. Chained together with TREE_CHAIN. dbxout.c uses this to get at the methods of a class. --- 580,585 ---- ! @item TYPE_METHODS ! Synonym for CLASSTYPE_METHOD_VEC. Chained together with TREE_CHAIN. dbxout.c uses this to get at the methods of a class. *************** *** 406,412 **** @item TYPE_VIRTUAL_P A flag used on a FIELD_DECL or a VAR_DECL, indicates it is a virtual ! function table. When used on a FUNCTION_DECL, indicates that it is a ! virtual function. When used on an IDENTIFIER_NODE, indicates that a ! function with this same name exists and has been declared virtual. When used on _TYPEs, it indicates that the type has virtual functions, --- 610,617 ---- @item TYPE_VIRTUAL_P A flag used on a FIELD_DECL or a VAR_DECL, indicates it is a virtual ! function table or a pointer to one. When used on a FUNCTION_DECL, ! indicates that it is a virtual function. When used on an ! IDENTIFIER_NODE, indicates that a function with this same name exists ! and has been declared virtual. When used on _TYPEs, it indicates that the type has virtual functions, *************** *** 413,418 **** or is derived from one that does. ! Not sure if the above about virtual tables is still true. See also ! DECL_VIRTUAL_P. What things can this be used on: --- 618,623 ---- or is derived from one that does. ! Not sure if the above about virtual function tables is still true. See ! also DECL_VIRTUAL_P. What things can this be used on: *************** *** 419,422 **** --- 624,669 ---- FIELD_DECLs, VAR_DECLs, FUNCTION_DECLs, IDENTIFIER_NODEs + + + @item VF_BASETYPE_VALUE + Get the associated type from the binfo that caused the given vfield to + exist. This is the least derived class (the most parent class) that + needed a virtual function table. It is probably the case that all uses + of this field are misguided, but they need to be examined on a + case-by-case basis. See history for more information on why the + previous statement was made. + + What things can this be used on: + + TREE_LISTs that are vfields + + History: + + This field was used to determine if a virtual function table's + slot should be filled in with a certain virtual function, by + checking to see if the type returned by VF_BASETYPE_VALUE was a + parent of the context in which the old virtual function existed. + This incorrectly assumes that a given type _could_ not appear as + a parent twice in a given inheritance lattice. For single + inheritance, this would in fact work, because a type could not + possibly appear more than once in an inheritance lattice, but + with multiple inheritance, a type can appear more than once. + + + @item VF_BINFO_VALUE + Identifies the binfo that caused this vfield to exist. Can use + TREE_VIA_VIRTUAL on result to find out if it is a virtual base class. + Related to the binfo found by get_binfo (VF_BASETYPE_VALUE (vfield), t, + 0) where t is the type that has the given vfield. get_binfo + (VF_BASETYPE_VALUE (vfield), t, 0) will return the binfo for the + the given vfield. + + May or may not be set at modify_vtable_entries time. Set at + finish_base_struct time. + + What things can this be used on: + + TREE_LISTs that are vfields + diff -rc2P gcc-2.4.0/gcc.texi gcc-2.4.1/gcc.texi *** gcc-2.4.0/gcc.texi Sun May 16 00:20:39 1993 --- gcc-2.4.1/gcc.texi Mon May 24 19:20:29 1993 *************** *** 132,144 **** @center Richard M. Stallman @sp 3 ! @center last updated 16 Dec 1992 @sp 1 @c The version number appears twice more in this file. ! @c NOTE: i commented out the version/edition numbers etc on the front ! @c cover at opus's request, so that she can have a cover made up that ! @c can be used with multiple versions of the manual. --mew, 30 nov 92 ! ! @c @center for version 2.4 @c @center (preliminary draft, which will change) @page --- 132,140 ---- @center Richard M. Stallman @sp 3 ! @center last updated 18 May 1993 @sp 1 @c The version number appears twice more in this file. ! @center for version 2.4 @c @center (preliminary draft, which will change) @page *************** *** 753,757 **** National Semiconductor 32000 processor). ! @ignore @c These features aren't advertised yet. @item Analog Devices helped implement the support for complex data types --- 749,753 ---- National Semiconductor 32000 processor). ! @ignore @c These features aren't advertised yet, since they don't fully work. @item Analog Devices helped implement the support for complex data types *************** *** 763,766 **** --- 759,766 ---- @item + Kresten Krab Thorup wrote the run time support for the Objective C + language. + + @item Stephen Moshier contributed the floating point emulator that assists in cross-compilation and permits support for floating point numbers wider *************** *** 1054,1057 **** --- 1054,1064 ---- @code{make}. Either ignore the problem or switch to GNU Make. + @item + On Linux SLS 1.01, there is a problem with @file{libc.a}: it does not + contain the obstack functions. However, GNU CC assumes that the obstack + functions are in @file{libc.a} when it is the GNU C library. To work + around this problem, change the @code{__GNU_LIBRARY__} conditional + around line 31 to @samp{#if 1}. + @item On some 386 systems, building the compiler never finishes because *************** *** 1173,1176 **** --- 1180,1187 ---- @item + Current GNU CC versions probably do not work on version 2 of the NeXT + operating system. + + @item On the Tower models 4@var{n}0 and 6@var{n}0, by default a process is not allowed to have more than one megabyte of memory. GNU CC cannot compile *************** *** 1320,1328 **** @itemize @bullet @item ! GNU C normally compiles functions to return small structures and unions ! in registers. Most other compilers arrange to return them just like ! larger structures and unions. This can lead to trouble when you link ! together code compiled by different compilers. To avoid the problem, you ! can use the option @samp{-fpcc-struct-return} when compiling with GNU CC. @item --- 1331,1337 ---- @itemize @bullet @item ! If you are using version 2.3 of libg++, you need to rebuild it with ! @samp{make CC=gcc} to avoid mismatches in the definition of ! @code{size_t}. @item *************** *** 1499,1504 **** is computed to a sequence less likely to tickle the HP-UX linker bug. ! We hope to work around this problem in GNU CC 2.4, if HP does not fix ! it. @item --- 1508,1513 ---- is computed to a sequence less likely to tickle the HP-UX linker bug. ! We hope to work around this problem in a later version, if HP does not ! fix it. @item *************** *** 1642,1645 **** --- 1651,1673 ---- you use to invoke @code{ld}. If someone tracks this problem down, it can probably be fixed easily. + + @item + On the Alpha, you may get assembler errors about invalid syntax as a + result of floating point constants. This is due to a bug in the C + library functions @code{ecvt}, @code{fcvt} and @code{gcvt}. Given valid + floating point numbers, they sometimes print @samp{NaN}. + + @item + On Irix 4.0.5F (and perhaps in some other versions), an assembler bug + sometimes reorders instructions incorrectly when optimization is turned + on. If you think this may be happening to you, try using the GNU + assembler; GAS version 2.1 supports ECOFF on Irix. + + Or use the @samp{-noasmopt} option when you compile GNU CC with itself, + and then again when you compile your program. (This is a temporary + kludge to turn off assembler optimization on Irix.) If this proves to + be what you need, edit the assembler spec in the file @file{specs} so + that it unconditionally passes @samp{-O0} to the assembler, and never + passes @samp{-O2} or @samp{-O3}. @end itemize *************** *** 2368,2371 **** --- 2396,2412 ---- order. Either increment might happen first. @code{func} might get the arguments @samp{3, 4}, or it might get @samp{4, 3}, or even @samp{3, 3}. + + @item + Using the ``canonical'' form of the target configuration name as the + directory for installation. + + This would be an improvement in some respects, but it would also cause + problems. For one thing, users might expect to use in the @samp{-b} + option the same name specified at installation; if installation used the + canonical form, that would not work. What's more, the canonical name + might be too long for certain file systems. + + We suggest you make a link to the installation directory under the + canonical name, if you want to use that name in the @samp{-b} option. @end itemize diff -rc2P gcc-2.4.0/genopinit.c gcc-2.4.1/genopinit.c *** gcc-2.4.0/genopinit.c Fri Apr 2 07:48:31 1993 --- gcc-2.4.1/genopinit.c Mon May 24 12:55:12 1993 *************** *** 64,76 **** upper-case forms of the comparison, respectively. */ char *optabs[] = ! { "extendtab[(int) %B][(int) %A][0] = CODE_FOR_%(extend%a%b2%)", ! "extendtab[(int) %B][(int) %A][1] = CODE_FOR_%(zero_extend%a%b2%)", ! "fixtab[(int) %A][(int) %B][0] = CODE_FOR_%(fix%F%a%I%b2%)", ! "fixtab[(int) %A][(int) %B][1] = CODE_FOR_%(fixuns%F%a%b2%)", ! "fixtrunctab[(int) %A][(int) %B][0] = CODE_FOR_%(fix_trunc%F%a%I%b2%)", ! "fixtrunctab[(int) %A][(int) %B][1] = CODE_FOR_%(fixuns_trunc%F%a%I%b2%)", ! "floattab[(int) %B][(int) %A][0] = CODE_FOR_%(float%I%a%F%b2%)", ! "floattab[(int) %B][(int) %A][1] = CODE_FOR_%(floatuns%I%a%F%b%)", "add_optab->handlers[(int) %A].insn_code = CODE_FOR_%(add%a3%)", "sub_optab->handlers[(int) %A].insn_code = CODE_FOR_%(sub%a3%)", --- 64,79 ---- upper-case forms of the comparison, respectively. */ + /* The reason we use \% is to avoid sequences of the form %-capletter-% + which SCCS treats as magic. This gets warnings which you should ignore. */ + char *optabs[] = ! { "extendtab[(int) %B][(int) %A][0] = CODE_FOR_%(extend%a\%b2%)", ! "extendtab[(int) %B][(int) %A][1] = CODE_FOR_%(zero_extend%a\%b2%)", ! "fixtab[(int) %A][(int) %B][0] = CODE_FOR_%(fix%F\%a%I\%b2%)", ! "fixtab[(int) %A][(int) %B][1] = CODE_FOR_%(fixuns%F\%a%b2%)", ! "fixtrunctab[(int) %A][(int) %B][0] = CODE_FOR_%(fix_trunc%F\%a%I\%b2%)", ! "fixtrunctab[(int) %A][(int) %B][1] = CODE_FOR_%(fixuns_trunc%F\%a%I\%b2%)", ! "floattab[(int) %B][(int) %A][0] = CODE_FOR_%(float%I\%a%F\%b2%)", ! "floattab[(int) %B][(int) %A][1] = CODE_FOR_%(floatuns%I\%a%F\%b%)", "add_optab->handlers[(int) %A].insn_code = CODE_FOR_%(add%a3%)", "sub_optab->handlers[(int) %A].insn_code = CODE_FOR_%(sub%a3%)", *************** *** 78,83 **** "smul_widen_optab->handlers[(int) %B].insn_code = CODE_FOR_%(mul%a%b3%)%N", "umul_widen_optab->handlers[(int) %B].insn_code = CODE_FOR_%(umul%a%b3%)%N", ! "sdiv_optab->handlers[(int) %A].insn_code = CODE_FOR_%(div%I%a3%)", ! "udiv_optab->handlers[(int) %A].insn_code = CODE_FOR_%(udiv%I%a3%)", "sdivmod_optab->handlers[(int) %A].insn_code = CODE_FOR_%(divmod%a4%)", "udivmod_optab->handlers[(int) %A].insn_code = CODE_FOR_%(udivmod%a4%)", --- 81,86 ---- "smul_widen_optab->handlers[(int) %B].insn_code = CODE_FOR_%(mul%a%b3%)%N", "umul_widen_optab->handlers[(int) %B].insn_code = CODE_FOR_%(umul%a%b3%)%N", ! "sdiv_optab->handlers[(int) %A].insn_code = CODE_FOR_%(div%I\%a3%)", ! "udiv_optab->handlers[(int) %A].insn_code = CODE_FOR_%(udiv%I\%a3%)", "sdivmod_optab->handlers[(int) %A].insn_code = CODE_FOR_%(divmod%a4%)", "udivmod_optab->handlers[(int) %A].insn_code = CODE_FOR_%(udivmod%a4%)", *************** *** 84,89 **** "smod_optab->handlers[(int) %A].insn_code = CODE_FOR_%(mod%a3%)", "umod_optab->handlers[(int) %A].insn_code = CODE_FOR_%(umod%a3%)", ! "flodiv_optab->handlers[(int) %A].insn_code = CODE_FOR_%(div%F%a3%)", ! "ftrunc_optab->handlers[(int) %A].insn_code = CODE_FOR_%(ftrunc%F%a2%)", "and_optab->handlers[(int) %A].insn_code = CODE_FOR_%(and%a3%)", "ior_optab->handlers[(int) %A].insn_code = CODE_FOR_%(ior%a3%)", --- 87,92 ---- "smod_optab->handlers[(int) %A].insn_code = CODE_FOR_%(mod%a3%)", "umod_optab->handlers[(int) %A].insn_code = CODE_FOR_%(umod%a3%)", ! "flodiv_optab->handlers[(int) %A].insn_code = CODE_FOR_%(div%F\%a3%)", ! "ftrunc_optab->handlers[(int) %A].insn_code = CODE_FOR_%(ftrunc%F\%a2%)", "and_optab->handlers[(int) %A].insn_code = CODE_FOR_%(and%a3%)", "ior_optab->handlers[(int) %A].insn_code = CODE_FOR_%(ior%a3%)", *************** *** 95,104 **** "rotl_optab->handlers[(int) %A].insn_code = CODE_FOR_%(rotl%a3%)", "rotr_optab->handlers[(int) %A].insn_code = CODE_FOR_%(rotr%a3%)", ! "smin_optab->handlers[(int) %A].insn_code = CODE_FOR_%(smin%I%a3%)", ! "smin_optab->handlers[(int) %A].insn_code = CODE_FOR_%(min%F%a3%)", ! "smax_optab->handlers[(int) %A].insn_code = CODE_FOR_%(smax%I%a3%)", ! "smax_optab->handlers[(int) %A].insn_code = CODE_FOR_%(max%F%a3%)", ! "umin_optab->handlers[(int) %A].insn_code = CODE_FOR_%(umin%I%a3%)", ! "umax_optab->handlers[(int) %A].insn_code = CODE_FOR_%(umax%I%a3%)", "neg_optab->handlers[(int) %A].insn_code = CODE_FOR_%(neg%a2%)", "abs_optab->handlers[(int) %A].insn_code = CODE_FOR_%(abs%a2%)", --- 98,107 ---- "rotl_optab->handlers[(int) %A].insn_code = CODE_FOR_%(rotl%a3%)", "rotr_optab->handlers[(int) %A].insn_code = CODE_FOR_%(rotr%a3%)", ! "smin_optab->handlers[(int) %A].insn_code = CODE_FOR_%(smin%I\%a3%)", ! "smin_optab->handlers[(int) %A].insn_code = CODE_FOR_%(min%F\%a3%)", ! "smax_optab->handlers[(int) %A].insn_code = CODE_FOR_%(smax%I\%a3%)", ! "smax_optab->handlers[(int) %A].insn_code = CODE_FOR_%(max%F\%a3%)", ! "umin_optab->handlers[(int) %A].insn_code = CODE_FOR_%(umin%I\%a3%)", ! "umax_optab->handlers[(int) %A].insn_code = CODE_FOR_%(umax%I\%a3%)", "neg_optab->handlers[(int) %A].insn_code = CODE_FOR_%(neg%a2%)", "abs_optab->handlers[(int) %A].insn_code = CODE_FOR_%(abs%a2%)", diff -rc2P gcc-2.4.0/getopt.c gcc-2.4.1/getopt.c *** gcc-2.4.0/getopt.c Mon May 17 14:48:51 1993 --- gcc-2.4.1/getopt.c Wed May 26 05:07:22 1993 *************** *** 34,38 **** #define alloca __builtin_alloca #else /* not __GNUC__ */ ! #if defined (HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__)))) #include #else --- 34,38 ---- #define alloca __builtin_alloca #else /* not __GNUC__ */ ! #if defined (HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__)))) || defined(__sgi) #include #else diff -rc2P gcc-2.4.0/gstddef.h gcc-2.4.1/gstddef.h *** gcc-2.4.0/gstddef.h Fri Feb 26 19:42:54 1993 --- gcc-2.4.1/gstddef.h Mon May 24 02:08:45 1993 *************** *** 36,42 **** #define _WCHAR_T #endif #undef _PTRDIFF_T_ ! #ifndef __need_ptrdiff_t #undef _SIZE_T_ #undef _WCHAR_T_ #endif --- 36,47 ---- #define _WCHAR_T #endif + /* Undef _FOO_T_ if we are supposed to define foo_t. */ + #if defined (__need_ptrdiff_t) || defined (_STDDEF_H_) #undef _PTRDIFF_T_ ! #endif ! #if defined (__need_size_t) || defined (_STDDEF_H_) #undef _SIZE_T_ + #endif + #if defined (__need_wchar_t) || defined (_STDDEF_H_) #undef _WCHAR_T_ #endif *************** *** 117,121 **** --- 122,128 ---- #define __SIZE_TYPE__ long unsigned int #endif + #if !(defined (__GNUG__) && defined (size_t)) typedef __SIZE_TYPE__ size_t; + #endif /* !(defined (__GNUG__) && defined (size_t)) */ #endif /* _SIZET_ */ #endif /* _GCC_SIZE_T */ *************** *** 175,190 **** /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. ! are already defined. We need not worry about the case of wanting just ! one of these types, not on 4.3bsd-net2, because only the GNU libc ! header files do that. */ #ifdef _ANSI_H_ #undef _PTRDIFF_T_ ! #ifdef _STDDEF_H /* This is a kludge. ! _STDDEF_H is defined when we are using the whole file, ! undefined when obstack.h wants just ptrdiff_t. */ #undef _SIZE_T_ - #undef _WCHAR_T_ #endif #endif #endif /* __sys_stdtypes_h */ --- 182,197 ---- /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. ! are already defined. */ #ifdef _ANSI_H_ + #ifdef _GCC_PTRDIFF_T_ #undef _PTRDIFF_T_ ! #endif ! #ifdef _GCC_SIZE_T_ #undef _SIZE_T_ #endif + #ifdef _GCC_WCHAR_T_ + #undef _WCHAR_T_ #endif + #endif /* _ANSI_H_ */ #endif /* __sys_stdtypes_h */ diff -rc2P gcc-2.4.0/install.texi gcc-2.4.1/install.texi *** gcc-2.4.0/install.texi Fri May 14 14:06:33 1993 --- gcc-2.4.1/install.texi Wed May 26 00:55:17 1993 *************** *** 1,3 **** ! @c Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. --- 1,3 ---- ! @c Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. *************** *** 24,27 **** --- 24,28 ---- * WE32K Install:: See below for installation on the 3b* aside from the 3b1. * MIPS Install:: See below for installation on the MIPS Architecture. + * Collect2:: How @code{collect2} works; how it finds @code{ld}. @end menu @iftex *************** *** 286,292 **** @item i386-ibm-aix ! You need to use a version of GAS that you can get from ! @code{tranle@@intellicorp.com}. ! @c does the above work now? --mew @item i386-sequent --- 287,292 ---- @item i386-ibm-aix ! You need to use GAS version 2.1 or later, and and LD from ! GNU binutils version 2.2 or later. @item i386-sequent *************** *** 477,481 **** @file{Makefile.in}. The additional text comes from files in the @file{config} directory, named @file{t-@var{target}} and ! @file{h-@var{host}}. If these files do not exist, it means nothing needs to be added for a given target or host. @c does the above work now? --mew --- 477,481 ---- @file{Makefile.in}. The additional text comes from files in the @file{config} directory, named @file{t-@var{target}} and ! @file{x-@var{host}}. If these files do not exist, it means nothing needs to be added for a given target or host. @c does the above work now? --mew *************** *** 482,485 **** --- 482,500 ---- @end itemize + @item + The standard directory for installing the compiler's passes and run-time + support in @file{/usr/local/lib}. If you want to install it somewhere + else, specify the option @samp{--prefix=@var{dir}} when you run + @file{configure}. @var{dir} is a directory name to use instead of + @file{/usr/local} for all purposes with one exception: the directory + @file{/usr/local/include} is searched for header files no matter where + you install the compiler. + + @item + Specify @samp{--local-prefix=@var{dir}} if you want the compiler to + search directory @file{@var{dir}/include} for header files + @emph{instead} of @file{/usr/local/include}. (This is for systems that + have different conventions for where to put site-specific things.) + @cindex Bison parser generator @cindex parser generator, Bison *************** *** 509,514 **** Ignore any warnings you may see about ``statement not reached'' in ! @file{insn-emit.c}; they are normal. Any other compilation errors may ! represent bugs in the port to your machine or operating system, and @ifclear INSTALLONLY should be investigated and reported (@pxref{Bugs}). --- 524,531 ---- Ignore any warnings you may see about ``statement not reached'' in ! @file{insn-emit.c}; they are normal. Also, warnings about ``unknown ! escape sequence'' are normal in @file{genopinit.c} and perhaps some ! other files. Any other compilation errors may represent bugs in the ! port to your machine or operating system, and @ifclear INSTALLONLY should be investigated and reported (@pxref{Bugs}). *************** *** 706,719 **** @end enumerate - If you cannot install the compiler's passes and run-time support in - @file{/usr/local/lib}, you can alternatively use the @samp{-B} option to - specify a prefix by which they may be found. The compiler concatenates - the prefix with the names @file{cpp}, @file{cc1} and @file{libgcc.a}. - Thus, you can put the files in a directory @file{/usr/foo/gcc} and - specify @samp{-B/usr/foo/gcc/} when you run GNU CC. - - Also, you can specify an alternative default directory for these files - by setting the Make variable @code{libdir} when you make GNU CC. - @node Other Dir @section Compilation in a Separate Directory --- 723,726 ---- *************** *** 1192,1195 **** --- 1199,1203 ---- @smallexample $ library gnu_cc:[000000]gcclib/delete=(new,eprintf) + $ library gnu_cc:[000000]gcclib/delete=L_* $ library libgcc2/extract=*/output=libgcc2.obj $ library gnu_cc:[000000]gcclib libgcc2.obj *************** *** 1196,1202 **** @end smallexample ! The first command simply removes old modules that will be replaced with modules ! from libgcc2. If the VMS librarian complains about those modules not being ! present, simply ignore the message and continue on with the next command. Whenever you update the compiler on your system, you should also update the --- 1204,1214 ---- @end smallexample ! The first command simply removes old modules that will be replaced with ! modules from @file{libgcc2} under different module names. The modules ! @code{new} and @code{eprintf} may not actually be present in your ! @file{gcclib.olb}---if the VMS librarian complains about those modules ! not being present, simply ignore the message and continue on with the ! next command. The second command removes the modules that came from the ! previous version of the library @file{libgcc2.c}. Whenever you update the compiler on your system, you should also update the *************** *** 1325,1328 **** --- 1337,1341 ---- @node MIPS Install @section Installing GNU CC on the MIPS + See @ref{Installation} about whether to use either of the options @samp{--with-stabs} or @samp{--with-gnu-as}. *************** *** 1383,1384 **** --- 1396,1505 ---- would not select this configuration. @end table + + On Irix version 4.0.5F, and perhaps on some other versions as well, + there is an assembler bug that reorders instructions incorrectly. To + work around it, specify the target configuration + @samp{mips-sgi-irix4loser}. This configuration inhibits assembler + optimization. + + You can turn off assembler optimization in a compiler configured with + target @samp{mips-sgi-irix4} using the @samp{-noasmopt} option. This + compiler option passes the option @samp{-O0} to the assembler, to + inhibit reordering. + + The @samp{-noasmopt} option can be useful for testing whether a problem + is due to erroneous assembler reordering. Even if a problem does not go + away with @samp{-noasmopt}, it may still be due to assembler + reordering---perhaps GNU CC itself was miscompiled as a result. + + We know this is inconvenient, but it's the best that can be done at + the last minute. + + @node Collect2 + @section @code{collect2} + + Many target systems do not have support in the assembler and linker for + ``constructors''---initialization functions to be called before the + official ``start'' of @code{main}. On such systems, GNU CC uses a + utility called @code{collect2} to arrange to call these functions at + start time. + + The program @code{collect2} works by linking the program once and + looking through the linker output file for symbols with particular names + indicating they are constructor functions. If it finds any, it + creates a new temporary @samp{.c} file containing a table of them, + compiles it, and links the program a second time including that file. + + The actual calls to the constructors are carried out by a subroutine + called @code{__main}, which is called (automatically) at the beginning + of the body of @code{main} (provided @code{main} was compiled with GNU + CC). + + The program @code{collect2} is installed as @code{ld} in the directory + where the passes of the compiler are installed. When @code{collect2} + needs to find the @emph{real} @code{ld}, it tries the following file + names: + + @itemize @bullet + @item + @file{gld} in the directories listed in the compiler's search + directories. + + @item + @file{gld} in the directories listed in the environment variable + @code{PATH}. + + @item + @file{real-ld} in the compiler's search directories. + + @item + @file{real-ld} in @code{PATH}. + + @item + @file{ld} in @code{PATH}. + @end itemize + + ``The compiler's search directories'' means all the directories where + @code{gcc} searches for passes of the compiler. This includes + directories that you specify with @samp{-B}. + + Cross compilers search a little differently: + + @itemize @bullet + @item + @file{gld} in the compiler's search directories. + + @item + @file{@var{target}-gld} in @code{PATH}. + + @item + @file{real-ld} in the compiler's search directories. + + @item + @file{@var{target}-real-ld} in @code{PATH}. + + @item + @file{@var{target}-ld} in @code{PATH}. + @end itemize + + @code{collect2} does not search for @file{ld} using the compiler's + search directories, because if it did, it would find itself---not the + real @code{ld}---and this could lead to infinite recursion. However, + the directory where @code{collect2} is installed might happen to be in + @code{PATH}. That could lead @code{collect2} to invoke itself anyway. + when looking for @code{ld}. + + To prevent this, @code{collect2} explicitly avoids running @code{ld} + using the file name under which @code{collect2} itself was invoked. In + fact, it remembers up to two such names---in case one copy of + @code{collect2} finds another copy (or version) of @code{collect2} + installed as @code{ld} in a second place in the search path. + + If two file names to avoid are not sufficient, you may still encounter + an infinite recursion of @code{collect2} processes. When this happens. + check all the files installed as @file{ld} in any of the directories + searched, and straighten out the situation. + + (In a future version, we will probably change @code{collect2} to avoid + any reinvocation of a file from which any parent @code{collect2} was + run.) diff -rc2P gcc-2.4.0/integrate.c gcc-2.4.1/integrate.c *** gcc-2.4.0/integrate.c Fri May 14 13:21:31 1993 --- gcc-2.4.1/integrate.c Mon May 24 18:53:18 1993 *************** *** 1740,1745 **** if (structure_value_addr) ! return gen_rtx (MEM, TYPE_MODE (type), ! memory_address (TYPE_MODE (type), structure_value_addr)); return target; } --- 1740,1748 ---- if (structure_value_addr) ! { ! target = gen_rtx (MEM, TYPE_MODE (type), ! memory_address (TYPE_MODE (type), structure_value_addr)); ! MEM_IN_STRUCT_P (target) = 1; ! } return target; } diff -rc2P gcc-2.4.0/invoke.texi gcc-2.4.1/invoke.texi *** gcc-2.4.0/invoke.texi Fri May 14 13:43:17 1993 --- gcc-2.4.1/invoke.texi Sat May 22 13:23:00 1993 *************** *** 1,3 **** ! @c Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. --- 1,3 ---- ! @c Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. *************** *** 3097,3107 **** @table @code @item -fpcc-struct-return ! Use the same convention for returning @code{struct} and @code{union} ! values that is used by the Portable C compiler, i.e. they are returned ! in memory instead of in registers. This convention is less efficient for ! small structures, and on many machines it fails to be reentrant; but it has ! the advantage of allowing intercallability between GNU CC-compiled code ! and PCC-compiled code. @item -freg-struct-return Use the convention that @code{struct} and @code{union} values are --- 3097,3111 ---- @table @code @item -fpcc-struct-return ! Return ``short'' @code{struct} and @code{union} values in memory like ! longer ones, rather than in registers. This convention is less ! efficient, but it has the advantage of allowing intercallability between ! GNU CC-compiled files and files compiled with other compilers. + The precise convention for returning structures in memory depends + on the target configuration macros. + + Short structures and unions are those whose size and alignment match + that of some integer type. + @item -freg-struct-return Use the convention that @code{struct} and @code{union} values are *************** *** 3112,3116 **** option @samp{-freg-struct-return}, GNU CC defaults to whichever convention is standard for the target. If there is no standard ! convention, GNU CC defaults to @samp{-fpcc-struct-return}. @item -fshort-enums --- 3116,3123 ---- option @samp{-freg-struct-return}, GNU CC defaults to whichever convention is standard for the target. If there is no standard ! convention, GNU CC defaults to @samp{-fpcc-struct-return}, except on ! targets where GNU CC is the principal compile. In those cases, we can ! choose the standard, and we chose the more efficient register return ! alternative. @item -fshort-enums diff -rc2P gcc-2.4.0/loop.c gcc-2.4.1/loop.c *** gcc-2.4.0/loop.c Fri May 7 13:15:04 1993 --- gcc-2.4.1/loop.c Thu May 20 00:33:24 1993 *************** *** 683,687 **** /* In order to move a register, we need to have one of three cases: (1) it is used only in the same basic block as the set ! (2) it is not a user variable. (3) the set is guaranteed to be executed once the loop starts, and the reg is not used until after that. */ --- 683,689 ---- /* In order to move a register, we need to have one of three cases: (1) it is used only in the same basic block as the set ! (2) it is not a user variable and it is not used in the ! exit test (this can cause the variable to be used ! before it is set just like a user-variable). (3) the set is guaranteed to be executed once the loop starts, and the reg is not used until after that. */ *************** *** 689,693 **** && ! loop_reg_used_before_p (set, p, loop_start, scan_start, end)) ! || ! REG_USERVAR_P (SET_DEST (PATTERN (p))) || reg_in_basic_block_p (p, SET_DEST (PATTERN (p))))) ; --- 691,696 ---- && ! loop_reg_used_before_p (set, p, loop_start, scan_start, end)) ! || (! REG_USERVAR_P (SET_DEST (PATTERN (p))) ! && ! REG_LOOP_TEST_P (SET_DEST (PATTERN (p)))) || reg_in_basic_block_p (p, SET_DEST (PATTERN (p))))) ; diff -rc2P gcc-2.4.0/md.texi gcc-2.4.1/md.texi *** gcc-2.4.0/md.texi Fri May 14 14:02:01 1993 --- gcc-2.4.1/md.texi Mon May 24 18:42:26 1993 *************** *** 1200,1204 **** constants of greater than word size precision (usually upper case). ! @item EXTRA_CONSTRAINTS Special cases of registers or memory. This macro is not required, and is only defined for some machines. --- 1200,1204 ---- constants of greater than word size precision (usually upper case). ! @item EXTRA_CONSTRAINT Special cases of registers or memory. This macro is not required, and is only defined for some machines. diff -rc2P gcc-2.4.0/objc/init.c gcc-2.4.1/objc/init.c *** gcc-2.4.0/objc/init.c Fri May 14 12:04:12 1993 --- gcc-2.4.1/objc/init.c Sun May 23 15:31:24 1993 *************** *** 225,229 **** { int i; ! Class* proto_class; if (! protos) --- 225,229 ---- { int i; ! static Class* proto_class = 0; if (! protos) *************** *** 230,236 **** return; ! proto_class = objc_lookup_class("Protocol"); ! if (proto_class == 0 && ! list_find (&unclaimed_proto_list, protos)) { unclaimed_proto_list = list_cons (protos, unclaimed_proto_list); --- 230,237 ---- return; ! if (!proto_class) ! proto_class = objc_lookup_class("Protocol"); ! if (!proto_class) { unclaimed_proto_list = list_cons (protos, unclaimed_proto_list); *************** *** 242,252 **** for(i = 0; i < protos->count; i++) { ! if (((size_t)((id)protos->list[i])->class_pointer) == PROTOCOL_VERSION) ! ((id)protos->list[i])->class_pointer = proto_class; ! else if (((id)protos->list[i])->class_pointer != proto_class) { fprintf (stderr, "Version %d doesn't match runtime protocol version %d\n", ! ((size_t)((id)protos->list[i])->class_pointer), PROTOCOL_VERSION); abort (); --- 243,260 ---- for(i = 0; i < protos->count; i++) { ! struct objc_protocol* aProto = protos->list[i]; ! if (((size_t)aProto->class_pointer) == PROTOCOL_VERSION) { + /* assign class pointer */ + aProto->class_pointer = proto_class; + + /* init super protocols */ + __objc_init_protocols (aProto->protocol_list); + } + else if (protos->list[i]->class_pointer != proto_class) + { fprintf (stderr, "Version %d doesn't match runtime protocol version %d\n", ! ((size_t)protos->list[i]->class_pointer), PROTOCOL_VERSION); abort (); diff -rc2P gcc-2.4.0/objc/objc.h gcc-2.4.1/objc/objc.h *** gcc-2.4.0/objc/objc.h Sun May 9 09:07:59 1993 --- gcc-2.4.1/objc/objc.h Sun May 23 15:31:20 1993 *************** *** 118,121 **** --- 118,122 ---- #ifndef __OBJC__ typedef struct objc_protocol { + struct objc_class* class_pointer; char *protocol_name; struct objc_protocol_list *protocol_list; diff -rc2P gcc-2.4.0/objc/sarray.c gcc-2.4.1/objc/sarray.c *** gcc-2.4.0/objc/sarray.c Wed May 5 04:13:45 1993 --- gcc-2.4.1/objc/sarray.c Fri May 21 11:37:06 1993 *************** *** 61,69 **** boffset = xx.off.boffset; eoffset = xx.off.eoffset; ! #else ioffset = index/INDEX_CAPACITY; boffset = (index/BUCKET_SIZE)%INDEX_SIZE; eoffset = index%BUCKET_SIZE; #endif assert(soffset_decode(index) < array->capacity); /* Range check */ --- 61,74 ---- boffset = xx.off.boffset; eoffset = xx.off.eoffset; ! #else /* not PRECOMPUTE_SELECTORS */ ! #ifdef OBJC_SPARSE3 ioffset = index/INDEX_CAPACITY; boffset = (index/BUCKET_SIZE)%INDEX_SIZE; eoffset = index%BUCKET_SIZE; + #else + boffset = index/BUCKET_SIZE; + eoffset = index%BUCKET_SIZE; #endif + #endif /* not PRECOMPUTE_SELECTORS */ assert(soffset_decode(index) < array->capacity); /* Range check */ diff -rc2P gcc-2.4.0/objc/sarray.h gcc-2.4.1/objc/sarray.h *** gcc-2.4.0/objc/sarray.h Sun May 9 09:08:03 1993 --- gcc-2.4.1/objc/sarray.h Fri May 21 11:37:03 1993 *************** *** 214,217 **** --- 214,218 ---- #endif /* OBJC_SPARSE2 */ #else /* not PRECOMPUTE_SELECTORS */ + #ifdef OBJC_SPARSE3 return array-> indices[index/INDEX_CAPACITY]-> *************** *** 218,221 **** --- 219,225 ---- buckets[(index/BUCKET_SIZE)%INDEX_SIZE]-> elems[index%BUCKET_SIZE]; + #else /* OBJC_SPARSE2 */ + return array->buckets[index/BUCKET_SIZE]->elems[index%BUCKET_SIZE]; + #endif /* not OBJC_SPARSE3 */ #endif /* not PRECOMPUTE_SELECTORS */ } diff -rc2P gcc-2.4.0/objc-act.c gcc-2.4.1/objc-act.c *** gcc-2.4.0/objc-act.c Sun May 9 00:51:33 1993 --- gcc-2.4.1/objc-act.c Wed May 19 23:12:57 1993 *************** *** 1,4 **** /* Implement classes and message passing for Objective C. ! Copyright (C) 1992 Free Software Foundation, Inc. Author: Steve Naroff. --- 1,4 ---- /* Implement classes and message passing for Objective C. ! Copyright (C) 1992, 1993 Free Software Foundation, Inc. Author: Steve Naroff. *************** *** 1044,1048 **** get_identifier (TAG_MSGSEND), temp_type); DECL_EXTERNAL (umsg_decl) = 1; ! TREE_PUBLIC (umsg_decl) = 0; DECL_INLINE (umsg_decl) = 1; --- 1044,1048 ---- get_identifier (TAG_MSGSEND), temp_type); DECL_EXTERNAL (umsg_decl) = 1; ! TREE_PUBLIC (umsg_decl) = 1; DECL_INLINE (umsg_decl) = 1; *************** *** 7453,7456 **** --- 7453,7457 ---- tree decl; char *string = (char *) alloca (strlen (name) + 30); + tree exp; sprintf (string, "%sobjc_class_name_%s", *************** *** 7468,7471 **** --- 7469,7477 ---- readonly_data_section (); + exp = build1 (ADDR_EXPR, string_type_node, decl); + + /* Align the section properly. */ + assemble_constant_align (exp); + /* Inform the assembler about this new external thing. */ assemble_external (decl); *************** *** 7472,7477 **** /* Output a constant to reference this address. */ ! output_constant (build1 (ADDR_EXPR, string_type_node, decl), ! int_size_in_bytes (string_type_node)); } else --- 7478,7482 ---- /* Output a constant to reference this address. */ ! output_constant (exp, int_size_in_bytes (string_type_node)); } else diff -rc2P gcc-2.4.0/protoize.c gcc-2.4.1/protoize.c *** gcc-2.4.0/protoize.c Mon May 10 11:59:50 1993 --- gcc-2.4.1/protoize.c Tue May 25 10:48:37 1993 *************** *** 273,284 **** /* Pick up GNU C++ specific include files. */ { GPLUSPLUS_INCLUDE_DIR, 1}, - { GCC_INCLUDE_DIR, 0}, - { TOOL_INCLUDE_DIR, 0}, #ifdef CROSS_COMPILE /* For cross-compilation, this dir name is generated automatically in Makefile.in. */ { CROSS_INCLUDE_DIR, 0 }, #else /* not CROSS_COMPILE */ { LOCAL_INCLUDE_DIR, 0}, /* Some systems have an extra dir of include files. */ #ifdef SYSTEM_INCLUDE_DIR --- 273,295 ---- /* Pick up GNU C++ specific include files. */ { GPLUSPLUS_INCLUDE_DIR, 1}, #ifdef CROSS_COMPILE + /* This is the dir for fixincludes. Put it just before + the files that we fix. */ + { GCC_INCLUDE_DIR, 0}, /* For cross-compilation, this dir name is generated automatically in Makefile.in. */ { CROSS_INCLUDE_DIR, 0 }, + /* This is another place that the target system's headers might be. */ + { TOOL_INCLUDE_DIR, 0}, #else /* not CROSS_COMPILE */ + /* This should be /use/local/include and should come before + the fixincludes-fixed header files. */ { LOCAL_INCLUDE_DIR, 0}, + /* This is here ahead of GCC_INCLUDE_DIR because assert.h goes here. + Likewise, behind LOCAL_INCLUDE_DIR, where glibc puts its assert.h. */ + { TOOL_INCLUDE_DIR, 0}, + /* This is the dir for fixincludes. Put it just before + the files that we fix. */ + { GCC_INCLUDE_DIR, 0}, /* Some systems have an extra dir of include files. */ #ifdef SYSTEM_INCLUDE_DIR *************** *** 1022,1026 **** { p->hash_next = NULL; ! p->symbol = savestring (s); p->ddip = NULL; p->fip = NULL; --- 1033,1037 ---- { p->hash_next = NULL; ! p->symbol = savestring (s, strlen (s)); p->ddip = NULL; p->fip = NULL; *************** *** 1161,1167 **** } *copy_p++ = '\n'; ! *copy_p++ = '\0'; ! return (got_unexpanded ? savestring (line_buf) : 0); } --- 1172,1178 ---- } *copy_p++ = '\n'; ! *copy_p = '\0'; ! return (got_unexpanded ? savestring (line_buf, copy_p - line_buf) : 0); } *************** *** 1266,1270 **** buffer and return a pointer to the copy. */ ! return savestring (abs_buffer); } --- 1277,1281 ---- buffer and return a pointer to the copy. */ ! return savestring (abs_buffer, outp - abs_buffer); } diff -rc2P gcc-2.4.0/real.c gcc-2.4.1/real.c *** gcc-2.4.0/real.c Tue May 11 00:44:03 1993 --- gcc-2.4.1/real.c Sat May 22 15:32:29 1993 *************** *** 691,695 **** GET_REAL (&rr, d); #ifdef NANS ! if (eisnan (&rr)) { warning ("conversion from NaN to int"); --- 691,695 ---- GET_REAL (&rr, d); #ifdef NANS ! if (eisnan (d)) { warning ("conversion from NaN to int"); *************** *** 769,774 **** REAL_VALUE_TYPE x; { #ifdef NANS ! return (eisnan (&x)); #else return (0); --- 769,777 ---- REAL_VALUE_TYPE x; { + unsigned EMUSHORT e[NE]; + #ifdef NANS ! GET_REAL (&x, e); ! return (eisnan (e)); #else return (0); *************** *** 1329,1333 **** /* Fill external format number with infinity pattern (IEEE) ! or largest possible number (non-IEEE). */ void --- 1332,1338 ---- /* Fill external format number with infinity pattern (IEEE) ! or largest possible number (non-IEEE). ! Before calling einfin, you should either call eclear ! or set up the sign bit by hand. */ void *************** *** 1459,1463 **** #endif einfin (b); ! return; } #endif --- 1464,1468 ---- #endif einfin (b); ! return; } #endif *************** *** 2129,2134 **** } */ - s[rw] &= ~rmsk; } if ((r & rmbit) != 0) { --- 2134,2139 ---- } */ } + s[rw] &= ~rmsk; if ((r & rmbit) != 0) { *************** *** 2636,2641 **** #endif #endif /* NANS */ einfin (y); ! if (r & 0x8000) eneg (y); return; --- 2641,2647 ---- #endif #endif /* NANS */ + eclear (y); einfin (y); ! if (yy[0]) eneg (y); return; *************** *** 2729,2732 **** --- 2735,2739 ---- #endif #endif /* NANS */ + eclear (y); einfin (y); if (*p & 0x8000) *************** *** 2788,2793 **** #endif #endif /* NANS */ einfin (y); ! if (r & 0x8000) eneg (y); return; --- 2795,2801 ---- #endif #endif /* NANS */ + eclear (y); einfin (y); ! if (yy[0]) eneg (y); return; diff -rc2P gcc-2.4.0/regclass.c gcc-2.4.1/regclass.c *** gcc-2.4.0/regclass.c Tue Mar 23 20:17:30 1993 --- gcc-2.4.1/regclass.c Tue May 25 13:30:11 1993 *************** *** 554,558 **** for (m = VOIDmode; (int) m < (int) MAX_MACHINE_MODE; ! m = (enum machine_mode) ((int) m) + 1) if (HARD_REGNO_MODE_OK (j, m)) { --- 554,558 ---- for (m = VOIDmode; (int) m < (int) MAX_MACHINE_MODE; ! m = (enum machine_mode) ((int) m + 1)) if (HARD_REGNO_MODE_OK (j, m)) { diff -rc2P gcc-2.4.0/reload.c gcc-2.4.1/reload.c *** gcc-2.4.0/reload.c Mon May 10 00:54:06 1993 --- gcc-2.4.1/reload.c Sun May 23 01:09:51 1993 *************** *** 617,623 **** If we have (SUBREG:M1 (REG:M2 ...) ...) with M1 wider than M2 and the register is a pseudo, this will become the same as the above case. ! Do the same for (SUBREG:M1 (REG:M2 ...) ...) for a hard register R where either M1 is not valid for R or M2 is wider than a word but we only need one word to store an M2-sized quantity in R. Note that the case of (SUBREG (CONST_INT...)...) is handled elsewhere; we can't handle it here because CONST_INT does not indicate a mode. --- 617,626 ---- If we have (SUBREG:M1 (REG:M2 ...) ...) with M1 wider than M2 and the register is a pseudo, this will become the same as the above case. ! Similar issue for (SUBREG:M1 (REG:M2 ...) ...) for a hard register R where either M1 is not valid for R or M2 is wider than a word but we only need one word to store an M2-sized quantity in R. + (However, if OUT is nonzero, we need to reload the reg *and* + the subreg, so do nothing here, and let following statement handle it.) + Note that the case of (SUBREG (CONST_INT...)...) is handled elsewhere; we can't handle it here because CONST_INT does not indicate a mode. *************** *** 636,641 **** && (GET_MODE_SIZE (inmode) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))))) ! || (GET_CODE (SUBREG_REG (in)) == REG ! && REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER && (! HARD_REGNO_MODE_OK (REGNO (SUBREG_REG (in)), inmode) || (GET_MODE_SIZE (inmode) <= UNITS_PER_WORD --- 639,646 ---- && (GET_MODE_SIZE (inmode) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))))) ! || (REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER ! /* The case where out is nonzero ! is handled differently in the following statement. */ ! && (out == 0 || SUBREG_WORD (in) == 0) && (! HARD_REGNO_MODE_OK (REGNO (SUBREG_REG (in)), inmode) || (GET_MODE_SIZE (inmode) <= UNITS_PER_WORD *************** *** 667,670 **** --- 672,699 ---- inmode = GET_MODE (in); } + + /* Similar issue for (SUBREG:M1 (REG:M2 ...) ...) for a hard register R where + either M1 is not valid for R or M2 is wider than a word but we only + need one word to store an M2-sized quantity in R. + + However, we must reload the inner reg *as well as* the subreg in + that case. */ + + if (in != 0 && GET_CODE (in) == SUBREG + && GET_CODE (SUBREG_REG (in)) == REG + && REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER + && (! HARD_REGNO_MODE_OK (REGNO (SUBREG_REG (in)), inmode) + || (GET_MODE_SIZE (inmode) <= UNITS_PER_WORD + && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))) + > UNITS_PER_WORD) + && ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))) + / UNITS_PER_WORD) + != HARD_REGNO_NREGS (REGNO (SUBREG_REG (in)), + GET_MODE (SUBREG_REG (in))))))) + { + push_reload (SUBREG_REG (in), NULL_RTX, &SUBREG_REG (in), NULL_PTR, + GENERAL_REGS, VOIDmode, VOIDmode, 0, 0, opnum, type); + } + /* Similarly for paradoxical and problematical SUBREGs on the output. diff -rc2P gcc-2.4.0/reload1.c gcc-2.4.1/reload1.c *** gcc-2.4.0/reload1.c Sat May 15 10:08:35 1993 --- gcc-2.4.1/reload1.c Mon May 24 20:29:38 1993 *************** *** 191,194 **** --- 191,200 ---- static HARD_REG_SET counted_for_nongroups; + /* Indexed by pseudo reg number N, + says may not delete stores into the real (memory) home of pseudo N. + This is set if we already substituted a memory equivalent in some uses, + which happens when we have to eliminate the fp from it. */ + static char *cannot_omit_stores; + /* Nonzero if indirect addressing is supported on the machine; this means that spilling (REG n) does not require reloading it into a register in *************** *** 512,515 **** --- 518,523 ---- reg_max_ref_width = (int *) alloca (max_regno * sizeof (int)); bzero (reg_max_ref_width, max_regno * sizeof (int)); + cannot_omit_stores = (char *) alloca (max_regno); + bzero (cannot_omit_stores, max_regno); /* Look for REG_EQUIV notes; record what each pseudo is equivalent to. *************** *** 2602,2606 **** mem_mode, NULL_RTX); if (new != reg_equiv_memory_loc[regno]) ! return copy_rtx (new); } return x; --- 2610,2617 ---- mem_mode, NULL_RTX); if (new != reg_equiv_memory_loc[regno]) ! { ! cannot_omit_stores[regno] = 1; ! return copy_rtx (new); ! } } return x; *************** *** 4821,4836 **** if (k == nr) { ! /* Mark the register as in use for this part of ! the insn. */ ! mark_reload_reg_in_use (spill_regs[i], ! reload_opnum[r], ! reload_when_needed[r], ! reload_mode[r]); ! reload_reg_rtx[r] = reg_last_reload_reg[regno]; ! reload_inherited[r] = 1; ! reload_inheritance_insn[r] = reg_reloaded_insn[i]; ! reload_spill_index[r] = i; ! SET_HARD_REG_BIT (reload_reg_used_for_inherit, ! spill_regs[i]); } } --- 4832,4873 ---- if (k == nr) { ! int i1; ! ! /* We found a register that contains the ! value we need. If this register is the ! same as an `earlyclobber' operand of the ! current insn, just mark it as a place to ! reload from since we can't use it as the ! reload register itself. */ ! ! for (i1 = 0; i1 < n_earlyclobbers; i1++) ! if (reg_overlap_mentioned_for_reload_p ! (reg_last_reload_reg[regno], ! reload_earlyclobbers[i1])) ! break; ! ! if (i1 != n_earlyclobbers ! /* Don't really use the inherited spill reg ! if we need it wider than we've got it. */ ! || (GET_MODE_SIZE (reload_mode[r]) ! > GET_MODE_SIZE (mode))) ! reload_override_in[r] = reg_last_reload_reg[regno]; ! else ! { ! /* We can use this as a reload reg. */ ! /* Mark the register as in use for this part of ! the insn. */ ! mark_reload_reg_in_use (spill_regs[i], ! reload_opnum[r], ! reload_when_needed[r], ! reload_mode[r]); ! reload_reg_rtx[r] = reg_last_reload_reg[regno]; ! reload_inherited[r] = 1; ! reload_inheritance_insn[r] ! = reg_reloaded_insn[i]; ! reload_spill_index[r] = i; ! SET_HARD_REG_BIT (reload_reg_used_for_inherit, ! spill_regs[i]); ! } } } *************** *** 6439,6442 **** --- 6476,6482 ---- return; } + + if (cannot_omit_stores[REGNO (reg)]) + return; /* If this insn will store in the pseudo again, diff -rc2P gcc-2.4.0/rtl.c gcc-2.4.1/rtl.c *** gcc-2.4.0/rtl.c Sun Apr 25 20:14:32 1993 --- gcc-2.4.1/rtl.c Mon May 17 16:07:00 1993 *************** *** 801,806 **** *s++ = '0'; /* Set the GET_RTX_FORMAT of CONST_DOUBLE to a string ! of as many `i's as we now have elements. */ ! for (i = 0; i < rtx_length[(int) CONST_DOUBLE]; i++) *s++ = 'w'; *s++ = 0; --- 801,807 ---- *s++ = '0'; /* Set the GET_RTX_FORMAT of CONST_DOUBLE to a string ! of as many `w's as we now have elements. Subtract two from ! the size to account for the 'e' and the '0'. */ ! for (i = 2; i < rtx_length[(int) CONST_DOUBLE]; i++) *s++ = 'w'; *s++ = 0; diff -rc2P gcc-2.4.0/rtl.texi gcc-2.4.1/rtl.texi *** gcc-2.4.0/rtl.texi Sat Apr 17 17:13:44 1993 --- gcc-2.4.1/rtl.texi Mon May 24 17:33:06 1993 *************** *** 57,61 **** An integer is simply an @code{int}; their written form uses decimal digits. A wide integer is an integral object whose type is @code{HOST_WIDE_INT} ! (@pxref{Config}); their written form used decimal digits. A string is a sequence of characters. In core it is represented as a --- 57,61 ---- An integer is simply an @code{int}; their written form uses decimal digits. A wide integer is an integral object whose type is @code{HOST_WIDE_INT} ! (@pxref{Config}); their written form uses decimal digits. A string is a sequence of characters. In core it is represented as a diff -rc2P gcc-2.4.0/stmt.c gcc-2.4.1/stmt.c *** gcc-2.4.0/stmt.c Fri May 14 14:59:58 1993 --- gcc-2.4.1/stmt.c Tue May 25 00:08:27 1993 *************** *** 1147,1151 **** && TREE_CODE (val) != PARM_DECL && TREE_CODE (val) != INDIRECT_REF) ! TREE_VALUE (tail) = save_expr (TREE_VALUE (tail)); output_rtx[i] = expand_expr (TREE_VALUE (tail), NULL_RTX, VOIDmode, 0); --- 1147,1159 ---- && TREE_CODE (val) != PARM_DECL && TREE_CODE (val) != INDIRECT_REF) ! { ! TREE_VALUE (tail) = save_expr (TREE_VALUE (tail)); ! /* If it's a constant, print error now so don't crash later. */ ! if (TREE_CODE (TREE_VALUE (tail)) != SAVE_EXPR) ! { ! error ("invalid output in `asm'"); ! return; ! } ! } output_rtx[i] = expand_expr (TREE_VALUE (tail), NULL_RTX, VOIDmode, 0); diff -rc2P gcc-2.4.0/tm.texi gcc-2.4.1/tm.texi *** gcc-2.4.0/tm.texi Fri May 14 13:56:13 1993 --- gcc-2.4.1/tm.texi Sun May 23 01:31:35 1993 *************** *** 1,3 **** ! @c Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. --- 1,3 ---- ! @c Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. *************** *** 4729,4734 **** some other manner---for example, by means of the @code{collect2} program, which looks through the symbol table to find these functions by their ! names. If you want to use @code{collect2}, then you need to arrange for ! it to be built and installed and used on your system. @item ASM_OUTPUT_DESTRUCTOR (@var{stream}, @var{name}) --- 4729,4733 ---- some other manner---for example, by means of the @code{collect2} program, which looks through the symbol table to find these functions by their ! names. @item ASM_OUTPUT_DESTRUCTOR (@var{stream}, @var{name}) diff -rc2P gcc-2.4.0/toplev.c gcc-2.4.1/toplev.c *** gcc-2.4.0/toplev.c Sat May 15 10:30:31 1993 --- gcc-2.4.1/toplev.c Mon May 24 00:30:48 1993 *************** *** 1820,1831 **** #endif ! /* dbx on Suns needs to separate gcc_compiled. from first function. ! We do not test write_symbols because -g should not alter ! the actual code generated. */ ! #ifndef DBX_DEBUGGING_INFO /* Don't let the first function fall at the same address as gcc_compiled., if profiling. */ if (profile_flag || profile_block_flag) - #endif assemble_zeros (UNITS_PER_WORD); --- 1820,1836 ---- #endif ! /* ??? Note: There used to be a conditional here ! to call assemble_zeros without fail if DBX_DEBUGGING_INFO is defined. ! This was to guarantee separation between gcc_compiled. and ! the first function, for the sake of dbx on Suns. ! However, having the extra zero here confused the Emacs ! code for unexec, and might confuse other programs too. ! Therefore, I took out that change. ! In future versions we should find another way to solve ! that dbx problem. -- rms, 23 May 93. */ ! /* Don't let the first function fall at the same address as gcc_compiled., if profiling. */ if (profile_flag || profile_block_flag) assemble_zeros (UNITS_PER_WORD); diff -rc2P gcc-2.4.0/va-sparc.h gcc-2.4.1/va-sparc.h *** gcc-2.4.0/va-sparc.h Tue Apr 6 21:32:39 1993 --- gcc-2.4.1/va-sparc.h Wed May 19 22:24:28 1993 *************** *** 34,38 **** #define va_alist __builtin_va_alist ! #define va_dcl #ifdef __GCC_NEW_VARARGS__ --- 34,38 ---- #define va_alist __builtin_va_alist ! #define va_dcl int __builtin_va_alist; #ifdef __GCC_NEW_VARARGS__ diff -rc2P gcc-2.4.0/varasm.c gcc-2.4.1/varasm.c *** gcc-2.4.0/varasm.c Thu May 6 13:02:21 1993 --- gcc-2.4.1/varasm.c Wed May 19 23:09:47 1993 *************** *** 433,436 **** --- 433,454 ---- } + /* Output alignment directive to align for constant expression EXP. */ + + void + assemble_constant_align (exp) + tree exp; + { + int align; + + /* Align the location counter as required by EXP's data type. */ + align = TYPE_ALIGN (TREE_TYPE (exp)); + #ifdef CONSTANT_ALIGNMENT + align = CONSTANT_ALIGNMENT (exp, align); + #endif + + if (align > BITS_PER_UNIT) + ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT)); + } + /* Output a string of literal assembler code for an `asm' keyword used between functions. */ diff -rc2P gcc-2.4.0/version.c gcc-2.4.1/version.c *** gcc-2.4.0/version.c Sun May 16 00:29:07 1993 --- gcc-2.4.1/version.c Wed May 26 00:55:47 1993 *************** *** 1 **** ! char *version_string = "2.4.0"; --- 1 ---- ! char *version_string = "2.4.1";