Subject: Re: port-xen/29887: sysctl kern.consdev coredumps
To: None <,,>
From: Christos Zoulas <>
List: netbsd-bugs
Date: 06/21/2005 09:01:59
On Jun 21, 12:24pm, (YAMAMOTO Takashi) wrote:
-- Subject: Re: port-xen/29887: sysctl kern.consdev coredumps

|  yes, we are free to add it to our puts.
|  however, i think it's a bad idea as i wrote in my another mail.
|  besides, gcc is also free to optimize puts not to use our puts.

It is all a loss+benefit analysis. Adding the check to puts() seems
simple enough, we are allowed to by the standards, and makes the
gcc behavior consistent. It is also the least intrusive change. If
gcc decides to do something else in the future, we can examine the
problem when it happens.
|  > The reality is we will probably have to live with gcc making assumptions 
|  > for us. And to be honest, if we change puts(), then the assumption gcc 
|  > makes (that printf("%s\n", x) yields the same effect as puts(x) for all x) 
|  > is once again true.
|  you can't assume how gcc optimizes printf.
|  although it might happen to "fix" the problem at this point,
|  introducing another extention which is not recognized by gcc
|  just makes the situation worse.

There is no extension here; it does not make a difference to gcc
how we implement puts.