Date: Tue, 27 Mar 2001 11:23:03 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Jack Klein cc: djgpp AT delorie DOT com Subject: Re: is this a bug? In-Reply-To: <2tg0cts3iddc003gfs3q9mma4qj9droi1t@4ax.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 27 Mar 2001, Jack Klein wrote: > > It works, and not by accident. But you are right: it's bad C. > > No, there is no requirement that a pointer to an array of chars has > the same representation as a pointer to char, just as there is no > requirement for pointer to any different scalar types to have the same > representation, with the exception of pointer to char and pointer to > void. Well, if this is the accident you had in mind, then I agree. But on any machine whose representation of pointers to all objects is identical, the code in question will work.