ORBit 2.4.3 generates invalid C89 *-stubs.c files



While building ORBit 2.4.3 on HP-UX 11.00, orbit-idl-2 generated
src/services/name/CosNaming-stubs.c. The HP C compiler generated the
following error:
  cc -Ae -DHAVE_CONFIG_H -I. -I. -I../../.. -I. -I../../../include
  -I../../../include -DORBIT2_INTERNAL_API -DG_DISABLE_DEPRECATED
  -I/opt/TWWfsw/libglib20/include/glib-2.0
  -I/opt/TWWfsw/libglib20/lib/glib-2.0/include
  -I/opt/TWWfsw/gnome202/include -I/opt/TWWfsw/libidl08/include
  -I/opt/TWWfsw/libpopt17/include +O2 -z +ESlit +Onofltacc +DAportable
  +Oentrysched +Odataprefetch +Onolimit -c CosNaming-stubs.c  +Z -DPIC
  -o .libs/CosNaming-stubs.lo
  cpp: "/usr/include/sys/param.h", line 420: warning 2001: Redefinition of macro MIN.
  cpp: "/usr/include/sys/param.h", line 421: warning 2001: Redefinition of macro MAX.
  cc: "../../../include/orbit/GIOP/giop-endian.h", line 16: warning 562:
  Redeclaration of "giop_byteswap" with a different storage class
  specifier: "giop_byteswap" will have internal linkage.
  cc: "CosNaming-stubs.c", line 19: error 1521: Incorrect initialization.
  cc: "CosNaming-stubs.c", line 33: error 1521: Incorrect initialization.
  cc: "CosNaming-stubs.c", line 47: error 1521: Incorrect initialization.
  cc: "CosNaming-stubs.c", line 61: error 1521: Incorrect initialization.
  cc: "CosNaming-stubs.c", line 76: error 1521: Incorrect initialization.
  ...

The problem is the following in CosNaming-stubs.c:
  ...
   } else { /* remote marshal */
  gpointer _args[] = { 
  (gpointer)n, (gpointer)&obj  };ORBit_small_invoke_stub_n (_obj,
  &CosNaming_Namin
  gContext__iinterface.methods, 0, NULL, _args, NULL, ev);

The Sun compiler warns on the above with:
  ...
  "CosNaming-stubs.c", line 19: warning: non-constant initializer: op "NAME"
  "CosNaming-stubs.c", line 33: warning: non-constant initializer: op "NAME"
  "CosNaming-stubs.c", line 47: warning: non-constant initializer: op "NAME"
  "CosNaming-stubs.c", line 61: warning: non-constant initializer: op "NAME"
  "CosNaming-stubs.c", line 76: warning: non-constant initializer: op "NAME"
  "CosNaming-stubs.c", line 91: warning: non-constant initializer: op "NAME"
  "CosNaming-stubs.c", line 121: warning: non-constant initializer: op "NAME"

GCC 3.2 with -ansi -pedantic warns with:
  ...
  CosNaming-stubs.c: In function `CosNaming_NamingContext_bind':
  CosNaming-stubs.c:19: warning: initializer element is not computable at load time
  CosNaming-stubs.c:19: warning: initializer element is not computable at load time
  CosNaming-stubs.c: In function `CosNaming_NamingContext_rebind':
  CosNaming-stubs.c:33: warning: initializer element is not computable at load time
  CosNaming-stubs.c:33: warning: initializer element is not computable at load time
  CosNaming-stubs.c: In function `CosNaming_NamingContext_bind_context':
  CosNaming-stubs.c:47: warning: initializer element is not computable at load time
  CosNaming-stubs.c:47: warning: initializer element is not computable at load time
  CosNaming-stubs.c: In function
  `CosNaming_NamingContext_rebind_context':
  CosNaming-stubs.c:61: warning: initializer element is not computable at load time
  CosNaming-stubs.c:61: warning: initializer element is not computable at load time

-- 
albert chin (china@thewrittenword.com)



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