Subject: Re: port-xen/29887: sysctl kern.consdev coredumps
To: Jason Thorpe <email@example.com>
From: James Chacon <jmc@NetBSD.org>
Date: 06/17/2005 17:36:16
On Fri, Jun 17, 2005 at 03:26:53PM -0700, Jason Thorpe wrote:
> IT IS NOT A BUG. GCC is perfectly within its rights to do what it is
> doing. Maybe people should stop passing NULL pointers to printf() in
> the first place?
I disagree there. Where is it stated in the standard the compiler
is allowed to "optimize" calls to function A to map instead to function B
entirely under the covers for me?
Fine..So it's a non-standard extention. In that case I pose the question:
Does it violate the principle of least surprise that the compiler is deciding
to call entirely different functions for me because it decided that was
"optimal" when all I did was specify -O2 or -O3?
Certainly does to me (and I'm sure many others). This is why other extentions
that were in left field should require an explicit -f option to enable.