Hi, I have a two-part question:

1)
During build of Solaris kernel + userland, what's the value of
compiler's -xalias_level flag? If -xalias_level=any are there any parts
in the code that selectively take advantage of strong aliasing feature
of C compiler?

2)
Suppose we know there are no aliasing issues in the code and we build
everything with -xalias_level=std flag, isn't 'restrict' pointer
qualifier in the following function prototype redundant? I mean compiler
knows those pointers point to different types, hence they can never
alias each other?

int pthread_rwlock_init(
        pthread_rwlock_t *restrict rwlock,
        const pthread_rwlockattr_t *restrict attr);
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to