According to http://linuxsoftware.co.nz/cppgrammar.html#for-init-statement you can get only simple declaration or an expression (which is not permitted to contain declaration) in the for-init statement. That means the answer is no (if I analyzed the BNF correctly :) )