Sun Studio 12: C User's Guide

D.1.9 Idempotent Qualifiers

6.7.3 Type qualifiers:

If the same qualifier appears more than once in the same specifier-qualifier-list, either directly or through one or more typedefs, the behavior is the same as when the type qualifier appears only once.

In C90, the following code would cause an error:

%example cat test.c

const const int a;

int main(void) {

%example cc -xc99=none test.c
"test.c", line 1: invalid type combination

However, with C99, the C compiler accepts multiple qualifiers.

%example cc -xc99 test.c