Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-dim-access to a single-dim array with "incorrect" C Code (not caught with BCC error message) #650

Open
GWRon opened this issue Jan 16, 2024 · 0 comments

Comments

@GWRon
Copy link
Contributor

GWRon commented Jan 16, 2024

Coming from #649:

SuperStrict
framework brl.standardio

Local arr:Int[10]
arr[0,5] = 10
print arr[5]

Results in:

Building untitled1
[  9%] Processing:untitled1.bmx
[ 91%] Compiling:untitled1.bmx.console.release.linux.x64.c
/BlitzMaxNG/tmp/.bmx/untitled1.bmx.console.release.linux.x64.c: In function �_bb_main�:
/BlitzMaxNG/tmp/.bmx/untitled1.bmx.console.release.linux.x64.c:9:50: error: expected expression before �]� token
    9 |                 ((BBINT*)BBARRAYDATA(bbt_arr,1))[]=10;
      |                                                  ^
Build Error: failed to compile (256) /BlitzMaxNG/tmp/.bmx/untitled1.bmx.console.release.linux.x64.c
Process complete

I guess once a "array assignment"-check is added to BCC this would be resolved too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant