Does defining multiple variables on one line offer some form of optimization for the build process or is it simply a choice of coding style?
For example would this:
void foo()
{
int a, b, c, d;
..... // do something with a,b,c and d
}
Offer any optimization over this:
void bar()
{
int a;
int b;
int c;
int d;
..... // do something with a,b,c and d
}
Possibly, yes. Smaller input files are faster to read for the compiler. But it would depend a lot on the implementation of the compiler. If you are interested in reducing build times in a compiler independent manner, there are a lot of other optimisations which can be done. Large-Scale C++ Software Design by John Lakos is a very good book to read for this.