title: Where Is gcvt or gcvtf Defined in gcc Source Code?
body: <p>I'm working on some old source code for an embedded system on an m68k target, and I'm seeing massive memory allocation requests sometimes when calling <code>gcvtf</code> to format a floating point number for display.  I can probably work around this by writing my own substitute routine, but the nature of the error has me very curious, because it only occurs when the heap starts at or above a certain address, and it goes away if I hack the .ld linker script or remove any set of global variables (which are placed before the heap in my memory map) that add up to enough byte size so that the heap starts below the mysterious critical address.</p>
  <p>So, I thought I'd look in the gcc source code for the compiler version I'm using (m68k-elf-gcc 3.3.2).  I downloaded what appears to be the source for this version at <a href="http://gcc.petsads.us/releases/gcc-3.3.2/" rel="nofollow noreferrer">http://gcc.petsads.us/releases/gcc-3.3.2/</a>, but I can't find the definition for gcvt or gcvtf anywhere in there.  When I search for it, grep only finds some documentation and .h references, but not the definition:</p>
  <pre><code>$ find | xargs grep gcvt
  ./gcc/doc/gcc.info:     C library functions `ecvt', `fcvt' and `gcvt'.  Given va
  lid
  ./gcc/doc/trouble.texi:library functions @code{ecvt}, @code{fcvt} and @code{gcvt
  }.  Given valid
  ./gcc/sys-protos.h:extern char *                 gcvt(double, int, char *);
  </code></pre>
  <p>So, where is this function actually defined in the source code?  Or did I download the entirely wrong thing?</p>
  <p>I don't want to change this project to use the most recent gcc, due to project stability and testing considerations, and like I said, I can work around this by writing my own formatting routine, but this behavior is very confusing to me, and it will grind my brain if I don't find out why it's acting so weird.</p>