Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 25 Nov 2014 22:23:03 +0100
From: Jens Gustedt <jens.gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 1/4] the CMPLX macros must be usable in
 initializations of static variables

Am Dienstag, den 25.11.2014, 20:21 +0100 schrieb Szabolcs Nagy:
> it seems gcc added __builtin_complex but there is no easy way to check
> for the availability of such builtin (other than checking >= gcc 4.7)

Haven't they planned to implement a feature test tool, similar to
clang's ?

Basically this means that we only can use it in C11 mode, I guess. At
least that one has a feature test macro :)

> i guess we could use the builtin with gcc version check

This always has the possibility of false detection when using one of
the other compilers that simulate gcc behavior. Usually getting this
right for all such compilers is quite a pain. I'll see what clang
offers, here.

> and fall back
> to the compound literal version otherwise (it wont work as static
> initializer then, but right now the biggest user of CMPLX is most
> likely musl src/complex/* which dont need it to be constant expr
> but does rely on proper semantics for infinites and signed zeros)

If that is so, I'd be in favor of having and using an internal macro
that uses the compound literal. The compilation of the library
shouldn't depend too much on compiler versions.

Jens


-- 
:: INRIA Nancy Grand Est ::: AlGorille ::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::



Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.