🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2002

Re: legality of assignment of function to a void *.

#2002
From: Stephen Clamage
Date: Sun, 18 Nov 1990 00:53
15 lines
1178 bytes
blodgett@apollo.HP.COM (Bruce Blodgett) writes:

>Was it really the intent of the ANSI C committee not to allow void
>pointers from holding uncasted function addresses (in either
>conforming or strictly conforming programs)?

Yes.  On some implementations it may not be possible (or at least not
reasonable) to cast a function pointer to a void*.  For a simple
example, consider a program on a PC in large-code-small-data model.
A function pointer is then 32 bits, but a void* is 16 bits.  One purpose
of the standard is to explain what programs can be run safely on all
conforming implementations.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Technical Details
Message-ID: <520@taumet.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!jarthur!uunet!taumet!steve
References: <1990Nov12.211511.2344@batcomputer.tn.cornell.edu> <1990Nov13.174920.2235@zoo.toronto.edu> <1990Nov14.031125.14027@athena.mit.edu> <4e0cac89.20b6d@apollo.HP.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!jarthur!uunet!taumet!steve
From: steve@taumet.com (Stephen Clamage)
Newsgroups: comp.std.c
Subject: Re: legality of assignment of function to a void *.
Message-ID: <520@taumet.com>
Date: 18 Nov 90 00:53:36 GMT
References: <1990Nov12.211511.2344@batcomputer.tn.cornell.edu> <1990Nov13.174920.2235@zoo.toronto.edu> <1990Nov14.031125.14027@athena.mit.edu> <4e0cac89.20b6d@apollo.HP.COM>
Organization: Taumetric Corporation, San Diego
Lines: 15