On Fri, Apr 13, 2012 at 09:59:11AM +0300, Teodor wrote: > Package: gcc-4.6 > Version: 4.6.3-3 > Severity: normal > > Hi, > > I was debugging a more complex problem and noticed that not all > input values were read. Further inspection showed that input > integers "08" and "09" (read from a file) were not correctly > recognised by fscanf() as two integers (8 and 9) but as four > integers (0 8 0 9). I've attached a minimal test C program > and a test file. After compile execute: > $ ./tscanf0809 < tscanf0809.txt
It's not a bug, read the documentation about scanf and the difference between %d and %i, which attempts to read a number represented in octal with your input. Gabriel -- To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20120413081453.gb11...@visitor2.iram.es