Boost logo

Boost :

Subject: Re: [boost] [#pragma once]
From: jbosboom_at_[hidden]
Date: 2009-04-10 18:58:24


> If unrecognized pragmas are ignored, then I don't see why boost
> developers should jump
> through a hoop to satisfy the "el-cheapo" compilers. In other words, if
> a compiler gives
> a warning about the #pragma-once, then let the programmer turn off the
> warning locally
> for the build, which is usually done in a single location within a
> makefile.

Well, what about the compilers that recognize #pragma once but don't
implement it correctly? Or implement it as well as they can on their
platform but somehow differ from other compilers?

Also, there was once a version of GCC that would launch nethack or rogue
when it encountered #pragma once. That's a perfectly legal thing for it
to do (if not all that helpful).

My point is that since we can't depend on the semantics of #pragma once,
we ought not to use it.

--Jeffrey Bosboom


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk