tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] tcc array bounds error?


From: Somchai Smythe
Subject: [Tinycc-devel] tcc array bounds error?
Date: Wed, 5 Dec 2012 16:24:51 +0700

Hello,

    From the snapshot of tcc mob I downloaded today, I see this when I compile:

clang -o x86_64-gen.o -c x86_64-gen.c -DTCC_TARGET_X86_64     -O3 -m64
-march=x86-64 -mtune=generic -pipe -fno-strict-aliasing
-Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -m64
tccasm.c:541:72: warning: data argument not used by format string
[-Wformat-extra-args]
            sprintf(sname, (n?".%s%d":".%s"), get_tok_str(tok1, NULL), n);
                                      ~~~~~                            ^
tccpp.c:918:22: warning: array index 2 is past the end of the array
(which contains 2 elements) [-Warray-bounds]
        str[len++] = cv->tab[2];
                     ^       ~
./tcc.h:284:5: note: array 'tab' declared here
    int tab[2];
    ^
tccpp.c:919:22: warning: array index 3 is past the end of the array
(which contains 2 elements) [-Warray-bounds]
        str[len++] = cv->tab[3];
                     ^       ~
./tcc.h:284:5: note: array 'tab' declared here
    int tab[2];
    ^
tccgen.c:740:17: warning: array index 2 is past the end of the array
(which contains 2 elements) [-Warray-bounds]
                vtop->c.tab[2] &= 0xffff;
                ^           ~
./tcc.h:284:5: note: array 'tab' declared here
    int tab[2];
    ^
tccgen.c:742:17: warning: array index 3 is past the end of the array
(which contains 2 elements) [-Warray-bounds]
                vtop->c.tab[3] = 0;
                ^           ~
./tcc.h:284:5: note: array 'tab' declared here
    int tab[2];
    ^

Should I be worried, or is this expected?  The self-tests passed anyway.

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]