Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

LLVM for DOS/DJGPP? (Developers)

posted by RayeR Homepage, CZ, 09.09.2011, 19:44

BTW do you know if LLVM/Clang support runtime array bound check?
I cannot find this. But for good clang have some static bound check and display such nice warning:

C:\LLVM>clang hello.c
hello.c:10:3: warning: array index of '10' indexes past the end of an array
      (that contains 10 elements) [-Warray-bounds]
  b[10]=0;
  ^ ~~
hello.c:4:1: note: array 'b' declared here
char b[10];
^
1 warning generated.

but if you do

  char c=9;
  b[c+1]=0;

it will pass. I think I don't make such stupid mistakes so it will not help like runtime check...

---
DOS gives me freedom to unlimited HW access.

 

Complete thread:

Back to the forum
Board view  Mix view
22758 Postings in 2121 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum