From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE2AB129A73; Tue, 16 Apr 2024 11:41:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=63.228.1.57 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713267665; cv=none; b=DnmurTIRLFaZXwzvOfEAPox9GZnZLaFPZ5eXyda9YqfhgkkBeZPs7UBboh1H1qYOpmazTTVmqOkitka/m/HTtWRSr/NdcxWspngv+T28sXnxiZ/+1nf/QAxRvtbS+U7eIp8QUqyPC8uL/OsCEA67cj75bRBX1cvhSgH+zWOj1RM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713267665; c=relaxed/simple; bh=kNJU8Ltay0OqFj6q8sYh4jLmXUE3xZPHeMman0C8bLM=; h=Date:From:To:Cc:Subject:Message-ID:References:Mime-Version: Content-Type:Content-Disposition:In-Reply-To; b=cGwAhZhM6k4OkMiU2U6KspbcIi90FVxthTWFGP2to8cGVvDt3rHlYSibcUHY06QkOSeRplBOisDLuzOLmC/nuaT166IsJknk3xi9aCM+goh6HrvJ4pSXCO3VhHQg/x2NpcVRvD4LxXEz8MM/WNEBj+yDmeK9O1nV7CK7V1JQXLg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org; spf=pass smtp.mailfrom=kernel.crashing.org; arc=none smtp.client-ip=63.228.1.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 43GAcL6I005112; Tue, 16 Apr 2024 05:38:21 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 43GAcJln005111; Tue, 16 Apr 2024 05:38:19 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 16 Apr 2024 05:38:19 -0500 From: Segher Boessenkool To: Naresh Kamboju Cc: open list , lkft-triage@lists.linaro.org, Linux Regressions , linuxppc-dev , "Aneesh Kumar K.V" , Anders Roxell , Kees Cook , Arnd Bergmann , clang-built-linux , Nick Desaulniers , Nathan Chancellor , Jeff Xu , "Naveen N. Rao" , Dan Carpenter Subject: Re: powerpc: io-defs.h:43:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic] Message-ID: <20240416103819.GQ19790@gate.crashing.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i On Tue, Apr 16, 2024 at 03:02:52PM +0530, Naresh Kamboju wrote: > In file included from arch/powerpc/include/asm/io.h:672: > arch/powerpc/include/asm/io-defs.h:43:1: error: performing pointer > arithmetic on a null pointer has undefined behavior > [-Werror,-Wnull-pointer-arithmetic] It is not UB, but just undefined: the program is meaningless. It is not a null pointer but even a null pointer constant here. It matters in places, including here. It would help if the warnings were more correct :-( Segher