This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Regression with strn-stuff
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: pedro_alves at portugalmail dot pt
- Cc: nickc at redhat dot com, hans-peter dot nilsson at axis dot com, binutils at sourceware dot org
- Date: Sun, 17 Sep 2006 21:16:53 +0200
- Subject: Re: Regression with strn-stuff
> Date: Sun, 17 Sep 2006 19:57:24 +0100
> From: Pedro Alves <pedro_alves@portugalmail.pt>
> In my original:
> #define const_strcmp(DST, ORG) \
> strncmp (DST, ORG "", sizeof (ORG) - 1)
Oh! I didn't notice, but then again I didn't look at your
original submission very hard (just enough for a "that sounds
good").
> The double double-quotes ("") were there to check if the parameter
> was a compile time const string, since it is legal in C to write a
> string this way:
> ("string part 1" "string part 2").
> Isn't the double quotes version OK?
With a comment why it's there, this sounds to me like the Right Thing.
brgds, H-P