From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by sourceware.org (Postfix) with ESMTPS id 1FA283851C31 for ; Fri, 1 May 2020 18:18:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1FA283851C31 Received: by mail-io1-xd2a.google.com with SMTP id w4so5681269ioc.6 for ; Fri, 01 May 2020 11:18:01 -0700 (PDT) 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:cc:content-transfer-encoding; bh=pQMPAJ9JMvtdoWMOVn08BIx/sLeJ6LM97n5qQ+Acxmw=; b=hxPQvLuQvjEVAM44SccnM0ARy0EKQJZDGt4a9CVlUnc7ra7P5Ye2gEX8MyGulL+bpR MT61AgfcDb3QVOFKBFHSBvNDw14LpDoQ8pu2hv0THMQyI8LzZ6gST5ObG8ni3p54rYUY CwjP9+Skem5aCAymQ2VinjC1hFdIeCC3enT+QkQRsBku59aaa6pTDjxE0llm4G/kMNi9 2e8OdiQl+QXmcqop8pYTk6oBuphkeRP2BCmSV0KuFEo0w7lKD6xwT8AMO5fDJ1DJLk2B bvJnH6owsaB38Zi5bb4mNDl9ZYJmo91rdukuYmfEEib1VDg1j4sENMBnIh/3/3NGDWIX sw1w== X-Gm-Message-State: AGi0PuYTOb2ZnJ4QOmZhHF2pU9hVGkNYwx2bcK7UraUojsd6fn0j7FqQ kK8TKDBa+2Vz3o5xfvAgOhMv9oPiN8Lyv+MKZxU= X-Google-Smtp-Source: APiQypI9obtBdN416+pryU7dArKkLm+MrcC754YaVPbh0AlcXrC4JzqC6yDOedv0djhGX3BIwPd+1smqQTzWfyPnD1g= X-Received: by 2002:a02:205:: with SMTP id 5mr4206645jau.78.1588357080443; Fri, 01 May 2020 11:18:00 -0700 (PDT) MIME-Version: 1.0 References: <705810366.188410.1588278611012@email.ionos.com> <1924531380.192357.1588287485150@email.ionos.com> <31960797.205994.1588353217751@email.ionos.com> In-Reply-To: <31960797.205994.1588353217751@email.ionos.com> From: Jonathan Wakely Date: Fri, 1 May 2020 19:17:49 +0100 Message-ID: Subject: Re: -fsanitize=undefined behavior To: Tom N Cc: gcc-help Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: Fri, 01 May 2020 18:18:02 -0000 On Fri, 1 May 2020 at 18:13, Tom N wrote: > > > On May 1, 2020 at 7:39 AM Jonathan Wakely wrote= : > > > > On Thu, 30 Apr 2020 at 23:58, Tom N wrote:>> >= On April 30, 2020 at 5:57 PM Jonathan Wakely wrote= :The man page says:"Unlike other similar options, -fsanitize=3Dfloat-divide= -by-zero is not enabled by -fsanitize=3Dundefined" and "Unlike other simila= r options,-fsanitize=3Dfloat-cast-overflow is not enabled by -fsanitize=3Du= ndefined"So it seems reasonable to assume that all the other suboptions are= enabled by -fsanitize=3Dundefined, and if you want *all* of them then use = -fsanitize=3Dundefined -fsanitize=3Dfloat-divide-by-zero-fsanitize=3Dfloat-= cast-overflow> Thanks for the tip. Any reason the description of -fsanitize= =3Dundefined doesn't include something like, "If the -fsanitize=3Dundefined= option is enabled all sub-options will be enabled unless otherwise specifi= ed." so it's clear?Probably because nobody has suggested doing that yet. Wo= uld you liketo propose a patch for the docs? > > The relevant place is here:https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dblo= b;f=3Dgcc/doc/invoke.texi;h=3D527d362533ab503cee9568b27808177977a52ac8;hb= =3DHEAD#l13541 > > I'd be happy to but unfortunately I'm not familiar with git. (I know...).= But here's an old-style patch off 8.4 if it helps (attached too): That'll do, thanks. I'll do the rest early next week.