Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 29 Mar 2018 00:30:52 +0000
From: Jon Scobie <jon.scobie@...lsign.com>
To: musl@...ts.openwall.com
Subject: Re: Maybe not a bug but a possible omission?

Intended types? It's a macro. Where is the type definition? It is inferred.
Why not just make it implicit when the language allows for it?

On Wed, 28 Mar 2018, 18:54 Rich Felker, <dalias@...c.org> wrote:

> On Wed, Mar 28, 2018 at 07:19:49PM +0200, Szabolcs Nagy wrote:
> > * Jon Scobie <jon.scobie@...lsign.com> [2018-03-28 14:33:23 +0100]:
> > > Well, I definitely agree that instead of definitions like
> > >
> > > #define INT64_MIN  (-1-0x7fffffffffffffff)
> > >
> > > we should have
> > >
> > > #define INT64_MIN  (-1 - INT64_C(0x7fffffffffffffff))
> > >
> >
> > why?
> >
> > "The macro INTN_C(value) shall expand to an integer constant expression
> corresponding to the type int_leastN_t"
> >
> > i dont think it is necessary or appropriate: the c rules
> > already handles this portably: the const has the lowest
> > rank 64bit signed int type, any additional complication
> > can just get the type wrong.
>
> Yes. If a tool is misinterpreting the expressions here, the tool
> should be fixed. They all have the intended types already when
> evaluated as C expressions. Making random edits to headers to make
> buggy tools happy is not a direction I want to take.
>
> Rich
>

-- 

----
The information contained in this communication is private and confidential 
and may contain privileged material. It is intended solely for use by the 
recipient(s). Copying, distributing, disclosing or using any of the 
information in it or any attachments is strictly prohibited and may be 
unlawful.

Content of type "text/html" skipped

Powered by blists - more mailing lists

Your e-mail address:

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