This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Unomitted frame pointers
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Andreas Schwab'" <schwab at suse dot de>
- Cc: "'jlh'" <jlh at gmx dot ch>,"'Thomas R. Truscott'" <trt at cs dot duke dot edu>,<gcc at gcc dot gnu dot org>
- Date: Fri, 10 Dec 2004 16:39:15 -0000
- Subject: RE: Unomitted frame pointers
> -----Original Message-----
> From: Andreas Schwab [mailto:schwab@suse.de]
> Sent: 10 December 2004 16:33
> "Dave Korn" writes:
>
> > So really the safe way to code this is
> >
> > #define HELLOSTRING "Hello World!\n"
> >
> > write (2, HELLOSTRING, strlen(HELLOSTRING)-1);
>
> No, it's
>
> write (2, HELLOSTRING, strlen(HELLOSTRING));
>
> Andreas.
>
Duh. Yes, of course I needn't allow for the NUL-terminator......
cheers,
DaveK
--
Can't think of a witty .sigline today....