[Bug c++/31489] New: error says struct when it should say class
jg at jguk dot org
gcc-bugzilla@gcc.gnu.org
Thu Apr 5 22:50:00 GMT 2007
When a forward declared class is not found the error message describes it
incorrectly as a struct. See below for an example.
I'd like to submit a patch to correctly display class. Let me know if such a
patch would be considered.
$ g++ -Wall -ggdb -O0 -o t test6.cpp
test6.cpp: In function Âint main()Â:
test6.cpp:8: error: invalid use of undefined type Âstruct foobarÂ
test6.cpp:4: error: forward declaration of Âstruct foobarÂ
File contains:
=====================================
// g++ -Wall -ggdb -O0 -o t test6.cpp
class foobar;
int main()
{
foobar * o = new foobar;
}
====================================
--
Summary: error says struct when it should say class
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jg at jguk dot org
GCC build triplet: i686-gnu-linux
GCC host triplet: i686-gnu-linux
GCC target triplet: i686-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31489
More information about the Gcc-bugs
mailing list