F
Francis Moreau
Hello,
I read the latest post on 'restrict' keyword the subject and it makes
me think about the following declaration used by the BSD socket
library:
typedef union {
struct sockaddr * restrict __sockaddr__;
struct sockaddr_at * restrict __sockaddr_at__;
struct sockaddr_un * restrict __sockaddr_un__;
struct sockaddr_in * restrict __sockaddr_in__;
struct sockaddr_in6 * restrict __sockaddr_in6__;
} __SOCKADDR_ARG __attribute__ ((__transparent_union__));
__SOCKADDR_ARG being used as parameter type passed to a couple of
functions such as bind().
Does anybody understand the use of 'restrict' keyword in that case ?
BTW could anybody point out a link that correctly sum up the
definition of 'restrict' ? The formal definition given by the C spec
is almost unreadable for my poor english.
Thanks
I read the latest post on 'restrict' keyword the subject and it makes
me think about the following declaration used by the BSD socket
library:
typedef union {
struct sockaddr * restrict __sockaddr__;
struct sockaddr_at * restrict __sockaddr_at__;
struct sockaddr_un * restrict __sockaddr_un__;
struct sockaddr_in * restrict __sockaddr_in__;
struct sockaddr_in6 * restrict __sockaddr_in6__;
} __SOCKADDR_ARG __attribute__ ((__transparent_union__));
__SOCKADDR_ARG being used as parameter type passed to a couple of
functions such as bind().
Does anybody understand the use of 'restrict' keyword in that case ?
BTW could anybody point out a link that correctly sum up the
definition of 'restrict' ? The formal definition given by the C spec
is almost unreadable for my poor english.
Thanks