From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115548 invoked by alias); 10 Jun 2019 18:32:47 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 115423 invoked by uid 89); 10 Jun 2019 18:32:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=jozefl.gcc@gmail.com, jozeflgccgmailcom, dirty X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Jun 2019 18:32:45 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x5AIWgbT000961; Mon, 10 Jun 2019 13:32:43 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x5AIWgIO000960; Mon, 10 Jun 2019 13:32:42 -0500 Date: Mon, 10 Jun 2019 18:32:00 -0000 From: Segher Boessenkool To: Jozef Lawrynowicz Cc: Richard Biener , David Malcolm , GCC Development Subject: Re: Preventing ISO C errors when using macros for builtin types Message-ID: <20190610183242.GG31586@gate.crashing.org> References: <20190605142559.05791323@jozef-kubuntu> <20190610172031.66eabae6@jozef-kubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190610172031.66eabae6@jozef-kubuntu> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00084.txt.bz2 On Mon, Jun 10, 2019 at 05:20:31PM +0100, Jozef Lawrynowicz wrote: > On Thu, 6 Jun 2019 10:09:32 +0200 > Richard Biener wrote: > > > On Wed, Jun 5, 2019 at 3:26 PM Jozef Lawrynowicz wrote: > > > > > > I would appreciate if anyone can help me decide if: > > > - It would be OK for the use of builtin macros such as __SIZE_TYPE__ to somehow > > > not trigger the "pedantic errors", and what a valid approach might look like > > > > I think that would be OK - note you could also modify your target board. > > I'm now realising that the most straightforward way to fix this issue will be > to just modify the configuration of the DejaGNU target board, so that > DEFAULT_CFLAGS is set there and declarations of DEFAULT_CFLAGS in the testsuite > that would set -pedantic-errors are never used. That is not a fix, that is sweeping the problem under the rug. As a somewhat dirty hack I added #if __MSP430X_LARGE__ #undef __SIZE_TYPE__ __extension__ typedef unsigned __int20 __SIZE_TYPE__; #endif to the start of the installed stddef.h, and that fixes the problem fine, for correct programs that do not forget to include (directly or indirectly), anyway. Segher