From owner-freebsd-chat Tue Apr 30 13:53:44 2002 Delivered-To: freebsd-chat@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 7233037B41E for ; Tue, 30 Apr 2002 13:53:41 -0700 (PDT) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 780FF5346; Tue, 30 Apr 2002 22:53:39 +0200 (CEST) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Francis Jordan Cc: freebsd-chat@freebsd.org Subject: Re: strange gcc warning References: <20020430181138.37192.qmail@web20403.mail.yahoo.com> From: Dag-Erling Smorgrav Date: 30 Apr 2002 22:53:38 +0200 In-Reply-To: <20020430181138.37192.qmail@web20403.mail.yahoo.com> Message-ID: Lines: 13 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Francis Jordan writes: > The warning goes away when I wrap the array in a > struct, but I still don't understand it clearly. > If the array is converted to a pointer, isn't it > safe to cast a regular pointer to a pointer to > const (i.e. a read-only pointer)? Yes, but what you had in your argument list was a pointer to a pointer. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message