www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - can't use stdarg with debug build on linux

reply Ben Hinkle <bhinkle4 juno.com> writes:
import std.stdarg;

void foo(...) {
  int tmp = va_arg!(int)(_argptr);
  printf("%d\n",tmp);
}

int main() {
  foo(10);
  return 0;
}

compiling with the default flags (or with -g)
/usr/bin/ld: Warning: size of symbol `_D3std6stdarg8va_arg_i6va_argFKPvZi'
changed from 18 to 21 in /usr/lib/libphobos.a(format.o)

It only compiles if I pass -O to the compiler. I think win32 is ok.

-Ben
Sep 23 2004
parent "Walter" <newshound digitalmars.com> writes:
"Ben Hinkle" <bhinkle4 juno.com> wrote in message
news:ciut7g$1kv5$1 digitaldaemon.com...
 import std.stdarg;

 void foo(...) {
   int tmp = va_arg!(int)(_argptr);
   printf("%d\n",tmp);
 }

 int main() {
   foo(10);
   return 0;
 }

 compiling with the default flags (or with -g)
 /usr/bin/ld: Warning: size of symbol `_D3std6stdarg8va_arg_i6va_argFKPvZi'
 changed from 18 to 21 in /usr/lib/libphobos.a(format.o)

 It only compiles if I pass -O to the compiler. I think win32 is ok.
The warning shouldn't stop the linking.
Sep 30 2004