Article View: comp.std.c
Article #4646... char * * promotion to char const * const * ...
From: Mark Klenk
Date: Tue, 16 Jan 1996 16:20
Date: Tue, 16 Jan 1996 16:20
30 lines
936 bytes
936 bytes
My question is this: Why does a char * * not naturally promote to a char const * const *? The following is legal and generates no compiler warning: char const * foo; char * bar; foo = bar; // bar = foo; // Not allowed without cast. But why not this: char const * const * foo_array; char * * bar_array; foo_array = bar_array; On every compiler I've tried, I get a warning about this, something like "assignment from incompatible pointer type." Can anyone clear this up for me? --- mklenk@coronacorp.com (Mark Klenk)
Technical Details
Message-ID:
<4dgj8q$qin@unix.sri.com>Path:
arc1-ca.pugleaf.net!unix.sri.com!usenetShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!unix.sri.com!usenet From: mklenk@updike.sri.com (Mark Klenk) Newsgroups: comp.std.c Subject: ... char * * promotion to char const * const * ... Date: 16 Jan 1996 16:20:42 GMT Organization: Nuance Communications Message-ID: <4dgj8q$qin@unix.sri.com> Reply-To: mklenk@updike.sri.com NNTP-Posting-Host: 204.75.161.40