Since constants with leading zeros (other than leading 0x) are always octal:
A cyclic integer literal (base eight) starts at 0 and consists of a sequence of octal digits.
C ++ Draft Standard ( n1905 ) §2.13.1
It has nothing to do with setprecision.
a source
to share