Performance Tools for Software Developers - Enum Type Compatibility

The Intel® C++ compiler for Linux* and Mac OS* X treats different enum types as being incompatible.

For example:

test.cpp
typedef enum { e } E;
typedef enum { f } F;
E g();
F g();

icpc test.cpp
t.cpp(5): error: cannot overload functions distinguished by return type alone
F g():

^

Operating System:

Red Flag* Linux* Desktop 4.1, Red Hat* Linux, Novell* Linux* Desktop 9, Red Hat* Desktop Linux* 3, Red Hat* Enterprise Linux Desktop 4, Red Hat* Desktop 3 Update 4, Neoshine* 2.0, Red Hat* Enterprise Linux Desktop 3 Update 3, Red Hat* Enterprise Linux Desktop 3 Update 4, Red Hat* Enterprise Linux Desktop 3 Update 5, Red Hat* Enterprise Linux Desktop 4 Update 1, Red Flag* Linux* Desktop 4.1 SP1, Red Flag* Linux* Desktop 4.1 SP2, Mac OS*, Novell* Linux* Desktop 9 SP1, Novell* Linux* Desktop 9 SP2, Debian* 3.1 Linux, Mandriva* Linux 2006, Red Hat* Enterprise Linux 2.1, SUSE* Linux 9.1, SUSE* Linux Enterprise Server 8.0, SUSE* Linux Enterprise Server 9.0, Red Hat* Enterprise Linux 4.0, MontaVista* Linux 3.0 CEE LE, MontaVista* Linux 3.1 Pro BE, Mandriva* 2006 Update*, Mandriva* 2007, Redhat* Desktop 3 Update 5, Redhat* Desktop 3 Update 6, Redhat* Desktop 3 Update 7, Redhat* Desktop 4 Update 2, Redhat* Desktop 4 Update 3, Redhat* Desktop 4 Update 4, Novell* Linux* Desktop 9 SP3, SuSE* Linux* Enterprise* Desktop 10, Redflag* Desktop 4.1 SP2, Redflag* Desktop 5.0, Redflag* Desktop 5.0 SP1, Neoshine* Linux* Desktop 2.0.2, Neoshine* Linux* Desktop 3.0, Neoshine* Linux* Desktop 3.0.1, SUSE* Linux Enterprise Server 10, OpenDesktop*, Turbolinux*, Linux*, Red Hat* Linux 6.2, Red Hat* Linux 6.2 SBE2, Red Hat* Linux 7.0, Red Hat* Linux 7.1, Red Hat* Linux 7.2, Red Hat* Linux 7.3, SUSE* Linux 7.3, SUSE* Linux 8.0, SUSE* Linux 8.1, Red Hat* Linux 8.0, Turbolinux* 8 Workstation, Turbolinux* 8 Server, Turbolinux* 7 Server, Turbolinux* 7 Workstation, Debian Linux, Caldera* Linux, Turbolinux* 6.5, SUSE* Linux 7.2, SUSE* Linux 7.1, SUSE* Linux 7.0, SUSE* Linux, Red Hat* Linux Advanced Server 2.x, Red Flag* Linux* Desktop 4.0, Red Hat* Linux 9.0, Red Hat* Enterprise Linux 3.0, SUSE* Linux* 8.2, Red Hat* Linux Advanced Server 3.x, SUSE* Linux* 9.x
有关编译器优化的更完整信息,请参阅优化通知