From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13801 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Nick Bray Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] eliminate strict parentheses warnings for byteswaps Date: Thu, 14 Feb 2019 18:27:26 -0800 Message-ID: References: Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="171425"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com Original-X-From: musl-return-13817-gllmg-musl=m.gmane.org@lists.openwall.com Fri Feb 15 03:27:54 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1guTEI-000iTp-17 for gllmg-musl@m.gmane.org; Fri, 15 Feb 2019 03:27:54 +0100 Original-Received: (qmail 24115 invoked by uid 550); 15 Feb 2019 02:27:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 24096 invoked from network); 15 Feb 2019 02:27:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=Avnr1LYeWV01a4bX3R72Ow1i3IKpBINTxVuUkiVCCaA=; b=KbiA+2BEXSs86b9YznZaqysUfaZ25SYPE5nymsMbwGXtVZtSOelITKdKY5FaH+BTN2 lMauZ3t3GC80ThR/0j4XiR9uxKrmxi60yZn2KrUwP+Y4N0FSCKALrnkrextlN+quZr6Q fxk/bZwQPNShd4Ef8IpbasDAnM8US6sQDxjahARNztzfFBY9zWya9OdeYpTKxlNe4EeC QgUVY+zQlzz3JpTadgi5mG5JK80VUelnWL3Ii9HzJaHJd1Kd2F6HhBVrhrgG7nCsYx8J 7my84+/89IHf1srAzy6BCVEJPRbvh9lcIhwLKH5MjXG8pgBtoQEOVC9LMhEazXZi4llj qGSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=Avnr1LYeWV01a4bX3R72Ow1i3IKpBINTxVuUkiVCCaA=; b=hQ8d9GZtYiB66lPNyvFxfoAAwH6Sx0nxPyFp0bebwfBt54X4SWLT2q89V2bwQ1kcRD 8zHPI+n7nIGFzw0DYcAgS9PsVHCwdU82isXcafwbigKSMzv+KSFdKl6jiSgNLoetDCea Mq0Ug6PPSeYXiKlNDERzk1+v55nVGe3U2GXV4IENGF4Oz8ZvYNd4rTwzVwBUEOzxZ9fD frulxtGg2+LZyVd+W/8s1i+PGIQBaUEluWZCRJKdJjaktraK9UxoiGLGjciCnFCn1pJh ZYzWXTRyGn9NEV26H4CVgr4GNwsCrNaPkqGJIoFK3jXNZyc2XbNO5FhfWbMpk5cg/ZYR mNmg== X-Gm-Message-State: AHQUAuZLJo8SpJbFTeJT/JYSSOFHZUHQBnSkVUUsAkNXlSCWahTgaRzK BmT6v/18jYm8ufd3MVI86dpi3mPGci5eBMh6u4I8swD7eDU= X-Google-Smtp-Source: AHgI3IYpDSZkw4UCEl+YG78Ja67NyLBD6IGOU0ecaUyJBeCeF7487D8kkVVti6Mjt23Mv6AbwzfIX2DFdkQ40Tod3+c= X-Received: by 2002:a5d:8946:: with SMTP id b6mr3932298iot.231.1550197658621; Thu, 14 Feb 2019 18:27:38 -0800 (PST) In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:13801 Archived-At: To give a little more context, I am targeting a small non-Linux OS. We are not at a point where maintaining our own toolchain make sense. Instead we are using Android's prebuilt toolchains, providing an alternate sysroot (empty for now), and treating Musl as a library built from source. It's a flat playing field and there is no such thing as system headers or system libraries. We can dial the strictness down when compiling Musl itself, but header files touch everything. This isn't the traditional use case, but Musl seems like a pretty good choice for embedded systems-ish type work when you need to scale down into a smaller memory footprint. On Thu, Feb 14, 2019 at 5:55 PM A. Wilcox wrote: > > On 02/14/19 18:24, Nick Bray wrote: > > Patch is attached. > > > > The change was motivated by including Musl's headers from a project > > with -Werror -Wall enabled. I believe Fucshia ran into this, too. I > > couldn't think of a good regression test, in part because warnings are > > somewhat compiler specific. One possible approach would be to enable > > -Werror -Wall in the main build, but that runs into issues of which > > compilers are supported and what the core developers prefer. Another > > approach would be to only lint the header files - generate a dummy .c > > file that includes all the header files and compile it with -Werror. > > This is complicated by the "redirection" header files that warn you > > should use the canonical version. Which header files should be > > checked? So for the moment I punted on regression testing. I mention > > this line of thinking in case anyone has some perspective. > > > This has a strong +1 from me, but changes like this have already been > rejected at least twice on this list because "compilers shouldn't warn > about system headers". > > Perhaps at attempt #3, they will just accept that this happens regularly > enough that a few parens is not the end of the world. (It also makes > more components of musl reusable in other libraries, if desired.) > > Best, > --arw > > -- > A. Wilcox (awilfox) > Project Lead, Ad=C3=A9lie Linux > https://www.adelielinux.org >