--- gcc/gcc.texinfo 2018/04/24 16:55:26 1.1.1.10 +++ gcc/gcc.texinfo 2018/04/24 17:02:43 1.1.1.14 @@ -42,12 +42,12 @@ Foundation instead of in the original En @sp 2 @center Richard M. Stallman @sp 3 -@center last updated 4 December 1990 +@center last updated 19 Sep 1992 @sp 1 -@center for version 1.38 +@center for version 1.42 @page @vskip 0pt plus 1filll -Copyright @copyright{} 1988, 1989, 1990 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 @@ -514,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 @@ -602,16 +602,17 @@ Above all, don't work for the look-and-f 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. @@ -1272,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 @@ -1518,10 +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. +* 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. -* MIPS Install:: See below for installation on MIPS. +* Tower Install:: See below for installation on an NCR Tower. @end menu @iftex See below for VMS systems, and modified procedures needed on Sun @@ -1558,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 @@ -1565,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''). @@ -1611,14 +1619,31 @@ 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. @@ -1627,9 +1652,11 @@ Another variant of the Mips computer, th 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 @@ -1647,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 @@ -1926,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 @@ -1973,6 +2017,12 @@ installed it, by specifying the Make var 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 @@ -2042,17 +2092,33 @@ 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 +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 @@ -2109,21 +2175,21 @@ The compiler that comes with this system @samp{-O}. Therefore, you should redefine the Make variable @code{CCLIBFLAGS} not to use @samp{-O}. -In addition, the compiler produces incorrect output when compiling parts -of GNU CC; the resulting executable @file{cc1} does not work properly -when it is used with @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}. -Therefore, what you must do after building the first stage -is use GNU CC to compile itself without optimization. Here is how: +Also, edit the definition of @code{USER_H} to remove the file @file{limits.h}. -@example -make -k cc1 CC="./gcc -B./" -@end example +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}. -You can think of this as ``stage 1.1'' of the installation process. -However, using this command has the effect of discarding the faulty -stage 1 executable for @file{cc1} and replacing it with stage 1.1. You -can then proceed with @samp{make stage1} and the rest of installation. +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 @@ -2219,6 +2285,25 @@ requires editing all the @code{gcc} comm have a working 1.33 or newer GNU CC, you can change this file back. @end enumerate +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 @@ -2227,23 +2312,62 @@ attributes for the variable, since the l 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}, unless you force the linker to use the -@code{qsort} routine from @file{gcclib.olb}. The @file{qsort} routine -supplied with @file{VAXCRTL} has a bug which causes a compiler crash. -The executable that is generated by @file{make-cc1.com} uses the -non-shared version of @file{VAXCRTL} (and thus the @file{qsort} routine -from @file{gcclib.olb}). +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. -@node HPUX Install, MIPS Install, VMS Install, Installation +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, Tower Install, VMS Install, Installation @section Installing GNU CC on HPUX To install GNU CC on HPUX, you must start by editing the file @@ -2275,16 +2399,24 @@ follows: make CC=stage1/gcc CFLAGS="-g -O -Bstage1/ -I../binutils/hp-include" @end example -@node MIPS Install,, HPUX Install, Installation -@section Installing GNU CC on MIPS +@node Tower Install,, HPUX Install, Installation +@section Installing GNU CC on an NCR Tower -To avoid errors when linking programs with @samp{-g}, create an empty -library named @file{libg.a}. An easy way to do this is: +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 -ar rc /usr/local/lib/libg.a +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 @@ -2318,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: @@ -2373,6 +2499,7 @@ the definition of @code{struct mumble} a think it's worth being incompatible for. @end itemize +Additional problems are described in @ref{Incompatibilities}. @node Service, Incompatibilities, Trouble, Top @chapter How To Get Help with GNU CC @@ -2384,7 +2511,7 @@ ways to find it: @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{info-gcc@@prep.ai.mit.edu}. +@code{help-gcc@@prep.ai.mit.edu}. @item Look in the service directory for someone who might help you for a fee. @@ -2547,33 +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. - -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. - -The convention for structure returning is also incompatible, and -@samp{-fpcc-struct-return} does not help. +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. We have not been able to tell whether the C compiler -agrees with the Fortran compiler. Currently, GNU CC treats these registers -as temporaries on the Vax, which is compatible with BSD Unix. - -If we learn for certain that Ultrix has departed from the traditional -BSD calling convention, we will change GNU CC for Ultrix to fit. In the -mean time, you can use these options to produce code compatible with the -Fortran compiler: +by function calls. However, the C compiler uses conventions compatible +with BSD Unix: registers 2 through 5 may be clobbered by function calls. + +GNU CC uses the same convention as the Ultrix C compiler. You can use +these options to produce code compatible with the Fortran compiler: @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 @@ -2802,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 @@ -2832,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 @@ -3058,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 @@ -3598,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. @@ -3609,8 +3799,6 @@ information that makes for fixing the bu @menu * Criteria: Bug Criteria. Have you really found a bug? * Reporting: Bug Reporting. How to report a bug effectively. -* Known: Trouble. A list of known problems. -* Help: Service. How to get help. @end menu @node Bug Criteria, Bug Reporting, Bugs, Bugs @@ -3698,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 @@ -3715,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 @@ -6405,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))] "" "* @@ -6587,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")))] "" @@ -6599,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")))] "" @@ -6744,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))] "" "* @@ -6941,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 @@ -7534,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])" "* @@ -7804,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 @@ -8536,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 @@ -8998,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 @@ -9042,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 @@ -9619,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