diff options
author | Arsen Arsenović <arsen@aarsen.me> | 2025-03-26 12:26:39 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2025-04-04 09:58:54 +0100 |
commit | 6b7e447503d147e22fa7f38395574beae91b3d8c (patch) | |
tree | 5f0d8f38de350ce2ec8ff77ad1682b23da7a3beb | |
parent | 08e803aa9becf407eb7ef7cf6af96e3bd0d02d38 (diff) | |
download | gcc-6b7e447503d147e22fa7f38395574beae91b3d8c.zip gcc-6b7e447503d147e22fa7f38395574beae91b3d8c.tar.gz gcc-6b7e447503d147e22fa7f38395574beae91b3d8c.tar.bz2 |
libstdc++: allow defining version FTMs without standard-named macros
This is useful to provide libstdc++-internal-only macros.
libstdc++-v3/ChangeLog:
* include/bits/version.tpl: Implement no_stdname.
* include/bits/version.def: Document no_stdname.
-rw-r--r-- | libstdc++-v3/include/bits/version.def | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/version.tpl | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def index 1468c04..8569d9f 100644 --- a/libstdc++-v3/include/bits/version.def +++ b/libstdc++-v3/include/bits/version.def @@ -30,6 +30,7 @@ AutoGen Definitions version.tpl; // ftms = { // name = FTM NAME; // [stdname = FTM STANDARD MACRO NAME;] +// [no_stdname = true;] // values = { // v = VALUE FOR FTM IF MATCHING; // [extra_cond = STRING;] @@ -56,7 +57,8 @@ AutoGen Definitions version.tpl; // stdname configures the name of the *standard* macro emitted, i.e. it // replaces only the __cpp_lib_ macro in the emitted definition. Defaults to -// __cpp_lib_${name} +// __cpp_lib_${name}. If no_stdname exists (with any value), the stdname +// define is not emitted. // N.B This list needs to be in topological sort order, as later entries in // this list can and do use the earlier entries. diff --git a/libstdc++-v3/include/bits/version.tpl b/libstdc++-v3/include/bits/version.tpl index dd5f851..ccda71d 100644 --- a/libstdc++-v3/include/bits/version.tpl +++ b/libstdc++-v3/include/bits/version.tpl @@ -143,13 +143,15 @@ h }*/# /*{(unless (first-for?) "el")}*/if /*{(generate-cond)}*/ # define __glibcxx_/*{name}*/ /*{v}*/L -# if defined(__glibcxx_want_all) || defined(__glibcxx_want_/*{name}*/) +# if defined(__glibcxx_want_all) || defined(__glibcxx_want_/*{name}*/)/*{ + IF (not (exist? "no_stdname")) }*/ # define /*{ ;; Compute the name for this FTM based on stdname/name. (if (exist? "stdname") (get "stdname") (format #f "__cpp_lib_~a" (get "name"))) -}*/ /*{v}*/L +}*/ /*{v}*/L/*{ + ENDIF no_std_name }*/ # endif /*{ ENDFOR values }*/# endif |