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 the

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) and