LWN.net Logo

access off end of array

access off end of array

Posted Mar 26, 2013 8:09 UTC (Tue) by alankila (subscriber, #47141)
In reply to: access off end of array by tjc
Parent article: Regehr: GCC 4.8 Breaks Broken SPEC 2006 Benchmarks

I guess there would be many ways to improve C, which largely are about breaking expressions that used to work but which are ugly, confusing and sometimes semantically broken. Perhaps GCC can slowly over time nudge people away from doing multiple things in a single statement -- that definitely sounds like an improvement.


(Log in to post comments)

access off end of array

Posted Mar 26, 2013 16:26 UTC (Tue) by tjc (subscriber, #137) [Link]

I think a warning flag would be a step in the right direction, and maybe as far as things should to go. -Wall doesn't warn against this sort of thing, but since the "all" in -Wall is not really all, there might already be a flag for this.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds