Message ID | 657a408d-7d92-0714-5528-230e3f17ad93@suse.cz |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EE8BA384B078 for <patchwork@sourceware.org>; Thu, 5 May 2022 12:19:43 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 10F8E3853804 for <gcc-patches@gcc.gnu.org>; Thu, 5 May 2022 12:18:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 10F8E3853804 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 441FC1F8D5 for <gcc-patches@gcc.gnu.org>; Thu, 5 May 2022 12:18:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651753125; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v0pz0r33BJpw9+xDUvGA56HJjMdHHbviGhChvDHtc2U=; b=EBDHrMmj3SYGXaVpSS8jZn7ICYApUeyenQlm1zIT428hYdpU8sBG7/7QI7sO1hWC6ITBH2 mJCoC1tVWlIpVF1nUIGyl9mEcuTX60+6wtofjFCkBBqqZcemdLPec/XzoFJt/DdAQXOMBO 9W+wWQh2PqdnykcdfusFAkYn+hPiIEc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651753125; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v0pz0r33BJpw9+xDUvGA56HJjMdHHbviGhChvDHtc2U=; b=5WtQNFVxw2W7xbW1rVhzx/Sck0aSaryHwddrguXm1cr1Acjl/PfLRCUIN+OsNXyPO7BcLi vF+B7JddpZQaaaAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2F73E13A65 for <gcc-patches@gcc.gnu.org>; Thu, 5 May 2022 12:18:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id RGJbCqXAc2JufAAAMHmgww (envelope-from <mliska@suse.cz>) for <gcc-patches@gcc.gnu.org>; Thu, 05 May 2022 12:18:45 +0000 Message-ID: <657a408d-7d92-0714-5528-230e3f17ad93@suse.cz> Date: Thu, 5 May 2022 14:18:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 From: =?utf-8?q?Martin_Li=C5=A1ka?= <mliska@suse.cz> Subject: [PATCH] Remove non-ANSI C path in ansidecl.h. To: gcc-patches@gcc.gnu.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
Remove non-ANSI C path in ansidecl.h.
|
|
Commit Message
Martin Liška
May 5, 2022, 12:18 p.m. UTC
Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin include/ChangeLog: * ansidecl.h (PTR): Remove Not ANCI C part. --- include/ansidecl.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-)
Comments
On Thu, May 5, 2022 at 2:19 PM Martin Liška <mliska@suse.cz> wrote: > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > include/ChangeLog: > > * ansidecl.h (PTR): Remove Not ANCI C part. > --- > include/ansidecl.h | 16 +--------------- > 1 file changed, 1 insertion(+), 15 deletions(-) > > diff --git a/include/ansidecl.h b/include/ansidecl.h > index 4275c9b9cbd..f42c6afc7e9 100644 > --- a/include/ansidecl.h > +++ b/include/ansidecl.h > @@ -89,21 +89,7 @@ So instead we use the macro below and test it against specific values. */ > # endif > #endif > > -#else /* Not ANSI C. */ > - > -#define PTR char * > - > -/* some systems define these in header files for non-ansi mode */ > -#undef const > -#undef volatile > -#undef signed > -#undef inline > -#define const > -#define volatile > -#define signed > -#define inline > - > -#endif /* ANSI C. */ You'd have to ask the sourceware side as well (binutils), but for sure either the guarding #if should be removed or the #else path should contain an #error. Richard. > +#endif > > /* Define macros for some gcc attributes. This permits us to use the > macros freely, and know that they will come into play for the > -- > 2.36.0 >
On Thu, May 5, 2022 at 8:27 AM Richard Biener via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > On Thu, May 5, 2022 at 2:19 PM Martin Liška <mliska@suse.cz> wrote: > > > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > > > Ready to be installed? > > Thanks, > > Martin > > > > include/ChangeLog: > > > > * ansidecl.h (PTR): Remove Not ANCI C part. > > --- > > include/ansidecl.h | 16 +--------------- > > 1 file changed, 1 insertion(+), 15 deletions(-) > > > > diff --git a/include/ansidecl.h b/include/ansidecl.h > > index 4275c9b9cbd..f42c6afc7e9 100644 > > --- a/include/ansidecl.h > > +++ b/include/ansidecl.h > > @@ -89,21 +89,7 @@ So instead we use the macro below and test it against specific values. */ > > # endif > > #endif > > > > -#else /* Not ANSI C. */ > > - > > -#define PTR char * > > - > > -/* some systems define these in header files for non-ansi mode */ > > -#undef const > > -#undef volatile > > -#undef signed > > -#undef inline > > -#define const > > -#define volatile > > -#define signed > > -#define inline > > - > > -#endif /* ANSI C. */ > > You'd have to ask the sourceware side as well (binutils), but for sure > either the > guarding #if should be removed or the #else path should contain an #error. Maybe just make it a #warning for one release, and then if no one complains, turn it into an #error in the following release? > > Richard. > > > +#endif > > > > /* Define macros for some gcc attributes. This permits us to use the > > macros freely, and know that they will come into play for the > > -- > > 2.36.0 > >
On 5/5/22 14:27, Richard Biener wrote: > You'd have to ask the sourceware side as well (binutils), but for sure > either the Yes, I've asked and they proved that. > guarding #if should be removed or the #else path should contain an #error. All right, I'm going to install the version w/o #if. Martin
diff --git a/include/ansidecl.h b/include/ansidecl.h index 4275c9b9cbd..f42c6afc7e9 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -89,21 +89,7 @@ So instead we use the macro below and test it against specific values. */ # endif #endif -#else /* Not ANSI C. */ - -#define PTR char * - -/* some systems define these in header files for non-ansi mode */ -#undef const -#undef volatile -#undef signed -#undef inline -#define const -#define volatile -#define signed -#define inline - -#endif /* ANSI C. */ +#endif /* Define macros for some gcc attributes. This permits us to use the macros freely, and know that they will come into play for the