work on local extern declarations
commit85690480313c4a8b0efeb3761ee68456cfe57840
authorgrischka <grischka>
Sat, 22 Jun 2019 02:00:52 +0000 (22 04:00 +0200)
committergrischka <grischka>
Mon, 24 Jun 2019 09:38:32 +0000 (24 11:38 +0200)
treef525e8ee167d14f564ce78fbc970722fdea4d02d
parentcbbba01b463066593ce1f524f4fbda49331b7488
work on local extern declarations

Example:
    int a = 1;
    void f(void)
    {
        int a = 2;
        {
             extern int a; // = 1 !!
             ....

To get this (more) correctly there is a new function to copy
syms between local to global stacks.

Also, this patch changes the meaning of VT_EXTERN back
to the simpler and IMO more useful notion of
    DECLARED but not (yet) DEFINED.
and that for both variables and functions.  That is, VT_EXTERN
in tcc doesn't have to do with the keyword 'extern' necessarily.

Also this patch does allow
    int x[];
as alias for
    extern int x[];
(as do gcc and msvc)
tccasm.c
tccgen.c
tests/tests2/60_errors_and_warnings.c
tests/tests2/60_errors_and_warnings.expect