[openib-general] Re: [PATCH] mthca: fix posting long work request lists
Roland Dreier
rolandd at cisco.com
Wed Nov 9 14:52:14 PST 2005
The issue in this case is that if you do
void foo(void)
{
{
int x[2];
/* stuff */
}
{
int x[2];
/* other stuff */
}
}
then gcc allocates stack space for two copies of x even though they
can never both be in scope. I think gcc 4.1 might be better in this
area but that's a little futuristic.
So it's better to declare x once at the top of the function.
- R.
More information about the general
mailing list