Merge remote-tracking branch 'origin/master' - scc - simple c99 compiler
 (HTM) git clone git://git.simple-cc.org/scc
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 027d5ed74d0e1195669b4f7d7a1531a82f3441e0
 (DIR) parent 23beeedce6a5a56ce4a12dbb96178fc165e913b4
 (HTM) Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
       Date:   Fri, 18 Apr 2025 22:55:07 +0200
       
       Merge remote-tracking branch 'origin/master'
       
       Diffstat:
         M src/cmd/scc-cc/cc2/swtch.c          |       3 ++-
         M tests/libc/execute/0044-wcslen.c    |       2 +-
         M tests/libc/execute/0048-wcscpy.c    |       4 ++--
         M tests/libc/execute/0057-wcschr.c    |       2 +-
         M tests/libc/execute/0058-wcsrchr.c   |       2 +-
       
       5 files changed, 7 insertions(+), 6 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/scc-cc/cc2/swtch.c b/src/cmd/scc-cc/cc2/swtch.c
       @@ -5,7 +5,7 @@
        
        #include "cc2.h"
        
       -static Swtch *list;
       +static Swtch *list = NULL;
        
        static Node *
        swtch_if(Node *np)
       @@ -147,4 +147,5 @@ cleanswtch(void)
                        }
                        free(p);
                }
       +        list = NULL;
        }
 (DIR) diff --git a/tests/libc/execute/0044-wcslen.c b/tests/libc/execute/0044-wcslen.c
       @@ -1,6 +1,6 @@
        #include <assert.h>
        #include <stdio.h>
       -#include <stdlib.h>
       +#include <wchar.h>
        
        /*
        output:
 (DIR) diff --git a/tests/libc/execute/0048-wcscpy.c b/tests/libc/execute/0048-wcscpy.c
       @@ -21,9 +21,9 @@ main()
                assert(s == buf);
                assert(!wcscmp(s, test));
        
       -        s = wcscpy(buf, "");
       +        s = wcscpy(buf, L"");
                assert(s == buf);
       -        assert(!wcscmp(s, ""));
       +        assert(!wcscmp(s, L""));
        
                puts("done");
        
 (DIR) diff --git a/tests/libc/execute/0057-wcschr.c b/tests/libc/execute/0057-wcschr.c
       @@ -35,7 +35,7 @@ main()
                p = wcschr(buf, 'h');
                assert(p == NULL);
        
       -        p = wcschr("", 'a');
       +        p = wcschr(L"", 'a');
                assert(p == NULL);
        
                puts("done");
 (DIR) diff --git a/tests/libc/execute/0058-wcsrchr.c b/tests/libc/execute/0058-wcsrchr.c
       @@ -18,7 +18,7 @@ main()
                assert(wcsrchr(buf, '1') == buf+5);
                assert(wcsrchr(buf, '0') == buf);
                assert(wcsrchr(buf, '3') == buf+3);
       -        assert(wcsrchr("",  '0') == NULL);
       +        assert(wcsrchr(L"",  '0') == NULL);
                assert(wcsrchr(buf, 'a')  == NULL);
                assert(wcsrchr(buf, 0) == buf+6);
                puts("done");