Subject: Re: port-xen/29887: sysctl kern.consdev coredumps
To: None <tech-userlevel@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-userlevel
Date: 06/20/2005 13:34:29
On Sun, 19 Jun 2005, der Mouse wrote:
> And I think that is what bothers me about what gcc did: they
> assumed, incorrectly in our case, that the semantics of cases not
> defined by the standard didn't matter, so they could make a certain
> transformation without caring what happened in cases the standard
> didn't define.
If the compiler was invoked with something like "-ansi" or "-std=foo"
for foo in {standards that define printf()}, then the compiler didn't
just assume of its own accord, it was *instructed* to assume that calls
to printf() were in fact requests for the printf() behaviour defined in
the relevant standard. (I don't know whether the compiler was invoked
like that, but *if* it was, then I think it's quite reasonable for it to
behave as it did.)
> Abstractly, the same thing is true of inlining bcopy (a transformation
> with which this one was compared upthread). As I see it, they were
> just as abstractly wrong there;
As I see it, the compiler is just as right there. If invoked with
"-std=foo" where foo is a standard that defines bcopy(), then the
compiler may assume that calls to bcopy() are in fact requests for the
behaviour that the relevant standard defines for bcopy().
--apb (Alan Barrett)