[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RFC, problem with g++4


 /usr/include/sys/socket.h has this:

/* The following constants should be used for the second parameter of
   `shutdown'.  */
  SHUT_RD = 0,          /* No more receptions.  */
#define SHUT_RD         SHUT_RD
  SHUT_WR,              /* No more transmissions.  */
#define SHUT_WR         SHUT_WR
  SHUT_RDWR             /* No more receptions or transmissions.  */
#define SHUT_RDWR       SHUT_RDWR

 which results into error when compiling sfs with g++ 4.x:

rexchan.C: In member function 'virtual void unixfd::data(svccb*)':
rexchan.C:254: error: '<anonymous enum>' is/uses anonymous type
rexchan.C:254: error:   trying to instantiate 'template<class C, class
R, class B1, class A1, class AA1> refcounted<callback_c_1_1<C*, C, R,
B1, A1>, scalar>* wrap(C*, R (C::*)(A1, B1), const AA1&)'
rexchan.C:254: error: no matching function for call to 'wrap(unixfd*
const, void (unixfd::*)(int, int), <anonymous enum>)'

 rexchan.C:254 is:

paios_out->setwcb (wrap (this, &unixfd::update_connstate, SHUT_WR));

 Now, should libc name that enumeration, g++ generate warning instead
of error or moon be mined for cheese snacks?


Reply to: