Date: Tue, 10 Feb 2026 11:50:48 -0800
On Tuesday, 10 February 2026 11:38:11 Pacific Standard Time Alejandro Colomar
wrote:
> Hi Thiago,
>
> On 2026-02-10T11:06:07-0800, Thiago Macieira via Std-Proposals wrote:
> > Yes they have and are. If I put a [[gnu::noclone]] attribute on a function
> > and compile with Clang, it just tells me:
> >
> > warning: unknown attribute 'gnu::noclone' ignored; did you mean
> > 'gnu::noinline'?
>
> This is not being ignored. This is a diagnostic, which is all that is
> required for a constraint violation (in C terms).
It says right there it was "ignored" and warnings can be suppressed. This is
not Clang telling me that it didn't need to do anything about cloning because
it never clones noinline functions (which is the case). It's telling me it has
no clue what this attribute meant and thus ignored it.
In the case of this thread, the attribute cannot be ignored and it changes the
sematics of the program. Something that wasn't valid before becomes valid.
wrote:
> Hi Thiago,
>
> On 2026-02-10T11:06:07-0800, Thiago Macieira via Std-Proposals wrote:
> > Yes they have and are. If I put a [[gnu::noclone]] attribute on a function
> > and compile with Clang, it just tells me:
> >
> > warning: unknown attribute 'gnu::noclone' ignored; did you mean
> > 'gnu::noinline'?
>
> This is not being ignored. This is a diagnostic, which is all that is
> required for a constraint violation (in C terms).
It says right there it was "ignored" and warnings can be suppressed. This is
not Clang telling me that it didn't need to do anything about cloning because
it never clones noinline functions (which is the case). It's telling me it has
no clue what this attribute meant and thus ignored it.
In the case of this thread, the attribute cannot be ignored and it changes the
sematics of the program. Something that wasn't valid before becomes valid.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Data Center - Platform & Sys. Eng.
Received on 2026-02-10 19:50:51
