[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72kE5AznnA81sb5S-KVx3VCef20zcMBfbRUO41g3uAtQ+Q@mail.gmail.com>
Date: Sun, 20 Jul 2025 18:36:01 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Eugenio Pérez <eperezma@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
"Michael S. Tsirkin" <mst@...hat.com>, Al Viro <viro@...iv.linux.org.uk>,
Alexei Starovoitov <ast@...nel.org>, Alexey Dobriyan <adobriyan@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>, Andrii Nakryiko <andrii@...nel.org>,
Arnd Bergmann <arnd@...nel.org>, Borislav Petkov <bp@...en8.de>, Dan Williams <dan.j.williams@...el.com>,
Daniel Borkmann <daniel@...earbox.net>, Dave Hansen <dave.hansen@...ux.intel.com>,
David Laight <David.Laight@...lab.com>, David Lechner <dlechner@...libre.com>,
Dinh Nguyen <dinguyen@...nel.org>, Eduard Zingerman <eddyz87@...il.com>,
Gatlin Newhouse <gatlin.newhouse@...il.com>, Hao Luo <haoluo@...gle.com>,
Ingo Molnar <mingo@...hat.com>, Linus Torvalds <torvalds@...ux-foundation.org>,
Jakub Sitnicki <jakub@...udflare.com>, Jan Hendrik Farr <kernel@...rr.cc>, Jason Wang <jasowang@...hat.com>,
Jiri Olsa <jolsa@...nel.org>, John Fastabend <john.fastabend@...il.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>, Josh Poimboeuf <jpoimboe@...nel.org>,
KP Singh <kpsingh@...nel.org>, Kees Cook <kees@...nel.org>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>, Marc Herbert <Marc.Herbert@...ux.intel.com>,
Martin KaFai Lau <martin.lau@...ux.dev>, Mateusz Guzik <mjguzik@...il.com>, Michal Luczaj <mhal@...x.co>,
Miguel Ojeda <ojeda@...nel.org>, Mykola Lysenko <mykolal@...com>, NeilBrown <neil@...wn.name>,
Peter Zijlstra <peterz@...radead.org>, Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Sami Tolvanen <samitolvanen@...gle.com>, Shuah Khan <shuah@...nel.org>, Song Liu <song@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Thomas Gleixner <tglx@...utronix.de>,
Thorsten Blum <thorsten.blum@...ux.dev>, Uros Bizjak <ubizjak@...il.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, Yafang Shao <laoar.shao@...il.com>,
Ye Bin <yebin10@...wei.com>, Yonghong Song <yonghong.song@...ux.dev>,
Yufeng Wang <wangyufeng@...inos.cn>, bpf@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-sparse@...r.kernel.org, virtualization@...ts.linux.dev, x86@...nel.org
Subject: Re: [PATCH v2 1/7] compiler_types.h: add "auto" as a macro for "__auto_type"
On Sun, Jul 20, 2025 at 8:52 AM H. Peter Anvin <hpa@...or.com> wrote:
>
> gcc and clang provide the "__auto_type" alias keyword as an extension
> for pre-C23, however, there is no reason to pollute the bulk of the
> source base with this temporary keyword; instead define "auto" as a
> macro unless the compiler is running in C23+ mode.
>
> This macro is added in <linux/compiler_types.h> because that header is
> included in some of the tools headers, wheres <linux/compiler.h> is
> not as it has a bunch of very kernel-specific things in it.
Sounds good. I guess we could need a workaround if someone happened to
invent an attribute which requires using "auto" in it, since it is not
reserved there in C23 AFAIU. So FWIW:
Acked-by: Miguel Ojeda <ojeda@...nel.org>
> + * so it has always been "namespace reserved."
Not sure what this means (could we just say reserved?).
Thanks!
Relatedly, there are some proposed, further changes to `auto` for C2y:
https://www.open-std.org/jtc1/sc22/WG14/www/docs/n3579.htm
Cheers,
Miguel
Powered by blists - more mailing lists