https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128480

            Bug ID: 128480
           Summary: spurious "ignoring attributes applied to X after
                    definition" for a btf_type_tag on an aggregate
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c
          Assignee: vineetg 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: ---

A btf_type_tag applied to a variant of an aggregate produces a warning the
user cannot act on.

```c
struct mce { int status; };
extern __attribute__((btf_type_tag("percpu"))) __typeof__(struct mce) injectm;
```

$ gcc -c t.c
t.c:3:15: warning: ignoring attributes applied to 'struct mce' after definition
[-Wattributes]

clang accepts the same declaration silently, even under -Wall, and also drops
the tag.
  • [Bug c/128480] New: spurious "... vineetg at gcc dot gnu.org via Gcc-bugs

Reply via email to