[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-patches
Subject:    Re: [C PATCH] Simple compile-time array bounds checking
From:       Dirk Mueller <dmuell () gmx ! net>
Date:       2007-01-13 12:53:27
Message-ID: 200701131353.28039.dmuell () gmx ! net
[Download RAW message or body]

On Saturday, 13. January 2007 06:36, Roger Sayle wrote:

> My apologies if this is a frequently contributed patch

:)

The patch in http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01523.html was 
approved in http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01703.html by 
Richard Guenther. It is my lazyness (a complete bootstrap+regtest takes me 
more than 24 hours) that I haven't committed the patch yet. I also wanted to 
address Richards concern to only enable the struct hack in sensible cases, 
although this could be done in a followup patch. 

> Thoughts?  Ok for mainline?

I've tested it, and it seems to fail on: 

int a[10];
int* f(void) {
    a[10] = 0; 
    return a;
}

And a couple of other cases that are linked in the testcase that is attached 
to above URL. Also, it is not working for the C++ frontend, while the VRP 
based solution workes for C and C++ (and can be enabled for other frontends 
as well in followup patches). 

Would you mind commenting on why you think the patch I posted is a bad idea or 
would you mind if I go ahead and commit it after a regtest (just started it 
again, might complete before monday)?

Thanks,
Dirk
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic