>On Fri, Jan 03, 2025 at 05:18:55PM +0000, xxx wrote: >> From: yxj-github-437 <2457369...@qq.com> >> >> This patch attempts to fix an error when build module std. The reason for the >> error is __builrin_va_list (aka struct __va_list) is an internal linkage. so >> attempt to handle this builtin type by identifying whether >> DECL_SOURCE_LOCATION (entity) >> is BUILTINS_LOCATION. >> > >Hi, thanks for the patch! I suspect this may not be sufficient to >completely avoid issues with the __gnuc_va_list type; in particular, if >it's internal linkage that may prevent it from being referred to in >other ways by inline functions in named modules (due to P1815). > >Maybe a better approach would be to instead mark this builtin type as >TREE_PUBLIC (presumably in aarch64_build_builtin_va_list)?
Thanks for reply, I notice a function `tree decl_linkage (tree decl)` in cp/tree.cc, which can get a decl's linkage. The type marked with TREE_PUBLIC will return lk_external. Should I add a builtin type also has lk_external?