From: Andreas Schwab <schwab@suse.de>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: Mikael Pettersson <mikpe@csd.uu.se>,
"H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][2.6.6-rc3] gcc-3.4.0 fixes
Date: Tue, 01 Jun 2004 17:38:33 +0200 [thread overview]
Message-ID: <jeaczn8f0m.fsf@sykes.suse.de> (raw)
In-Reply-To: <20040601150913.GU2093@holomorphy.com> (William Lee Irwin, III's message of "Tue, 1 Jun 2004 08:09:13 -0700")
William Lee Irwin III <wli@holomorphy.com> writes:
> On Tue, Jun 01, 2004 at 04:52:59PM +0200, Mikael Pettersson wrote:
>> You're assuming pointers have uniform representation.
>> C makes no such guarantees, and machines _have_ had
>> different types of representations in the past.
>> Some not-so-obsolete 64-bit machines in effect use fat
>> representations for pointers to functions (descriptors),
>> but they usually cheat and use pointers to the descriptors
>> instead. However, a C implementation could legally
>> represent a function pointer as a 128-bit value, while
>> data pointers remain 64 bits.
>
> IIRC for all types foo, sizeof(foo *) <= sizeof(void *), no?
No. There is no implied relation between data pointers and function
pointers. The only requirement is that all _function_ pointers smell
alike, because you can convert any function pointer to any other function
pointer and back without losing information. There is no dedicated
generic function pointer type, any one can function as one.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2004-06-01 15:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-29 21:46 [PATCH][2.6.6-rc3] gcc-3.4.0 fixes Mikael Pettersson
2004-05-17 0:58 ` H. Peter Anvin
2004-06-01 14:52 ` Mikael Pettersson
2004-06-01 15:09 ` William Lee Irwin III
2004-06-01 15:35 ` Mikael Pettersson
2004-06-01 15:38 ` Andreas Schwab [this message]
2004-06-01 17:09 ` H. Peter Anvin
2004-06-01 17:14 ` H. Peter Anvin
2004-06-01 21:47 ` Mikael Pettersson
2004-06-01 17:27 ` Linus Torvalds
2004-06-01 19:34 ` Chris Wedgwood
2004-07-16 4:28 ` H. Peter Anvin
[not found] <1PX8S-5z2-23@gated-at.bofh.it>
2004-04-29 9:30 ` Ihar 'Philips' Filipau
2004-04-29 20:46 ` Paul Wagland
2004-04-29 20:54 ` Denis Vlasenko
2004-04-29 21:35 ` Ihar 'Philips' Filipau
-- strict thread matches above, loose matches on Subject: below --
2004-04-28 13:07 Mikael Pettersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jeaczn8f0m.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox