On Mon, Aug 18, 2008 at 05:29:11PM -0700, Junio C Hamano wrote: > Haven't looked at the real declarations but if the decl are "extern" and > nobody refers to them, why should the resulting object file require them > to be defined anywhere? If the decl are not and in (fortran-ish) "common" > section, on the other hand, you shouldn't have to define them yourself > like this either. > > This sounds like a compiler bug to me. This was my first thought as well but after more inspection there are two things to consider: 1. I was not really precise enough in my description since I didn't spot that when I looked into the issue first: Actually there are references to these variables in static inline functions in cache.h. Thus there actually is a reference though one that will never be used since abspath.c (that includes cache.h) is not calling any of these functions. 2. Since these symbols turn out to be referenced though in dead code only I wouldn't call it a compiler bug. Obviously a smart compiler would do dead code elimination here but the fact that this compiler is not doing so is bad but not really a bug. Robert -- Robert Schiele Dipl.-Wirtsch.informatiker mailto:rschiele@xxxxxxxxx "Quidquid latine dictum sit, altum sonatur."
Attachment:
pgpmD6zEkODbj.pgp
Description: PGP signature