Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42E63132.6080406@hones.org.uk> Date: Tue, 26 Jul 2005 13:48:50 +0100 From: Cliff Hones User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: gcc-core and g++ source References: <20050726114441 DOT 60159 DOT qmail AT web31702 DOT mail DOT mud DOT yahoo DOT com> In-Reply-To: <20050726114441.60159.qmail@web31702.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-IsSubscribed: yes James McLaughlin wrote: > I've been wondering about why functions such as strcpy > return char*, instead of being void, so I thought I'd > look at the source for this function and see if there > were any informative comments. However, while I've got > the g++ and gcc-core source, I can't find the source > for the standard functions - can anyone > tell me which file to look in? > > In fact, is there any sort of document detailing where > to find the source for the functions defined in , say, > header ? (organised by header)? If not, are there > any plans to include such a document in the Cygwin > docs? The C specification ISO/IEC 9899:1999 (2nd Edition) is, I believe, the definitive documentation for the functions - these are part of the C standard library which any conforming implementation must provide. [You can download a pdf of this standard from www.iso.ch for a small fee.] Looking at sources such as newlib or glibc will only show you how it is implemented, not why the specification was chosen to be that way. Note also that gcc "knows" about a number of C library functions, including the string ones, and (depending on the target platform and the selected level of optimisation) may generate inline code rather than call the library routine. -- Cliff -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/