Fraser Ross
2008-06-24 17:01:06 UTC
This compiles with BDS2006 but not with Comeau:
class {};
The lack of an error allows for other errors to not be reported, as in
QC report 49230. That report needs some commenting. I might write a
new report using the above statement add reference 49230.
The following program also shows that the lack of an error causes other
things to happen:
struct TM {
class {
unsigned __int8 Status;
unsigned __int8 Attribute;
};
};
[C++ Error] Unit2.cpp(9): E2019 'TM:: ::Status' cannot be declared in an
anonymous union
[C++ Error] Unit2.cpp(9): E2019 'TM:: ::Attribute' cannot be declared in
an anonymous union
Fraser.
class {};
The lack of an error allows for other errors to not be reported, as in
QC report 49230. That report needs some commenting. I might write a
new report using the above statement add reference 49230.
The following program also shows that the lack of an error causes other
things to happen:
struct TM {
class {
unsigned __int8 Status;
unsigned __int8 Attribute;
};
};
[C++ Error] Unit2.cpp(9): E2019 'TM:: ::Status' cannot be declared in an
anonymous union
[C++ Error] Unit2.cpp(9): E2019 'TM:: ::Attribute' cannot be declared in
an anonymous union
Fraser.