C++test は次の GCC コンパイラをサポートします。
- Windows
- GCC 4.0.x
- GCC 4.1.x
- GCC 4.2.x
- GCC 4.3.x
- GCC 4.4.x
- GCC 4.5.x
- GCC 4.6.x
- GCC 4.7.x
- GCC 4.8.x (x86 and x86-64)
- GCC 4.9.x (x86 and x86-64)
- GCC 5.x (x86 and x86-64)
- GCC 6.x (x86 and x86-64)
- GCC 7.x (x86 and x86-64)
- GCC 8.x (x86 and x86-64)
- Linux
- GCC 4.0.x (x86 and x86-64)
- GCC 4.1.x (x86 and x86-64)
- GCC 4.2.x (x86 and x86-64)
- GCC 4.3.x (x86 and x86-64)
- GCC 4.4.x (x86 and x86-64)
- GCC 4.5.x (x86 and x86-64)
- GCC 4.6.x (x86 and x86-64)
- GCC 4.7.x (x86 and x86-64)
- GCC 4.8.x (x86 and x86-64)
- GCC 4.9.x (x86 and x86-64)
- GCC 5.x (x86 and x86-64)
- GCC 6.x (x86 and x86-64)
- GCC 7.x (x86 and x86-64)
- GCC 8.x (x86 and x86-64)
- GCC ベースのクロス コンパイラのリストは、 「コンパイラ」 に記載されています。
- 他の GCC ベースのクロス コンパイラとカスタム GCC コンパイラ ビルドは、上記の GCC コンパイラのバージョンに基づきます。大幅に変更された GCC ベースのコンパイラ、およびその非標準の拡張はサポートされない場合があります。
これらの GCC コンパイラを使用するには、GCC の実行ファイルがあるディレクトリを PATH 環境変数に追加する必要があります。
サポートされない GCC コンパイラ拡張
このセクションでは、C++test が現在サポートしていない GCC コンパイラ拡張について説明します。GNU コンパイラ拡張についての情報のソースとして http://gcc.gnu.org/onlinedocs を使用しました。
これらの制限事項は、「コンパイラ」 に記載された GCC ベースのクロス コンパイラ、他の GCC ベースのクロス コンパイラ、およびカスタム GCC コンパイラ ビルドの適切なバージョンにも適用されます。
GCC 4.0.x
サポートされない機能
関数への引数として変数長の配列
void tester (int len, char data[len][len]) { }
- 複素数
- ネストされた関数
上書きされる戻り型を持つ仮想関数
class A { public: virtual void* a(); }; class B: public A { public: virtual B* a(); // Return type changed from void* to (compatible) B*. // It is ok in GCC but EDG will complain };
- Java 拡張 ( extern "Java"、java 属性など)
- Offsetof 拡張
メンバー関数のポインター エイリアスの制限
class T { public: void fn(); }; void T::fn () __restrict__ // EDG won't compile this { }
非互換性
関数属性
void fatal () __attribute__ ((noreturn)); void fatal () { } typedef void voidfn (); volatile voidfn fatal; // EDG: declaration is incompatible with // "void fatal()"
friend 宣言
class A; namespace N { class B { friend class A; // In GCC 4.0+ it refer to N::A (which has not been // declared yet) But EDG and older GCCs refer to ::A int _private; }; class A { void foo() { B b; b._private = 0; // EDG inaccessible field. } }; }
GCC 4.1.x
GCC 4.0.x と同じです。
GCC 4.2.x
GCC 4.0.x と同じです。
GCC 4.3.x
GCC 4.0.x と同じです。
GCC 4.4.x
GCC 4.0.x と同じです。
GCC 4.5.x
GCC 4.0.x と同じです。
GCC 4.6.x
GCC 4.0.x と同じです。
GCC 4.7.x
GCC 4.0.x と同じです。
GCC 4.8.x
GCC 4.0.x と同じです。
GCC 4.9.x
GCC 4.0.x と同じです。
GCC 5.x
GCC 4.0.x と同じです。
GCC 6.x
GCC 4.0.x と同じです。
GCC 7.x
GCC 4.0.x と同じです。
GCC 8.x
GCC 4.0.x と同じです。
C++2a 機能はサポートされません。