Index Home About Blog
Newsgroups: fa.linux.kernel
From: Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH][2.6.6-rc3] gcc-3.4.0 fixes
Original-Message-ID: <Pine.LNX.4.58.0406011020310.14095@ppc970.osdl.org>
Date: Tue, 1 Jun 2004 17:29:47 GMT
Message-ID: <fa.it77l83.1546a3t@ifi.uio.no>

On Tue, 1 Jun 2004, Mikael Pettersson wrote:
>
> You're assuming pointers have uniform representation.

Are we?

I don't see any point where we cast any function pointers to anything
else.

We cast data pointers all over the place, but that is actually guaranteed
to work in C for some "large enough" integer type, and "unsigned long" is
pretty much it.

And even function pointers should be safeish. The fact that some broken
architecture (can you say "ia64"?) has totally idiotic calling conventions
and requires the caller to load the GP value is _their_ problem. The
architecture will either die or hide the fact that it's being silly. For
now it's hiding it.

Repeat after me: practice is more important than theory. A _lot_ more
important.

		Linus

Index Home About Blog