General GCC Support Notes

  • See GNU GCC for the list of supported GCC-based compilers.
  • You can use a custom GCC compiler build that is based on one of the the supported GCC compilers. However, heavily modified GCC-based compilers or non-standard compiler extensions may not be supported.
  • To use a  GCC-based compiler, ensure that the directory that contains the GCC executable is included in the $PATH environment variable.

Unsupported Compiler Extensions for GCC Compilers

The following sections specifies the GCC compiler extensions that are not supported by C/C++test. The limitations apply to the supported GCC-based compilers, as well as custom GCC compiler builds. See http://gcc.gnu.org/onlinedocs for more information about GNU compiler extensions.

GCC 4.5.x

Unsupported Features

  • Arrays of Variable Length as Arguments to Functions

    void tester (int len, char data[len][len])
    {
    }
  • Complex Numbers
  • Nested Functions
  • Virtual Function With Overridden Return Type

    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 Extensions (like extern "Java", java attributes)
  • Offsetof extension
  • Restricting Pointer Aliasing for Member functions

    class T
    {
    	public:
    		void fn();
    };
    void T::fn () __restrict__ // EDG won't compile this
    {
    }

Incompatibilities

  • Function Attributes

    void fatal () __attribute__ ((noreturn));
    void fatal () { }
    typedef void voidfn ();
    volatile voidfn fatal; // EDG: declaration is incompatible with
    // "void fatal()"
  • Friend Declarations

    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.6.x

Same as for GCC 4.5.x.

GCC 4.7.x

Same as for GCC 4.5.x.

GCC 4.8.x

Same as for GCC 4.5.x.

GCC 4.9.x

Same as for GCC 4.5.x.

GCC 5.x

Same as for GCC 4.5.x.

GCC 6.x

Same as for GCC 4.5.x.

GCC 7.x

Same as for GCC 4.5.x.

GCC 8.x

Same as for GCC 4.5.x.

C++20 features are not supported.

GCC 9.x

Same as for GCC 4.5.x.

C++20 features are not supported.

GCC 10.x

Same as for GCC 4.5.x.

C++20 features are not supported.

GCC 11.x

Same as for GCC 4.5.x.

C++20 features are not supported.

  • No labels