This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14748] New: class member field name __ct


I cannot believe, that this is a bug, but I did not find any explanation for 
this behaviour. When I compile following simple class, I get an error:

class Ct {
public:
 int __ct;

 Ct() : __ct(0) {};
};

int main() {
  Ct ctobj;
}



Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.3/specs
Configured with: ../configure --disable-nls --with-as=/usr/ccs/bin/as --with-
ld=/usr/ccs/bin/ld
Thread model: posix
gcc version 3.2.3
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.3/cpp0 -lang-c++ -D__GNUG__=3 -
D__DEPRECATED -D__EXCEPTIONS -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -
D__GNUC_PATCHLEVEL__=3 -D__GXX_ABI_VERSION=102 -Dsparc -Dsun -Dunix -D__svr4__ -
D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc__ -D__sun__ -D__unix__ -
D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc -D__sun -D__unix -
Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -
D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -
D__EXTENSIONS__ -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -
D__WCHAR_TYPE__=long int -D__WINT_TYPE__=long int -D__GCC_NEW_VARARGS__ -
Acpu=sparc -Amachine=sparc test_ct.cc test_ct.ii
GNU CPP version 3.2.3 (cpplib) (sparc ELF)
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/sparc-sun-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/c++/3.2.3
 /usr/local/include/c++/3.2.3/sparc-sun-solaris2.8
 /usr/local/include/c++/3.2.3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.3/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.3/cc1plus -fpreprocessed 
test_ct.ii -quiet -dumpbase test_ct.cc -version -o test_ct.s
GNU CPP version 3.2.3 (cpplib) (sparc ELF)
GNU C++ version 3.2.3 (sparc-sun-solaris2.8)
        compiled by GNU C version 3.2.3.

test_ct.cc: In constructor `Ct::Ct()':
test_ct.cc:6: class `Ct' does not have any field named `__ct'


my *.ii file looks like this:

# 1 "test_ct.cc"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "test_ct.cc"

class Ct {
public:
 int __ct;

 Ct() : __ct(0) {};
};

int main() {
  Ct ctobj;
}

-- 
           Summary: class member field name __ct
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Holger dot Ahl at web dot de
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14748


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]