Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Problem with exotic constructor
Hi, I am having problems with the following constructor. Builds with all other compilers, not with DMC. Is this a bug in DMC? Regards, Johnny Willemsen class ACE_Export ACE_Multihomed_INET_Addr : public ACE_INET_Addr { public: ACE_Multihomed_INET_Addr(u_short port_number, const char primary_host_name[], int encode = 1, int address_family = AF_UNSPEC, const char *(secondary_host_names[]) = 0, size_t size = 0); Implementation: ACE_Multihomed_INET_Addr::ACE_Multihomed_INET_Addr(u_short port_number, const char host_name[], int encode, int address_family, const char *(secondary_host_names[]), size_t size) { Compile output: dmc -Ar -ND -g -Ic:\ace\latest\ace_wrappers -DACE_NO_INLINE -Ic:\ace\latest\ace_wrappers -DACE_HAS_ACE_TOKEN -DAC E_HAS_ACE_SVCCONF -DACE_BUILD_DLL -c -o .shobj/Multihomed_INET_Addr.o Multihomed_INET_Addr.cpp Multihomed_INET_Addr.cpp: const char *(secondary_host_names[]) = 0, ^ c:\ace\latest\ace_wrappers\ace/Multihomed_INET_Addr.h(53) : Error: parameter list is out of context const char *(secondary_host_names[]) = 0, ^ c:\ace\latest\ace_wrappers\ace/Multihomed_INET_Addr.h(96) : Error: parameter list is out of context const char *(secondary_host_names[]), ^ Multihomed_INET_Addr.cpp(30) : Error: ')' expected to close function parameter list with size_t size){ ^ Multihomed_INET_Addr.cpp(31) : Error: 'size_t' previously declared as something else It was declared as: unsigned It is now declared: int if (secondary_host_names && size){ ^ Multihomed_INET_Addr.cpp(37) : Error: '=', ';' or ',' expected Fatal error: too many errors --- errorlevel 1 make[1]: *** [.shobj/Multihomed_INET_Addr.o] Error 1 make[1]: Leaving directory `/cygdrive/c/ACE/latest/ACE_wrappers/ace' make: *** [ACE] Error 2 C:\ACE\latest\ACE_wrappers\ace> Oct 19 2004
Try omitting the secondary_host_names identifier in the declaration. "Johnny Willemsen" <jwillemsen remedy.nl> wrote in message news:cl3k0a$e6c$2 digitaldaemon.com...Hi, I am having problems with the following constructor. Builds with all other compilers, not with DMC. Is this a bug in DMC? Regards, Johnny Willemsen class ACE_Export ACE_Multihomed_INET_Addr : public ACE_INET_Addr { public: ACE_Multihomed_INET_Addr(u_short port_number, const char primary_host_name[], int encode = 1, int address_family = AF_UNSPEC, const char *(secondary_host_names[]) = 0, size_t size = 0); Implementation: ACE_Multihomed_INET_Addr::ACE_Multihomed_INET_Addr(u_short port_number, const char host_name[], int encode, int address_family, const char *(secondary_host_names[]), size_t size) { Compile output: Oct 19 2004
Hi Walter, The workaround you gave works, removing the identifier from the declaration resolves these errors, but this is not the way I like to go. I think this is a small bug in the DMC compiler, do you agree? Johnny "Walter" <newshound digitalmars.com> wrote in message news:cl4l65$1h5o$2 digitaldaemon.com...Try omitting the secondary_host_names identifier in the declaration. "Johnny Willemsen" <jwillemsen remedy.nl> wrote in message news:cl3k0a$e6c$2 digitaldaemon.com...Hi, I am having problems with the following constructor. Builds with all other compilers, not with DMC. Is this a bug in DMC? Regards, Johnny Willemsen class ACE_Export ACE_Multihomed_INET_Addr : public ACE_INET_Addr { public: ACE_Multihomed_INET_Addr(u_short port_number, const char primary_host_name[], int encode = 1, int address_family = AF_UNSPEC, const char *(secondary_host_names[]) = 0, size_t size = 0); Implementation: ACE_Multihomed_INET_Addr::ACE_Multihomed_INET_Addr(u_short port_number, const char host_name[], int encode, int address_family, const char *(secondary_host_names[]), size_t size) { Compile output: Oct 20 2004
"Johnny Willemsen" <jwillemsen remedy.nl> wrote in message news:cl63mg$d1$1 digitaldaemon.com...Hi Walter, The workaround you gave works, removing the identifier from the Oct 20 2004
Hi WalterI've added it to the bug list. Oct 20 2004
"Johnny Willemsen" <jwillemsen remedy.nl> wrote in message news:cl6dhr$auc$1 digitaldaemon.com...Hi WalterI've added it to the bug list. Oct 21 2004
Hi,Hi WalterI've added it to the bug list. Oct 21 2004
"Johnny Willemsen" <jwillemsen remedy.nl> wrote in message news:cl8roi$o2b$1 digitaldaemon.com...Hi,Hi WalterI've added it to the bug list. Oct 21 2004
|