From owner-freebsd-bugs Mon Aug 21 22:20: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5A00E37B42C for ; Mon, 21 Aug 2000 22:20:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id WAA60853; Mon, 21 Aug 2000 22:20:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Mon, 21 Aug 2000 22:20:03 -0700 (PDT) Message-Id: <200008220520.WAA60853@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Mark.Andrews@nominum.com Subject: Re: gnu/20767: gcc const produces invalid warning Reply-To: Mark.Andrews@nominum.com Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR gnu/20767; it has been noted by GNATS. From: Mark.Andrews@nominum.com To: Garrett Wollman Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: gnu/20767: gcc const produces invalid warning Date: Tue, 22 Aug 2000 15:20:14 +1000 > < > > gcc incorrectly reports 'incompatible pointer type' when function > > is declared with 'const pointer to const pointer' arguement and is > > just passed pointer to pointer. > > The code is in error, and the warning is in fact correct. The type > `const foo * const *' is not compatible with `foo **'. Only the > outermost qualifier participates in this form of promotion. > > -GAWollman > If that is what ANSI C says I'll have to live with it but it is illogical, not that logic applies to standards. Mark -- Mark Andrews, Nominum Inc. 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: Mark.Andrews@nominum.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message