Wish: Variable Not Used Warning
    Bruce Adams 
    tortoise_74 at yeah.who.co.uk
       
    Mon Jul 14 13:51:16 PDT 2008
    
    
  
On Thu, 10 Jul 2008 21:32:23 +0100, Markus Koskimies  
<markus at reaaliaika.net> wrote:
> About those unused imports (mentioned by Robert) - I think that the
> compiler could stop also with those. I was just coming to that subject :D
Unused symbols must not be a warning in the case of shared libraries.
They must be errors when called from functions in a real program as this  
is most
likely a bug and is what we have come to expect from C programs.
For unreachable code I suppose it doesn't matter so much. I would still be  
inclined
to err on the side of caution and require a stub rather than trying to be  
clever on
the sly (which might go wrong).
It is of course reasonable to have symbols that are resolved at runtime by  
a dynamic
linker. These probably should be annotated specially in the code. But  
please for gawd's
sake not __declspec(dllimport) because that's just sick and twisted.
Regards,
Bruce.
    
    
More information about the Digitalmars-d
mailing list