Date: 08 Jun 2001 15:09:53 +0200 From: Assar Westerlund <assar@FreeBSD.ORG> To: Peter Pentchev <roam@orbitel.bg> Cc: Thomas David Rivers <rivers@dignus.com>, jhb@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: free() and const warnings Message-ID: <5lsnhbqfry.fsf@assaris.sics.se> In-Reply-To: Peter Pentchev's message of "Fri, 8 Jun 2001 16:03:04 %2B0300" 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>
index | next in thread | previous in thread | raw e-mail
Peter Pentchev <roam@orbitel.bg> 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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5lsnhbqfry.fsf>
