[hackers] [scc] [tests] Update scc-tests.lst after cd855 || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Sat, 18 Feb 2017 12:19:27 +0100 (CET)

commit 5e4fb6e5ad284273341f9056c927a3910b01adcf
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sat Feb 18 12:18:01 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sat Feb 18 12:18:01 2017 +0100

    [tests] Update scc-tests.lst after cd855

diff --git a/cc1/decl.c b/cc1/decl.c
index 5cc2dc2..de4d92b 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -17,7 +17,7 @@ static char sccsid[] = "@(#) ./cc1/decl.c";
 
 
 struct declarators {
- unsigned char nr;
+ unsigned char nr, ns;
         struct declarator {
                 unsigned char op;
                 TINT nelem;
_AT_@ -272,10 +272,13 @@ static void
 fundcl(struct declarators *dp)
 {
         Type *types[NR_FUNPARAM], type;
- Symbol *syms[NR_FUNPARAM+1], **pars;
+ Symbol *sym, *syms[NR_FUNPARAM+1], **pars;
         int k_r, ntypes, nsyms;
         size_t size;
 
+ sym = dp->d[0].sym;
+ if ((sym->flags&SDECLARED) == 0)
+ install(dp->ns, sym);
         pushctx();
         expect('(');
         type.n.elem = 0;
_AT_@ -748,14 +751,23 @@ identifier(struct decl *dcl)
                 errorp("declared variable '%s' of incomplete type", name);
         }
 
- sym = install(NS_IDEN, sym);
- if (tp->op == FTN) {
+ if (tp->op != FTN) {
+ sym = install(NS_IDEN, sym);
+ } else {
                 if (sclass == NOSCLASS)
                         sclass = EXTERN;
                 if (!strcmp(name, "main") && tp->type != inttype) {
                         errorp("main shall be defined with a return type of int");
                         errorp("please contact __20h__ on irc.freenode.net (#bitreich-en) via IRC");
                 }
+ /*
+ * function identifiers are installed in fundcl() because
+ * we have to add a context for the parameters, and if we
+ * delay the install until here then we will install the
+ * symbol of the function after the parameters.
+ */
+ if ((sym->flags&SEMITTED) != 0)
+ sym = NULL;
         }
 
         if (sym == NULL) {
_AT_@ -817,6 +829,7 @@ dodcl(int rep, Symbol *(*fun)(struct decl *), unsigned ns, Type *parent)
 
         do {
                 stack.nr = 0;
+ stack.ns = ns;
                 dcl.pars = NULL;
                 dcl.type = base;
 
_AT_@ -852,7 +865,8 @@ decl(void)
          * against GLOBALCTX+1
          */
         if (curctx != GLOBALCTX+1 || yytoken == ';') {
- emit(ODECL, sym);
+ if (!(sym->flags & SEMITTED))
+ emit(ODECL, sym);
                 /*
                  * avoid non used warnings in prototypes
                  */
diff --git a/tests/execute/scc-tests.lst b/tests/execute/scc-tests.lst
index 974bd4f..e2938b9 100644
--- a/tests/execute/scc-tests.lst
+++ b/tests/execute/scc-tests.lst
_AT_@ -94,7 +94,7 @@
 0099-tentative.c
 0102-bug.c
 0103-voidparm.c
-0104-voidparm.c
+0104-qbebug.c
 0105-shl.c
 0106-ppcast.c
 0107-bnot.c
Received on Sat Feb 18 2017 - 12:19:27 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 18 2017 - 12:24:24 CET