From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.perfora.net (mout.perfora.net [74.208.4.196]) by sourceware.org (Postfix) with ESMTPS id CFF843898538 for ; Thu, 30 Apr 2020 22:58:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CFF843898538 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesniffer.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nospam@codesniffer.com Received: from oxuslxaltgw07.schlund.de ([10.72.76.63]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MWD5b-1jeyH6241x-00XIht; Fri, 01 May 2020 00:58:05 +0200 Date: Thu, 30 Apr 2020 18:58:05 -0400 (EDT) From: Tom N Reply-To: Tom N To: Jonathan Wakely Cc: gcc-help Message-ID: <1924531380.192357.1588287485150@email.ionos.com> In-Reply-To: References: <705810366.188410.1588278611012@email.ionos.com> Subject: Re: -fsanitize=undefined behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.1-Rev30 X-Originating-Client: open-xchange-appsuite X-Provags-ID: V03:K1:sqndhY2tvh0YHFCke+oiKktRdXF3rb0MnmyThLAN+BxlBAWkZ5Z pE4C4/rZ0IWUd4sZD1ZVpdT7604MSuJNSo3ARM49x7rNuCNfDE3SDwVLnsAT2uZrQ1mbGmi +ujVRotGOJeuacvFNX9BnOpN96jS6ridZ+c0dEFWQlaq6T0KEkz8k8gcMeWgNfC844CFB4P 8Sy5QAd/1koSSSsD8IUjw== X-UI-Out-Filterresults: notjunk:1;V03:K0:+uS8nebeeeQ=:5XQ5PuiIRXLlpGNfPdXoP7 93HJII+AzkxjMCFGhdyTJK+0vwtbXwiNmr3sM71JhyXOSHWUhDXARA0sjJsyjTrDk6G+NIig7 4N/AxQaC6dOzV6N7d93Rxv3iDMuS6sn27WDKb7ps4Irj2BUUffpGMwbHU/DKjYudCxDyUR4KV az6g0cmmKfemOodOaS/nmvRrE4WHPwfa+OtIi9igIaYe6WDdnDibnC5dQpr7/nQt7pt0NntNY rr488FE09uXQ4O7SrfapaQ0iEQD1u2NgZwTboSS9mU0nknUoIlfJ9PLo/57URhaL7+MZHLsQI FMBe55DrMoGo+gcRbaQIna2hhKWByCeHIIBGApTdaGPunKrVuCYEUvxibQ0KaxEYzcKymQeNa 4Y6WTp+LVXrvsB4dR/rIJ+rsUSgWUv34fKKyjZrPRD/xSRKSQnMO2YqekQhA+qrDY4482fwiy Ehz9offjn+r6fuS8shq+M8Ha99r/tRMjsCPaT+NT5VdkuXG3XN7zXtw7uSvgmwTDbv1JRwwoR IFl71PORPWY2zHYV65mn9AYP05r3+9WKtZ8hK5IYeqGhVgA+4weh+df5/IUOtDfVgoQTeJ9z6 ni15XK/nuZvYH/6l8udFJgMHcaNCBUnQc9S3i8miLXp51leitVZi5z6hBzCSXa3KV19qAsuw0 4nkjhanmoN7mJKkqIiBBDLQTYRlJTyyWa1xvqi5TBKFEwRLYk0zyFoMM1SlYuVgcdJuHd8ebT 5A+RjxgxI+vc404ktDz83gasY4D9CrkzCPiwFHk6bMsF8CRTbDLprYOOjFXNbQKE+OvvRfP4q rOUFuL+9pif6ZYRQGJ+Pus817DWq07k1r4VZ5SdgrGAGYvlGaRljKDhuohzL2UV/GkSH6zC X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2020 22:58:08 -0000 > On April 30, 2020 at 5:57 PM Jonathan Wakely wrote: > The man page says: > "Unlike other similar options, -fsanitize=float-divide-by-zero is not enabled by -fsanitize=undefined" and "Unlike other similar options,-fsanitize=float-cast-overflow is not enabled by -fsanitize=undefined" > So it seems reasonable to assume that all the other suboptions are enabled by -fsanitize=undefined, and if you want *all* of them then use -fsanitize=undefined -fsanitize=float-divide-by-zero-fsanitize=float-cast-overflow Thanks for the tip. Any reason the description of -fsanitize=undefined doesn't include something like, "If the -fsanitize=undefined option is enabled all sub-options will be enabled unless otherwise specified." so it's clear?