public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/32870] New: Unclear error message when declaring struct in wrong namespace
@ 2007-07-23 19:22 scovich at gmail dot com
2007-08-15 12:35 ` [Bug c++/32870] " pcarlini at suse dot de
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: scovich at gmail dot com @ 2007-07-23 19:22 UTC (permalink / raw)
To: gcc-bugs
Compiling this code:
struct Foo {
struct Bar;
Foo();
};
namespace Baz {
Foo::Foo() { }
struct Foo::Bar { };
}
Gives the following two error messages:
test.C:6: error: definition of 'void Foo::Foo()' is not in namespace enclosing
'Foo'
test.C:7: error: declaration of 'struct Foo::Bar' in 'Baz' which does not
enclose 'struct Foo'
The first error is nice and clear; the second would be much easier to
understand quickly if it also identified 'Baz' as a namespace.
Note: this bug dates back at least as far as g++-3.4.4 (tested on 3.4.4, 4.1.2,
4.2.0 and 4.3-20070716)
--
Summary: Unclear error message when declaring struct in wrong
namespace
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: scovich at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32870
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/32870] Unclear error message when declaring struct in wrong namespace
2007-07-23 19:22 [Bug c++/32870] New: Unclear error message when declaring struct in wrong namespace scovich at gmail dot com
@ 2007-08-15 12:35 ` pcarlini at suse dot de
2007-08-17 9:35 ` paolo at gcc dot gnu dot org
2007-08-17 9:36 ` pcarlini at suse dot de
2 siblings, 0 replies; 4+ messages in thread
From: pcarlini at suse dot de @ 2007-08-15 12:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pcarlini at suse dot de 2007-08-15 12:35 -------
working on it.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pcarlini at suse dot de
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-08-15 12:35:10
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32870
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/32870] Unclear error message when declaring struct in wrong namespace
2007-07-23 19:22 [Bug c++/32870] New: Unclear error message when declaring struct in wrong namespace scovich at gmail dot com
2007-08-15 12:35 ` [Bug c++/32870] " pcarlini at suse dot de
@ 2007-08-17 9:35 ` paolo at gcc dot gnu dot org
2007-08-17 9:36 ` pcarlini at suse dot de
2 siblings, 0 replies; 4+ messages in thread
From: paolo at gcc dot gnu dot org @ 2007-08-17 9:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo at gcc dot gnu dot org 2007-08-17 09:35 -------
Subject: Bug 32870
Author: paolo
Date: Fri Aug 17 09:35:23 2007
New Revision: 127581
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127581
Log:
/cp
2007-08-17 Paolo Carlini <pcarlini@suse.de>
PR c++/32870
* parser.c (cp_parser_class_head): Improve error message.
/testsuite
2007-08-17 Paolo Carlini <pcarlini@suse.de>
PR c++/32870
* g++.dg/other/error17.C: Adjust.
Added:
trunk/gcc/testsuite/g++.dg/other/error17.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32870
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/32870] Unclear error message when declaring struct in wrong namespace
2007-07-23 19:22 [Bug c++/32870] New: Unclear error message when declaring struct in wrong namespace scovich at gmail dot com
2007-08-15 12:35 ` [Bug c++/32870] " pcarlini at suse dot de
2007-08-17 9:35 ` paolo at gcc dot gnu dot org
@ 2007-08-17 9:36 ` pcarlini at suse dot de
2 siblings, 0 replies; 4+ messages in thread
From: pcarlini at suse dot de @ 2007-08-17 9:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pcarlini at suse dot de 2007-08-17 09:36 -------
Fixed.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32870
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-08-17 9:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-23 19:22 [Bug c++/32870] New: Unclear error message when declaring struct in wrong namespace scovich at gmail dot com
2007-08-15 12:35 ` [Bug c++/32870] " pcarlini at suse dot de
2007-08-17 9:35 ` paolo at gcc dot gnu dot org
2007-08-17 9:36 ` pcarlini at suse dot de
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).