ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/14/01:21:08

To: Steve McConnel <steve AT acadcomp DOT sil DOT org>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: bug in gcc (either cc1 or as or ld)
Date: Tue, 14 Feb 95 07:57:36 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>

> 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

Seems like a genuine GCC (or Binutils) bug to me.  I would suggest
reporting this to the appropriate GNU Newsgroup.

Aaron Ucko (ucko AT vax1 DOT rockhurst DOT edu) writes:
> [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
> ...
> It probably isn't bad practice to assume there's only one namespace
> anyway unless you have a really good reason not to...

It could be a linker bug, but it seems to only pop up when compiling
with -g.  And ANSI C clearly says that structures and functions are
in separate namespaces, so it *is* a bug, even if good practice from
old times to eternity is to avoid different things called by same
names.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019