[PATCH v4] c++/modules: Handle reflection SPLICE_SCOPE tree node

Jason Merrill jason@redhat.com
Wed Jan 28 02:44:49 GMT 2026


On 1/28/26 3:42 AM, Patrick Palka wrote:
> On Mon, 26 Jan 2026, vspefs wrote:
> 
>> Previous patches contains errors. A new patch is attached.
>>
>> I am so bad at git and I hope I get it right this time T_T
>>
>> Subject: [PATCH] Handles `SPLICE_SCOPE` tree
>>
>> This patch adds support for serializing and deserializing SPLICE_SCOPE trees in
>> C++20 modules implementation. SPLICE_SCOPE is introduced by C++26 reflection,
>> notably used for dependent splice types, thus needing to be exported/imported
>> as part of the module interface. Not handling SPLICE_SCOPE leads to ICE.
>>
>> This patch also includes 2 simple test cases: one for exporting splice scope
>> types and another for importing them.
>>
>> gcc/cp/
>>
>> 	* module.cc (trees_out::type_node): Add case for SPLICE_SCOPE.
>> 	* module.cc (trees_in::tree_node): Add case for SPLICE_SCOPE.
>>
>> gcc/testsuite/
>>
>> 	* g++.dg/modules/splice-scope-tree_a.C: New test.
>> 	* g++.dg/modules/splice-scope-tree_b.C: New test.
>>
>> Signed-off-by: vspefs <vspefs@protonmail.com>
> 
> Thanks for the patch! The code changes look good to me. However, I
> believe we can't accept DCO sign-offs for pseudonyms :/ (see
> https://gcc.gnu.org/dco.html)
> 
> Jason, do you reckon this change is small enough that we can accept it
> without a DCO sign-off?

I think so, yes.  I'm pushing this modification that adjusts the 
ChangeLog entry to make git gcc-verify happy, and replaces the sign-off 
with Reviewed-by.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-c-modules-Handle-reflection-SPLICE_SCOPE-tree-node.patch
Type: text/x-patch
Size: 3696 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20260128/28a91196/attachment.bin>


More information about the Gcc-patches mailing list