From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by sourceware.org (Postfix) with ESMTPS id 82DB73858D39 for ; Sat, 20 Jan 2024 18:17:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 82DB73858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=systematicsw.ab.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=systematicsw.ab.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 82DB73858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=216.40.44.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705774639; cv=none; b=Cu4fW+gy8UoDG0SwGHuIPo1OrYm4Xi0kzTC4CrUwGZ+IljrcyIucOV9o8xDtxoXsJO0nLp1smx6+Y3H/6WMYafGd38naRQpX8ZneMuYZXQJsvYD5mjOzWRui5lsdCAW4sEfAV31aWfSRE8w0lw6KKA+uWm3zqncQqMZ4FVVboiw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705774639; c=relaxed/simple; bh=HJMl5cslNiB2UDercIfW+DztPzNiAQnzjk+Tvxpk4/o=; h=Message-ID:Date:MIME-Version:From:Subject:To; b=o9ACopP0yMbOi9gOjHvj58mmxO6agR1+7Ge+3x/HR8OUrQgbGlPltBJxJZqD25ilKRh3B7qyWW9Y+XU4Uk7nja4rlVEksDaOFC0KAeBnMWUcTGXn6tXmsT27E80/JMEBKWTtHymVx/02BD+5vgaj9RpD5hdCixDrf0+reNqoCuc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from omf05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 08A191404BC for ; Sat, 20 Jan 2024 18:17:17 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: Brian.Inglis@SystematicSW.ab.ca) by omf05.hostedemail.com (Postfix) with ESMTPA id 8EC9A2000D for ; Sat, 20 Jan 2024 18:17:15 +0000 (UTC) Message-ID: <9d3d3c81-e8e1-4e75-b585-d6425cbc5335@systematicsw.ab.ca> Date: Sat, 20 Jan 2024 11:17:14 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: brian.inglis@systematicsw.ab.ca Subject: Re: -Wall Reply-To: newlib@sourceware.org To: newlib@sourceware.org References: Content-Language: en-CA Autocrypt: addr=brian.inglis@systematicsw.ab.ca; keydata= xjMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePbN LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT7ClgQTFggA PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDM44BF6KcfMSCisGAQQBl1UB BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAfCfgQYFggAJhYhBMM5 /lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5 RSyTY8X+AQ== Organization: Systematic Software In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspamout06 X-Rspamd-Queue-Id: 8EC9A2000D X-Stat-Signature: wbkbdp65hpnu8yb8yofwwgech3yai8pt X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361 X-Session-ID: U2FsdGVkX1+GNmqGO3+RwBMge3BwkRph6ej/YK55Aps= X-HE-Tag: 1705774635-624691 X-HE-Meta: U2FsdGVkX1+I4ixIueCgMMrLH8ne4/y0XtbPbS5nW6tEsG7Ys2t0Lrqxpxtimga3JiDh0q8KEf+CVI+N7Ke+srPVIRZuoFxKOGfwFhVWfi9zrvmIe9Be2dXrs/cC8TuqdGBH2B4kgc242QfB0zJ6+1w8Dq3LEAaOiiikNo/1BhqMITNDKLviz7/8Dnnlg/obWcX0wo5K++drsLbCPxPTryNWbw2YXcGiWdMrCcYBYdvKK80v3ZbrQl1KDZ4jtk30mkHVRN20xairiTzZHppSgNxiqCcI0a3bB6/nKwnekXp6/aGFAXNCZQA+Z7UEBEGB X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2024-01-19 05:55, Corinna Vinschen wrote: > Hi folks, > > 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 >= 0 ^ b == 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? ++ I also like: -Wextra -Wformat=2 -Wformat-overflow=2 -Werror=format-security to get more useful warnings, and error if there are security issues like totally variable format strings; use `info gcc W...` for descriptions; YL/100kmMV I have also found the following work well for development with recent gcc: -fanalyzer -fsanitize-recover=all -fstack-check -fstack-protector-all --param=ssp-buffer-size=4 but may be inappropriate for production builds; use `info gcc f...` for descriptions. -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry