Place declarations with other declarations and not mised with code - fixes #7073

This commit fixes a case where GCC v2.93.2, which still ships with
Solaris 10, errors out and aborts a build in cases where declarations
are mixed in with code.

fixes #7073
Merge branch 'fix/mixing-declarations_with-code-7073' into next

fixes #7073