f



ACE Bug

bash-4.2$ clang -Weverything -Wno-c99-extensions -Wno-documentation-depreca=
ted-sync -Wno-documentation -Wno-padded -Wno-documentation-unknown-command =
-Wno-extra-semi -Wno-sign-conversion -Wno-c++98-compat-pedantic -Wno-missin=
g-noreturn -Wno-disabled-macro-expansion -Wno-shorten-64-to-32 -std=3Dc++11=
 -Wno-shadow -Wno-deprecated -Wno-unreachable-code -I <>/include/ test.cpp =
<>/lib/libACE.so -lstdc++ -lsctp
test.cpp:35:1: warning: no previous prototype for function '_gobble_Test' [=
-Wmissing-prototypes]
ACE_SVC_FACTORY_DEFINE (Test)
^
<>/include/ace/Global_Macros.h:804:36: note: expanded from macro
      'ACE_SVC_FACTORY_DEFINE'
# define ACE_SVC_FACTORY_DEFINE(X) ACE_FACTORY_DEFINE (ACE_Svc, X)
                                   ^
<>/include/ace/Global_Macros.h:711:6: note: expanded from macro
      'ACE_FACTORY_DEFINE'
void ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_=
CLASS) (void *p) { \
     ^
<>/include/ace/Global_Macros.h:652:77: note: expanded from macro
      'ACE_MAKE_SVC_CONFIG_GOBBLER_NAME'
#define ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(VERSIONED_NAMESPACE,SERVICE_CLASS)=
 ACE_MAKE_SVC_CONFIG_FUNCTION_NAME(_gobble,VERSIONED_NAMESPACE,SER...
                                                                           =
 ^
<>/include/ace/Global_Macros.h:648:86: note: expanded from macro
      'ACE_MAKE_SVC_CONFIG_FUNCTION_NAME'
# define ACE_MAKE_SVC_CONFIG_FUNCTION_NAME(PREFIX,VERSIONED_NAMESPACE,SERVI=
CE_CLASS) PREFIX ## _ ## SERVICE_CLASS
                                                                           =
          ^
<scratch space>:147:1: note: expanded from here
_gobble_Test


cat test.cpp

#include "ace/Service_Config.h"
#include "ace/Service_Object.h"
#include "ace/Svc_Conf.h"
#include "ace/svc_export.h"

class Test : public ACE_Service_Object
{
public:
  int init (int, char *[]);

};

int Test::init (int, char *[])
{
  return 0;
}

int main(int, char *[])
{
  Test test;
}

ACE_STATIC_SVC_DECLARE(Test)

ACE_SVC_FACTORY_DECLARE(Test)

// ------------------------------------------------------------------------
// THE FOLLOWING PROTOTYPE IS MISSING FROM THE ACE_***_DECLARE MACROS ABOVE
// ------------------------------------------------------------------------
// extern "C" void  ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(ACE_Svc, Test)(void *)=
;
//


ACE_SVC_FACTORY_DEFINE (Test)

ACE_STATIC_SVC_DEFINE (Test,
                       "Test", ACE_SVC_OBJ_T,
                       &ACE_SVC_NAME (Test),
                       ACE_Service_Type::DELETE_THIS |
                       ACE_Service_Type::DELETE_OBJ, 0)
0
garynicholls
9/23/2016 9:43:20 AM
comp.soft-sys.ace 20326 articles. 1 followers. marlow.andrew (167) is leader. Post Follow

0 Replies
770 Views

Similar Articles

[PageSpeed] 51

Reply: