Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/sys
> | > 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
Home |
Main Index |
Thread Index |
Old Index