From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 5A6D63858D28 for ; Fri, 6 Jan 2023 18:24:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A6D63858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x62b.google.com with SMTP id tz12so5253091ejc.9 for ; Fri, 06 Jan 2023 10:24:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SWnbyZqaWJTNBx+aJT4wAzJFAZKi3y33P2swmz6JMyQ=; b=cWlEd8jP/Uk2ftl6+ycMRw/s9bezqSWOLQERMbjBlJDgf4bKk3N+vvPVOHG1ZtGKfN THCLNgP0ki3sq0GC4PAjzn86S6yZhgYXtCIDxGheNPJkItkn6fxZBCi8rb1wAfdlfuGi CNmWRU+M2y5RReMlUHL8feqhdQqYOX1DWDkJUHhIvNXqQStkHxHQyM2a7y7FZSNux6RN oYt0UBDy+KKnezbYONoZiT+XBUOnfWU4MkPgguf5YmsD6J/bSQNpyQ2riQLrt2nB7zFR kNm7vvMvDu0O7jWRg/RS1OaYGp4T+tMQp+QtpKrE37vWGrdQrLHY8+3zZhwu9gVsy9Un tSXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SWnbyZqaWJTNBx+aJT4wAzJFAZKi3y33P2swmz6JMyQ=; b=AwPtH0XOpSHhaylx4GZa/PizOX4pHmEdxIgRctPoA4toZ/7rqiyngvdeBR3gLZrFd3 YhHaTN7M0aK/Rspd7u6SmSdU1nF0eEOqxZcnvJBgGslstPjJk7g0+K7qYJV9kS/Sb22L PNPIwH85LcBs12WF98AJ5dffysyUKEB+n8W7mllVMqpEz339kb1yqFEyz15KvBw2Jt34 3kmNq3b24yWYVqKZi5szzCsgdhMOClMgRPFCC0fyKT0bgBUYWg5/f++GcSkSsq5jMgZU sZa8tbObxneNprGeSygLPBuU66t0ojn8Mg4Y2u3/DFjIa65vKewTg5upA6P0dYImufF8 Qf+g== X-Gm-Message-State: AFqh2koHWJ4ed8FKJPF5WPMhXeml25oOTZMUztiNZYPVtry7nWP5yQXg lEczCKKiKmM66YqQYzgwewONIAjGe8WAOX3a5hg= X-Google-Smtp-Source: AMrXdXvk6tcNUKGWNpVRJAcKX40kxxHssqS8ab6S1UdWU51SnhsniEKUbASxKHEkqH9493t94zzp8KodfTwJE0zjUN0= X-Received: by 2002:a17:906:9243:b0:7c0:d58f:3409 with SMTP id c3-20020a170906924300b007c0d58f3409mr3020590ejx.416.1673029448985; Fri, 06 Jan 2023 10:24:08 -0800 (PST) MIME-Version: 1.0 References: <6defa548-2da3-6cba-0372-f1e6c6b64c81@suse.cz> In-Reply-To: From: Jonathan Wakely Date: Fri, 6 Jan 2023 18:23:57 +0000 Message-ID: Subject: Re: [PATCH] Remove legacy pre-C++ 11 definitions To: Andrew Pinski Cc: =?UTF-8?Q?Martin_Li=C5=A1ka?= , gcc-patches Content-Type: multipart/alternative; boundary="0000000000000189f405f19c8689" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000000189f405f19c8689 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 6 Jan 2023, 17:21 Andrew Pinski, wrote: > On Fri, Jan 6, 2023 at 4:21 AM Martin Li=C5=A1ka wrote: > > > > As mentioned in the PRs, both are defined in C++ 11 > > which is a version we depend on. > > > > Ready to be installed now? > > There is another #define NULL below: > /* System headers may define NULL to be an integer (e.g. 0L), which cannot > be > used safely in certain contexts (e.g. as sentinels). Redefine NULL to > nullptr in order to make it safer. Note that this might confuse system > headers, however, by convention they must not be included after this > point. > */ > #ifdef __cplusplus > #undef NULL > #define NULL nullptr > #endif > Seems to me that GCC code should just use nullptr directly not redefine NULL. Thanks, > Andrew Pinski > > > > > Thanks, > > Martin > > > > PR middle-end/108311 > > PR middle-end/108312 > > > > gcc/ChangeLog: > > > > * system.h (va_copy): Remove as it is defined in C++ 11. > > (NULL): Likewise. > > --- > > gcc/system.h | 13 ------------- > > 1 file changed, 13 deletions(-) > > > > diff --git a/gcc/system.h b/gcc/system.h > > index 5eaeb9d2d03..0d06b9749e5 100644 > > --- a/gcc/system.h > > +++ b/gcc/system.h > > @@ -31,25 +31,12 @@ along with GCC; see the file COPYING3. If not see > > /* We must include stdarg.h before stdio.h. */ > > #include > > > > -#ifndef va_copy > > -# ifdef __va_copy > > -# define va_copy(d,s) __va_copy (d, s) > > -# else > > -# define va_copy(d,s) ((d) =3D (s)) > > -# endif > > -#endif > > - > > #ifdef HAVE_STDDEF_H > > # include > > #endif > > > > #include > > > > -/* Define a generic NULL if one hasn't already been defined. */ > > -#ifndef NULL > > -#define NULL 0 > > -#endif > > - > > /* Use the unlocked open routines from libiberty. */ > > > > /* Some of these are #define on some systems, e.g. on AIX to redirect > > -- > > 2.39.0 > > > --0000000000000189f405f19c8689--