public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/39730] New: C++ incomplete type error can be misleading
@ 2009-04-10 20:23 ian at airs dot com
2009-04-16 18:26 ` [Bug c++/39730] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: ian at airs dot com @ 2009-04-10 20:23 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 794 bytes --]
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/39730] C++ incomplete type error can be misleading
2009-04-10 20:23 [Bug c++/39730] New: C++ incomplete type error can be misleading ian at airs dot com
@ 2009-04-16 18:26 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-16 18:26 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 563 bytes --]
------- Comment #1 from pinskia at gcc dot gnu dot org 2009-04-16 18:26 -------
>foo.cc:6: error: std::ifstream was declared but not defined
This is even more confusing to me. As incomplete types are understood easier
than just being declared and not defined.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39730
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-16 18:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-10 20:23 [Bug c++/39730] New: C++ incomplete type error can be misleading ian at airs dot com
2009-04-16 18:26 ` [Bug c++/39730] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).