On Thu, Oct 12, 2017 at 8:16 AM, Gian-Carlo Pascutto <[email protected]> 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 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 because of inertia. > > It's covered in our Coding Style: > https://developer.mozilla.org/en-US/docs/Mozilla/Developer_ > guide/Coding_Style#CC_practices > > The #pragma is non-standard (though fairly widely supported), but the > "portable" way is recognized as equivalent for several compilers. It > actually seems MSVC is the only one that we (still) use that doesn't > know about the equivalence. > To be fair, the Coding Style doesn't mention `#pragma once`, nor does it have the discussion provided by gcp. Should it be added? Nick _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

