Hi,
Oh, I was wrong previously, gcc does respect __attribute__
((__regparm__ (3))) flag (I forget to add -Os so it still uses stack
to store value). And the bug is still there ! Try this test program:
I confirm with gcc-4.4
This is a grave problem then. This check was added by Marco Gerards
#includestdio.h
void foo (int a, int b, void (*hook) (int aa, int bb, int cc))
{
b += a;
hook (a, b, a + b);
}
void qq (int a)
{
auto void q1 (int aa, int bb, int cc);
void q1 (int aa, int bb, int cc)
{
printf (%d %d %d\n, a, aa + bb, cc);
}
foo (a, a + 1, q1);
}
int
On Thu, Sep 3, 2009 at 5:54 PM, Paolo Bonzinibonz...@gnu.org wrote:
#includestdio.h
void foo (int a, int b, void (*hook) (int aa, int bb, int cc))
{
b += a;
hook (a, b, a + b);
}
void qq (int a)
{
auto void q1 (int aa, int bb, int cc);
void q1 (int aa, int bb, int cc)
{