long double on Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

long double on Windows

Christian Jullien-3

Hello I tried to convince myself that double and long double, while implemented the same, are actually two different types.

Since _Generic is not available on Visual, I switched to C++ and saw they are. Thank you for your patch which lets _Generic also works the same as with gcc on Windows.

 

 

#include <stdio.h>

 

void

foo(long double x) {

        printf("long double %d\n", sizeof(x));

}

 

void

foo(double x) {

        printf("double %d\n", sizeof(x));

}

 

int main()

{

    double a = 0;

    long double b = 1.0;

    foo(a);

    foo(b);

}

 


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel