tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] long double on Windows


From: Christian Jullien
Subject: [Tinycc-devel] long double on Windows
Date: Mon, 13 Apr 2020 06:33:51 +0200

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);

}

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]