public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31489]  New: error says struct when it should say class
@ 2007-04-05 22:50 jg at jguk dot org
  2007-04-05 23:09 ` [Bug c++/31489] " pinskia at gcc dot gnu dot org
  2007-04-07 15:23 ` bangerth at dealii dot org
  0 siblings, 2 replies; 5+ messages in thread
From: jg at jguk dot org @ 2007-04-05 22:50 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-09-27 21:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-31489-4@http.gcc.gnu.org/bugzilla/>
2011-09-27 10:15 ` [Bug c++/31489] error says struct when it should say class paolo.carlini at oracle dot com
2011-09-27 21:57 ` paolo at gcc dot gnu.org
2011-09-27 22:06 ` paolo.carlini at oracle dot com
2007-04-05 22:50 [Bug c++/31489] New: " jg at jguk dot org
2007-04-05 23:09 ` [Bug c++/31489] " pinskia at gcc dot gnu dot org
2007-04-07 15:23 ` bangerth at dealii 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).