[ace-users] Pointer conversion

Johnny Willemsen jwillemsen at remedy.nl
Mon Jun 25 12:47:51 CDT 2007


HI,

Thanks for using the PRF form, this is already fixed and will be in the
upcoming x.5.9 release of ACE. The fix is using reinterpret_cast, we don't
want to use c-style casts.

Regards,

Johnny Willemsen
Remedy IT
Postbus 101
2650 AC  Berkel en Rodenrijs
The Netherlands
www.theaceorb.nl / www.remedy.nl  

*** Integrated compile and test statistics see
http://scoreboard.theaceorb.nl ***
*** Commercial service and support for ACE/TAO/CIAO             ***
*** See http://www.theaceorb.nl/en/support.html                 *** 

>     ACE VERSION: 5.5.8
> 
>     HOST MACHINE and OPERATING SYSTEM:
> Linux xxx 2.6.11-ivlsmp #1 SMP Wed Jun 29 18:06:23 EEST 2005 i686 i686
> i386 GNU/Linux
> gcc (GCC) 3.3.3 20040412 (ASPLinux 3.3.3-7)
> 
>     TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
>     COMPILER NAME AND VERSION (AND PATCHLEVEL):
> 
>     THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
>     specific file, simply state which one]:
> #ifndef IVL_ACE_CONFIG_H
> #define IVL_ACE_CONFIG_H
> 
> #if defined(DOXYGEN)
> #   include <ace/config-doxygen.h>
> #elif defined(_WIN32)
> #   include <ace/config-win32.h>
> #elif defined(__linux__)
> #   include <ace/config-linux.h>
> #elif defined(__sun__)
> //#   include <ace/config-sunos5.7.h>
> #   include <ace/config-sunos5.8.h>
> //#   include <ace/config-sunos5.9.h>
> //#   include <ace/config-sunos5.10.h>
> #else
> #   error "Unknown platform. Edit ace/config.h file to specify used
> platform."
> #endif
> 
> #endif // IVL_ACE_CONFIG_H
> 
>     THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
>     use a link to a platform-specific file, simply state which one
>     (unless this isn't used in this case, e.g., with Microsoft Visual
>     C++)]:
>         platform_linux.GNU
> 
>     CONTENTS OF 
> $ACE_ROOT/bin/MakeProjectCreator/config/default.features
>     (used by MPC when you generate your own makefiles):
> dummy_label      = 0
> acexml           = 1
> zlib             = 1
> uses_wchar       = 0
> expat            = 1
> regex            = 1
> png              = 1
> jpeg             = 1
> tiff             = 1
> ssl              = 1
> qos              = 1
> sctp             = 1
> cidl             = 1
> negotiate_codesets=1
> gui              = 1
> wxWindows        = 1
> boost            = 1
> x11              = 1
> xt               = 0
> tk               = 0
> fl               = 0
> qt               = 0
> gl               = 1
> gtk              = 1
> ace_qtreactor    = 0
> ace_xtreactor    = 0
> ace_tkreactor    = 0
> ace_flreactor    = 0
> tao_qtresource   = 0
> tao_xtresource   = 0
> tao_tkresource   = 0
> tao_flresource   = 0
> 
>     AREA/CLASS/EXAMPLE AFFECTED:
> [What example failed?  What module failed to compile?]
> 
>     DOES THE PROBLEM AFFECT:
>         COMPILATION? YES
>         LINKING? NO
>         EXECUTION? NO
>         OTHER (please specify)?
> [Please indicate whether ACE, your application, or both are affected.]
> 
>     SYNOPSIS:
> Compilation error
> 
>     DESCRIPTION:
> g++ -W -Wall -Wpointer-arith -g -pipe   -pipe -D_REENTRANT
> -DACE_HAS_AIO_CALLS -D_GNU_SOURCE
> -I/home/zpf/WORK/XRTDB/trunk/ACE_wrappers -DACE_HAS_EXCEPTIONS
> -D__ACE_INLINE__ -I../../ACE_wrappers -DACE_HAS_XML_SVC_CONF
> -DACE_BUILD_DLL  -c -fPIC -o .shobj/Service_Gestalt.o
> Service_Gestalt.cpp
> Service_Gestalt.cpp: In member function `ACE_XML_Svc_Conf*
>    ACE_Service_Gestalt::get_xml_svc_conf(ACE_DLL&)':
> Service_Gestalt.cpp:856: error: ISO C++ forbids casting between
>    pointer-to-function and pointer-to-object
> 
>     REPEAT BY:
> [What you did to get the error; include test program or session
> transcript if at all possible.  ]
> 
>     SAMPLE FIX/WORKAROUND:
> Using C-style conversion fixes the problem:
>   ACE_XML_Svc_Conf::Factory factory =
>     (ACE_XML_Svc_Conf::Factory) (foo);
> 
> -- 
> Pavel Zaichenko
> Chief Expert,
> IVL Equipment & Engineering, Ltd.
> Phone: +380(44)451-87-33
> mailto:zpf at ivl.ua
> mailto:zpf at ivl.kiev.ua
> http://www.ivl.ua/
> 



More information about the Ace-users mailing list