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

Reply via email to