C variable declarations after function heading in definition
Posted
by Yktula
on Stack Overflow
See other posts from Stack Overflow
or by Yktula
Published on 2010-04-13T22:59:38Z
Indexed on
2010/04/13
23:02 UTC
Read the original article
Hit count: 369
When reading some FreeBSD source code (See: radix.h lines 158-173), I found variable declarations that followed the "function heading" in the definition.
Is this valid in ISO C (C99)? when should this be done in production code instead of just declaring the variables within the "function heading?" Why is it being done here?
I refer to the function heading the string that looks like this: int someFunction(int i, int b) {
© Stack Overflow or respective owner