ref: 41765c098e17137abaa8f9e65858b4d03c99db47
parent: 0e9ab695770b9c5501b56fb712527e1ed780950d
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat Jan 9 16:28:19 EST 2016
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.
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -703,7 +703,10 @@
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;