Files
gcc/libstdc++-v3/include
Jakub Jelinek ec5605dafe c++: Handle annotations in data_member_spec/define_aggregate
The following patch attempts to implement another part of P3795R2,
in particular the addition of annotations to data_member_options
and handling it in data_member_spec/define_aggregate etc.

2026-03-31  Jakub Jelinek  <jakub@redhat.com>

libstdc++-v3/
	* include/std/meta (std::meta::data_member_options): Add annotations
	member.
gcc/cp/
	* reflect.cc (get_range_elts): If N is negative, just use the tree
	as object to extract range from instead of finding Nth argument
	of a call.
	(eval_is_bit_field, eval_type_of, eval_size_of, eval_alignment_of,
	eval_bit_size_of, eval_has_identifier, eval_identifier_of): Adjust
	function comments from P3795R2.
	(eval_display_string_of): Handle annotations in
	REFLECT_DATA_MEMBER_SPEC.
	(eval_annotations_of): Adjust function comments from P3795R2.
	(eval_data_member_spec): Likewise.  Read and diagnose annotations.
	(eval_define_aggregate): Adjust function comments from P3795R2.
	Create annotations.
	(compare_reflections): Compare REFLECT_DATA_MEMBER_SPEC annotations.
	* mangle.cc (write_reflection): Mangle REFLECT_DATA_MEMBER_SPEC
	annotations.
gcc/testsuite/
	* g++.dg/reflect/data_member_spec5.C: New test.
	* g++.dg/reflect/data_member_spec6.C: New test.
	* g++.dg/reflect/display_string_of1.C: Expect extra ", {}" before
	closing paren for empty annotations, otherwise a list of annotations.
	* g++.dg/reflect/u8display_string_of1.C: Likewise.
	* g++.dg/reflect/define_aggregate9.C: New test.
	* g++.dg/reflect/mangle1.C: Test mangling of REFLECT_DATA_MEMBER_SPEC
	annotations.

Reviewed-by: Jason Merrill <jason@redhat.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
2026-04-01 00:16:36 +02:00
..
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00