Er, that variable declaration included a non-constant. That's not valid C89 :) The only real advantage of intermingling variable declarations like that is that their declarations get moved textually closer to their uses. That's a significant readability advantage, surely, but C89 isn't C++ (or indeed C99): you can't use non-constants in the initializations, so there's no efficiency gain from moving declarations around like that. (GNU C has always allowed arbitrary function calls there, but this is an extension to C89.)
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds