[LLVMbugs] [Bug 6593] New: False error: use of undeclared identifier 'address'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 12 05:33:57 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=6593

           Summary: False error: use of undeclared identifier 'address'
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: Fons.Rademakers at cern.ch
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


The attached aap.cxx compiles fine with g++ (and for that matter any other know
compiler), but not with clang++. Do:

clang++ -c aap.cxx
In file included from core/base/src/G__Base2.cxx:1:
In file included from core/base/src/G__Base2.cxx:18:
include/TCollectionProxyInfo.h:217:40: error: use of undeclared identifier
      'address'
         return e->fStart = e->fSize ? address(*c->begin()) : 0;
                                       ^
include/TCollectionProxyInfo.h:356:51: note: in instantiation of member
function
      'ROOT::TCollectionProxyInfo::Pushback<class std::vector<class TString,
      class std::allocator<class TString> > >::resize' requested here
                                               T::resize,
                                                  ^
In file included from core/base/src/G__Base2.cxx:1:
core/base/src/G__Base2.cxx:5914:41: note: in instantiation of function template
      specialization 'ROOT::TCollectionProxyInfo::Generate<struct
      ROOT::TCollectionProxyInfo::Pushback<class std::vector<class TString,
      class std::allocator<class TString> > > >' requested here
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo:...
                                        ^
In file included from core/base/src/G__Base2.cxx:1:
In file included from core/base/src/G__Base2.cxx:18:
include/TCollectionProxyInfo.h:104:20: note: must qualify identifier to find
      this declaration in dependent base class
      static void* address(T ref) {
                   ^
include/TCollectionProxyInfo.h:154:29: error: use of undeclared identifier
      'address'
         return e->fStart = address(ref);
                            ^
include/TCollectionProxyInfo.h:358:51: note: in instantiation of member
function
      'ROOT::TCollectionProxyInfo::Type<class std::vector<class TString, class
      std::allocator<class TString> > >::first' requested here
                                               T::first,
                                                  ^
In file included from core/base/src/G__Base2.cxx:1:
core/base/src/G__Base2.cxx:5914:41: note: in instantiation of function template
      specialization 'ROOT::TCollectionProxyInfo::Generate<struct
      ROOT::TCollectionProxyInfo::Pushback<class std::vector<class TString,
      class std::allocator<class TString> > > >' requested here
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo:...
                                        ^
In file included from core/base/src/G__Base2.cxx:1:
In file included from core/base/src/G__Base2.cxx:18:
include/TCollectionProxyInfo.h:104:20: note: must qualify identifier to find
      this declaration in dependent base class
      static void* address(T ref) {
                   ^
include/TCollectionProxyInfo.h:163:17: error: use of undeclared identifier
      'address'
         return address(ref);
                ^
include/TCollectionProxyInfo.h:359:51: note: in instantiation of member
function
      'ROOT::TCollectionProxyInfo::Type<class std::vector<class TString, class
      std::allocator<class TString> > >::next' requested here
                                               T::next,
                                                  ^
In file included from core/base/src/G__Base2.cxx:1:
core/base/src/G__Base2.cxx:5914:41: note: in instantiation of function template
      specialization 'ROOT::TCollectionProxyInfo::Generate<struct
      ROOT::TCollectionProxyInfo::Pushback<class std::vector<class TString,
      class std::allocator<class TString> > > >' requested here
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo:...
                                        ^
In file included from core/base/src/G__Base2.cxx:1:
In file included from core/base/src/G__Base2.cxx:18:
include/TCollectionProxyInfo.h:104:20: note: must qualify identifier to find
      this declaration in dependent base class
      static void* address(T ref) {
                   ^
include/TCollectionProxyInfo.h:217:40: error: use of undeclared identifier
      'address'
         return e->fStart = e->fSize ? address(*c->begin()) : 0;
                                       ^
include/TCollectionProxyInfo.h:356:51: note: in instantiation of member
function
      'ROOT::TCollectionProxyInfo::Pushback<class std::vector<class
      std::basic_string<char, struct std::char_traits<char>, class
      std::allocator<char> >, class std::allocator<class
std::basic_string<char,
      struct std::char_traits<char>, class std::allocator<char> > > >
>::resize'
      requested here
                                               T::resize,
                                                  ^
In file included from core/base/src/G__Base2.cxx:1:
core/base/src/G__Base2.cxx:5972:41: note: in instantiation of function template
      specialization 'ROOT::TCollectionProxyInfo::Generate<struct
      ROOT::TCollectionProxyInfo::Pushback<class std::vector<class
      std::basic_string<char, struct std::char_traits<char>, class
      std::allocator<char> >, class std::allocator<class
std::basic_string<char,
      struct std::char_traits<char>, class std::allocator<char> > > > > >'
      requested here
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo:...
                                        ^
In file included from core/base/src/G__Base2.cxx:1:
In file included from core/base/src/G__Base2.cxx:18:
include/TCollectionProxyInfo.h:104:20: note: must qualify identifier to find
      this declaration in dependent base class
      static void* address(T ref) {
                   ^
include/TCollectionProxyInfo.h:154:29: error: use of undeclared identifier
      'address'
         return e->fStart = address(ref);
                            ^
include/TCollectionProxyInfo.h:358:51: note: in instantiation of member
function
      'ROOT::TCollectionProxyInfo::Type<class std::vector<class
      std::basic_string<char, struct std::char_traits<char>, class
      std::allocator<char> >, class std::allocator<class
std::basic_string<char,
      struct std::char_traits<char>, class std::allocator<char> > > > >::first'
      requested here
                                               T::first,
                                                  ^
In file included from core/base/src/G__Base2.cxx:1:
core/base/src/G__Base2.cxx:5972:41: note: in instantiation of function template
      specialization 'ROOT::TCollectionProxyInfo::Generate<struct
      ROOT::TCollectionProxyInfo::Pushback<class std::vector<class
      std::basic_string<char, struct std::char_traits<char>, class
      std::allocator<char> >, class std::allocator<class
std::basic_string<char,
      struct std::char_traits<char>, class std::allocator<char> > > > > >'
      requested here
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo:...
                                        ^
In file included from core/base/src/G__Base2.cxx:1:
In file included from core/base/src/G__Base2.cxx:18:
include/TCollectionProxyInfo.h:104:20: note: must qualify identifier to find
      this declaration in dependent base class
      static void* address(T ref) {
                   ^
include/TCollectionProxyInfo.h:163:17: error: use of undeclared identifier
      'address'
         return address(ref);
                ^
include/TCollectionProxyInfo.h:359:51: note: in instantiation of member
function
      'ROOT::TCollectionProxyInfo::Type<class std::vector<class
      std::basic_string<char, struct std::char_traits<char>, class
      std::allocator<char> >, class std::allocator<class
std::basic_string<char,
      struct std::char_traits<char>, class std::allocator<char> > > > >::next'
      requested here
                                               T::next,
                                                  ^
In file included from core/base/src/G__Base2.cxx:1:
core/base/src/G__Base2.cxx:5972:41: note: in instantiation of function template
      specialization 'ROOT::TCollectionProxyInfo::Generate<struct
      ROOT::TCollectionProxyInfo::Pushback<class std::vector<class
      std::basic_string<char, struct std::char_traits<char>, class
      std::allocator<char> >, class std::allocator<class
std::basic_string<char,
      struct std::char_traits<char>, class std::allocator<char> > > > > >'
      requested here
      instance.AdoptCollectionProxyInfo(TCollectionProxyInfo:...
                                        ^
In file included from core/base/src/G__Base2.cxx:1:
In file included from core/base/src/G__Base2.cxx:18:
include/TCollectionProxyInfo.h:104:20: note: must qualify identifier to find
      this declaration in dependent base class
      static void* address(T ref) {
                   ^
24 diagnostics generated.


No errors compiling with g++.

Cheers, Fons.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list