Mail Archives: djgpp/1995/02/13/17:01:18
>While trying to compile MAWK 1.1.4 with DJGPP 1.12m4 (gcc 2.6.3), I
>encountered a rather strange bug during the link step. I don't know
>whether to blame as or ld for this one (or could it be cc1?). A
>function that came at the beginning of the file preceding a struct
>definition was not recognized by ld if the -g option was used with gcc
>to compile the file. This bug is demonstrated by the four tiny files
>attached below (makefile, bugged.c, fixed.c, and x.c). For what it's
>worth, the program compiles fine on SunOS 4.1.3_U1 with gcc 2.6.2.
>That's the only other implementation of gcc that I have available for
>testing.
[conflict between hash() and struct hash]
This is probably related to the classic linker problem where the
linker fails to warn you if you have a struct with the same name
as a function, but there shouldn't be a conflict here, so it seems
to be a binutils bug. What version of the binutils does your
Sun run?
It probably isn't bad practice to assume there's only one namespace
anyway unless you have a really good reason not to...
--- Aaron Ucko (ucko AT vax1 DOT rockhurst DOT edu; finger for PGP public key) -=- httyp!
-=*=-Just because you're paranoid doesn't mean they aren't out to get you.-=*=-
Geek code 2.1 [finger hayden AT vax1 DOT mankato DOT msus DOT edu for explanation]:
GCS/M/S d(-) H s g+ p? !au a-- w+ v+ C++(+++)>++++ UL++(-)(S+)>++++ P++
L+(++) 3(-) E-(----) !N>++ K- W-(---) M-(--) V(--) po-(--) Y+(++) t(+) !5 j R
G tv--(-) b+++ !D(--) B--(---) e>++++(*) u++(@) h!() f(+) r-(--)>+++ n+(-) y?
- Raw text -