________________________________________
From: Development <development-boun...@qt-project.org> on behalf of Ville 
Voutilainen <ville.voutilai...@gmail.com>

On Wed, 26 Feb 2020 at 18:45, Benjamin TERRIER <b.terr...@gmail.com> wrote:
>> I would like the idea of using attributes for this. However, compilers are 
>> allowed to warn for unknown attributes, which is useful to detect typos.
>> This means that we would get a warning for each usage of [[qt::emit]]. So 
>> unless there is a way to disable unknown attribute warnings for a specific 
>> set of custom attributes this will be a pain.

>That's debatable. [dcl.attr]/6 says
>Any attribute-token that is not recognized by the implementation is ignored.

>In general, implementations can still warn about pretty much whatever
>they please, especially considering
>that their default modes are not strictly conforming.
>
>The compilers we plan to support in Qt 6 do warn about unknown
>attributes, so the allowance point is kinda
>theoretical.

Ville, please help me understand sth. If the express intention of attributes is 
that users should be encouraged to have their own, aren't the warning policies 
exhibited by current compilers counter productive to the intent of their 
intended purpose? Or do attributes mostly exist for the purposes compilers 
themselves may face?

Also what's the chance that compiler communities might accept Qt specific 
attributes if for example TQtC were to put relevant patches forward?

--
Alex
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to