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: [C PATCH] Simple compile-time array bounds checking


On Jan 12, 2007, at 9:36 PM, Roger Sayle wrote:
I discovered that the known compile-time array bounds violation isn't
picked up by gcc,

Idiomatic old C includes things like:


struct {
	float a;
	char extra[1];
} *bla;

bla->extra[20]... Does your patch warn about them? Is that a bug or a feature? :-)


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