Mail Archives: djgpp-workers/1998/01/22/20:04:20
> 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 -