Re: builtin sscanf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/19/2016 12:45 PM, fedor_qd wrote:
How precize this function?
I write sample:
int main()
    {
    float x, y;
    __builtin_sscanf("30,981", "%f", &x);
    __builtin_printf("Test comma: %f\n", x);
    return(0);
    }

Compile with options: g++ main.c -o hello -static-libgcc

This sample returns 30.00 but 30.981 expected
That would depend on your host implementation of printf/scanf and is outside of GCC's control.

jeff






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux