Subject: Re: CVS commit: src/sys/sys
To: None <christos@zoulas.com>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: source-changes
Date: 12/12/2004 08:20:41
> | > Module Name:	src
> | > Committed By:	christos
> | > Date:		Sat Dec 11 05:59:00 UTC 2004
> | > 
> | > Modified Files:
> | > 	src/sys/sys: cdefs.h
> | > 
> | > Log Message:
> | > kill gcc specific version of __UNCONST. Does not work to unconst
> | > const char *foo[];
> | 
> | what's a problem?
> | foo is not a const pointer.
> 
> The following does not work:
> 
> 	const char *foo[2];
> 	char **bar = (char **)__UNCONST(foo);

it's intended not to work because foo and bar is not compatible.
at least it's an intention when i wrote the gcc version of __UNCONST.

> Also having 2 versions with slightly different semantics (they return
> different types) just leads to confusion.

do you mean, the semantics of __UNCONST should be
"convert any type to void *"?
it's horrible and it doesn't match with its name, IMO.

YAMAMOTO Takashi