Hi,
I’ve noticed that scanf in CINT doesn’t handle the assignment-suppression character ‘*’ correctly when the list of pointer arguments is empty. The following f1.C code shows the problem for “%c” but other format specifications are also affected.
void f1()
{
Char_t c;
scanf("%*c");
scanf("%*c%c", &c);
printf("%c\n", c);
}
CINT fails but the compiled code works as expected
root [0] .x f1.C
Limitation: scanf only takes upto 11 arguments f1.C:4:
*** Interpreter error recovered ***
root [0] .x f1.C++
Info in <TUnixSystem::ACLiC>: creating shared library /home/malusek/test/root/./f1_C.so
123 # my input
3 # output from printf
openSUSE 10.3, x86_64, ROOT 5.21/06