Subject: Re: port-xen/29887: sysctl kern.consdev coredumps
To: Alan Barrett <>
From: Jachym Holecek <>
List: netbsd-bugs
Date: 06/20/2005 18:18:05

> > A compiler by your logic could completely supply libc internally and
> > not call your system supplied one with extentions you may be depending
> > on.
> Yes, a compiler could do that, to the extent permitted by the
> standards that you tell the compiler to use.  Again, don't tell the
> compiler "-std=c99" if you are relying on printf("%s",NULL) to print
> "(null)", or if you are relying on any other non-standard extensions to
> standard-defined functions.

If the standard leaves behaviour as not-strictly-defined, then the compiler
should delegate behaviour to the implementation, ie. compiler is not free
to be smart in such case. So, unless 'fputs(NULL, x)' is defined to behave
the same as 'printf("%s", NULL)', then I'd call blind printf->fputs
substition "not good". IANAL though...

		-- Jachym Holecek