home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / msdos / djgpp / docs / gcc / gcc.i7 < prev    next >
Encoding:
GNU Info File  |  1993-05-29  |  47.2 KB  |  1,126 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.54 from the input
  2. file gcc.texi.
  3.  
  4.    This file documents the use and the internals of the GNU compiler.
  5.  
  6.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  7.  
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.  
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided also
  14. that the sections entitled "GNU General Public License" and "Protect
  15. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  16. original, and provided that the entire resulting derived work is
  17. distributed under the terms of a permission notice identical to this
  18. one.
  19.  
  20.    Permission is granted to copy and distribute translations of this
  21. manual into another language, under the above conditions for modified
  22. versions, except that the sections entitled "GNU General Public
  23. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  24. permission notice, may be included in translations approved by the Free
  25. Software Foundation instead of in the original English.
  26.  
  27. 
  28. File: gcc.info,  Node: Function Names,  Prev: Incomplete Enums,  Up: C Extensions
  29.  
  30. Function Names as Strings
  31. =========================
  32.  
  33.    GNU CC predefines two string variables to be the name of the current
  34. function.  The variable `__FUNCTION__' is the name of the function as
  35. it appears in the source.  The variable `__PRETTY_FUNCTION__' is the
  36. name of the function pretty printed in a language specific fashion.
  37.  
  38.    These names are always the same in a C function, but in a C++
  39. function they may be different.  For example, this program:
  40.  
  41.      extern "C" {
  42.      extern int printf (char *, ...);
  43.      }
  44.      
  45.      class a {
  46.       public:
  47.        sub (int i)
  48.          {
  49.            printf ("__FUNCTION__ = %s\n", __FUNCTION__);
  50.            printf ("__PRETTY_FUNCTION__ = %s\n", __PRETTY_FUNCTION__);
  51.          }
  52.      };
  53.      
  54.      int
  55.      main (void)
  56.      {
  57.        a ax;
  58.        ax.sub (0);
  59.        return 0;
  60.      }
  61.  
  62. gives this output:
  63.  
  64.      __FUNCTION__ = sub
  65.      __PRETTY_FUNCTION__ = int  a::sub (int)
  66.  
  67. 
  68. File: gcc.info,  Node: C++ Extensions,  Next: Trouble,  Prev: C Extensions,  Up: Top
  69.  
  70. Extensions to the C++ Language
  71. ******************************
  72.  
  73.    The GNU compiler provides these extensions to the C++ language (and
  74. you can also use most of the C language extensions in your C++
  75. programs).  If you want to write code that checks whether these
  76. features are available, you can test for the GNU compiler the same way
  77. as for C programs: check for a predefined macro `__GNUC__'.  You can
  78. also use `__GNUG__' to test specifically for GNU C++ (*note Standard
  79. Predefined Macros: (cpp.info)Standard Predefined.).
  80.  
  81. * Menu:
  82.  
  83. * Naming Results::      Giving a name to C++ function return values.
  84. * Min and Max::        C++ Minimum and maximum operators.
  85. * Destructors and Goto:: Goto is safe to use in C++ even when destructors
  86.                            are needed.
  87. * C++ Interface::       You can use a single C++ header file for both
  88.                          declarations and definitions.
  89.  
  90. 
  91. File: gcc.info,  Node: Naming Results,  Next: Min and Max,  Up: C++ Extensions
  92.  
  93. Named Return Values in C++
  94. ==========================
  95.  
  96.    GNU C++ extends the function-definition syntax to allow you to
  97. specify a name for the result of a function outside the body of the
  98. definition, in C++ programs:
  99.  
  100.      TYPE
  101.      FUNCTIONNAME (ARGS) return RESULTNAME;
  102.      {
  103.        ...
  104.        BODY
  105.        ...
  106.      }
  107.  
  108.    You can use this feature to avoid an extra constructor call when a
  109. function result has a class type.  For example, consider a function
  110. `m', declared as `X v = m ();', whose result is of class `X':
  111.  
  112.      X
  113.      m ()
  114.      {
  115.        X b;
  116.        b.a = 23;
  117.        return b;
  118.      }
  119.  
  120.    Although `m' appears to have no arguments, in fact it has one
  121. implicit argument: the address of the return value.  At invocation, the
  122. address of enough space to hold `v' is sent in as the implicit argument.
  123. Then `b' is constructed and its `a' field is set to the value 23.
  124. Finally, a copy constructor (a constructor of the form `X(X&)') is
  125. applied to `b', with the (implicit) return value location as the
  126. target, so that `v' is now bound to the return value.
  127.  
  128.    But this is wasteful.  The local `b' is declared just to hold
  129. something that will be copied right out.  While a compiler that
  130. combined an "elision" algorithm with interprocedural data flow analysis
  131. could conceivably eliminate all of this, it is much more practical to
  132. allow you to assist the compiler in generating efficient code by
  133. manipulating the return value explicitly, thus avoiding the local
  134. variable and copy constructor altogether.
  135.  
  136.    Using the extended GNU C++ function-definition syntax, you can avoid
  137. the temporary allocation and copying by naming `r' as your return value
  138. as the outset, and assigning to its `a' field directly:
  139.  
  140.      X
  141.      m () return r;
  142.      {
  143.        r.a = 23;
  144.      }
  145.  
  146. The declaration of `r' is a standard, proper declaration, whose effects
  147. are executed *before* any of the body of `m'.
  148.  
  149.    Functions of this type impose no additional restrictions; in
  150. particular, you can execute `return' statements, or return implicitly by
  151. reaching the end of the function body ("falling off the edge").  Cases
  152. like
  153.  
  154.      X
  155.      m () return r (23);
  156.      {
  157.        return;
  158.      }
  159.  
  160. (or even `X m () return r (23); { }') are unambiguous, since the return
  161. value `r' has been initialized in either case.  The following code may
  162. be hard to read, but also works predictably:
  163.  
  164.      X
  165.      m () return r;
  166.      {
  167.        X b;
  168.        return b;
  169.      }
  170.  
  171.    The return value slot denoted by `r' is initialized at the outset,
  172. but the statement `return b;' overrides this value.  The compiler deals
  173. with this by destroying `r' (calling the destructor if there is one, or
  174. doing nothing if there is not), and then reinitializing `r' with `b'.
  175.  
  176.    This extension is provided primarily to help people who use
  177. overloaded operators, where there is a great need to control not just
  178. the arguments, but the return values of functions.  For classes where
  179. the copy constructor incurs a heavy performance penalty (especially in
  180. the common case where there is a quick default constructor), this is a
  181. major savings.  The disadvantage of this extension is that you do not
  182. control when the default constructor for the return value is called: it
  183. is always called at the beginning.
  184.  
  185. 
  186. File: gcc.info,  Node: Min and Max,  Next: Destructors and Goto,  Prev: Naming Results,  Up: C++ Extensions
  187.  
  188. Minimum and Maximum Operators in C++
  189. ====================================
  190.  
  191.    It is very convenient to have operators which return the "minimum"
  192. or the "maximum" of two arguments.  In GNU C++ (but not in GNU C),
  193.  
  194. `A <? B'
  195.      is the "minimum", returning the smaller of the numeric values A
  196.      and B;
  197.  
  198. `A >? B'
  199.      is the "maximum", returning the larger of the numeric values A and
  200.      B.
  201.  
  202.    These operations are not primitive in ordinary C++, since you can
  203. use a macro to return the minimum of two things in C++, as in the
  204. following example.
  205.  
  206.      #define MIN(X,Y) ((X) < (Y) ? : (X) : (Y))
  207.  
  208. You might then use `int min = MIN (i, j);' to set MIN to the minimum
  209. value of variables I and J.
  210.  
  211.    However, side effects in `X' or `Y' may cause unintended behavior.
  212. For example, `MIN (i++, j++)' will fail, incrementing the smaller
  213. counter twice.  A GNU C extension allows you to write safe macros that
  214. avoid this kind of problem (*note Naming an Expression's Type: Naming
  215. Types.).  However, writing `MIN' and `MAX' as macros also forces you to
  216. use function-call notation notation for a fundamental arithmetic
  217. operation.  Using GNU C++ extensions, you can write `int min = i <? j;'
  218. instead.
  219.  
  220.    Since `<?' and `>?' are built into the compiler, they properly
  221. handle expressions with side-effects;  `int min = i++ <? j++;' works
  222. correctly.
  223.  
  224. 
  225. File: gcc.info,  Node: Destructors and Goto,  Next: C++ Interface,  Prev: Min and Max,  Up: C++ Extensions
  226.  
  227. `goto' and Destructors in GNU C++
  228. =================================
  229.  
  230.    In C++ programs, you can safely use the `goto' statement.  When you
  231. use it to exit a block which contains aggregates requiring destructors,
  232. the destructors will run before the `goto' transfers control.  (In ANSI
  233. C++, `goto' is restricted to targets within the current block.)
  234.  
  235.    The compiler still forbids using `goto' to *enter* a scope that
  236. requires constructors.
  237.  
  238. 
  239. File: gcc.info,  Node: C++ Interface,  Prev: Destructors and Goto,  Up: C++ Extensions
  240.  
  241. Declarations and Definitions in One Header
  242. ==========================================
  243.  
  244.    C++ object definitions can be quite complex.  In principle, your
  245. source code will need two kinds of things for each object that you use
  246. across more than one source file.  First, you need an "interface"
  247. specification, describing its structure with type declarations and
  248. function prototypes.  Second, you need the "implementation" itself.  It
  249. can be tedious to maintain a separate interface description in a header
  250. file, in parallel to the actual implementation.  It is also dangerous,
  251. since separate interface and implementation definitions may not remain
  252. parallel.
  253.  
  254.    With GNU C++, you can use a single header file for both purposes.
  255.  
  256.      *Warning:* The mechanism to specify this is in transition.  For the
  257.      nonce, you must use one of two `#pragma' commands; in a future
  258.      release of GNU C++, an alternative mechanism will make these
  259.      `#pragma' commands unnecessary.
  260.  
  261.    The header file contains the full definitions, but is marked with
  262. `#pragma interface' in the source code.  This allows the compiler to
  263. use the header file only as an interface specification when ordinary
  264. source files incorporate it with `#include'.  In the single source file
  265. where the full implementation belongs, you can use either a naming
  266. convention or `#pragma implementation' to indicate this alternate use
  267. of the header file.
  268.  
  269. `#pragma interface'
  270.      Use this directive in *header files* that define object classes,
  271.      to save space in most of the object files that use those classes.
  272.      Normally, local copies of certain information (backup copies of
  273.      inline member functions, debugging information, and the internal
  274.      tables that implement virtual functions) must be kept in each
  275.      object file that includes class definitions.  You can use this
  276.      pragma to avoid such duplication.  When a header file containing
  277.      `#pragma interface' is included in a compilation, this auxiliary
  278.      information will not be generated (unless the main input source
  279.      file itself uses `#pragma implementation').  Instead, the object
  280.      files will contain references to be resolved at link time.
  281.  
  282. `#pragma implementation'
  283. `#pragma implementation "OBJECTS.h"'
  284.      Use this pragma in a *main input file*, when you want full output
  285.      from included header files to be generated (and made globally
  286.      visible).  The included header file, in turn, should use `#pragma
  287.      interface'.  Backup copies of inline member functions, debugging
  288.      information, and the internal tables used to implement virtual
  289.      functions are all generated in implementation files.
  290.  
  291.      `#pragma implementation' is *implied* whenever the basename(1) of
  292.      your source file matches the basename of a header file it
  293.      includes.  There is no way to turn this off (other than using a
  294.      different name for one of the two files).  In the same vein, if
  295.      you use `#pragma implementation' with no argument, it applies to an
  296.      include file with the same basename as your source file.  For
  297.      example, in `allclass.cc', `#pragma implementation' by itself is
  298.      equivalent to `#pragma implementation "allclass.h"'; but even if
  299.      you do not say `#pragma implementation' at all, `allclass.h' is
  300.      treated as an implementation file whenever you include it from
  301.      `allclass.cc'.
  302.  
  303.      If you use an explicit `#pragma implementation', it must appear in
  304.      your source file *before* you include the affected header files.
  305.  
  306.      Use the string argument if you want a single implementation file to
  307.      include code from multiple header files.  (You must also use
  308.      `#include' to include the header file; `#pragma implementation'
  309.      only specifies how to use the file--it doesn't actually include
  310.      it.)
  311.  
  312.      There is no way to split up the contents of a single header file
  313.      into multiple implementation files.
  314.  
  315.    `#pragma implementation' and `#pragma interface' also have an effect
  316. on function inlining.
  317.  
  318.    If you define a class in a header file marked with `#pragma
  319. interface', the effect on a function defined in that class is similar to
  320. an explicit `extern' declaration--the compiler emits no code at all to
  321. define an independent version of the function.  Its definition is used
  322. only for inlining with its callers.
  323.  
  324.    Conversely, when you include the same header file in a main source
  325. file that declares it as `#pragma implementation', the compiler emits
  326. code for the function itself; this defines a version of the function
  327. that can be found via pointers (or by callers compiled without
  328. inlining).
  329.  
  330.    ---------- Footnotes ----------
  331.  
  332.    (1)  A file's "basename" is the name stripped of all leading path
  333. information and of trailing suffixes, such as `.h' or `.C' or `.cc'.
  334.  
  335. 
  336. File: gcc.info,  Node: Trouble,  Next: Bugs,  Prev: C++ Extensions,  Up: Top
  337.  
  338. Known Causes of Trouble with GNU CC
  339. ***********************************
  340.  
  341.    This section describes known problems that affect users of GNU CC.
  342. Most of these are not GNU CC bugs per se--if they were, we would fix
  343. them.  But the result for a user may be like the result of a bug.
  344.  
  345.    Some of these problems are due to bugs in other software, some are
  346. missing features that are too much work to add, and some are places
  347. where people's opinions differ as to what is best.
  348.  
  349. * Menu:
  350.  
  351. * Actual Bugs::              Bugs we will fix later.
  352. * Installation Problems::     Problems that manifest when you install GNU CC.
  353. * Cross-Compiler Problems::   Common problems of cross compiling with GNU CC.
  354. * Interoperation::      Problems using GNU CC with other compilers,
  355.                and with certain linkers, assemblers and debuggers.
  356. * External Bugs::    Problems compiling certain programs.
  357. * Incompatibilities::   GNU CC is incompatible with traditional C.
  358. * Disappointments::     Regrettable things we can't change, but not quite bugs.
  359. * C++ Misunderstandings::     Common misunderstandings with GNU C++.
  360. * Protoize Caveats::    Things to watch out for when using `protoize'.
  361. * Non-bugs::        Things we think are right, but some others disagree.
  362. * Warnings and Errors:: Which problems in your code get warnings,
  363.                          and which get errors.
  364.  
  365. 
  366. File: gcc.info,  Node: Actual Bugs,  Next: Installation Problems,  Up: Trouble
  367.  
  368. Actual Bugs We Haven't Fixed Yet
  369. ================================
  370.  
  371.    * The `fixincludes' script interacts badly with automounters; if the
  372.      directory of system header files is automounted, it tends to be
  373.      unmounted while `fixincludes' is running.  This would seem to be a
  374.      bug in the automounter.  We don't know any good way to work around
  375.      it.
  376.  
  377.    * Loop unrolling doesn't work properly for certain C++ programs.
  378.      This is because of difficulty in updating the debugging
  379.      information within the loop being unrolled.  We plan to revamp the
  380.      representation of debugging information so that this will work
  381.      properly, but we have not done this in version 2.4 because we
  382.      don't want to delay it any further.
  383.  
  384. 
  385. File: gcc.info,  Node: Installation Problems,  Next: Cross-Compiler Problems,  Prev: Actual Bugs,  Up: Trouble
  386.  
  387. Installation Problems
  388. =====================
  389.  
  390.    This is a list of problems (and some apparent problems which don't
  391. really mean anything is wrong) that show up during installation of GNU
  392. CC.
  393.  
  394.    * On certain systems, defining certain environment variables such as
  395.      `CC' can interfere with the functioning of `make'.
  396.  
  397.    * If you encounter seemingly strange errors when trying to build the
  398.      compiler in a directory other than the source directory, it could
  399.      be because you have previously configured the compiler in the
  400.      source directory.  Make sure you have done all the necessary
  401.      preparations.  *Note Other Dir::.
  402.  
  403.    * In previous versions of GNU CC, the `gcc' driver program looked for
  404.      `as' and `ld' in various places such as files beginning with
  405.      `/usr/local/lib/gcc-'.  GNU CC version 2 looks for them in the
  406.      directory `/usr/local/lib/gcc-lib/TARGET/VERSION'.
  407.  
  408.      Thus, to use a version of `as' or `ld' that is not the system
  409.      default, for example `gas' or GNU `ld', you must put them in that
  410.      directory (or make links to them from that directory).
  411.  
  412.    * Some commands executed when making the compiler may fail (return a
  413.      non-zero status) and be ignored by `make'.  These failures, which
  414.      are often due to files that were not found, are expected, and can
  415.      safely be ignored.
  416.  
  417.    * It is normal to have warnings in compiling certain files about
  418.      unreachable code and about enumeration type clashes.  These files'
  419.      names begin with `insn-'.  Also, `real.c' may get some warnings
  420.      that you can ignore.
  421.  
  422.    * Sometimes `make' recompiles parts of the compiler when installing
  423.      the compiler.  In one case, this was traced down to a bug in
  424.      `make'.  Either ignore the problem or switch to GNU Make.
  425.  
  426.    * On Linux SLS 1.01, there is a problem with `libc.a': it does not
  427.      contain the obstack functions.  However, GNU CC assumes that the
  428.      obstack functions are in `libc.a' when it is the GNU C library.
  429.      To work around this problem, change the `__GNU_LIBRARY__'
  430.      conditional around line 31 to `#if 1'.
  431.  
  432.    * On some 386 systems, building the compiler never finishes because
  433.      `enquire' hangs due to a hardware problem in the motherboard--it
  434.      reports floating point exceptions to the kernel incorrectly.  You
  435.      can install GNU CC except for `float.h' by patching out the
  436.      command to run `enquire'.  You may also be able to fix the problem
  437.      for real by getting a replacement motherboard.  This problem was
  438.      observed in Revision E of the Micronics motherboard, and is fixed
  439.      in Revision F.
  440.  
  441.    * On some 386 systems, GNU CC crashes trying to compile `enquire.c'.
  442.      This happens on machines that don't have a 387 FPU chip.  On 386
  443.      machines, the system kernel is supposed to emulate the 387 when you
  444.      don't have one.  The crash is due to a bug in the emulator.
  445.  
  446.      One of these systems is the Unix from Interactive Systems: 386/ix.
  447.      On this system, an alternate emulator is provided, and it does
  448.      work.  To use it, execute this command as super-user:
  449.  
  450.           ln /etc/emulator.rel1 /etc/emulator
  451.  
  452.      and then reboot the system.  (The default emulator file remains
  453.      present under the name `emulator.dflt'.)
  454.  
  455.      Try using `/etc/emulator.att', if you have such a problem on the
  456.      SCO system.
  457.  
  458.      Another system which has this problem is Esix.  We don't know
  459.      whether it has an alternate emulator that works.
  460.  
  461.    * Sometimes on a Sun 4 you may observe a crash in the program
  462.      `genflags' or `genoutput' while building GNU CC.  This is said to
  463.      be due to a bug in `sh'.  You can probably get around it by running
  464.      `genflags' or `genoutput' manually and then retrying the `make'.
  465.  
  466.    * On Solaris 2, executables of GNU CC version 2.0.2 are commonly
  467.      available, but they have a bug that shows up when compiling current
  468.      versions of GNU CC: undefined symbol errors occur during assembly
  469.      if you use `-g'.
  470.  
  471.      The solution is to compile the current version of GNU CC without
  472.      `-g'.  That makes a working compiler which you can use to recompile
  473.      with `-g'.
  474.  
  475.    * Solaris 2 comes with a number of optional OS packages.  Six of
  476.      these packages are needed to use GNU CC fully.  If you did not
  477.      install all optional packages when installing Solaris, you will
  478.      need to verify that these six packages are installed.
  479.  
  480.      The six packages that GNU CC needs are: `SUNWarc', `SUNWbtool',
  481.      `SUNWesu', `SUNWhea', `SUNWlibm', and `SUNWtoo'.  To check whether
  482.      an optional package is installed, use the `pkginfo' command.  To
  483.      add an optional package, use the `pkgadd' command.  For further
  484.      details, see the Solaris documentation.
  485.  
  486.    * If you use the 1.31 version of the MIPS assembler (such as was
  487.      shipped with Ultrix 3.1), you will need to use the
  488.      -fno-delayed-branch switch when optimizing floating point code.
  489.      Otherwise, the assembler will complain when the GCC compiler fills
  490.      a branch delay slot with a floating point instruction, such as
  491.      add.d.
  492.  
  493.    * Users have reported some problems with version 2.0 of the MIPS
  494.      compiler tools that were shipped with Ultrix 4.1.  Version 2.10
  495.      which came with Ultrix 4.2 seems to work fine.
  496.  
  497.    * Some versions of the MIPS linker will issue an assertion failure
  498.      when linking code that uses `alloca' against shared libraries on
  499.      RISC-OS 5.0, and DEC's OSF/1 systems.  This is a bug in the
  500.      linker, that is supposed to be fixed in future revisions.  To
  501.      protect against this, GCC passes `-non_shared' to the linker
  502.      unless you pass an explicit `-shared' or `-call_shared' switch.
  503.  
  504.    * On System V release 3, you may get this error message while
  505.      linking:
  506.  
  507.           ld fatal: failed to write symbol name SOMETHING
  508.            in strings table for file WHATEVER
  509.  
  510.      This probably indicates that the disk is full or your ULIMIT won't
  511.      allow the file to be as large as it needs to be.
  512.  
  513.      This problem can also result because the kernel parameter `MAXUMEM'
  514.      is too small.  If so, you must regenerate the kernel and make the
  515.      value much larger.  The default value is reported to be 1024; a
  516.      value of 32768 is said to work.  Smaller values may also work.
  517.  
  518.    * On System V, if you get an error like this,
  519.  
  520.           /usr/local/lib/bison.simple: In function `yyparse':
  521.           /usr/local/lib/bison.simple:625: virtual memory exhausted
  522.  
  523.      that too indicates a problem with disk space, ULIMIT, or `MAXUMEM'.
  524.  
  525.    * Current GNU CC versions probably do not work on version 2 of the
  526.      NeXT operating system.
  527.  
  528.    * On the Tower models 4N0 and 6N0, by default a process is not
  529.      allowed to have more than one megabyte of memory.  GNU CC cannot
  530.      compile itself (or many other programs) with `-O' in that much
  531.      memory.
  532.  
  533.      To solve this problem, reconfigure the kernel adding the following
  534.      line to the configuration file:
  535.  
  536.           MAXUMEM = 4096
  537.  
  538.    * On HP 9000 series 300 or 400 running HP-UX release 8.0, there is a
  539.      bug in the assembler that must be fixed before GNU CC can be
  540.      built.  This bug manifests itself during the first stage of
  541.      compilation, while building `libgcc2.a':
  542.  
  543.           _floatdisf
  544.           cc1: warning: `-g' option not supported on this version of GCC
  545.           cc1: warning: `-g1' option not supported on this version of GCC
  546.           ./xgcc: Internal compiler error: program as got fatal signal 11
  547.  
  548.      A patched version of the assembler is available by anonymous ftp
  549.      from `altdorf.ai.mit.edu' as the file
  550.      `archive/cph/hpux-8.0-assembler'.  If you have HP software support,
  551.      the patch can also be obtained directly from HP, as described in
  552.      the following note:
  553.  
  554.           This is the patched assembler, to patch SR#1653-010439, where
  555.           the assembler aborts on floating point constants.
  556.  
  557.           The bug is not really in the assembler, but in the shared
  558.           library version of the function "cvtnum(3c)".  The bug on
  559.           "cvtnum(3c)" is SR#4701-078451.  Anyway, the attached
  560.           assembler uses the archive library version of "cvtnum(3c)"
  561.           and thus does not exhibit the bug.
  562.  
  563.      This patch is also known as PHCO_0800.
  564.  
  565.    * To build GCC for HP PA model 1.1 machines running HP-UX versions
  566.      earlier than 8.07, you have to configure for HP PA model 1.0.
  567.      This is because a bug in the PA configuration that probably will
  568.      be fixed in the next release of the compiler.
  569.  
  570.    * On HP-UX version 9.01 on the HP PA, the HP compiler `cc' does not
  571.      compile GNU CC correctly.  We do not yet know why.  However, GNU CC
  572.      compiled on earlier HP-UX versions works properly on HP-UX 9.01
  573.      and can compile itself properly on 9.01.
  574.  
  575.    * Another assembler problem on the HP PA results in an error message
  576.      like this while compiling part of `libgcc2.a':
  577.  
  578.           as: /usr/tmp/cca08196.s @line#30 [err#1060]
  579.             Argument 1 or 3 in FARG upper
  580.                    - lookahead = RTNVAL=GR
  581.  
  582.      This happens because HP changed the assembler syntax after system
  583.      release 8.02.  GNU CC assumes the newer syntax; if your assembler
  584.      wants the older syntax, comment out this line in the file
  585.      `pa1-hpux.h':
  586.  
  587.           #define HP_FP_ARG_DESCRIPTOR_REVERSED
  588.  
  589.    * Some versions of the Pyramid C compiler are reported to be unable
  590.      to compile GNU CC.  You must use an older version of GNU CC for
  591.      bootstrapping.  One indication of this problem is if you get a
  592.      crash when GNU CC compiles the function `muldi3' in file
  593.      `libgcc2.c'.
  594.  
  595.      You may be able to succeed by getting GNU CC version 1, installing
  596.      it, and using it to compile GNU CC version 2.  The bug in the
  597.      Pyramid C compiler does not seem to affect GNU CC version 1.
  598.  
  599.    * There may be similar problems on System V Release 3.1 on 386
  600.      systems.
  601.  
  602.    * On the Altos 3068, programs compiled with GNU CC won't work unless
  603.      you fix a kernel bug.  This happens using system versions V.2.2
  604.      1.0gT1 and V.2.2 1.0e and perhaps later versions as well.  See the
  605.      file `README.ALTOS'.
  606.  
  607.    * You will get several sorts of compilation and linking errors on the
  608.      we32k if you don't follow the special instructions.  *Note WE32K
  609.      Install::.
  610.  
  611. 
  612. File: gcc.info,  Node: Cross-Compiler Problems,  Next: Interoperation,  Prev: Installation Problems,  Up: Trouble
  613.  
  614. Cross-Compiler Problems
  615. =======================
  616.  
  617.    You may run into problems with cross compilation on certain machines,
  618. for several reasons.
  619.  
  620.    * Cross compilation can run into trouble for certain machines because
  621.      some target machines' assemblers require floating point numbers to
  622.      be written as *integer* constants in certain contexts.
  623.  
  624.      The compiler writes these integer constants by examining the
  625.      floating point value as an integer and printing that integer,
  626.      because this is simple to write and independent of the details of
  627.      the floating point representation.  But this does not work if the
  628.      compiler is running on a different machine with an incompatible
  629.      floating point format, or even a different byte-ordering.
  630.  
  631.      In addition, correct constant folding of floating point values
  632.      requires representing them in the target machine's format.  (The C
  633.      standard does not quite require this, but in practice it is the
  634.      only way to win.)
  635.  
  636.      It is now possible to overcome these problems by defining macros
  637.      such as `REAL_VALUE_TYPE'.  But doing so is a substantial amount of
  638.      work for each target machine.  *Note Cross-compilation::.
  639.  
  640.    * At present, the program `mips-tfile' which adds debug support to
  641.      object files on MIPS systems does not work in a cross compile
  642.      environment.
  643.  
  644. 
  645. File: gcc.info,  Node: Interoperation,  Next: External Bugs,  Prev: Cross-Compiler Problems,  Up: Trouble
  646.  
  647. Interoperation
  648. ==============
  649.  
  650.    This section lists various difficulties encountered in using GNU C or
  651. GNU C++ together with other compilers or with the assemblers, linkers,
  652. libraries and debuggers on certain systems.
  653.  
  654.    * If you are using version 2.3 of libg++, you need to rebuild it with
  655.      `make CC=gcc' to avoid mismatches in the definition of `size_t'.
  656.  
  657.    * GNU C++ does not do name mangling in the same way as other C++
  658.      compilers.  This means that object files compiled with one compiler
  659.      cannot be used with another.
  660.  
  661.      This effect is intentional, to protect you from more subtle
  662.      problems.  Compilers differ as to many internal details of C++
  663.      implementation, including: how class instances are laid out, how
  664.      multiple inheritance is implemented, and how virtual function
  665.      calls are handled.  If the name encoding were made the same, your
  666.      programs would link against libraries provided from other
  667.      compilers--but the programs would then crash when run.
  668.      Incompatible libraries are then detected at link time, rather than
  669.      at run time.
  670.  
  671.    * Older GDB versions sometimes fail to read the output of GNU CC
  672.      version 2.  If you have trouble, get GDB version 4.4 or later.
  673.  
  674.    * DBX rejects some files produced by GNU CC, though it accepts
  675.      similar constructs in output from PCC.  Until someone can supply a
  676.      coherent description of what is valid DBX input and what is not,
  677.      there is nothing I can do about these problems.  You are on your
  678.      own.
  679.  
  680.    * The GNU assembler (GAS) does not support PIC.  To generate PIC
  681.      code, you must use some other assembler, such as `/bin/as'.
  682.  
  683.    * On some BSD systems including some versions of Ultrix, use of
  684.      profiling causes static variable destructors (currently used only
  685.      in C++) not to be run.
  686.  
  687.    * Use of `-I/usr/include' may cause trouble.
  688.  
  689.      Many systems come with header files that won't work with GNU CC
  690.      unless corrected by `fixincludes'.  The corrected header files go
  691.      in a new directory; GNU CC searches this directory before
  692.      `/usr/include'.  If you use `-I/usr/include', this tells GNU CC to
  693.      search `/usr/include' earlier on, before the corrected headers.
  694.      The result is that you get the uncorrected header files.
  695.  
  696.      Instead, you should use these options (when compiling C programs):
  697.  
  698.           -I/usr/local/lib/gcc-lib/TARGET/VERSION/include -I/usr/include
  699.  
  700.      For C++ programs, GNU CC also uses a special directory that
  701.      defines C++ interfaces to standard C subroutines.  This directory
  702.      is meant to be searched *before* other standard include
  703.      directories, so that it takes precedence.  If you are compiling
  704.      C++ programs and specifying include directories explicitly, use
  705.      this option first, then the two options above:
  706.  
  707.           -I/usr/local/lib/g++-include
  708.  
  709.    * On a Sparc, GNU CC aligns all values of type `double' on an 8-byte
  710.      boundary, and it expects every `double' to be so aligned.  The Sun
  711.      compiler usually gives `double' values 8-byte alignment, with one
  712.      exception: function arguments of type `double' may not be aligned.
  713.  
  714.      As a result, if a function compiled with Sun CC takes the address
  715.      of an argument of type `double' and passes this pointer of type
  716.      `double *' to a function compiled with GNU CC, dereferencing the
  717.      pointer may cause a fatal signal.
  718.  
  719.      One way to solve this problem is to compile your entire program
  720.      with GNU CC.  Another solution is to modify the function that is
  721.      compiled with Sun CC to copy the argument into a local variable;
  722.      local variables are always properly aligned.  A third solution is
  723.      to modify the function that uses the pointer to dereference it via
  724.      the following function `access_double' instead of directly with
  725.      `*':
  726.  
  727.           inline double
  728.           access_double (double *unaligned_ptr)
  729.           {
  730.             union d2i { double d; int i[2]; };
  731.           
  732.             union d2i *p = (union d2i *) unaligned_ptr;
  733.             union d2i u;
  734.           
  735.             u.i[0] = p->i[0];
  736.             u.i[1] = p->i[1];
  737.           
  738.             return u.d;
  739.           }
  740.  
  741.      Storing into the pointer can be done likewise with the same union.
  742.  
  743.    * On Solaris, the `malloc' function in the `libmalloc.a' library may
  744.      allocate memory that is only 4 byte aligned.  Since GNU CC on the
  745.      Sparc assumes that doubles are 8 byte aligned, this may result in a
  746.      fatal signal if doubles are stored in memory allocated by the
  747.      `libmalloc.a' library.
  748.  
  749.      The solution is to not use the `libmalloc.a' library.  Use instead
  750.      `malloc' and related functions from `libc.a'; they do not have
  751.      this problem.
  752.  
  753.    * On a Sun, linking using GNU CC fails to find a shared library and
  754.      reports that the library doesn't exist at all.
  755.  
  756.      This happens if you are using the GNU linker, because it does only
  757.      static linking and looks only for unshared libraries.  If you have
  758.      a shared library with no unshared counterpart, the GNU linker
  759.      won't find anything.
  760.  
  761.      We hope to make a linker which supports Sun shared libraries, but
  762.      please don't ask when it will be finished--we don't know.
  763.  
  764.    * Sun forgot to include a static version of `libdl.a' with some
  765.      versions of SunOS (mainly 4.1).  This results in undefined symbols
  766.      when linking static binaries (that is, if you use `-static').  If
  767.      you see undefined symbols `_dlclose', `_dlsym' or `_dlopen' when
  768.      linking, compile and link against the file `mit/util/misc/dlsym.c'
  769.      from the MIT version of X windows.
  770.  
  771.    * On the HP PA machine, ADB sometimes fails to work on functions
  772.      compiled with GNU CC.  Specifically, it fails to work on functions
  773.      that use `alloca' or variable-size arrays.  This is because GNU CC
  774.      doesn't generate HP-UX unwind descriptors for such functions.  It
  775.      may even be impossible to generate them.
  776.  
  777.    * Debugging (`-g') is not supported on the HP PA machine, unless you
  778.      use the preliminary GNU tools (*note Installation::.).
  779.  
  780.    * The HP-UX linker has a bug which can cause programs which make use
  781.      of `const' variables to fail in unusual ways.  If your program
  782.      makes use of global `const' variables, we suggest you compile with
  783.      the following additional options:
  784.  
  785.           -Dconst="" -D__const="" -D__const__="" -fwritable-strings
  786.  
  787.      This will force the `const' variables into the DATA subspace which
  788.      will avoid the linker bug.
  789.  
  790.      Another option one might use to work around this problem is
  791.      `-mkernel'.  `-mkernel' changes how the address of variables is
  792.      computed to a sequence less likely to tickle the HP-UX linker bug.
  793.  
  794.      We hope to work around this problem in a later version, if HP does
  795.      not fix it.
  796.  
  797.    * Taking the address of a label may generate errors from the HP-UX
  798.      PA assembler.  GAS for the PA does not have this problem.
  799.  
  800.    * GNU CC produced code will not yet link against HP-UX 8.0 shared
  801.      libraries.  We expect to fix this problem in GNU CC 2.4.
  802.  
  803.    * GNU CC compiled code sometimes emits warnings from the HP-UX
  804.      assembler of the form:
  805.  
  806.           (warning) Use of GR3 when
  807.             frame >= 8192 may cause conflict.
  808.  
  809.      These warnings are harmless and can be safely ignored.
  810.  
  811.    * The current version of the assembler (`/bin/as') for the RS/6000
  812.      has certain problems that prevent the `-g' option in GCC from
  813.      working.  Note that `Makefile.in' uses `-g' by default when
  814.      compiling `libgcc2.c'.
  815.  
  816.      IBM has produced a fixed version of the assembler.  The upgraded
  817.      assembler unfortunately was not included in any of the AIX 3.2
  818.      update PTF releases (3.2.2, 3.2.3, or 3.2.3e).  Users of AIX 3.1
  819.      should request PTF U403044 from IBM and users of AIX 3.2 should
  820.      request PTF U416277.  See the file `README.RS6000' for more
  821.      details on these updates.
  822.  
  823.      You can test for the presense of a fixed assembler by using the
  824.      command
  825.  
  826.           as -u < /dev/null
  827.  
  828.      If the command exits normally, the assembler fix already is
  829.      installed.  If the assembler complains that "-u" is an unknown
  830.      flag, you need to order the fix.
  831.  
  832.    * On the IBM RS/6000, compiling code of the form
  833.  
  834.           extern int foo;
  835.           
  836.           ... foo ...
  837.           
  838.           static int foo;
  839.  
  840.      will cause the linker to report an undefined symbol `foo'.
  841.      Although this behavior differs from most other systems, it is not a
  842.      bug because redefining an `extern' variable as `static' is
  843.      undefined in ANSI C.
  844.  
  845.    * AIX on the RS/6000 provides support (NLS) for environments outside
  846.      of the United States.  Compilers and assemblers use NLS to support
  847.      locale-specific representations of various objects including
  848.      floating-point numbers ("." vs "," for separating decimal
  849.      fractions).  There have been problems reported where the library
  850.      linked with GCC does not produce the same floating-point formats
  851.      that the assembler accepts.  If you have this problem, set the
  852.      LANG environment variable to "C" or "En_US".
  853.  
  854.    * There is an assembler bug in versions of DG/UX prior to 5.4.2.01
  855.      that occurs when the `fldcr' instruction is used.  GNU CC uses
  856.      `fldcr' on the 88100 to serialize volatile memory references.  Use
  857.      the option `-fno-serialize-volatile' if your version of the
  858.      assembler has this bug.
  859.  
  860.    * On VMS, GAS versions 1.38.1 and earlier may cause spurious warning
  861.      messages from the linker.  These warning messages complain of
  862.      mismatched psect attributes.  You can ignore them.  *Note VMS
  863.      Install::.
  864.  
  865.    * On NewsOS version 3, if you include both of the files `stddef.h'
  866.      and `sys/types.h', you get an error because there are two typedefs
  867.      of `size_t'.  You should change `sys/types.h' by adding these
  868.      lines around the definition of `size_t':
  869.  
  870.           #ifndef _SIZE_T
  871.           #define _SIZE_T
  872.           ACTUAL TYPEDEF HERE
  873.           #endif
  874.  
  875.    * On the Alliant, the system's own convention for returning
  876.      structures and unions is unusual, and is not compatible with GNU
  877.      CC no matter what options are used.
  878.  
  879.    * On the IBM RT PC, the MetaWare HighC compiler (hc) uses yet another
  880.      convention for structure and union returning.  Use
  881.      `-mhc-struct-return' to tell GNU CC to use a convention compatible
  882.      with it.
  883.  
  884.    * On Ultrix, the Fortran compiler expects registers 2 through 5 to
  885.      be saved by function calls.  However, the C compiler uses
  886.      conventions compatible with BSD Unix: registers 2 through 5 may be
  887.      clobbered by function calls.
  888.  
  889.      GNU CC uses the same convention as the Ultrix C compiler.  You can
  890.      use these options to produce code compatible with the Fortran
  891.      compiler:
  892.  
  893.           -fcall-saved-r2 -fcall-saved-r3 -fcall-saved-r4 -fcall-saved-r5
  894.  
  895.    * On the WE32k, you may find that programs compiled with GNU CC do
  896.      not work with the standard shared C ilbrary.  You may need to link
  897.      with the ordinary C compiler.  If you do so, you must specify the
  898.      following options:
  899.  
  900.           -L/usr/local/lib/gcc-lib/we32k-att-sysv/2.4 -lgcc -lc_s
  901.  
  902.      The first specifies where to find the library `libgcc.a' specified
  903.      with the `-lgcc' option.
  904.  
  905.      GNU CC does linking by invoking `ld', just as `cc' does, and there
  906.      is no reason why it *should* matter which compilation program you
  907.      use to invoke `ld'.  If someone tracks this problem down, it can
  908.      probably be fixed easily.
  909.  
  910.    * On the Alpha, you may get assembler errors about invalid syntax as
  911.      a result of floating point constants.  This is due to a bug in the
  912.      C library functions `ecvt', `fcvt' and `gcvt'.  Given valid
  913.      floating point numbers, they sometimes print `NaN'.
  914.  
  915.    * On Irix 4.0.5F (and perhaps in some other versions), an assembler
  916.      bug sometimes reorders instructions incorrectly when optimization
  917.      is turned on.  If you think this may be happening to you, try
  918.      using the GNU assembler; GAS version 2.1 supports ECOFF on Irix.
  919.  
  920.      Or use the `-noasmopt' option when you compile GNU CC with itself,
  921.      and then again when you compile your program.  (This is a temporary
  922.      kludge to turn off assembler optimization on Irix.)  If this
  923.      proves to be what you need, edit the assembler spec in the file
  924.      `specs' so that it unconditionally passes `-O0' to the assembler,
  925.      and never passes `-O2' or `-O3'.
  926.  
  927. 
  928. File: gcc.info,  Node: External Bugs,  Next: Incompatibilities,  Prev: Interoperation,  Up: Trouble
  929.  
  930. Problems Compiling Certain Programs
  931. ===================================
  932.  
  933.    * Parse errors may occur compiling X11 on a Decstation running
  934.      Ultrix 4.2 because of problems in DEC's versions of the X11 header
  935.      files `X11/Xlib.h' and `X11/Xutil.h'.  People recommend adding
  936.      `-I/usr/include/mit' to use the MIT versions of the header files,
  937.      using the `-traditional' switch to turn off ANSI C, or fixing the
  938.      header files by adding this:
  939.  
  940.           #ifdef __STDC__
  941.           #define NeedFunctionPrototypes 0
  942.           #endif
  943.  
  944. 
  945. File: gcc.info,  Node: Incompatibilities,  Next: Disappointments,  Prev: External Bugs,  Up: Trouble
  946.  
  947. Incompatibilities of GNU CC
  948. ===========================
  949.  
  950.    There are several noteworthy incompatibilities between GNU C and most
  951. existing (non-ANSI) versions of C.  The `-traditional' option
  952. eliminates many of these incompatibilities, *but not all*, by telling
  953. GNU C to behave like the other C compilers.
  954.  
  955.    * GNU CC normally makes string constants read-only.  If several
  956.      identical-looking string constants are used, GNU CC stores only one
  957.      copy of the string.
  958.  
  959.      One consequence is that you cannot call `mktemp' with a string
  960.      constant argument.  The function `mktemp' always alters the string
  961.      its argument points to.
  962.  
  963.      Another consequence is that `sscanf' does not work on some systems
  964.      when passed a string constant as its format control string or
  965.      input.  This is because `sscanf' incorrectly tries to write into
  966.      the string constant.  Likewise `fscanf' and `scanf'.
  967.  
  968.      The best solution to these problems is to change the program to use
  969.      `char'-array variables with initialization strings for these
  970.      purposes instead of string constants.  But if this is not possible,
  971.      you can use the `-fwritable-strings' flag, which directs GNU CC to
  972.      handle string constants the same way most C compilers do.
  973.      `-traditional' also has this effect, among others.
  974.  
  975.    * `-2147483648' is positive.
  976.  
  977.      This is because 2147483648 cannot fit in the type `int', so
  978.      (following the ANSI C rules) its data type is `unsigned long int'.
  979.      Negating this value yields 2147483648 again.
  980.  
  981.    * GNU CC does not substitute macro arguments when they appear inside
  982.      of string constants.  For example, the following macro in GNU CC
  983.  
  984.           #define foo(a) "a"
  985.  
  986.      will produce output `"a"' regardless of what the argument A is.
  987.  
  988.      The `-traditional' option directs GNU CC to handle such cases
  989.      (among others) in the old-fashioned (non-ANSI) fashion.
  990.  
  991.    * When you use `setjmp' and `longjmp', the only automatic variables
  992.      guaranteed to remain valid are those declared `volatile'.  This is
  993.      a consequence of automatic register allocation.  Consider this
  994.      function:
  995.  
  996.           jmp_buf j;
  997.           
  998.           foo ()
  999.           {
  1000.             int a, b;
  1001.           
  1002.             a = fun1 ();
  1003.             if (setjmp (j))
  1004.               return a;
  1005.           
  1006.             a = fun2 ();
  1007.             /* `longjmp (j)' may occur in `fun3'. */
  1008.             return a + fun3 ();
  1009.           }
  1010.  
  1011.      Here `a' may or may not be restored to its first value when the
  1012.      `longjmp' occurs.  If `a' is allocated in a register, then its
  1013.      first value is restored; otherwise, it keeps the last value stored
  1014.      in it.
  1015.  
  1016.      If you use the `-W' option with the `-O' option, you will get a
  1017.      warning when GNU CC thinks such a problem might be possible.
  1018.  
  1019.      The `-traditional' option directs GNU C to put variables in the
  1020.      stack by default, rather than in registers, in functions that call
  1021.      `setjmp'.  This results in the behavior found in traditional C
  1022.      compilers.
  1023.  
  1024.    * Programs that use preprocessor directives in the middle of macro
  1025.      arguments do not work with GNU CC.  For example, a program like
  1026.      this will not work:
  1027.  
  1028.           foobar (
  1029.           #define luser
  1030.                   hack)
  1031.  
  1032.      ANSI C does not permit such a construct.  It would make sense to
  1033.      support it when `-traditional' is used, but it is too much work to
  1034.      implement.
  1035.  
  1036.    * Declarations of external variables and functions within a block
  1037.      apply only to the block containing the declaration.  In other
  1038.      words, they have the same scope as any other declaration in the
  1039.      same place.
  1040.  
  1041.      In some other C compilers, a `extern' declaration affects all the
  1042.      rest of the file even if it happens within a block.
  1043.  
  1044.      The `-traditional' option directs GNU C to treat all `extern'
  1045.      declarations as global, like traditional compilers.
  1046.  
  1047.    * In traditional C, you can combine `long', etc., with a typedef
  1048.      name, as shown here:
  1049.  
  1050.           typedef int foo;
  1051.           typedef long foo bar;
  1052.  
  1053.      In ANSI C, this is not allowed: `long' and other type modifiers
  1054.      require an explicit `int'.  Because this criterion is expressed by
  1055.      Bison grammar rules rather than C code, the `-traditional' flag
  1056.      cannot alter it.
  1057.  
  1058.    * PCC allows typedef names to be used as function parameters.  The
  1059.      difficulty described immediately above applies here too.
  1060.  
  1061.    * PCC allows whitespace in the middle of compound assignment
  1062.      operators such as `+='.  GNU CC, following the ANSI standard, does
  1063.      not allow this.  The difficulty described immediately above
  1064.      applies here too.
  1065.  
  1066.    * GNU CC complains about unterminated character constants inside of
  1067.      preprocessor conditionals that fail.  Some programs have English
  1068.      comments enclosed in conditionals that are guaranteed to fail; if
  1069.      these comments contain apostrophes, GNU CC will probably report an
  1070.      error.  For example, this code would produce an error:
  1071.  
  1072.           #if 0
  1073.           You can't expect this to work.
  1074.           #endif
  1075.  
  1076.      The best solution to such a problem is to put the text into an
  1077.      actual C comment delimited by `/*...*/'.  However, `-traditional'
  1078.      suppresses these error messages.
  1079.  
  1080.    * Many user programs contain the declaration `long time ();'.  In the
  1081.      past, the system header files on many systems did not actually
  1082.      declare `time', so it did not matter what type your program
  1083.      declared it to return.  But in systems with ANSI C headers, `time'
  1084.      is declared to return `time_t', and if that is not the same as
  1085.      `long', then `long time ();' is erroneous.
  1086.  
  1087.      The solution is to change your program to use `time_t' as the
  1088.      return type of `time'.
  1089.  
  1090.    * When compiling functions that return `float', PCC converts it to a
  1091.      double.  GNU CC actually returns a `float'.  If you are concerned
  1092.      with PCC compatibility, you should declare your functions to return
  1093.      `double'; you might as well say what you mean.
  1094.  
  1095.    * When compiling functions that return structures or unions, GNU CC
  1096.      output code normally uses a method different from that used on most
  1097.      versions of Unix.  As a result, code compiled with GNU CC cannot
  1098.      call a structure-returning function compiled with PCC, and vice
  1099.      versa.
  1100.  
  1101.      The method used by GNU CC is as follows: a structure or union
  1102.      which is 1, 2, 4 or 8 bytes long is returned like a scalar.  A
  1103.      structure or union with any other size is stored into an address
  1104.      supplied by the caller (usually in a special, fixed register, but
  1105.      on some machines it is passed on the stack).  The
  1106.      machine-description macros `STRUCT_VALUE' and
  1107.      `STRUCT_INCOMING_VALUE' tell GNU CC where to pass this address.
  1108.  
  1109.      By contrast, PCC on most target machines returns structures and
  1110.      unions of any size by copying the data into an area of static
  1111.      storage, and then returning the address of that storage as if it
  1112.      were a pointer value.  The caller must copy the data from that
  1113.      memory area to the place where the value is wanted.  GNU CC does
  1114.      not use this method because it is slower and nonreentrant.
  1115.  
  1116.      On some newer machines, PCC uses a reentrant convention for all
  1117.      structure and union returning.  GNU CC on most of these machines
  1118.      uses a compatible convention when returning structures and unions
  1119.      in memory, but still returns small structures and unions in
  1120.      registers.
  1121.  
  1122.      You can tell GNU CC to use a compatible convention for all
  1123.      structure and union returning with the option
  1124.      `-fpcc-struct-return'.
  1125.  
  1126.