--- gcc/gcc.texinfo 2018/04/24 16:53:33 1.1.1.9 +++ gcc/gcc.texinfo 2018/04/24 17:02:43 1.1.1.14 @@ -6,7 +6,7 @@ @ifinfo This file documents the use and the internals of the GNU compiler. -Copyright (C) 1988, 1989 Free Software Foundation, Inc. +Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -42,12 +42,12 @@ Foundation instead of in the original En @sp 2 @center Richard M. Stallman @sp 3 -@center last updated 21 February 1990 +@center last updated 19 Sep 1992 @sp 1 -@center for version 1.37.1 +@center for version 1.42 @page @vskip 0pt plus 1filll -Copyright @copyright{} 1988, 1989 Free Software Foundation, Inc. +Copyright @copyright{} 1988, 1989, 1990, 1991, 1992 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -86,6 +86,7 @@ well as its new features and incompatibi * Options:: Command options supported by @samp{gcc}. * Installation:: How to configure, compile and install GNU CC. * Trouble:: If you have trouble installing GNU CC. +* Service:: How to find suppliers of services for GNU CC users. * Incompatibilities:: Incompatibilities of GNU CC. * Extensions:: GNU extensions to the C language. * Bugs:: How to report bugs (if you want to get them fixed). @@ -480,19 +481,26 @@ Jonathan Stone wrote the machine descrip @node Boycott, Options, Contributors, Top @chapter Protect Your Freedom---Fight ``Look And Feel'' +@quotation +@i{This section is a political message from the League for Programming +Freedom to the users of GNU CC. It is included here as an expression +of support for the League on the part of the Free Software Foundation +and Richard Stallman.} +@end quotation + Ashton-Tate, Apple, Lotus and Xerox are trying to create a new form of legal monopoly: a copyright on a class of user interfaces. These monopolies would cause serious problems for users and developers of computer software and systems. -Until three years ago, the law seemed clear: no one could restrict +Until a few years ago, the law seemed clear: no one could restrict others from using a user interface; programmers were free to implement any interface they chose. Imitating interfaces, sometimes with changes, was standard practice in the computer field. The interfaces we know evolved gradually in this way; for example, the Macintosh user interface drew ideas from the Xerox interface, which in turn drew on work done at -Stanford and SRI. 1-2-3 imitated VisiCalc, and dBase imitated a database -program from JPL. +Stanford and SRI. 1-2-3 imitated VisiCalc, and dBase imitated a +database program from JPL. Most computer companies, and nearly all computer users, were happy with this state of affairs. The companies that are suing say it does not @@ -506,7 +514,7 @@ the courts, the precedent will hobble th @itemize @bullet @item -Gratuitous incompatibilites will burden users. Imagine if each +Gratuitous incompatibilities will burden users. Imagine if each car manufacturer had to arrange the pedals in a different order. @item @@ -528,10 +536,46 @@ Even Apple, etc., will find it harder to they can no longer adapt the good ideas that others introduce, for fear of weakening their own legal positions. Some users suggest that this stagnation may already have started. + +@item +If you use GNU software, you might find it of some concern that user +interface copyright will make it hard for the Free Software Foundation +to develop programs compatible with the interfaces that you already +know. @end itemize -Here are some things you can do to protect your freedom to write -programs: +To protect our freedom from lawsuits like these, a group of programmers +and users have formed a new grass-roots political organization, the +League for Programming Freedom. + +The purpose of the League is to oppose new monopolistic practices such +as user-interface copyright and software patents; it calls for a return +to the legal policies of the recent past, in which these practices were +not allowed. The League is not concerned with free software as an +issue, and not affiliated with the Free Software Foundation. + +The League's membership rolls include John McCarthy, inventor of Lisp, +Marvin Minsky, founder of the Artificial Intelligence lab, Guy L. +Steele, Jr., author of well-known books on Lisp and C, as well as +Richard Stallman, the developer of GNU CC. Please join and add your +name to the list. Membership dues in the League are $42 per year for +programmers, managers and professionals; $10.50 for students; $21 for +others. + +The League needs both activist members and members who only pay their +dues. + +To join, or for more information, phone (617) 492-0023 or write to: + +@example +League for Programming Freedom +1 Kendall Square #143 +P.O. Box 9171 +Cambridge, MA 02139 league@@prep.ai.mit.edu +@end example + +Here are some suggestions from the League for how you can protect your +freedom to write programs: @itemize @bullet @item @@ -554,30 +598,21 @@ Tell your friends and colleagues about t to ruin the computer industry. @item -Join the League for Programming Freedom. Phone (617) 492-0023 or write to: - -@example -League for Programming Freedom -1 Kendall Square #143 -P.O. Box 9171 -Cambridge, MA 02139 league@@prep.ai.mit.edu -@end example - -@item Above all, don't work for the look-and-feel plaintiffs, and don't accept contracts from them. @item -Write to or phone your elected representatives to show them how -important this issue is. +Write to Congress to explain the importance of this issue. @example -Senator So and So Representative So and So -United States Senate House of Representatives -Washington, DC 20510 Washington, DC 20515 -@end example +House Subcommittee on Intellectual Property +2137 Rayburn Bldg +Washington, DC 20515 -You can phone senators and representatives at (202) 225-3121. +Senate Subcommittee on Patents, Trademarks and Copyrights +United States Senate +Washington, DC 20510 +@end example @end itemize Express your opinion! You can make a difference. @@ -736,7 +771,8 @@ declarations of functions. @item The keywords @code{typeof}, @code{inline}, @code{signed}, @code{const} -and @code{volatile} are not recognized.@refill +and @code{volatile} are not recognized. (You can still use the alternative +keywords such as @code{__typeof__}, @code{__inline__}, and so on.) @item Comparisons between pointers and integers are always allowed. @@ -1237,6 +1273,9 @@ seems to result in better code than woul This option is enabled by default on certain machines, usually those which have no call-preserved registers to use instead. +Don't use @samp{-fcaller-saves} together with +@samp{-fomit-frame-pointer}. This combination does not work. + @item -fkeep-inline-functions Even if all calls to a given function are integrated, and the function is declared @code{static}, nevertheless output a @@ -1445,7 +1484,7 @@ directories from the search path except @item -M Tell the preprocessor to output a rule suitable for @code{make} -describing the dependencies of each source file. For each source +describing the dependencies of each object file. For each source file, the preprocessor outputs one @code{make}-rule whose target is the object file name for that source file and whose dependencies are all the files @samp{#include}d in it. This rule may be a single line @@ -1483,8 +1522,10 @@ Here is the procedure for installing GNU * Other Dir:: Compiling in a separate directory (not where the source is). * Sun Install:: See below for installation on the Sun. * 3B1 Install:: See below for installation on the 3B1. +* SCO Install:: See below for installation on SCO System V 3.2. (Or ESIX.) * VMS Install:: See below for installation on VMS. * HPUX Install:: See below for installation on HPUX. +* Tower Install:: See below for installation on an NCR Tower. @end menu @iftex See below for VMS systems, and modified procedures needed on Sun @@ -1521,6 +1562,10 @@ Intel 386 PCs running system V. @item i386-sysv-gas Intel 386 PCs running system V, using the GNU assembler and GNU linker. +@item i386-sysv4 +Intel 386 PCs running system V.4. You must run the shell script +@file{fixincludes-V4} in order for GNU CC to work properly. You must +also uncomment some lines in @file{Makefile}. @item sequent-i386 Sequent with Intel 386 processors. @item i386-aix @@ -1528,23 +1573,23 @@ Intel 386 PCs or PS/2s running AIX. @item sun2 Sun 2 running system version 2 or 3. @item sun3 -Sun 3 running system version 2 or 3, with 68881. +Sun 3 running system version 4, with 68881. Note there we do not provide a configuration file to use an FPA by default, because programs that establish signal handlers for floating point traps inherently cannot work with the FPA. @item sun3-nfp -Sun 3 running system version 2 or 3, without 68881. +Sun 3 running system version 4, without 68881. @item sun4 -Sun 4 running system version 2 or 3. @xref{Incompatibilities}, +Sun 4 running system version 4. @xref{Incompatibilities}, for calling convention incompatibilities on the Sun 4 (sparc). @item sun2-os4 Sun 2 running system version 4. -@item sun3-os4 -Sun 3 running system version 4, with 68881. -@item sun3-nfp-os4 -Sun 3 running system version 4, without 68881. -@item sun4-os4 -Sun 4 running system version 4. @xref{Incompatibilities}, +@item sun3-os3 +Sun 3 running system version 2 or 3, with 68881. +@item sun3-nfp-os3 +Sun 3 running system version 2 or 3, without 68881. +@item sun4-os3 +Sun 4 running system version 2 or 3. @xref{Incompatibilities}, for calling convention incompatibilities on the Sun 4 (sparc). @item sun386 Sun 386 (``roadrunner''). @@ -1574,24 +1619,44 @@ The tahoe computer (running BSD, and usi @item decstation The DEC 3100 Mips machine (``pmax''). Note that GNU CC cannot generate debugging information in the unusual format used on the Mips. +@item mips-sysv-os5 +The Mips computer, RS series, with the System V environment +running on revision 5.00 of RISC-OS as default. +Note that GNU CC cannot generate debugging information in the unusual +format used on the Mips, and also cannot be used to create +programs that use shared libraries. @item mips-sysv The Mips computer, RS series, with the System V environment as default. Note that GNU CC cannot generate debugging information in the unusual format used on the Mips. +@item mips-bsd43-os5 +The Mips computer, RS series, with the BSD 4.3 environment +running revision 5.00 of RISC-OS as default. +Note that GNU CC cannot generate debugging information in the unusual +format used on the Mips, and also cannot be used to create +programs that use shared libraries. @item mips-bsd43 The Mips computer, RS series, with the BSD 4.3 environment as default. Note that GNU CC cannot generate debugging information in the unusual format used on the Mips. +@item mips-os5 +The Mips computer, M series running revision 5.00 of RISC-OS. +Note that GNU CC cannot generate debugging information in the +unusual format used on the Mips, and also cannot be used to +create programs that use shared libraries. @item mips The Mips computer, M series. Note that GNU CC cannot generate debugging information in the unusual format used on the Mips. @item iris -The Mips computer, as delivered by Iris. Note that GNU CC cannot -generate debugging information in the unusual format used on the Mips. +Another variant of the Mips computer, the Silicon Graphics Iris 4D. +Note that GNU CC cannot generate debugging information in the unusual +format used on the Mips. @item convex-c1 -Convex C1 computer. +Convex C1 computer. With operating system version 9, use @samp{cc -pcc} +as the compilation command when building stage 1 of GNU CC. @item convex-c2 -Convex C2 computer. +Convex C2 computer. With operating system version 9, use @samp{cc -pcc} +as the compilation command when building stage 1 of GNU CC. @item pyramid Pyramid computer. @item hp9k320 @@ -1609,6 +1674,12 @@ older than 6.5. Note there is no suppor thus, @samp{-g} is not available in this configuration. @item hp9k320-bsd HP 9000 series 300 running BSD. +@item hp9k200-bsd +HP 9000 series 200 running BSD. Note that the C compiler that comes +with this system cannot compile GNU CC; contact @code{law@@super.org} to +get binaries of GNU CC for bootstrapping. Additionally, a minor patch +is necessary if you wish to build kernels with GNU CC; contact +@code{law@@super.org} to get a copy of the patch. @item isi68 ISI 68000 or 68020 system with a 68881. @item isi68-nfp @@ -1617,6 +1688,8 @@ ISI 68000 or 68020 system without a 6888 Sony NEWS 68020 system. @item next NeXT system. +@item tower +NCR Tower 32 system. @item altos Altos 3068. Note that you must use the GNU assembler, linker and debugger, with COFF-encapsulation. Also, you must fix a kernel @@ -1707,6 +1780,8 @@ for HPUX systems, if you are using the G other utilities. Not all of the pieces of GNU software needed for this mode of operation are as yet in distribution; full instructions will appear here in the future.@refill +@item tm-tower-as.h +for NCR Tower 32 systems, using the standard system assembler. @end table For the vax, use @file{tm-vax.h} on BSD Unix, @file{tm-vaxv.h} on @@ -1743,6 +1818,16 @@ Note that Encore systems are supported o For Sparc (Sun 4) machines, use @file{tm-sparc.h} with operating system version 4, and @file{tm-sun4os3.h} with system version 3. +For Convex systems before version 8.1, use @file{tm-conv1os7.h} or +@file{tm-conv2os7.h}. For versions 8.1 and greater, use @file{tm-convex1.h} +or @file{tm-convex2.h}. You should also bootstrap GCC with @code{pcc} +rather than @code{cc}; one way to do this is with the following commands. + +@example +ln -s /bin/pcc ./cc +set path = (. $path) +@end example + @item Make a symbolic link named @file{md} to the machine description pattern file. It should be in the @file{config} subdirectory and its @@ -1766,6 +1851,19 @@ Bison versions older than Sept 8, 1988 w for @file{c-parse.tab.c}. @item +If you have a previous version of GCC installed, then chances are +you can compile the new version with that. Do the following: + +@example +make CC="gcc -O" +@end example + +@noindent +Since this produces an optimized executable right away, there is no need +to bootstrap the result with itself except to test it. Therefore, you can +skip directly to the @samp{make install} step below. + +@item Build the compiler. Just type @samp{make} in the compiler directory. Ignore any warnings you may see about ``statement not reached'' in the @@ -1803,6 +1901,8 @@ Recompile the compiler with itself, with make CC=stage1/gcc CFLAGS="-g -O -Bstage1/" @end example +This is called making the stage 2 compiler. + On a 68000 or 68020 system lacking floating point hardware, unless you have selected a @file{tm.h} file that expects by default that there is no such hardware, do this instead: @@ -1824,8 +1924,9 @@ end @end example @noindent -Aside from the @samp{-B} option, the options should be the same as -when you made stage 2. +This is called making the stage 3 compiler. Aside from the @samp{-B} +option, the options should be the same as when you made the stage 2 +compiler. The @code{foreach} command (written in C shell) will notify you if any of these stage 3 object files differs from those of stage 2. On BSD systems, @@ -1840,12 +1941,15 @@ comparison as follows (in Bourne shell): @example for file in *.o; do echo $file -tail +10 $file > foo1 -tail +10 stage2/$file > foo2 +tail +10c $file > foo1 +tail +10c stage2/$file > foo2 cmp foo1 foo2 done @end example +On MIPS machines, you should use the shell script @file{ecoff-cmp} +to compare two object files. + @item Install the compiler driver, the compiler's passes and run-time support. You can use the following command: @@ -1855,12 +1959,23 @@ make install @end example @noindent -This copies the files @file{cc1}, @file{cpp} and @file{gnulib} to -files @file{gcc-cc1}, @file{gcc-cpp} and @file{gcc-gnulib} in -directory @file{/usr/local/lib}, which is where the compiler driver -program looks for them. It also copies the driver program @file{gcc} -into the directory @file{/usr/local/bin}, so that it appears in typical -execution search paths.@refill +On some machines, you will find that starts to recompile the @file{.c} +files, due to a bug in Make. If that happens, cancel it and try again +specifying the same values for Make variables that you used in the last +compilation; that may not prevent the spurious recompilation, but will +at least do it properly. For example: + +@example +make CC=stage2/gcc CFLAGS="-g -O -Bstage2/" install +@end example + +@noindent +The @samp{install} target copies the files @file{cc1}, @file{cpp} and +@file{gnulib} to files @file{gcc-cc1}, @file{gcc-cpp} and +@file{gcc-gnulib} in directory @file{/usr/local/lib}, which is where the +compiler driver program looks for them. It also copies the driver +program @file{gcc} into the directory @file{/usr/local/bin}, so that it +appears in typical execution search paths.@refill @strong{Warning: there is a bug in @code{alloca} in the Sun library. To avoid this bug, install the binaries of GNU CC that were compiled @@ -1887,6 +2002,27 @@ installs modified, corrected copies of t GNU CC will normally look for them. This script will work on various systems because it chooses the files by searching all the system headers for the problem cases that we know about. + +Use the following command to do this: + +@example +make includes +@end example + +@noindent +If you selected a different directory for GNU CC installation when you +installed it, by specifying the Make variable @code{prefix} or +@code{libdir}, specify it the same way in this command. + +Note that some systems are starting to come with ANSI C system header +files. On these systems, don't run @file{fixincludes}; it may not work, +and is certainly not necessary. + +@strong{Warning:} @file{fixincludes} does not work on many MIPS systems, +because those systems come with circular symbolic links which cause +@samp{ls -lR} to go into an infinite loop. The same problem may occur +on some versions of SunOS. If you encounter this problem, try using +@file{fixinc.new} instead opf @code{fixincludes}. @end enumerate If you cannot install the compiler's passes and run-time support in @@ -1956,18 +2092,34 @@ To avoid this bug, install the binaries GNU CC. They use @code{alloca} as a built-in function and never the one in the library. -Some versions of the Sun compiler crash when compiling GNU CC. -The problem is a segmentation fault in cpp. - -This problem seems to be due to the bulk of data in the environment -variables. You may be able to avoid it by using the following -command to compile GNU CC with Sun CC: +Some versions of the Sun compiler crash when compiling GNU CC, with a +segmentation fault in cpp. This can sometimes be due to the bulk of +data in the environment variables. You may be able to avoid it by using +the following command to compile GNU CC with Sun CC: @example make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc" @end example -@node 3b1 Install, VMS Install, Sun Install, Installation +Another problem that often happens on Suns is that you get a crash when +building stage 2, when @code{genflags} is run. + +One reason for such as crash is if you configured GNU CC for the wrong +version of SunOS. Starting with version 1.38, configurations @code{sun3} +and @code{sun4} are for SunOS 4, so this problem should no longer happen. + +Another cause of the same symptom is having installed the GNU linker +with an earlier version of SunOS. The version that worked before +stopped working due to a change in the format of executables in SunOS +4.1. Many sites have installed the GNU linker as +@file{/usr/local/lib/gcc-ld}, often as part of installing GNU C++. So +if you get such crashes and you have used the proper configuration, try +deleting @file{/usr/local/lib/gcc-ld}. + +The current version of the GNU linker, found in the current binutils +release, does work with SunOS 4.1. + +@node 3b1 Install, SCO Install, Sun Install, Installation @section Installing GNU CC on the 3b1 Installing GNU CC on the 3b1 is difficult if you do not already have @@ -2015,7 +2167,31 @@ problem, uncomment this line in @file{Ma CCLIBFLAGS = -B/usr/local/lib/gcc- -tp -Wp,-traditional @end example -@node VMS Install, HPUX Install, 3B1 Install, Installation +@node SCO Install, VMS Install, 3B1 Install, Installation +@section Installing GNU CC on SCO System V 3.2 +@cindex Installation on SCO systems + +The compiler that comes with this system does not work properly with +@samp{-O}. Therefore, you should redefine the Make variable +@code{CCLIBFLAGS} not to use @samp{-O}. + +You should also edit @file{Makefile} to enable the lines that set +@code{CLIB} to @code{-lPW}, and the ones specifically labeled as being +for SCO, that set @code{RANLIB}, and that set @code{CC} and @code{OLDCC} +to @samp{rcc -Di386 -DM_UNIX -DM_I386 -DM_SYSV -DM_COFF}. + +Also, edit the definition of @code{USER_H} to remove the file @file{limits.h}. + +Then you can run @samp{config.gcc i386-sco} and finish building GNU CC +normally. + +Note that the function @code{memmove} is broken in 3.2v2; it clobbers +register @code{%ebx}. See the file @file{sco-memmove.s}. + +The same recipe should work on ESIX, but use @samp{config.gcc i386-esix} +instead. + +@node VMS Install, HPUX Install, SCO Install, Installation @section Installing GNU CC on VMS The VMS version of GNU CC is distributed in a backup saveset containing @@ -2109,17 +2285,89 @@ requires editing all the @code{gcc} comm have a working 1.33 or newer GNU CC, you can change this file back. @end enumerate -There is a known problem on VMS: @code{const} global variables don't -work compatibly with the VMS C compiler; we don't know a way to get -them to the linker properly. - -Note that GNU CC on VMS does not generate debugging information to -describe the program's symbols. It is not straightforward to implement -this, and we have no time to spend on it, but we might consent to -install a very modular implementation if you write it. You will -probably have to modify GAS as well as GNU CC. +Due to the differences between the filesystems of Unix and VMS, the +preprocessor attempts to translate the names of include files into +something that VMS will understand. The basic strategy is to prepend a +prefix to the specification of the include file, convert the whole +filename to a VMS filename, and then try to open the file. The +preprocessor tries various prefixes until one of them succeeds. + +The first prefix is the @samp{GNU_CC_INCLUDE:} logical name: this is +where GNU_C header files are traditionally stored. If a header file is +not found there, @samp{SYS$SYSROOT:[SYSLIB.]} is tried next. If the +preprocessor is still unable to locate the file, it then assumes that +the include file specification is a valid VMS filename all by itself, +and it uses this filename to attempt to open the include file. If none +of these strategies succeeds, the preprocessor reports an error. + +If you wish to store header files in non-standard locations, then you +can assign the logical @samp{GNU_CC_INCLUDE} to be a search list, where +each element of the list is suitable for use with a rooted logical. + +With this version of GNU CC, @code{const} global variables now work +properly. Unless, however, the @code{const} modifier is also specified +in every external declaration of the variable in all of the source files +that use that variable, the linker will issue warnings about conflicting +attributes for the variable, since the linker does not know if the +variable should be read-only. The program will still work, but the +variable will be placed in writable storage. + +Due to an assembler bug, offsets to static constants are sometimes +incorrectly evaluated. This bug is present in GAS 1.38.1, and should be +fixed in the next version. + +Under previous versions of GNU CC, the generated code would occasionally +give strange results when linked to the sharable @file{VAXCRTL} library. +Now this should work. + +Even with this version, however, GNU CC itself should not be linked to the +sharable @file{VAXCRTL}. The @file{qsort} routine supplied with @file{VAXCRTL} +has a bug which can cause a compiler crash. + +Similarly, the preprocessor should not be linked to the sharable +@file{VAXCRTL}. The @code{strncat} routine supplied with @file{VAXCRTL} has a +bug which can cause the preprocessor to go into an infinite loop. + +It should be pointed out that if you attempt to link to the sharable +@file{VAXCRTL}, the VMS linker will strongly resist any effort to force +it to use the @code{qsort} and @code{strncat} routines from +@file{gcclib}. Until the bugs in @file{VAXCRTL} have been fixed, +linking any of the compiler components to the sharable VAXCRTL is not +recommended. (These routines can be bypassed by placing duplicate copies +of @code{qsort} and @code{strncat} in @file{gcclib} under different +names, and patching the compiler sources to use these routines). Both +of the bugs in @file{VAXCRTL} are still present in VMS version 5.4-1, +which is the most recent version as of this writing. + +The executables that are generated by @file{make-cc1.com} and +@file{make-cccp.com} use the non-shared version of @file{VAXCRTL} (and +thus use the @code{qsort} and @code{strncat} routines from +@file{gcclib.olb}). + +Note that GNU CC on VMS now generates debugging information to describe +the programs symbols to the VMS debugger. However, you need version 1.37 +or later of GAS in order to output them properly in the object file. + +The VMS linker does not distinguish between upper and lower case letters +in function and variable names. However, usual practice in C is to +distinguish case. Normally GNU C (by means of the assembler GAS) +implements usual C behavior by augmenting each name that is not all +lower-case. A name is augmented by truncating it to at most 23 +characters and then adding more characters at the end which encode the +case pattern the rest. + +Name augmentation yields bad results for programs that use precompiled +libraries (such as Xlib) which were generated by another compiler. Use +the compiler option @samp{/NOCASE_HACK} to inhibits augmentation; it +makes external C functions and variables case-independent as is usual on +VMS. Alternatively, you could write all references to the functions and +variables in such libraries using lower case; this will work on VMS, but +is not portable to other systems. In cases where you need to +selectively inhibit augmentation, you can define a macro for each mixed +case symbol for which you wish to inhibit augmentation, where the macro +expands into the lower case equivalent of the name. -@node HPUX Install,, VMS Install, Installation +@node HPUX Install, Tower Install, VMS Install, Installation @section Installing GNU CC on HPUX To install GNU CC on HPUX, you must start by editing the file @@ -2128,6 +2376,13 @@ saying what to change. You need to chan (if you are using GAS) some lines in the rule for the target @samp{gnulib}. +To avoid errors when linking programs with @samp{-g}, create an empty +library named @file{libg.a}. An easy way to do this is: + +@example +ar rc /usr/local/lib/libg.a +@end example + To compile with the HPUX C compiler, you must specify get the file @file{alloca.c} from GNU Emacs. Then, when you run @code{make}, use this argument: @@ -2144,8 +2399,26 @@ follows: make CC=stage1/gcc CFLAGS="-g -O -Bstage1/ -I../binutils/hp-include" @end example -@node Trouble, Incompatibilities, Installation, Top -@chapter Known Causes of Trouble with GNU CC. +@node Tower Install,, HPUX Install, Installation +@section Installing GNU CC on an NCR Tower + +On an NCR Tower model 4x0 or 6x0, you may have trouble because the +default maximum virtual address size of a process is just 1 Mb. Most +often you will find this problem while compiling GNU CC with itself. + +The only way to solve the problem is to reconfigure the kernel. +Add a line such as this to the configuration file: + +@example +MAXUMEM = 4096 +@end example + +@noindent +and then relink the kernel and reboot the machine. + + +@node Trouble, Service, Installation, Top +@chapter Known Causes of Trouble with GNU CC Here are some of the things that have caused trouble for people installing or using GNU CC. @@ -2177,12 +2450,6 @@ as @code{REAL_VALUE_TYPE}. But doing so work for each target machine. @xref{Cross-compilation}. @item -DBX rejects some files produced by GNU CC, though it accepts similar -constructs in output from PCC. Until someone can supply a coherent -description of what is valid DBX input and what is not, there is -nothing I can do about these problems. You are on your own. - -@item Users often think it is a bug when GNU CC reports an error for code like this: @@ -2232,7 +2499,27 @@ the definition of @code{struct mumble} a think it's worth being incompatible for. @end itemize -@node Incompatibilities, Extensions, Trouble, Top +Additional problems are described in @ref{Incompatibilities}. + +@node Service, Incompatibilities, Trouble, Top +@chapter How To Get Help with GNU CC + +If you need help installing, using or changing GNU CC, there are two +ways to find it: + +@itemize @bullet +@item +Send a message to a suitable network mailing list. First try +@code{bug-gcc@@prep.ai.mit.edu}, and if that brings no response, try +@code{help-gcc@@prep.ai.mit.edu}. + +@item +Look in the service directory for someone who might help you for a fee. +The service directory is found in the file named @file{SERVICE} in the +GNU CC distribution. +@end itemize + +@node Incompatibilities, Extensions, Service, Top @chapter Incompatibilities of GNU CC There are several noteworthy incompatibilities between GNU C and most @@ -2387,18 +2674,83 @@ method is not used in GNU CC because it You can tell GNU CC to use the PCC convention with the option @samp{-fpcc-struct-return}. +@end itemize + +There are also system-specific incompatibilities. +@itemize @bullet @item On the Sparc, GNU CC uses an incompatible calling convention for -structures. It passes them by including their contents in the argument -list, whereas the standard compiler passes them effectively by -reference. +structures and unions. It passes them by including their contents in +the argument list, whereas the standard compiler passes them effectively +by reference. + +This is hard to fix in GCC version 1. GNU CC version 2 will use a +compatible calling convention. + +The convention for structure or union returning is also incompatible, +and @samp{-fpcc-struct-return} does not help. + +System functions which can't be called properly from code compiled with +GCC include @code{fetch}, @code{store}, @code{delete}, @code{firstkey}, +@code{nextkey}, @code{inet_makeaddr}, @code{inet_lnaof}, +@code{inet_netof}, @code{inet_ntoa}, @code{mallinfo}, +@code{pmap_rmtcall}, @code{clnt_call}, @code{clntudp_bufcreate} and +@code{clntudp_create}. + +@item +One consequence of the unusual calling convention used on the Sparc +is that structures with less than word alignment do not work right +when passed as arguments to varargs functions. + +It's not easy to fix this problem. In any case, it will be gone in +version 2 as a result of the changed calling convention. + +@item +The Sparc version of @code{setjmp} interacts badly with unexpected stack +adjustments. With rare exceptions, you cannot use @code{setjmp} in a +function which moves the stack pointer. + +In the current version of GNU CC, there are three ways that the stack +pointer can change value: (1) calls to @code{alloca}, (2) use of +variable-sized objects, and (3) calls to functions with parameters that +do not all fit in the argument-passing registers (e.g., more than 6 +parameters). You should avoid all three in functions that call +@code{setjmp}. + +The cause of the problem is the way that Sun implemented register +windows. The 64 bytes at addresses @code{%sp} through @code{%sp+63} +correspond to the register window save area. When a register window +must be spilled, its stack pointer is located, and the registers are +dumped starting at that address. Similarly, when a register window must +be restored, its stack pointer is located, and the registers are +restored from that address. + +When @code{setjmp} is called, the current register window's registers +are saved into the register save area, and when @code{longjmp} is +called, they are restored (actually, @emph{all} register windows are +restored from all valid register windows at the time @code{longjmp} is +called). If there is a change in the value of the stack pointer bewteen +the @code{setjmp} and @code{longjmp} calls, when the registers are +restored, they are restored with random values. + +@item +On Ultrix, the Fortran compiler expects registers 2 through 5 to be saved +by function calls. However, the C compiler uses conventions compatible +with BSD Unix: registers 2 through 5 may be clobbered by function calls. -This really ought to be fixed, but such calling conventions are not -yet supported in GNU CC, so it isn't straightforward to fix it. +GNU CC uses the same convention as the Ultrix C compiler. You can use +these options to produce code compatible with the Fortran compiler: -The convention for structure returning is also incompatible, and -@samp{-fpcc-struct-return} does not help. +@example +-fcall-saved-r2 -fcall-saved-r3 -fcall-saved-r4 -fcall-saved-r5 +@end example + +@item +DBX rejects some files produced by GNU CC, though it accepts similar +constructs in output from PCC. Until someone can supply a coherent +description of what is valid DBX input and what is not, there is +nothing I can do about these problems. You are on your own. @end itemize @node Extensions, Bugs, Incompatibilities, Top @@ -2627,27 +2979,17 @@ expressions are equivalent: (a ? b = 5 : (c = 5)) @end example -A cast is a valid lvalue if its operand is valid. Taking the address of -the cast is the same as taking the address without a cast, except for the -type of the result. For example, these two expressions are equivalent (but -the second may be valid when the type of @code{a} does not permit a cast to -@code{int *}). - -@example -&(int *)a -(int **)&a -@end example - -A simple assignment whose left-hand side is a cast works by converting the -right-hand side first to the specified type, then to the type of the inner -left-hand side expression. After this is stored, the value is converter -back to the specified type to become the value of the assignment. Thus, if -@code{a} has type @code{char *}, the following two expressions are -equivalent: +A cast is a valid lvalue if its operand is an lvalue. A simple +assignment whose left-hand side is a cast works by converting the +right-hand side first to the specified type, then to the type of the +inner left-hand side expression. After this is stored, the value is +converted back to the specified type to become the value of the +assignment. Thus, if @code{a} has type @code{char *}, the following two +expressions are equivalent: @example (int)a = 5 -(int)(a = (char *)5) +(int)(a = (char *)(int)5) @end example An assignment-with-arithmetic operation such as @samp{+=} applied to a cast @@ -2657,9 +2999,26 @@ equivalent: @example (int)a += 5 -(int)(a = (char *) ((int)a + 5)) +(int)(a = (char *)(int) ((int)a + 5)) +@end example + +You cannot take the address of an lvalue cast, because the use of its +address would not work out coherently. Suppose that @code{&(int)f} were +permitted, where @code{f} has type @code{float}. Then the following +statement would try to store an integer bit-pattern where a floating +point number belongs: + +@example +*&(int)f = 1; @end example +This is quite different from what @code{(int)f = 1} would do---that +would convert 1 to floating point and store it. Rather than cause this +inconsistancy, we think it is better to prohibit use of @samp{&} on a cast. + +If you really do want an @code{int *} pointer with the address of +@code{f}, you can simply write @code{(int *)&f}. + @node Conditionals, Zero-Length, Lvalues, Extensions @section Conditional Expressions with Omitted Middle-Operands @@ -2883,7 +3242,7 @@ arithmetic operator would be. These fun @code{const}. For example, @example -extern const void square (); +extern const int square (); @end example @noindent @@ -2892,7 +3251,7 @@ fewer times than the program says. Note that a function that has pointer arguments and examines the data pointed to must @emph{not} be declared @code{const}. Likewise, a -function that calls a non-@code{const} function must not be +function that calls a non-@code{const} function usually must not be @code{const}. Some people object to this feature, claiming that ANSI C's @code{#pragma} @@ -3343,7 +3702,7 @@ variable the value it had at the time of machines, however, @code{longjmp} will not change the value of global register variables. To be portable, the function that called @code{setjmp} should make other arrangements to save the values of the global register -variables, and to restore them in a @code{longjmp}. This way, the the same +variables, and to restore them in a @code{longjmp}. This way, the same thing will happen regardless of what @code{longjmp} does. All global register variable declarations must precede all function @@ -3384,10 +3743,10 @@ automatically, but first we need to figu how to enable you to guide the choice. No solution is evident. Defining such a register variable does not reserve the register; it -remains available for other uses in places where flow control -determines the variable's value is not live. However, these registers -made unavailable for use in the reload pass. I would not be surprised -if excessive use of this feature leaves the compiler too few available +remains available for other uses in places where flow control determines +the variable's value is not live. However, these registers are made +unavailable for use in the reload pass. I would not be surprised if +excessive use of this feature leaves the compiler too few available registers to compile certain functions. @node Alternate Keywords,, Explicit Reg Vars, Extensions @@ -3423,10 +3782,16 @@ macros to replace them with the customar Your bug reports play an essential role in making GNU CC reliable. -Reporting a bug may help you by bringing a solution to your problem, or it -may not. But in any case the important function of a bug report is to help -the entire community by making the next version of GNU CC work better. Bug -reports are your contribution to the maintenance of GNU CC. +When you encounter a problem, the first thing to do is to see if it is +already known. @xref{Trouble}. Also look in @ref{Incompatibilities}. +If it isn't known, then you should report the problem. + +Reporting a bug may help you by bringing a solution to your problem, or +it may not. (If it does not, look in the service directory; see +@ref{Service}.) In any case, the principal function of a bug report +is to help the entire community by making the next version of GNU CC +work better. Bug reports are your contribution to the maintenance of +GNU CC. In order for a bug report to serve its purpose, you must include the information that makes for fixing the bug. @@ -3521,8 +3886,8 @@ bug-gcc@@prep.ai.mit.edu @{ucbvax|mit-eddie|uunet@}!prep.ai.mit.edu!bug-gcc @end example -@strong{Do not send bug reports to @samp{info-gcc}, or to the newsgroup -@samp{gnu.gcc}.} Most users of GNU CC do not want to receive bug +@strong{Do not send bug reports to @samp{help-gcc}, or to the newsgroup +@samp{gnu.gcc.help}.} Most users of GNU CC do not want to receive bug reports. Those that do, have asked to be on @samp{bug-gcc}. The mailing list @samp{bug-gcc} has a newsgroup which serves as a @@ -3538,7 +3903,8 @@ As a last resort, send bug reports on pa @example GNU Compiler Bugs -545 Tech Sq +Free Software Foundation +675 Mass Ave Cambridge, MA 02139 @end example @@ -4330,6 +4696,11 @@ in certain types of expression. Most of following macros: @table @code +@item EXTERNAL_SYMBOL_P (@var{x}) +In a @code{symbol_ref} expression, nonzero if it corresponds to a variable +declared extern in the users code. Zero for all other variables. Stored in +the @code{volatil} field and printed as @samp{/v}. + @item MEM_VOLATILE_P (@var{x}) In @code{mem} expressions, nonzero for volatile memory references. Stored in the @code{volatil} field and printed as @samp{/v}. @@ -4389,8 +4760,8 @@ Expressions that appear more than once a rules for shared structure (@pxref{Sharing}). @item volatil -This flag is used in @code{mem} and @code{reg} expressions and in insns. -In RTL dump files, it is printed as @samp{/v}. +This flag is used in @code{mem},@code{symbol_ref} and @code{reg} expressions +and in insns. In RTL dump files, it is printed as @samp{/v}. In a @code{mem} expression, it is 1 if the memory reference is volatile. Volatile memory references may not be deleted, reordered or combined. @@ -4398,6 +4769,9 @@ Volatile memory references may not be de In a @code{reg} expression, it is 1 if the value is a user-level variable. 0 indicates an internal compiler temporary. +In a @code{symbol_ref} expression, it is 1 if the symbol is declared +@code{extern}. + In an insn, 1 means the insn has been deleted. @item in_struct @@ -4764,11 +5138,28 @@ floating value. @item (cc0) This refers to the machine's condition code register. It has no -operands and may not have a machine mode. It may be validly used in -only two contexts: as the destination of an assignment (in test and -compare instructions) and in comparison operators comparing against -zero (@code{const_int} with value zero; that is to say, -@code{const0_rtx}). +operands and may not have a machine mode. There are two ways to use it: + +@itemize @bullet +@item +To stand for a complete set of condition code flags. This is best on +most machines, where each comparison sets the entire series of flags. + +With this technique, @code{(cc0)} may be validly used in only two +contexts: as the destination of an assignment (in test and compare +instructions) and in comparison operators comparing against zero +(@code{const_int} with value zero; that is to say, @code{const0_rtx}). + +@item +To stand for a single flag that is the result of a single condition. +This is useful on machines that have only a single flag bit, and in +which comparison instructions must specify the condition to test. + +With this technique, @code{(cc0)} may be validly used in only two +contexts: as the destination of an assignment (in test and compare +instructions) where the source is a comparison operator, and as the +first operand of @code{if_then_else} (in a conditional branch). +@end itemize There is only one expression object of code @code{cc0}; it is the value of the variable @code{cc0_rtx}. Any attempt to create an @@ -4784,6 +5175,11 @@ the macro @code{NOTICE_UPDATE_CC}). Onl purpose is to set the condition code, and instructions that use the condition code, need mention @code{(cc0)}. +In some cases, better code may result from recognizing combinations or +peepholes that include instructions that set the condition codes, even +in cases where some reloading is inevitable. For examples, search for +@samp{addcc} and @samp{andcc} in @file{sparc.md}. + @item (pc) This represents the machine's program counter. It has no operands and may not have a machine mode. @code{(pc)} may be validly used only in @@ -4927,7 +5323,7 @@ Represents the square root of @var{x}, c a floating point mode. @item (ffs:@var{m} @var{x}) -Represents the one plus the index of the least significant 1-bit in +Represents one plus the index of the least significant 1-bit in @var{x}, represented as an integer of mode @var{m}. (The value is zero if @var{x} is zero.) The mode of @var{x} need not be @var{m}; depending on the target machine, various mode combinations may be @@ -4937,12 +5333,13 @@ valid. @node Comparisons, Bit Fields, Arithmetic, RTL @section Comparison Operations -Comparison operators test a relation on two operands and are considered to -represent the value 1 if the relation holds, or zero if it does not. The -mode of the comparison is determined by the operands; they must both be -valid for a common machine mode. A comparison with both operands constant -would be invalid as the machine mode could not be deduced from it, but such -a comparison should never exist in RTL due to constant folding. +Comparison operators test a relation on two operands and are considered +to represent a machine-dependent nonzero value (@code{STORE_FLAG_VALUE}) +if the relation holds, or zero if it does not. The mode of the +comparison is determined by the operands; they must both be valid for a +common machine mode. A comparison with both operands constant would be +invalid as the machine mode could not be deduced from it, but such a +comparison should never exist in RTL due to constant folding. Inequality comparisons come in two flavors, signed and unsigned. Thus, there are distinct expression codes @code{gt} and @code{gtu} for signed and @@ -5007,7 +5404,7 @@ to express conditional jumps. Special expression codes exist to represent bit-field instructions. These types of expressions are lvalues in RTL; they may appear -on the left side of a assignment, indicating insertion of a value +on the left side of an assignment, indicating insertion of a value into the specified bit field. @table @code @@ -5467,7 +5864,8 @@ These four are described in a table belo The expression code @code{jump_insn} is used for instructions that may jump (or, more generally, may contain @code{label_ref} expressions). @code{jump_insn} insns have the same extra fields as @code{insn} insns, -accessed in the same way. +accessed in the same way. If there is an instruction to return from the +current function, it is recorded as a @code{jump_insn}. @item call_insn The expression code @code{call_insn} is used for instructions that may do @@ -5530,7 +5928,7 @@ optimization. @item NOTE_INSN_SETJMP Appears following each call to @code{setjmp} or a related function. -@item NOTE_INSN_LOOP_BEG +@item NOTE_INSN_LOOP_CONT Appears at the place in a loop that @code{continue} statements jump to. @end table @@ -5864,10 +6262,10 @@ like. It is incomplete because it may c and @code{match_dup} expressions that stand for operands of the instruction. -If the vector has only one element, that element is what the -instruction should look like. If the vector has multiple elements, -then the instruction looks like a @code{parallel} expression -containing that many elements as described. +If the vector has only one element, that element is the template for the +instruction pattern. If the vector has multiple elements, then the +instruction pattern is a @code{parallel} expression containing the +elements described. @item A condition. This is a string which contains a C expression that is @@ -6196,7 +6594,7 @@ a pattern could use @code{which_alternat @example (define_insn "" - [(set (match_operand:SI 0 "general_operand" "r,m") + [(set (match_operand:SI 0 "general_operand" "=r,m") (const_int 0))] "" "* @@ -6378,7 +6776,7 @@ Contrast, therefore, the two instruction @example (define_insn "" - [(set (match_operand:SI 0 "general_operand" "r") + [(set (match_operand:SI 0 "general_operand" "=r") (plus:SI (match_dup 0) (match_operand:SI 1 "general_operand" "r")))] "" @@ -6390,7 +6788,7 @@ which has two operands, one of which mus @example (define_insn "" - [(set (match_operand:SI 0 "general_operand" "r") + [(set (match_operand:SI 0 "general_operand" "=r") (plus:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "general_operand" "r")))] "" @@ -6535,7 +6933,7 @@ the first, 1 for the second alternative, @example (define_insn "" - [(set (match_operand:SI 0 "general_operand" "r,m") + [(set (match_operand:SI 0 "general_operand" "=r,m") (const_int 0))] "" "* @@ -6732,6 +7130,12 @@ with mode @var{m} of a register whose na the @samp{movstrict@var{m}} instruction is guaranteed not to alter any of the register except the part which belongs to mode @var{m}. +@item @samp{movsi_unaligned} +Like @samp{movsi} except that the memory reference will not trap +if loading or storing into unaligned memory. You must define this +pattern if you can pass structures or unions in registers when they +have less than a full word of alignment. + @item @samp{add@var{m}3} Add operand 2 and operand 1, storing the result in operand 0. All operands must have mode @var{m}. This can be used even on two-address machines, by @@ -6891,7 +7295,7 @@ point. @item @samp{extv} Extract a bit-field from operand 1 (a register or memory operand), where operand 2 specifies the width in bits and operand 3 the starting -bit, and store it in operand 0. Operand 0 must have @code{Simode}. +bit, and store it in operand 0. Operand 0 must have @code{SImode}. Operand 1 may have mode @code{QImode} or @code{SImode}; often @code{SImode} is allowed only for registers. Operands 2 and 3 must be valid for @code{SImode}. @@ -7008,8 +7412,8 @@ is no @samp{casesi} pattern. This pattern requires two operands: the address or offset, and a label which should immediately precede the jump table. If the macro @code{CASE_VECTOR_PC_RELATIVE} is defined then the first operand is an -absolute address to jump to; otherwise, it is an offset which counts -from the address of the table. +offset that counts from the address of the table; otherwise, it is an +absolute address to jump to. The @samp{tablejump} insn is always the last insn before the jump table it uses. Its assembler code normally has no need to use the @@ -7325,7 +7729,7 @@ Here is an example, taken from the 68000 @example (define_peephole [(set (reg:SI 15) (plus:SI (reg:SI 15) (const_int 4))) - (set (match_operand:DF 0 "register_operand" "f") + (set (match_operand:DF 0 "register_operand" "=f") (match_operand:DF 1 "register_operand" "ad"))] "FP_REG_P (operands[0]) && ! FP_REG_P (operands[1])" "* @@ -7595,13 +7999,13 @@ compiler source files include @file{conf * Registers:: Naming and describing the hardware registers. * Register Classes:: Defining the classes of hardware registers. * Stack Layout:: Defining which way the stack grows and by how much. -* Library Names:: Specifying names of subroutines to call automatically. +* Library Calls:: Specifying how to call certain library routines. * Addressing Modes:: Defining addressing modes valid for memory operands. * Delayed Branch:: Do branches execute the following instruction? * Condition Code:: Defining how insns update the condition code. -* Assembler Format:: Defining how to write insns and pseudo-ops to output. * Cross-compilation:: Handling floating point for cross-compilers. * Misc:: Everything else. +* Assembler Format:: Defining how to write insns and pseudo-ops to output. @end menu @node Run-time Target, Storage Layout, Machine Macros, Machine Macros @@ -7802,6 +8206,9 @@ of some instances of PCC: a bit field wh @code{int} has the same effect on the size and alignment of a structure as an actual @code{int} would have. +If the macro is defined, then its definition should be a C expression; +a nonzero value for the expression enables PCC-compatible behavior. + Just what effect that is in GNU CC depends on other parameters, but on most machines it would force the structure's alignment and size to a multiple of 32 or @code{BIGGEST_ALIGNMENT} bits. @@ -7938,7 +8345,7 @@ stack.) If this macro is not defined, it means that no death notes need to be preserved. This is the usual situation. -@item HARD_REGNO_REGS (@var{regno}, @var{mode}) +@item HARD_REGNO_NREGS (@var{regno}, @var{mode}) A C expression for the number of consecutive hard registers, starting at register number @var{regno}, required to hold a value of mode @var{mode}. @@ -8324,7 +8731,7 @@ so, 0 otherwise. If @var{c} is not one be 0 regardless of @var{value}. @end table -@node Stack Layout, Library Names, Register Classes, Machine Macros +@node Stack Layout, Library Calls, Register Classes, Machine Macros @section Describing Stack Layout @table @code @@ -8397,7 +8804,7 @@ registers. The actual allocation of such space would be done either by the call instruction or by the function prologue, or by -defining FIRST_PARM_CALLER_OFFSET. +defining @code{FIRST_PARM_CALLER_OFFSET}. @item STACK_ARGS_ADJUST (@var{size}) Define this macro if the machine requires padding on the stack for @@ -8447,6 +8854,9 @@ nothing (the caller pops all). When thi @var{funtype} is examined to determine whether a function takes a fixed number of arguments. +When this macro returns nonzero, the macro @code{FRAME_POINTER_REQUIRED} +must also return nonzero for proper operation. + @item FUNCTION_VALUE (@var{valtype}, @var{func}) A C expression to create an RTX representing the place where a function returns a value of data type @var{valtype}. @var{valtype} is @@ -8645,8 +9055,8 @@ frame pointer is in wanted, the macro ca @code{frame_pointer_needed}. The variable's value will be 1 at run time in a function that needs a frame pointer. -On machines where arguments may be passed in registers, and not have -stack space allocated, this macro must examine the variable +On machines where an argument may be passed partly in registers and +partly in memory, this macro must examine the variable @code{current_function_pretend_args_size}, and allocate that many bytes of uninitialized space on the stack just underneath the first argument arriving on the stack. (This may not be at the very end of the stack, @@ -8654,11 +9064,6 @@ if the calling sequence has pushed anyth arguments. But usually, on such machines, nothing else has been pushed yet, because the function prologue itself does all the pushing.) -This ``pretend argument'' space is allocated in functions that use the -ANSI library @file{stdarg.h} to accept anonymous arguments of -unspecified types; the last named argument is copied into the space, so -that the anonymous arguments follow it consecutively. - @item FUNCTION_PROFILER (@var{file}, @var{labelno}) A C statement or compound statement to output to @var{file} some assembler code to call the profiling subroutine @code{mcount}. @@ -8713,7 +9118,7 @@ Of course, since you are writing the def can take a short cut in the definition of this macro and use the name that you know will result. -@item EXIT_IGNORES_STACK +@item EXIT_IGNORE_STACK Define this macro as a C expression that is nonzero if the return instruction or the function epilogue ignores the value of the stack pointer; in other words, if it is safe to delete an instruction to @@ -8722,7 +9127,7 @@ adjust the stack pointer before a return Note that this macro's value is relevant only for functions for which frame pointers are maintained. It is never safe to delete a final stack adjustment in a function that has no frame pointer, and the -compiler knows this regardless of @code{EXIT_IGNORES_STACK}. +compiler knows this regardless of @code{EXIT_IGNORE_STACK}. @item FUNCTION_EPILOGUE (@var{file}, @var{size}) A C compound statement that outputs the assembler code for exit from a @@ -8788,8 +9193,8 @@ from the stack frames, rather than from across a call to @code{setjmp} on such machines. @end table -@node Library Names, Addressing Modes, Stack Layout, Machine Macros -@section Library Subroutine Names +@node Library Calls, Addressing Modes, Stack Layout, Machine Macros +@section Implicit Use of Library Routines @table @code @item MULSI3_LIBCALL @@ -8832,9 +9237,17 @@ not define this macro, the default name Define this macro if GNU CC should generate calls to the System V (and ANSI C) library functions @code{memcpy} and @code{memset} rather than the BSD functions @code{bcopy} and @code{bzero}. + +@item GNULIB_NEEDS_DOUBLE +Define this macro if only @code{float} arguments cannot be passed to +library routines (so they must be converted to @code{double}). This +macro affects both how library calls are generated and how the library +routines in @file{gnulib.c} accept their arguments. It is useful on +machines where floating and fixed point arguments are passed +differently, such as the i860. @end table -@node Addressing Modes, Delayed Branch, Library Names, Machine Macros +@node Addressing Modes, Delayed Branch, Library Calls, Machine Macros @section Addressing Modes @table @code @@ -8858,7 +9271,9 @@ are supported. @item MAX_REGS_PER_ADDRESS A number, the maximum number of registers that can appear in a valid -memory address. +memory address. Note that it is up to you to specify a value equal to +the maximum number that @code{go_if_legitimate_address} would ever +accept. @item GO_IF_LEGITIMATE_ADDRESS (@var{mode}, @var{x}, @var{label}) A C compound statement with a conditional @code{goto @var{label};} @@ -9378,31 +9793,6 @@ obtained with @code{GET_CODE (@var{x})}. @item DOLLARS_IN_IDENTIFIERS Define this to be nonzero if the character @samp{$} should be allowed by default in identifier names. - -@item USE_C_ALLOCA -Define this macro to indicate that the compiler is running with the -@code{alloca} implemented in C. This version of @code{alloca} can be -found in the file @file{alloca.c}; to use it, you must also alter the -@file{Makefile} variable @code{ALLOCA}. - -This macro, unlike most, describes the machine that the compiler is -running on, rather than the one the compiler is compiling for. -Therefore, it should be set in the @file{xm-@var{machine}.h} file -rather than in the @file{tm-@var{machine}.h} file. - -If you do define this macro, you should probably do it as follows: - -@example -#ifndef __GNUC__ -#define USE_C_ALLOCA -#else -#define alloca __builtin_alloca -#endif -@end example - -@noindent -so that when the compiler is compiled with GNU CC it uses the more -efficient built-in @code{alloca} function. @end table @node Assembler Format,, Misc, Machine Macros @@ -9432,6 +9822,14 @@ command given to the linker. If this macro is not defined, a default is provided that loads the standard C library from the usual place. See @file{gcc.c}. +@item LIBG_SPEC +Another C string constant used much like @code{LINK_SPEC}. +This controls whether to link @file{libg.a} when debugging. +Some systems expect this; others do not have any @file{libg.a}. + +If this macro is not defined, a default is provided that loads the +@file{libg.a} provided @samp{-g} is specified. See @file{gcc.c}. + @item STARTFILE_SPEC Another C string constant used much like @code{LINK_SPEC}. The difference between the two is that @code{STARTFILE_SPEC} is used at @@ -9783,10 +10181,10 @@ instruction to assemble a @code{float} c @itemx ASM_OUTPUT_CHAR (@var{stream}, @var{exp}) A C statement to output to the stdio stream @var{stream} an assembler instruction to assemble a @code{int}, @code{short} or @code{char} -constant whose value is @var{value}. The argument @var{exp} will be -an RTL expression which represents a constant value. Use -@samp{output_addr_const (@var{exp})} to output this value as an -assembler expression.@refill +constant whose value is @var{value}. The argument @var{exp} will be an +RTL expression which represents a constant value. Use +@samp{output_addr_const (@var{stream}, @var{exp})} to output this value +as an assembler expression.@refill @item ASM_OUTPUT_DOUBLE_INT (@var{stream}, @var{exp}) A C statement to output to the stdio stream @var{stream} an assembler @@ -9993,6 +10391,31 @@ exits after serious errors. @item SUCCESS_EXIT_CODE A C expression for the status code to be returned when the compiler exits without serious errors. + +@item USE_C_ALLOCA +Define this macro to indicate that the compiler is running with the +@code{alloca} implemented in C. This version of @code{alloca} can be +found in the file @file{alloca.c}; to use it, you must also alter the +@file{Makefile} variable @code{ALLOCA}. + +This macro, unlike most, describes the machine that the compiler is +running on, rather than the one the compiler is compiling for. +Therefore, it should be set in the @file{xm-@var{machine}.h} file +rather than in the @file{tm-@var{machine}.h} file. + +If you do define this macro, you should probably do it as follows: + +@example +#ifndef __GNUC__ +#define USE_C_ALLOCA +#else +#define alloca __builtin_alloca +#endif +@end example + +@noindent +so that when the compiler is compiled with GNU CC it uses the more +efficient built-in @code{alloca} function. @end table In addition, configuration files for system V define @code{bcopy},