This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12122] gcc do not respect stack argument list order
- From: "bland at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Sep 2003 08:07:40 -0000
- Subject: [Bug c/12122] gcc do not respect stack argument list order
- References: <20030901053735.12122.bland@mail.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12122
------- Additional Comments From bland at mail dot ru 2003-09-01 08:07 -------
May I bother you one more time? I understood your argumentation that this is
not a bug and agreed that basicly gcc is free to do such things.
But one thing is still confuses me. From the produced .s file I can see that
pushl instructions setups stack properly and ABI is not broken. But what the
reason than to make one more copy of 3 and 4 arguments than? Isn't this a
useless CPU time waste?
Probably this explains more where it's come from. I porting software to
FreeBSD system wich makes stack copy like this to pass it to another process:
fn (int a1, int a2)
{
void* buf_ptr = &a1;
size_t buf_size = sizeof (a1) + sizeof (a2);
...
send_args_to_daemon(cmd, buf_ptr, buf_size);
...
}
As you guess this code broken on gcc > 3