c++/10309: No specific error message when the base class is not defined
valentin_iancu@yahoo.com
valentin_iancu@yahoo.com
Fri Apr 4 13:06:00 GMT 2003
>Number: 10309
>Category: c++
>Synopsis: No specific error message when the base class is not defined
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Apr 04 13:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: valentin_iancu@yahoo.com
>Release: gcc version 3.2 20020927, 20020903
>Organization:
>Environment:
OS: Win2k / cygwin i686 ALSO
linux RH 8 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
/netrel/src/gcc-3.2-3/configure --enable-languages=c,c++,f77,java --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --without-included-gettext --enable-interpreter --disable-sjlj-exceptions --disable-version-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sbin
>Description:
gcc gives an erronated "parse" error, when it's actually a semantic error when declaring a class that has a base class undefined.
The famous code:
//Start the file
class A
: public B
{
};
//End the file
Class B is undefined here, and the error message says:
t.cpp:4: parse error before `{' token
I expect here an error that says : <<base class undefined>>!
>How-To-Repeat:
:-D copy & paste may be?
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list