C++ Logo

sg7

Advanced search

Re: Request for supporting and enumerating user-defined attributes

From: Peter Dimov <pdimov_at_[hidden]>
Date: Mon, 16 Oct 2023 10:59:53 +0300
Ville Voutilainen wrote:
> On Mon, 16 Oct 2023 at 10:36, Peter Dimov via SG7 <sg7_at_[hidden]>
> wrote:
> > However, the main problem with this is that attributes are currently
> ignorable,
> > and must remain so. Some implementations such as Clang don't store
> unknown
> > attributes in the AST at all, so it's not possible to get to them via reflection.
>
> Surely clang doesn't just toss unknown vendor attributes into the wind?

It totally does.

https://godbolt.org/z/Gh8681o57

> If it does, then perhaps that's a bug to be fixed.

The behavior is by design, apparently.

Received on 2023-10-16 07:59:57