From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by sourceware.org (Postfix) with ESMTPS id 820F13938C27 for ; Fri, 1 May 2020 11:40:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 820F13938C27 Received: by mail-io1-xd29.google.com with SMTP id f3so4621952ioj.1 for ; Fri, 01 May 2020 04:40:10 -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; bh=arWQBUQLwyqRaAlizWOmR3h2daiaomO9cO9i8lWI5AU=; b=qy5e1TkZFvHkHVgwTk2DnhjvEJQOCGGxniESaPnwRNOHQfY0pXLxiMwR//92lNaNa8 Q0Sbc5y7nKqpQnyvS2zvjvrQEB7mGy2w2ZW2334yTLlhCrhc+ZhE4uXvMzwuubFfpFz5 Iwq7Zh0h02NumNnK11RginTzBG1WF3FkKOoJAOgk6Gfx8NMA+VB+M3YybCBlJg0zF3Z4 Ai+e/USTDpIWFQClxi5ktxCm/DYaoAgZXpi5INJ4pPMqCNQvU2nZTx4XXP3sSnOO4rVd M0TOuk9C/wwQlDU8olfUOAlEq4wBAug2Nsdm4rV78ga0l7EzRJvi4OyfErTICsstX2rY NWFQ== X-Gm-Message-State: AGi0PubhE0fiDaud9lgMOiKK+nNZPr5Lf1VyxOUot+CpK3VwZy1dswss 7iyxvH3d3QkmBJHAV7QLJEEkcwqU0D2y141w8XUuUYzlBcQ= X-Google-Smtp-Source: APiQypJ3cCZKTQK6tERhNm4kEkZi90F3+UrKkAN9qwgTrw0vU4+hO0d1qNGwch/buGdeZexJpiwiNGmg53bjDwigtj8= X-Received: by 2002:a5d:84d4:: with SMTP id z20mr3503792ior.36.1588333209955; Fri, 01 May 2020 04:40:09 -0700 (PDT) MIME-Version: 1.0 References: <705810366.188410.1588278611012@email.ionos.com> <1924531380.192357.1588287485150@email.ionos.com> In-Reply-To: <1924531380.192357.1588287485150@email.ionos.com> From: Jonathan Wakely Date: Fri, 1 May 2020 12:39:58 +0100 Message-ID: Subject: Re: -fsanitize=undefined behavior To: Tom N Cc: gcc-help Content-Type: text/plain; charset="UTF-8" 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 11:40:11 -0000 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=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? Probably because nobody has suggested doing that yet. Would you like to propose a patch for the docs? The relevant place is here: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/doc/invoke.texi;h=527d362533ab503cee9568b27808177977a52ac8;hb=HEAD#l13541