🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4656

Re: ... char * * promotion to char const * const * ...

#4656
From: John Winters
Date: Wed, 17 Jan 1996 15:09
16 lines
1043 bytes
In article <KANZE.96Jan17121659@slsvewt.lts.sel.alcatel.de>,
James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de> wrote:
[snip]
>
>Originally, the C standard was going to allow this; in fact, it was
>going to allow all casts which added const anywhere in the type.  Then
>someone pointed out that the conversion 'char ** -> char *const *' was
>unsafe.  As a result, the wording was changed to only allow adding the
>const at the top level.

Interesting.  Could you enlighten us (well, me anyway) as to *why* it
is unsafe.  I don't find it immediately obvious.

John
-- 
John Winters.  Wallingford, Oxon, England.
Technical Details
Message-ID: <DLBzGB.J60@polo.demon.co.uk>
Path: arc1-ca.pugleaf.net!zetnet.co.uk!demon!polo!john
References: <4dgj8q$qin@unix.sri.com> <KANZE.96Jan17121659@slsvewt.lts.sel.alcatel.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!zetnet.co.uk!demon!polo!john
From: john@polo.demon.co.uk (John Winters)
Newsgroups: comp.std.c
Subject: Re: ... char * * promotion to char const * const * ...
Date: Wed, 17 Jan 1996 15:09:47 GMT
Organization: Wallingford
Message-ID: <DLBzGB.J60@polo.demon.co.uk>
References: <4dgj8q$qin@unix.sri.com> <KANZE.96Jan17121659@slsvewt.lts.sel.alcatel.de>
X-NNTP-Posting-Host: polo.demon.co.uk