From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id 64F7C3938C37 for ; Sat, 12 Sep 2020 21:04:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 64F7C3938C37 Received: by mail-lj1-x22d.google.com with SMTP id k25so15329005ljg.9 for ; Sat, 12 Sep 2020 14:04:37 -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; bh=VX7t7b1LEMeGMvRbjuHcIpj7M9wMc4gV3GK0pJWc8Zs=; b=tOmFf0u8nKMJ8hdIXYK2oU7hM91Wl6qN/lbI+ZYknRcTe6ebHytnwG2gMo0ihsBwyN 95Q0R73j+ALTxf8v+VSHlePt0PypuhP/yluihwvLpfdPMXoq7CJe68Dk1XCvbWBGeVWc A5BwC0wS8ZgZTGKiXccSN2i3WfIjQeeU/Vf5Ws0P7Akp1Y64TTPBMowJ7+XoZsjegrvi il9fLEBPKX3XfJrBEfacN7jIrAGsGDNDnw5xDuDIor2HexNIhwvGsVdm1S5X0wnYANMe Ot5956EV0nVQ18XM/aWjxN9TqCXBb3SBgFiShi2jZ8SILrQw12qX71j/BT295E6y730h ZQ8Q== X-Gm-Message-State: AOAM530D396No0LOW+WyTlWzdtJ+7IcE+wEhCjEqx/dc5flC/MSzvx9+ lwryoOzvjWAp4c2F2/4NflUWylFtQ2lYNXIDLj26c53eFHV1sg== X-Google-Smtp-Source: ABdhPJyEivpMYoOQUv/9MNQ7/IpAh0BR6aIH25Fdcn8EU8wGRpSmnczO3S3eK0tUGQRPpOkb+bIrLRikSYmQBD9QXDY= X-Received: by 2002:a2e:4e01:: with SMTP id c1mr2662430ljb.144.1599944675492; Sat, 12 Sep 2020 14:04:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: William Tambe Date: Sat, 12 Sep 2020 16:04:23 -0500 Message-ID: Subject: Re: Unconditional trap To: gcc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 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: Sat, 12 Sep 2020 21:04:38 -0000 On Sat, Sep 12, 2020 at 3:26 PM Marc Glisse wrote: > > On Sat, 12 Sep 2020, William Tambe via Gcc-help wrote: > > > However it causes the compiler to generate a trap when address 0 is > > used; in the example below, I have a function that prints characters > > through the UART using address 0; but the resulting assembly generates > > a function that traps instead. > > Are you using -fno-delete-null-pointer-checks? Using -fno-delete-null-pointer-checks helps. Is there a way to make it permanent in the GCC source such that providing that option is not needed ? > > -- > Marc Glisse