Re: Adventures with gcc: code vs object-code size
From: Marc Olzheim (marcolz_at_stack.nl)
Date: 03/21/04
- Previous message: Andrew MacIntyre: "Re: Adventures with gcc: code vs object-code size"
- In reply to: Peter Jeremy: "Re: Adventures with gcc: code vs object-code size"
- Next in thread: Andrew MacIntyre: "Re: Adventures with gcc: code vs object-code size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 21 Mar 2004 15:13:30 +0100 To: Peter Jeremy <peterjeremy@optushome.com.au>
On Sun, Mar 21, 2004 at 07:45:43PM +1100, Peter Jeremy wrote:
> But (IMHO) this is a lot less clear than the former code (thought I admit
> I'm guilty of doing this quite a lot in my code). Note that a modern C
> compiler is free to convert
> strcpy(elemcopy, ":") == 0
> into
> elemcopy[0] == ':' && elemcopy[1] == '\0'
> assuming the relevant header (<string.h>) is in scope. (I was under the
> impression that gcc did this).
You're mixing up strcpy() with strcmp(), but you are right, unless
-fno-builtin is specified.
Marc
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Andrew MacIntyre: "Re: Adventures with gcc: code vs object-code size"
- In reply to: Peter Jeremy: "Re: Adventures with gcc: code vs object-code size"
- Next in thread: Andrew MacIntyre: "Re: Adventures with gcc: code vs object-code size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|