https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125862
Bug ID: 125862
Summary: btf_decl_taf ignored for types
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: vineetg at gcc dot gnu.org
CC: dfaust at gcc dot gnu.org, jemarch at gcc dot gnu.org
Target Milestone: ---
Yonghong reported that gcc doesn't support the btf_decl_tag for types [1]. This
was when reviewing the pahole/kernel changes for enabling the decl tags in
kernel.
[1] https://lore.kernel.org/all/[email protected]/
/* tag on a typedef */
typedef struct foo foo_t1 __tag("typedef_foo_tag");
typedef struct {int foo2;} foo_t2 __tag("typedef_foo2_tag");
$ /home/yhs/work/gcc-build/opt/gcc-16.1/bin/gcc -O2 -gbtf -g -c decl_tag.c -o
decl_tag.o
decl_tag.c:30:1: warning: ‘btf_decl_tag’ attribute does not apply to types
[-Wattributes]
30 | } __tag("struct_foo_tag");
| ^