Before I proceed and upgrade my 4.5 Intel Compiler, I would like to know if the current version still generates an error when compiling the following code:
class foo {
public:
union {
float f;
const int i;
};
inline foo(float x) : f(x) {}
};
With 4.5, the compiler aborts with the following message:
error #409: "foo::foo(float)" provides no initializer for: const member "foo::i"
This class declares an anonymous union containing a const member which is initialized indirectly by the other member. This compiles correctly on both GCC 3.2 and Visual C++ 6.0.
Has this been fixed? Otherwise, any hope it can be?
Regards
Benoit Sevigny
Kaydara Inc.
Error #409
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.


