From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12617 Path: news.gmane.org!.POSTED!not-for-mail From: Martin Galvan Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: #define __MUSL__ in features.h Date: Thu, 15 Mar 2018 16:02:03 -0300 Message-ID: References: <20180315183939.GI1436@brightrain.aerifal.cx> <20180315185358.GJ1436@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1521140464 19332 195.159.176.226 (15 Mar 2018 19:01:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Mar 2018 19:01:04 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-12631-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 15 20:01:00 2018 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.84_2) (envelope-from ) id 1ewY7U-0004qS-U9 for gllmg-musl@m.gmane.org; Thu, 15 Mar 2018 20:00:57 +0100 Original-Received: (qmail 1930 invoked by uid 550); 15 Mar 2018 19:02:47 -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 1702 invoked from network); 15 Mar 2018 19:02:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=4n2dH59VI7gMYdzRVvGNevg5wGd0mj/co0ovtQtmkZA=; b=NyM33IiRXk7BnhVAfPjctbJ1P4QPecPAJPlvkdQBm8vIFcRljAY/IVU6sMOspkzqH4 4hffdXpYkuf7OZojSKmNfgbaBEd4vFXmkbmgwqJ3JEYBItU/pBQW9cnD/P64Srj6POuX htRez9tX211QfH6IA41vzBDnAcusxrCfj44VeOKxwNkCNZPa/QpQycQ1ckd5Jx8rr9Kz 4B6FTadSZ8fynu2HDmh/YejT2GQo8cin3ZxBMk4HiHwYngLVaBDmyeDm6by1blu7I4Rv 9pDmrmCp9XKLde73jptGy8DyU41znqu/DpApuhaer8FizLHaA49Jj+H+b9u0QMfn+ndI 4Rng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=4n2dH59VI7gMYdzRVvGNevg5wGd0mj/co0ovtQtmkZA=; b=TU+nth3i/XZus2Yd5is9u8xvvucJBVLuF4k9lMAsUAwdQh6h9k8XAFrlwMTApHtKjI UBmG4OLNpZrBthbtlwcOvg2mmC4DGsSo/cuBlJFDOEFBN06V1DO/M+Byvec/4fMfXid6 vaHSXmT7TAmyVKh8l47pZ7tsAdsx87lT/OAxM8ZjJ9DQdJ56iV0YjVXBIpk1+Mw9aJbm 7POkxjS3ZcllzxyjTx9rwnkYJ32cxyPbo5BcdKr3ddWWU4Pff8wajYY4mio5DijcP+EI 5OK7gEGWD9PxMBJ/vssZCkEcalJqxVw8VqXvF7xpufwe/L2tmrnLuCIP+AUuw+GvGXXo 0WMw== X-Gm-Message-State: AElRT7FSDAYfuPmgZfs10TFz6+nMma6lp4UgEiZEiOwHb6A5H7w92yB+ V0e3DfN7q13NCU1BfYrHiwdUXFwXBwW0vJkkeDk= X-Google-Smtp-Source: AG47ELtdygjGYevx1H3mg/vE39JpgoCmqV/xRxvNf2V/CVRnj3hL7Ba/Vpk9TobfElurUaz01CifSU3pYzlBx7C64n8= X-Received: by 10.223.138.214 with SMTP id z22mr4421860wrz.39.1521140544289; Thu, 15 Mar 2018 12:02:24 -0700 (PDT) In-Reply-To: <20180315185358.GJ1436@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:12617 Archived-At: 2018-03-15 15:53 GMT-03:00 Rich Felker : > In any case it's not a bug in musl. The code is perfectly valid C. If > the compiler is producing a warning for it, either ignore it or ask > the compiler to stop. Just because some code is valid C, it doesn't mean it's not buggy. >> The compiler warnings aren't being wrongly produced. musl will indeed >> perform a signed-to-unsigned conversion here. > > Because that's how the C language works. Yes. And gcc has checks to try and make up for C's weak typing. While your definition of "bug" is debatable, IMHO if a commonly used option causes application builds to break due to some library, the library has a usability issue. The issue is even bigger when we're talking about something as core as the standard C library. >> So whenever we find a bug on musl we should just stop all our >> development until you've fixed the bug? > > No. As noted above, if you need to support systems that might have bug > X, you write a test (configure-time or run-time as appropriate) to > detect bug X and handle it. Precisely, and __MUSL__ would be really useful for this.