John Nagle (no, not the TCP Nagle ;-) proposed a extension to C to keep array information over the call context to do bounds checks. His proposal Safe Arrays and Pointers for C through compatible additions to the language is a nice reading. On the GCC maillinglist the responses are mixed: more questions and doubts if such a extension will and can be adopted by the users.