On Mon, Jul 30, 2012 at 4:26 PM, Ian Campbell <ijc@xxxxxxxxxxxxxx> 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