Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 5 Apr 2014 09:07:00 -0400
From: Rich Felker <>
Subject: Re: build with clang-3.4 warnings report

On Sat, Apr 05, 2014 at 11:04:58AM +0200, Jens Gustedt wrote:
> Hello
> Am Freitag, den 04.04.2014, 21:54 -0400 schrieb Rich Felker:
> > On Sat, Apr 05, 2014 at 03:06:03AM +0200, Abdoulaye Walsimou Gaye wrote:
> > > In file included from src/errno/strerror.c:7:
> > > src/errno/__strerror.h:100:1: warning: implicit conversion from 'int' to 'unsigned char' changes value from 1133 to 109 [-Wconstant-conversion]
> > > 1133,
> > > ^~~~
> > > 1 warning generated.
> > 
> > Again, I'm confused why we're getting this one.
> This seems to come from the bogus handling of EDQUOT by mips:
> [...]
> I think the real bug is here
> #define E(a,b) ((unsigned char)a),
> this is a typical case of someone using a cast to burry a
> problem, black magic, "casting a spell".

The problem was fixed, not burried. In any case, the clang warning is
a bug in clang because it's claiming there's an implicit conversion
when the conversion is actually explicit.

> As this bug shows, the whole technique of searching the error string
> in strerror is somehow fragile.
> The whole thing could be avoided by using designated initializers and
> eliminating the whole errid array right away. Designated initializers
> should be present in all decent versions of gcc. Do you want me to
> prepare a patch?

No, this is not about avoiding features but rather not adding a whole
page (or two pages, on 64-bit machines) of non-sharable pseudo-data to, or the same amount of text to nearly every static-linked

Please see the previous bikeshed discussion from when the mips issue
was fixed. Several people offered up crazy ideas for strerror and none
of them could compare in size to the current implementation; most of
them also broke its other nice qualities.


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.