Re: #pragma once (was Re: incoming)

2021-03-01 Thread Al Viro
On Sat, Feb 27, 2021 at 02:02:21AM +0300, Alexey Dobriyan wrote: > There are rules and schemes about how to create guard macro. > > Should it be prefixed by underscore? > Should it be prefixed by two underscores? > Should it be full path uppercased or just last path component? > Should the guard

RE: #pragma once (was Re: incoming)

2021-03-01 Thread David Laight
From: Alexey Dobriyan > 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 > > wrote: > > > > > > I want to sent treewide "#pragma once" conversion: > > > > Are there *any* advantages to it? > >

Re: #pragma once (was Re: incoming)

2021-02-26 Thread Alexey Dobriyan
On Fri, Feb 26, 2021 at 01:53:48PM -0800, Linus Torvalds wrote: > On Fri, Feb 26, 2021 at 12:17 PM Alexey Dobriyan wrote: > > > > I want to sent treewide "#pragma once" conversion: > > Are there *any* advantages to it? > > It's non-standard, It is effectively standard:

Re: #pragma once (was Re: incoming)

2021-02-26 Thread Linus Torvalds
On Fri, Feb 26, 2021 at 12:17 PM Alexey Dobriyan wrote: > > I want to sent treewide "#pragma once" conversion: Are there *any* advantages to it? It's non-standard, and the historical argument for it ("it can reduce compile times because the preprocessor doesn't open the file twice" is pure and