cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/01/22/20:04:20

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199801230103.AA060247419@typhoon.rose.hp.com>
Subject: Re: No 'extern' in standard include files
To: eldredge AT ap DOT net (Nate Eldredge)
Date: Thu, 22 Jan 1998 17:03:38 PST
Cc: andrewc AT rosemail DOT rose DOT hp DOT com, djgpp-workers AT delorie DOT com
In-Reply-To: <199801230001.QAA23021@adit.ap.net>; from "Nate Eldredge" at Jan 22, 98 4:01 pm
Reply-To: andrewc AT rosemail DOT rose DOT hp DOT com

> K&R I (the only version I have handy) section 8.1 says:
> 
> If the sc-specifier [storage class specifier, i.e. `static', `register',
> `extern'] is missing from a declaration, it is taken to be `auto' inside a
> function, `extern' outside.
Hmm - 2nd edition (A8.1) has 

'At most one storage class specifier may be given in a declaration.  If none
is given, these rules are used: objects declared inside a function 
are taken to be auto; functions declared within a function are taken to be
extern; objects adn functions declared outside a function are taken to be 
static, eith external linkage.'

I must confess the last part loses me a little.
 
> This whole thing seems odd. Aren't there already any GCC systems on which
> the assembler demands extern declarations?
Grep'ing through the config directories I don't see many.  
GAS doesn't, nor any sys5 or BSD derivitives apparantly.

After thinking about it a little more I think my first choice of 
changing nasm default behavior is better.  I will make it so 
that nasm has a warning (not error) for implicits, and that if
nasm detects the gcc2-compiled symbol it will turn this warning 
off.  I don't want to have 1000's of externs go into each assembly
file when they really aren't needed.


Andy


--
_______       ___________________________________________________________
           /                       	                  Andrew Crabtree 
          /                          	      Workgroup Networks Division 
         ____       ___  /                                Hewlett-Packard 
        /     /    /    /   		                    Roseville, CA 
     __/   __/    _____/                                     916/785-1675
                 /                           andrewc AT rosemail DOT rose DOT hp DOT com
___________   __/   _____________________________________________________

- Raw text -


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