From: David Laight <David.Laight@ACULAB.COM>
To: 'Alexey Dobriyan' <adobriyan@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: RE: #pragma once (was Re: incoming)
Date: Mon, 1 Mar 2021 16:52:16 +0000 [thread overview]
Message-ID: <a941107b94f74be0914a359b144ec134@AcuMS.aculab.com> (raw)
In-Reply-To: <YDl9/QU8EsCOPyuf@localhost.localdomain>
From: Alexey Dobriyan <adobriyan@gmail.com>
> Sent: 26 February 2021 23:02
>
> On Fri, Feb 26, 2021 at 01:53:48PM -0800, Linus Torvalds wrote:
> > On Fri, Feb 26, 2021 at 12:17 PM Alexey Dobriyan <adobriyan@gmail.com> wrote:
> > >
> > > I want to sent treewide "#pragma once" conversion:
> >
> > Are there *any* advantages to it?
> >
> > It's non-standard,
>
> It is effectively standard:
> https://en.wikipedia.org/wiki/Pragma_once#Portability
At the top of the page....
In the C and C++ programming languages, pragma once is a non-standard but widely supported
So non-standard :-)
And #pragma is ugly...
There are also times when an include guard has to be set in order to stop
a problematic inner file being included.
Perhaps only during hacking, but it is useful.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2021-03-01 19:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-26 20:17 #pragma once (was Re: incoming) Alexey Dobriyan
2021-02-26 21:53 ` Linus Torvalds
2021-02-26 23:02 ` Alexey Dobriyan
2021-03-01 16:52 ` David Laight [this message]
2021-03-01 20:29 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a941107b94f74be0914a359b144ec134@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox