Vincent Danjean <vdanjean...@free.fr> 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 (r...@debian.org) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87d32aulhw....@windlord.stanford.edu