------- Comment #7 from rearnsha at gcc dot gnu dot org 2007-01-25 17:35 ------- (In reply to comment #6) > The problem is that the compiler is not either > 1) automatically aligning the > buffer so that the program actually works or
It doesn't have to, because the user hasn't asked it to (align the data). > 2) warning the user that their > code is retarded and needs to be modified so that all the stacks fit to > multiples of 32-bits. It can't, because the various casts are asserting that everything is ok. The compiler isn't psychic and it isn't Lint (though I don't know if Lint would find these specific cases either). I would strongly suggest that if you want this sort of analysis then you take a look at some specialist code analysis tools. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30581