From owner-freebsd-hackers Fri Jun 8 6: 9:53 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from assaris.sics.se (assaris.sics.se [193.10.66.234]) by hub.freebsd.org (Postfix) with ESMTP id EC21F37B407; Fri, 8 Jun 2001 06:09:50 -0700 (PDT) (envelope-from assar@assaris.sics.se) Received: (from assar@localhost) by assaris.sics.se (8.9.3/8.9.3) id PAA63250; Fri, 8 Jun 2001 15:09:53 +0200 (CEST) (envelope-from assar) To: Peter Pentchev Cc: Thomas David Rivers , jhb@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: free() and const warnings References: <20010608114957.C19938@ringworld.oblivion.bg> <200106081055.GAA49069@lakes.dignus.com> <20010608154249.A7671@ringworld.oblivion.bg> <5ld78frunz.fsf@assaris.sics.se> <20010608160304.G7671@ringworld.oblivion.bg> From: Assar Westerlund Date: 08 Jun 2001 15:09:53 +0200 In-Reply-To: Peter Pentchev's message of "Fri, 8 Jun 2001 16:03:04 +0300" Message-ID: <5lsnhbqfry.fsf@assaris.sics.se> Lines: 20 User-Agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Pentchev writes: > My explanation was a reply to a suggestion to remove the 'const' in > the structure definition. My fault. The code that I should have shown was without the 'const'. With gcc 2.95.3 and 'gcc -O -g -Werror -Wall -W -Wcast-qual -c foo.c' I don't get any errors with the const-less program (below). I was wondering if this is something that has changed in recent gcc. /assar struct validation_fun { char *name; void *fun; int dyn; }; struct validation_fun val_init[] = { {"init", 0, 0} }; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message