Kernel Bug Tracker – Bug 43287
scanf documentation example
Last modified: 2012-12-21 16:58:31 UTC
In scanf man file ( http://man7.org/linux/man-pages/man3/scanf.3.html ), in notes section an example given.
Example only works if it is compiled with -std=c89 option. It is not well defined. Probably because it was written long ago.
The man page already explains this quite clearly though:
The a modifier is not available if the program is compiled with
gcc -std=c99 or gcc -D_ISOC99_SOURCE (unless _GNU_SOURCE is
also specified), in which case the a is interpreted as a speci‐
fier for floating-point numbers (see above).
So, closing this bug.