For this example: # include <istream> # include <istream>
using namespace std; ifstream x; ifstream y(); int main(int argc, char** argv) { return 0; } current mainline g++ says: foo.cc:6: error: aggregate std::ifstream x has incomplete type and cannot be defined This is accurate but confusing for the uninitiated. How about something like foo.cc:6: error: std::ifstream was declared but not defined -- Summary: C++ incomplete type error can be misleading Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ian at airs dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39730