On Mon, Jul 30, 2012 at 4:26 PM, Ian Campbell <i...@hellion.org.uk> wrote: > I thought gcc optimised strlen("string literal") into a compile time > constant too. It does in a little userspace test I just wrote, but I > didn't look at its behaviour with the kernel's strlen.
It depends whether you use the built-in strlen() or not. AFAIK the kernel does not use the built-in variant. -- Thanks, //richard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/