This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]