Mail Archives: djgpp/1999/05/11/02:34:01
On Mon, 10 May 1999, DaXy_II wrote:
> The problem with the source is, i don't know what piece gives the error!
Is it too much to ask that you do a bit of digging into your sources and
try to find out? I mean, it's one thing to ask for a free help, but
letting us wade through your sources is something else...
It shouldn't be too hard to selectively disable parts of the source with
something like "#if 0 ... #endif", zero in on the offending part and only
post that part, as plain text, not as an encoded binary archive. Please
try to make this small effort in the future.
> >> f:/djgpp/tmp\ccbyi1sj: Assembler messages:
> >> f:/djgpp/tmp\ccbyi1sj:194: Fatal error: Symbol i already defined.
The offending code is the definition of `memcpy' in the header string.h:
it uses a label i, but since the function is declared `inline', GCC puts a
copy of this definition, and thus several instances of the same label i,
in the code, and the assembler won't have that.
You need to use local labels in inline functions (actually, i is not used
anywhere as far as I could see, so it could be simply removed).
Btw, I hope there's some point in defining your own versions of memcpy,
memmove, inp, out, and the rest of the functions in string.h and pio.h,
because DJGPP already has them all, and they are already written in
assembly.
Also, you need to know that GCC will sometimes emit code that bypasses
the function call for several functions, like memcpy, and instead expands
the call into its own inline assembly; use -no-builtins (I think) to
disable this.
- Raw text -