This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: C++ PATCH to fix thinko


>>>>> Richard Henderson <rth@cygnus.com> writes:

 > On Mon, May 15, 2000 at 07:11:25PM -0400, Kaveh R. Ghazi wrote:
 >> How about using __builtin_constant_p() to make sure the string really
 >> is constant and issue a compile time error if its not?

 > How about using strlen instead of sizeof, which is what
 > you were after anyway.

Yes!  gcc already knows how to optimize strlen of a constant.

Jason

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