public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Jason Merrill <jason@redhat.com>, gcc-patches@gcc.gnu.org
Subject: [PATCH] c++: Predefine __cpp_named_character_escapes=202207L for C++23 [PR106648]
Date: Mon, 22 Aug 2022 17:50:19 +0200	[thread overview]
Message-ID: <YwOlu2HxOJsWaiSZ@tucnak> (raw)
In-Reply-To: <YwJ22kdlxJ70JcPJ@tucnak>

On Sun, Aug 21, 2022 at 08:18:02PM +0200, Jakub Jelinek via Gcc-patches wrote:
> Resending with the generated uname2c.h part of patch split into
> compressed attachment, as it was too large for gcc-patches.

Unfortunately seems I forgot about the feature test macro for this, here
is an incremental patch for it.

Tested on x86_64-linux and i686-linux, ok for trunk together with the
rest of the implementation?

2022-08-22  Jakub Jelinek  <jakub@redhat.com>

	PR c++/106648
	* c-cppbuiltin.cc (c_cpp_builtins): Predefine
	__cpp_named_character_escapes to 202207L.

	* g++.dg/cpp23/feat-cxx2b.C: Test __cpp_named_character_escapes.

--- gcc/c-family/c-cppbuiltin.cc.jj	2022-02-09 20:13:51.492305530 +0100
+++ gcc/c-family/c-cppbuiltin.cc	2022-08-22 17:43:50.882791224 +0200
@@ -1080,6 +1080,7 @@ c_cpp_builtins (cpp_reader *pfile)
 	  cpp_define (pfile, "__cpp_if_consteval=202106L");
 	  cpp_define (pfile, "__cpp_constexpr=202110L");
 	  cpp_define (pfile, "__cpp_multidimensional_subscript=202110L");
+	  cpp_define (pfile, "__cpp_named_character_escapes=202207L");
 	}
       if (flag_concepts)
         {
--- gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C.jj	2022-02-09 20:13:51.577304369 +0100
+++ gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C	2022-08-22 17:45:26.920478034 +0200
@@ -557,3 +557,9 @@
 #elif __cpp_multidimensional_subscript != 202110
 #  error "__cpp_multidimensional_subscript != 202110"
 #endif
+
+#ifndef __cpp_named_character_escapes
+#  error "__cpp_named_character_escapes"
+#elif __cpp_named_character_escapes != 202207
+#  error "__cpp_named_character_escapes != 202207"
+#endif


	Jakub


  reply	other threads:[~2022-08-22 15:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-21 18:18 [PATCH] c++: Implement C++23 P2071R2 - Named universal character escapes [PR106648] Jakub Jelinek
2022-08-22 15:50 ` Jakub Jelinek [this message]
2022-08-24 20:22 ` Jason Merrill
2022-08-25  8:49   ` [PATCH] c++, v2: " Jakub Jelinek
2022-08-25 13:34     ` Jason Merrill
2022-08-30 21:10     ` Joseph Myers
2022-08-30 21:18       ` Jakub Jelinek
2022-08-30 21:37         ` Jakub Jelinek
2022-08-31 14:18           ` Jason Merrill
2022-08-31 14:35           ` Jakub Jelinek
2022-08-31 14:52             ` Jason Merrill
2022-08-31 15:07               ` Jakub Jelinek
2022-08-31 15:25                 ` Jakub Jelinek
2022-08-31 16:14                 ` Jason Merrill
2022-09-01 11:14                   ` Jakub Jelinek
2022-09-01 19:00                     ` Jason Merrill
2022-09-01 20:23                       ` Jakub Jelinek
2022-09-03 10:29                       ` [PATCH] libcpp, v3: Named universal character escapes and delimited escape sequence tweaks Jakub Jelinek
2022-09-03 10:54                         ` Jakub Jelinek
2022-09-05  7:54                           ` Jakub Jelinek
2022-09-07  1:32                           ` Jason Merrill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YwOlu2HxOJsWaiSZ@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).