This seems such a simple question, but something I've not examined for ages in my own style... When initializing variables separated by a comma, I've assumed the following to be an unsafe practice:
unsigned int n = foo.size, nxn = n * n;
Since I don't really ever use the comma operator as such for syntactic sugar, etc; but rather to indicate that two expressions are independent - as a kind of implicit commentary on 'fine-grained parallelism' (or expression independence), that often makes code a bit more terse, e.g.,
if (<some condition>)
a = true, b = value;
rather than requiring {} scope for semi-colon separated expressions.
But my question is really in re-examining the variable initialization case. Have I been incorrect in my assumption that nxn can't be relied on to be initialized as expected? Or have I been laboring under a misinterpretation all this time?