🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4457

Re: giving a (*)(const void *) to a (*)(void *)

#4457
From: Michael Cook
Date: Sat, 09 Dec 1995 16:57
14 lines
1176 bytes
>>>>> "TB" == Tanmoy Bhattacharya <tanmoy@qcd.lanl.gov> writes:

 TB> Yes, nowhere in the standard do I see that `const' can be ignored in this
 TB> context. It is true that this could have been allowed without adversely
 TB> affecting typesafety (I haven't gone through a formal proof: so I may be
 TB> wrong): but I believe it has not been done. const is an afterthought in
 TB> the C standard (or so it seems :-) and in more than one place, simplicity
 TB> of the rules has been favoured over the maximum flexibility to the
 TB> programmer.

Does the standard say that `void*' and `const void*' must have identical
representations?

Michael.
Technical Details
Message-ID: <r4loomi39o.fsf@erawan.cognex.com>
Path: arc1-ca.pugleaf.net!cognex.cognex.com!usenet
References: <Dominique.Marcadet-0712951751160001@marcadet.supelec.fr> <4a9nnm$h9b@newshost.lanl.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cognex.cognex.com!usenet
From: Michael Cook <mcook@cognex.com>
Newsgroups: comp.std.c
Subject: Re: giving a (*)(const void *) to a (*)(void *)
Date: 09 Dec 1995 11:57:23 -0500
Organization: Cognex Corporation, Natick, Massachusetts
Sender: mcook@erawan.cognex.com
Message-ID: <r4loomi39o.fsf@erawan.cognex.com>
References: <Dominique.Marcadet-0712951751160001@marcadet.supelec.fr>
 <4a9nnm$h9b@newshost.lanl.gov>
NNTP-Posting-Host: erawan.cognex.com
X-Newsreader: September Gnus v0.18/Emacs 19.29