This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30581] Deeply inlined static functions break stack creation
- From: "rearnsha at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jan 2007 17:35:14 -0000
- Subject: [Bug c/30581] Deeply inlined static functions break stack creation
- References: <bug-30581-13975@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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