[PATCH] D151683: [clang] Enable C++11-style attributes in all language modes

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 31 06:30:08 PDT 2023


erichkeane added a comment.

In D151683#4382408 <https://reviews.llvm.org/D151683#4382408>, @philnik wrote:

> In D151683#4380877 <https://reviews.llvm.org/D151683#4380877>, @erichkeane wrote:
>
>> What is the justification for this?
>
> What exactly are you asking for? Why I'd like to back port it? This would make quite a bit of code in libc++ simpler and avoids pit-falls where an attribute works in some place in some version but not in another.
>
>> Do other compilers do this?
>
> ICC and NVC++ support this: https://godbolt.org/z/TeMnGdGsY
>
>> Was there an RFC?
>
> No. I guess, since you are asking I should write one for this? Only for the removal of `-fdouble-square-bracket-attributes`, or also for back porting this?

The RFC I would expect for "allow C/C++ style attributes as an extension in previous modes".  This is a pretty significant feature to allow as an extension, particularly since our two main alternative compilers (G++/MSVC) don't have this as an extension. I'd be curious how the other C compilers do this as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151683/new/

https://reviews.llvm.org/D151683



More information about the cfe-commits mailing list