Re: const-correct argv in CORBA_ORB_init()




On 23/02/2009, at 17.19, Michael Haubenwallner wrote:

Hi,

we're using ORBit2 in our application, which now is completely built as
C++. After switching to more recent gcc, we're encouraged to get more
const-correctness into our code.

Compared to how similar things are specified[1], CORBA_ORB_init() should be declared to get 'char * const * argv' IMHO, like the attached patch.

But the standard says that CORBA_ORB_init() is declared as:

extern CORBA_ORB
CORBA_ORB_init(int *argc,
               char **argv,
               CORBA_ORBid orb_identifier,
               CORBA_Environment *env);

So unfortunately it really doesn't matter much whether you're correct or not as the standard trumps any conceivable argument.

Best,
  jules



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