This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/middle-end/diagnostic] Do not warn about unused out of bounds array refs


On Tuesday, 20. March 2007, Jakub Jelinek wrote:

> But if you never dereference it and it doesn't escape, then it is
> completely harmless.

part of the idea of the warning was to discover when somebody takes address of 
an element way beyond the array limit. 

> As is -Warray-bounds just causes too many false positives, see
> PR31227 or e.g. yesterday when I tried to bootstrap with obj-c++

I don't know what the obj-c++ issue is (is there a PR about it?), but I can 
remove the warning for taking addresses of array refs with a two liner patch 
for now. 


Dirk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]