This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19073] New: cp_namespace_decl not returning all decls
- From: "sstrasser at systemhaus-gruppe dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Dec 2004 00:41:18 -0000
- Subject: [Bug c++/19073] New: cp_namespace_decl not returning all decls
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I'm not sure if the bug is the behaviour of the function or the documentation,
but they differ:
cp_namespace_decl(tree) is documented to return all decls of a
namespace(documented in cp/name-lookup.c and in gcc internals documentation),
but it leaves out a lot of decls, e.g. c++ classes and enums.
this is true for current CVS version(12-19-04) and for the current release(3.4.3).
but in version 3.3.4 it correctly returns at least the type_decl nodes for
enums(classes not tested).
you can easily check this with -fdump-translation-unit, which uses
cp_namespace_decl:
code: "class Abc{};"
"Abc" does not appear in the output of current versions. in 3.3.4 it does.
--
Summary: cp_namespace_decl not returning all decls
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sstrasser at systemhaus-gruppe dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19073