Vincent Danjean <[email protected]> writes:

> There exists some kind of push/pop but I'm not sure it is relevant is
> your context nor that llvm/clang support them.
>   In one of my projects where I include a header file that produces
> warnings (with #warning ...) and that adds the "deprecated" attribute
> to some function, I use:

> #pragma GCC diagnostic push
> #  pragma GCC diagnostic ignored "-Wcpp"
> #  define CL_USE_DEPRECATED_OPENCL_1_1_APIS
> #  include <CL/cl.h>
> #pragma GCC diagnostic pop

> #pragma GCC diagnostic ignored "-Wdeprecated-declarations"

> Note that the "-Wdeprecated-declarations" is not in the push/pop
> section because it needs to be active at the time that deprecated
> functions are used, not at the time that deprecated functions are
> declared with their attribute (ie in <CL/cl.h>)

Oh, cool, thank you!  Learn something new every day.

-- 
Russ Allbery ([email protected])               <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to