Re: array bounds, sanitizer, safe programming, and cilk array notation

2015-02-21 Thread Martin Uecker
Marek Polacek : > Sorry for late reply - I've found this in my inbox only today. > > On Mon, Jan 26, 2015 at 11:53:59AM -0800, Martin Uecker wrote: > > > Finally, what is missing is a way to diagnose problems inside > > the called functions. -Warray-bounds=2 (with my recently > > accepted patch

Re: array bounds, sanitizer, safe programming, and cilk array notation

2015-02-21 Thread Marek Polacek
Sorry for late reply. On Tue, Jan 27, 2015 at 12:07:58AM +, Joseph Myers wrote: > On Mon, 26 Jan 2015, Martin Uecker wrote: > > > extern void bar2(int (*x)[5]); > > > int c = 4; > > int y[c]; > > > bar2(&y); // not diagnosed (found by asan) > > This is the undefined behav

Re: array bounds, sanitizer, safe programming, and cilk array notation

2015-02-21 Thread Marek Polacek
Sorry for late reply - I've found this in my inbox only today. On Mon, Jan 26, 2015 at 11:53:59AM -0800, Martin Uecker wrote: > > Hi all, > > I am writing numerical code, so I am trying to make the use > of arrays in C (with gcc) suck a bit less. In general, the long term > goal would be to hav