Re: #pragma once?

2017-10-12 Thread Kris Maglione
On Wed, Oct 11, 2017 at 11:45:54AM +0200, Emilio Cobos Álvarez wrote: Hi, I'm adding a header to the build, and I'm wondering: Can we use pragma once? I don't see it anywhere in the build except third-party paths and: dom/svg/nsISVGPoint.h xpcom/io/nsAnonymousTemporaryFile.h The last time

Re: #pragma once?

2017-10-12 Thread Nicholas Alexander
On Thu, Oct 12, 2017 at 8:16 AM, Gian-Carlo Pascutto <g...@mozilla.com> wrote: > On 11-10-17 11:45, Emilio Cobos Álvarez wrote: > > Hi, > > > > I'm adding a header to the build, and I'm wondering: Can we use pragma > once? > > > > I don't see it anyw

Re: #pragma once?

2017-10-11 Thread Tom Tromey
>>>>> "Marco" == Marco Bonardo <mbona...@mozilla.com> writes: Marco> See the previous pragma once proposal: Marco> https://groups.google.com/forum/#!msg/mozilla.dev.platform/PgDjWw3xp8k/PLYQc5xoWmsJ Something I didn't see in that thread is that, at least

Re: #pragma once?

2017-10-11 Thread Marco Bonardo
See the previous pragma once proposal: https://groups.google.com/forum/#!msg/mozilla.dev.platform/PgDjWw3xp8k/PLYQc5xoWmsJ On Wed, Oct 11, 2017 at 11:45 AM, Emilio Cobos Álvarez <emi...@crisal.io> wrote: > Hi, > > I'm adding a header to the build, and I'm wondering: Can we

#pragma once?

2017-10-11 Thread Emilio Cobos Álvarez
Hi, I'm adding a header to the build, and I'm wondering: Can we use pragma once? I don't see it anywhere in the build except third-party paths and: dom/svg/nsISVGPoint.h xpcom/io/nsAnonymousTemporaryFile.h So I'm not sure if it's because it's somehow prohibited or not recommended, or just

Re: Coding style change proposal: #pragma once

2012-10-30 Thread Mike Hommey
On Mon, Oct 29, 2012 at 06:11:04PM -0700, Gregory Szorc wrote: On 10/29/12 5:52 PM, Robert O'Callahan wrote: On Tue, Oct 30, 2012 at 1:13 PM, Nicholas Nethercote n.netherc...@gmail.com wrote: #pragma once does have one drawback (other than being non-standard) and that is if you have

Coding style change proposal: #pragma once

2012-10-29 Thread Ehsan Akhgari
I'd like to switch our coding style to use #pragma once instead of #include guards. #pragma once is supported on all compilers than can build our source code, it is more concise, and it avoids possible name clashes in #include guards (or adopting silly conventions for avoiding them), and it can

Re: Coding style change proposal: #pragma once

2012-10-29 Thread Justin Lebar
Not a concern, but the obvious question is: Do you have any idea how this affects compile times? On Mon, Oct 29, 2012 at 7:44 PM, Ehsan Akhgari ehsan.akhg...@gmail.com wrote: I'd like to switch our coding style to use #pragma once instead of #include guards. #pragma once is supported on all

Re: Coding style change proposal: #pragma once

2012-10-29 Thread Ehsan Akhgari
On 2012-10-29 7:56 PM, Justin Lebar wrote: Not a concern, but the obvious question is: Do you have any idea how this affects compile times? It probably won't have any meaningful improvements, since all decent compilers already seem to special case #include guards. Ehsan

Re: Coding style change proposal: #pragma once

2012-10-29 Thread Robert O'Callahan
On Tue, Oct 30, 2012 at 1:13 PM, Nicholas Nethercote n.netherc...@gmail.com wrote: #pragma once does have one drawback (other than being non-standard) and that is if you have the same file in different locations (we have this because our build system copies files around) then the compiler

Re: Coding style change proposal: #pragma once

2012-10-29 Thread Ehsan Akhgari
On 2012-10-29 9:11 PM, Gregory Szorc wrote: On 10/29/12 5:52 PM, Robert O'Callahan wrote: On Tue, Oct 30, 2012 at 1:13 PM, Nicholas Nethercote n.netherc...@gmail.com wrote: #pragma once does have one drawback (other than being non-standard) and that is if you have the same file in different

Re: Coding style change proposal: #pragma once

2012-10-29 Thread Gregory Szorc
On 10/29/12 7:17 PM, Ehsan Akhgari wrote: On 2012-10-29 9:11 PM, Gregory Szorc wrote: On 10/29/12 5:52 PM, Robert O'Callahan wrote: On Tue, Oct 30, 2012 at 1:13 PM, Nicholas Nethercote n.netherc...@gmail.com wrote: #pragma once does have one drawback (other than being non-standard