Subject: re: ktr from freebsd
To: Jason Thorpe <thorpej@wasabisystems.com>
From: matthew green <mrg@eterna.com.au>
List: tech-kern
Date: 04/30/2004 15:15:23
   
   >>> Though it is easily fixable, that is not true with current
   >>> implementation.
   >>
   >> Huh? I was saying that we have two lengths we store in the uvmhist=20
   >> entries, and that one of them is strlen()'s will be turned into a 
   >> constant=
   >> =20
   >> at compile time by our compiler. How is that not true?
   >
   > The strlen call isn't folded to constant actually.
   
   I'm pretty sure GCC 3.4 will do this, but I'm not sure GCC 3.3 will.


well it's not folder in more than a few hours old -current because
of the way it was assigned:

	struct.name = __STRING(foo);
	struct.namelen = strlen(struct.name);

enami commited a change so that the end line now reads

	struct.namelen = strlen(__STRING(foo));

which should allow GCC to optimise the strlen(3) calls now.