c++ - Problem with exotic constructor
- Johnny Willemsen (57/57) Oct 19 2004 Hi,
- Walter (7/63) Oct 19 2004 Try omitting the secondary_host_names identifier in the declaration.
- Johnny Willemsen (7/86) Oct 20 2004 Hi Walter,
- Walter (5/9) Oct 20 2004 declaration
- Johnny Willemsen (3/5) Oct 20 2004 Thanks, I will then wait for a newer version
- Walter (3/7) Oct 21 2004 Why not just use the workaround and move on?
- Johnny Willemsen (5/12) Oct 21 2004 The issue is that when I just remove it in ACE the doxygen documentation...
- Walter (4/17) Oct 21 2004 will
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: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:parameterlist is out of context const char *(secondary_host_names[]) = 0, ^ c:\ace\latest\ace_wrappers\ace/Multihomed_INET_Addr.h(96) : Error:parameterlist 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
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: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:parameterlist is out of context const char *(secondary_host_names[]) = 0, ^ c:\ace\latest\ace_wrappers\ace/Multihomed_INET_Addr.h(96) : Error:parameterlist 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 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 thedeclarationresolves these errors, but this is not the way I like to go. I think thisisa small bug in the DMC compiler, do you agree?I've added it to the bug list.
Oct 20 2004
Hi WalterI've added it to the bug list.Thanks, I will then wait for a newer version Johnny
Oct 20 2004
"Johnny Willemsen" <jwillemsen remedy.nl> wrote in message news:cl6dhr$auc$1 digitaldaemon.com...Hi WalterWhy not just use the workaround and move on?I've added it to the bug list.Thanks, I will then wait for a newer version
Oct 21 2004
Hi,The issue is that when I just remove it in ACE the doxygen documentation isn't generated completely and I don't want to zap this just for DMC. I will continue porting and change this on the build system, but not in cvs. JohnnyHi WalterWhy not just use the workaround and move on?I've added it to the bug list.Thanks, I will then wait for a newer version
Oct 21 2004
"Johnny Willemsen" <jwillemsen remedy.nl> wrote in message news:cl8roi$o2b$1 digitaldaemon.com...Hi,willThe issue is that when I just remove it in ACE the doxygen documentation isn't generated completely and I don't want to zap this just for DMC. IHi WalterWhy not just use the workaround and move on?I've added it to the bug list.Thanks, I will then wait for a newer versioncontinue porting and change this on the build system, but not in cvs.You can wrap the identifier with #ifndef __DMC__ ... #endif.
Oct 21 2004