mini_c is buggy

View: New views
3 Messages — Rating Filter:   Alert me  

mini_c is buggy

by varnie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hello all.

it seems there's a little bug in the mini_c sources on this moment (i'm using 57278 spirit revision). the bug is it doesn't recognize keywords and identifiers properly (i guess so). for example, "1.mini" gives us the follow example of program:
///////////////////////////////
/* my first mini program */

int pow2(n)
{
    int a = 2;
    int i = 1;
    while (i < n)
    {
        a = a * 2;
        i = i + 1;
    }
    return a;
}

int main()
{
    return pow2(10);
}
///////////////////////////////

if we hack it a little, say, put "inta = 2;" instead of "int a = 2;", it will properly be compiled (surprise!) and print "Result: 1024". if i'm not mistaken, it must NOT be compilable at all and the compiler should  print an error and stop.

any ideas?

Re: mini_c is is a buggy

by Joel de Guzman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

varnie wrote:
> hello all.
>
> it seems there's a little bug in the mini_c sources on this moment (i'm
> using 57278 spirit revision). the bug is it doesn't recognize keywords and

Fixed. Thanks for spotting.

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net
http://www.facebook.com/djowel

Meet me at BoostCon
http://www.boostcon.com/home
http://www.facebook.com/boostcon



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Spirit-general mailing list
Spirit-general@...
https://lists.sourceforge.net/lists/listinfo/spirit-general

Re: mini_c is is a buggy

by varnie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

good work, thanks;)