From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) by sourceware.org (Postfix) with ESMTPS id 4B85C3858D28 for ; Fri, 19 Jan 2024 15:55:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B85C3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4B85C3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.219.180 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705679736; cv=none; b=kV8ycE1TQdVP9PWo2q8IW69/o8n1IBdGSAIEZUgDWJel3XcP1doZSlWngaAeBkdQfkGwyXn2eZdHsATpdhr3s8rpG3RYL3bhie43tP+ALTfGzi/o7j3mQ3oV5w4UTn9f0hBZZ0hj3hHxvkN9MglERvwmyK3kezdjywmiX1XYPOI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705679736; c=relaxed/simple; bh=ea0peVoeIYjhQ4sQZb2N+EJbDglOZHbBFc4uXuV+dIo=; h=MIME-Version:From:Date:Message-ID:Subject; b=jpluiDsGvsr8ENmLwdM87MlfYup9L9M4azxlxykTwTpdDl/ZF4XRq7ztv7QQgsWh8YohGrumwh0ViqbY3rmbz1f83Nt//kDhDtqCTNLo3fA6I2++P6ySiB54fCZkC/NeHEWsfO2NADO5c85sJyvdtLyY9nx7wm3b3Lea8ugMQKs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-dafe04717baso864781276.1 for ; Fri, 19 Jan 2024 07:55:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705679734; x=1706284534; h=cc:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KjgDTw4J9y79T2H72flxxzikxxsJMrX3ifVSqYk5ipQ=; b=XX0btBc3ft7gEjI+TKjqRLugV7G2vUEEcmoPHTbJQ/VUl54zX4uZ/9Lpdk2juCULih 988sMnQsQjMEVVk4rSg4vN9nw5T1Kw4l095N9LObgsWWMryAIOUGPuHHgjDnqYxvegKm wamnUxa16PzmDGd6GeV89+GK5b0kKGRwSVJM4WiBwAwAga+ayDk+tloq3+gvM6fRSsPY khwxYrBhbtISJVORAqEGGH4VsdshjqUej1LLSqCebD+z0lxBeXDSTWSks0yaP4fjhcwl T2qc7L1jsHkFSAqENpGddieGxDcSy+cx6eGQ/9guJC+Yucpdf0NVYH4dz3Cy2/VFqYyz kbfw== X-Gm-Message-State: AOJu0Yzn5KtXSoPyIKH5l9x8FigNzHtREVJ8HKXvCF8vAG9urx7ZzTxk VpgN5NARL5pnsUWloAdwE6t3T0zPNZSHYeX0IRw89zQPQGp7xlb1mEK5lI76 X-Google-Smtp-Source: AGHT+IFgdFsZHU4pCY+vf3AILAWwQ7EFaACp9YVxjzAx0+ley1cq6aaMPqzMiGWvSEuvdw5gunD04g== X-Received: by 2002:a25:ab30:0:b0:dc2:2acf:ce48 with SMTP id u45-20020a25ab30000000b00dc22acfce48mr62627ybi.126.1705679734084; Fri, 19 Jan 2024 07:55:34 -0800 (PST) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com. [209.85.219.178]) by smtp.gmail.com with ESMTPSA id n189-20020a25d6c6000000b00dc227379358sm2821029ybg.19.2024.01.19.07.55.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Jan 2024 07:55:33 -0800 (PST) Received: by mail-yb1-f178.google.com with SMTP id 3f1490d57ef6-dc2540a4c26so721404276.2 for ; Fri, 19 Jan 2024 07:55:33 -0800 (PST) X-Received: by 2002:a25:3603:0:b0:dbe:a3b0:6e37 with SMTP id d3-20020a253603000000b00dbea3b06e37mr66038yba.117.1705679733564; Fri, 19 Jan 2024 07:55:33 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Reply-To: joel@rtems.org From: Joel Sherrill Date: Fri, 19 Jan 2024 09:55:21 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: -Wall Cc: newlib@sourceware.org Content-Type: multipart/alternative; boundary="0000000000009eadee060f4e8210" X-Spam-Status: No, score=-3030.9 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,KAM_DMARC_STATUS,MISSING_HEADERS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000009eadee060f4e8210 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 19, 2024 at 9:39=E2=80=AFAM Mike Frysinger = wrote: > On 19 Jan 2024 13:55, Corinna Vinschen wrote: > > if you saw my today's pushes, you're aware that I only found a bug > > because I used -Wall. I fixed the bug and a few less crucial warnings. > > > > I did NOT fix the warnings in code we took verbatim from some BSDs, > > which often contain unused variables, or in some cases expressions which > > are deemed to profit from extra paranthesis, e. g. > > > > if (a >=3D 0 ^ b =3D=3D 0) > > > > For that reason, I'd like to suggest to add -Wall by default to the > > build flags for newlib, just as it is already for ages in the Cygwin > > tree. > > > > Anybody having a strong opinion, pro or contra? > > enabling -Wall by default sounds fine. if you wanted to include any > -Werror, > that would require more effort/tooling like putting it all behind a new > flag > like --enable-werror. > Based on the warnings from BSD code, I hope you think -Werror should be off by default until the warnings are cleaned up. For RTEMS, we try not to modify code imported from third parties. We have a rule that you can only add code inside an ifdef __rtems__. For example, if we wanted to eliminate those unused variable warnings, we would likely do something like this in third party code: #ifndef __rtems__ int unused_variable; #endif And, if being really diligent, post a patch or ticket to the upstream project. Our goal is to make it easier to update these files in the future. FWIW we have over 1M lines of FreeBSD code in rtems-libbsd which is a port of the FreeBSD networking, USB, nvme, etc. and the commands to configure the stack (ifconfig, route, netstat, ping, etc) This has worked pretty well for us. --joel > -mike > --0000000000009eadee060f4e8210--