Oracle Solaris Studio 12.2: C ユーザーガイド

D.1.9 べき等修飾子

6.7.3 型修飾子

同一の指示子と修飾子のリストで、直接または typedef により同一の修飾子が複数ある場合は、動作は型修飾子が 1 つだけの場合と同様になります。

C90 では、次のコードではエラーが発生します。


%example cat test.c

const const int a;

int main(void) {
  return(0);
}

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

ただし、C99 では、C コンパイラで複数の修飾子を使用できます。


%example cc -xc99 test.c
%example