|
Message-ID: <1417007178.28402.106.camel@eris.loria.fr> Date: Wed, 26 Nov 2014 14:06:18 +0100 From: Jens Gustedt <jens.gustedt@...ia.fr> To: musl@...ts.openwall.com Subject: Re: type verification for number macros Hello, here is a new version of the test that also takes the correctness of the CMPLX macros for special values into consideration. I will follow up in the other thread with a new version of patch 1/4 that takes nsz' remarks into account. Am Dienstag, den 25.11.2014, 15:45 +0100 schrieb Jens Gustedt: > Hello, > > after a recent discussion about DR 456, I noticed that the types and > properties of the numerical macros that the C standard requires are > not always completely trivial. Basically there are three distinct > cases: > > (1) the standard requires that the type of an integer constant is the > promoted type > > (2) the standard requires that the type of an integer constant is the > exact type > > (3) the standard requires that the type of a floating point constant > is the exact type *and* that it must be suitable to initialize a > static varialble. > > Joint is a program that checks all of these. This exposes 3 different > bugs for musl: > > - [U]INTxx_C(x) macros don't have the exact type > - WINT_MIN must have type wint_t, that is unsigned for musl > - CMPLX(x, y) and friends must be usable for initialization > > The later makes the compilation of the program fail with musl :( > > In a follow up I will send 4 patches that address issues with this > types of macros. > > 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 :: View attachment "test_number_macros.c" of type "text/x-csrc" (24036 bytes) 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.