tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Opinions on constexpr being added to C2X?


From: Christian Jullien
Subject: Re: [Tinycc-devel] Opinions on constexpr being added to C2X?
Date: Tue, 19 Oct 2021 07:10:25 +0200

Thanks,

Indeed, I see that __STDC_NO_COMPLEX__ is already defined for tcc which is correct. I missed this, sorry.

 

7.3 Complex arithmetic <complex.h>

7.3.1 Introduction

1 The header <complex.h> defines macros and declares functions that support complex

arithmetic.192)

2 Implementations that define the macro _ _STDC_NO_COMPLEX_ _ need not provide

this header nor support any of its facilities.

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On Behalf Of Tyge Løvset
Sent: Monday, October 18, 2021 09:38
To: jullien@eligis.com; tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] Opinions on constexpr being added to C2X?

 

I added tgmath.h last year, which includes generic support for all non-complex math functions. As complex.h is optional in C11 and not included with tinycc, this should be fine.

 

I think any added C11 features should be welcome, C2X features are secondary, imo unless it is low-hanging fruit and easy to implement.

 

On constexpr, I  find it interesting for tinycc as it minimizes generated code - efficiency gains are not that important. Mutable types like in c++ are useful,

although it is possible to write functional style code instead. I haven't looked at the proposal yet, though.

-tyge

 

On Sun, 17 Oct 2021 at 11:03, Christian Jullien <eligis@orange.fr> wrote:

AFAIK, all stuff for complex is missing and the generic math macros are not implemented

 

The type-generic macros are as follows:

 

fabs       fabsf      fabs       fabsl      cabsf     cabs       cabsl

exp        expf       exp        expl       cexpf     cexp      cexpl

log          logf        log          logl         clogf      clog        clogl

pow       powf     pow       powl      cpowf   cpow     cpowl

sqrt        sqrtf      sqrt        sqrtl       csqrtf    csqrt      csqrtl

sin          sinf         sin          sinl         csinf       csin        csinl

cos         cosf        cos         cosl        ccosf      ccos       ccosl

tan         tanf        tan         tanl        ctanf      ctan       ctanl

asin        asinf      asin        asinl       casinf    casin      casinl

acos       acosf     acos       acosl      cacosf   cacos     cacosl

atan       atanf     atan       atanl      catanf   catan     catanl

sinh        sinhf      sinh        sinhl       csinhf    csinh      csinhl

cosh       coshf     cosh       coshl      ccoshf   ccosh     ccoshl

tanh       tanhf     tanh       tanhl      ctanhf   ctanh     ctanhl

asinh     asinhf    asinh     asinhl    casinhf  casinh   casinhl

acosh    acoshf   acosh    acoshl   cacoshf cacosh  cacoshl

atanh    atanhf   atanh    atanhl   catanhf catanh  catanhl

 

-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On Behalf Of Elijah Stone
Sent: Sunday, October 17, 2021 01:09
To: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] Opinions on constexpr being added to C2X?

 

Atomics are here now; I think the only thing missing is wide-chars/strings, no?

 

I have a patch to support a number of c11/c2x features (including widestrings), but the last time I posted it on this list I was met with crickets, so I am not sure what else to do with it (aside from continuing to use it for myself).

 

  -E

 

On Thu, 14 Oct 2021, Christian Jullien wrote:

 

>

> I’m big fan of constexpr in C++ that allows compile time computations and more code elimination. I probably overuse constexpr in my code.

>

> I’m not sure that the nature of tcc will find a big impact with constexpr support.

>

> There are many missing C11 features that should be handled before this one.

>

>  

>

> M2c

>

>  

>

> From: Tinycc-devel

> [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On Behalf Of

> Marcus Johnson

> Sent: Thursday, October 14, 2021 10:36

> To: tinycc-devel@nongnu.org

> Subject: [Tinycc-devel] Opinions on constexpr being added to C2X?

>

>  

>

> There's a new proposal to add it, and the standard is especially interested in hearing from small compiler devs their opinions on such a feature.

>

> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2851.pdf

>

>

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


reply via email to

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