[Bug 258] scanf format not portable

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Tue May 28 02:53:49 EST 2002


http://bugzilla.mindrot.org/show_bug.cgi?id=258





------- Additional Comments From liug at mama.indstate.edu  2002-05-28 02:53 -------
Here are some more info I gathered from the Watcom newsgroup:

The C99 draft explicitly said that:

"If a - character is in the scanlist
and is not the first, nor the second where the first
character  is  a  ^,  nor  the  last  character, the
behavior is implementation-defined."

So (assuming the draft did not change in this respect)
for portable programs you can only trust [-09] or [09-] and
[0123456789]. But are free to rely on [0-9] if you depend
on compiler (library really) X and Y (Borland, glibc, ...),
or Z for the other interpretation (the Watcom RTL, IBM VAC++,
...).




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the openssh-unix-dev mailing list