libstdc++: Tweak comment on generated #endif lines in bits/version.h

Make the #endif comment match the #if condition in the generated code.

Also adjust a comment in the Scheme code which describes the logic. The
__glibcxx_NAME macro is not defined _unconditionally_, as it still
depends on the conditions in cxxmin, extra_cond etca,. and the
__cpp_lib_NAME macro now depends on no_stdname too.

libstdc++-v3/ChangeLog:

	* include/bits/version.tpl: Fix comment on #endif. Tweak
	description of when macros are defined.
	* include/bits/version.h: Regenerate.

Reviewed-by: Arsen Arsenović <arsen@aarsen.me>
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
This commit is contained in:
Jonathan Wakely
2025-10-08 12:42:41 +01:00
committed by Jonathan Wakely
parent 0738f0ae35
commit 71e95e871d
2 changed files with 229 additions and 228 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -132,10 +132,11 @@ h
This macro block defines two versions of each FTM:
1. __glibcxx_NAME, which is defined unconditionally, and
2. __cpp_lib_NAME, which is defined only if marked as wanted.
1. __glibcxx_NAME, which is defined as long its conditions are met, and
2. __cpp_lib_NAME, which is defined only if __glibcxx_want_NAME is defined
and no_stdname is not set.
This allows FTMs to depend on eachother in their definitions without messing
This allows FTMs to depend on each other in their definitions without messing
with the exported values.
This can also be used by bits that do not want to expose FTMs that they can't
@@ -155,7 +156,7 @@ h
# endif
/*{ ENDFOR values
}*/# endif
#endif /* !defined(__cpp_lib_/*{name}*/) && defined(__glibcxx_want_/*{name}*/) */
#endif /* !defined(__cpp_lib_/*{name}*/) */
#undef __glibcxx_want_/*{name
}*//*{ (unless (last-for?) "\n\n" "\n")}*/
/*{ ENDFOR ftms }*//*{