共用方式為


編譯器警告 (層級 1) C4114

相同類型的限定詞已經使用多次

類型宣告或定義會多次使用類型限定詞 ( const 、、 signed volatileunsigned ) 。 這會導致 Microsoft 延伸模組 (/Ze) 出現警告,並在 ANSI 相容性下發生錯誤 (/Za)。

下列範例會產生 C4114:

// C4114.cpp
// compile with: /W1 /c
volatile volatile int i;   // C4114

下列範例會產生 C4114:

// C4114_b.cpp
// compile with: /W1 /c
static const int const * ii;   // C4114
static const int * const iii;   // OK