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 BC4E5389851A for ; Thu, 30 Apr 2020 21:58:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BC4E5389851A Received: by mail-io1-xd29.google.com with SMTP id k6so3169722iob.3 for ; Thu, 30 Apr 2020 14:58: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=BjJpjTJFGU4TBZbpwa1fVCcszlL2EYKcw32gjxoCqQ4=; b=MV88+D017s916HGlMR222/K1zzthiF+bXOdNPz0P0eH1fVs1lWIzAs3FISo3sComNN ZJpTKLlM/bZG1qmVWrUtDT2kzOiy8EvD4HgWRPZU0n3np+TNwUyOqFpNqwW5rrpCqdNB ZlhVzCaN8zGHtJjaH1k3BdF7L1PTez5qdBu7a/EsfKcY9yUhcnHEHt4eWD4ydPDt+75g 7XATRTNzUF1LLD6XGVN1MBCKB4BD6pArUpB1zfC77WCsX1bMoMGaMpPd9175+bwh2apZ LIykuKRgrnhafo0RHkFUl3cIrx3hrXac0fjOy67xu3RFtqJ193c9iTnVxuzBtLNrszbS NUFg== X-Gm-Message-State: AGi0PuZHqSfMwuzmAeR6pJNLRyVTod/+R8PfcIj8yhqH5ciIZ6n5UTJU pzD+XR95PAw7V59BmZODdEzh3ZapiyLdZdvnRoP0h11jbtc= X-Google-Smtp-Source: APiQypL22in3WOHo+HfvlrGpBJuuIiev5qgSs9zt4Gt96gXMY1VvNrvNAdNeOz12De7PWsMrHJu6H8K8MW2N19zhbeo= X-Received: by 2002:a6b:e412:: with SMTP id u18mr892439iog.95.1588283881163; Thu, 30 Apr 2020 14:58:01 -0700 (PDT) MIME-Version: 1.0 References: <705810366.188410.1588278611012@email.ionos.com> In-Reply-To: <705810366.188410.1588278611012@email.ionos.com> From: Jonathan Wakely Date: Thu, 30 Apr 2020 22:57: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, 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: Thu, 30 Apr 2020 21:58:02 -0000 On Thu, 30 Apr 2020 at 22:27, Tom N wrote: > > The man page for -fsanitize=3Dundefined lists a bunch of sub-options (eg.= -fsanitize=3Dshift, -fsanitize=3Dshift-exponent, etc). If I include -fsan= itize=3Dundefined does it enable all of the sub-options, or none, or someth= ing in between? If it doesn't enable all sub-options, is there an easy way= to do that short of specifying all of them? The man page says: "Unlike other similar options, -fsanitize=3Dfloat-divide-by-zero is not enabled by -fsanitize=3Dundefined" and "Unlike other similar options, -fsanitize=3Dfloat-cast-overflow is not enabled by -fsanitize=3Dundefined" 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