[hackers] [scc] Mark as extern functions without storage class || Roberto E. Vargas Caballero
commit 41765c098e17137abaa8f9e65858b4d03c99db47
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sat Jan 9 21:28:19 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sat Jan 9 21:28:19 2016 +0100
Mark as extern functions without storage class
When a function is defined the first time, if there is no
storage class then it is a symbol with extern linkage.
diff --git a/cc1/decl.c b/cc1/decl.c
index 0fd0dc8..2923838 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -703,7 +703,10 @@ identifier(struct decl *dcl)
flags |= (sclass == REGISTER) ? ISREGISTER : ISAUTO;
break;
case NOSCLASS:
- flags |= (curctx == GLOBALCTX) ? ISGLOBAL : ISAUTO;
+ if (tp->op == FTN)
+ flags |= ISEXTERN;
+ else
+ flags |= (curctx == GLOBALCTX) ? ISGLOBAL : ISAUTO;
break;
case EXTERN:
flags |= ISEXTERN;
Received on Sat Jan 09 2016 - 21:33:36 CET
This archive was generated by hypermail 2.3.0
: Sat Jan 09 2016 - 21:36:25 CET