------- Comment #30 from neil at daikokuya dot co dot uk  2006-02-19 00:52 
-------
Subject: Re:  no compile time array index checking

rguenth at gcc dot gnu dot org wrote:-

> Also make sure not to trip on
> 
> typedef struct {
>   int len;
>   char str[4];
> } String;
> 
> char foo(String *s)
> {
>   return s->str[42];
> }

That definitely deserves a warning.

Neil.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8268

Reply via email to