'diagnostic pop' pragma without 'diagnostic push' in Drawable.h
Swiss army knife of image processing
Brought to you by:
bfriesen
Since version 1.3.31, Clang raises two warnings in Drawable.h:
/usr/local/include/GraphicsMagick/Magick++/Drawable.h:2925:26: error: pragma diagnostic pop could not pop, no matching push [-Werror,-Wunknown-pragmas]
#pragma clang diagnostic pop
^
/usr/local/include/GraphicsMagick/Magick++/Drawable.h:2926:26: error: pragma diagnostic pop could not pop, no matching push [-Werror,-Wunknown-pragmas]
#pragma clang diagnostic pop
It seems related to commit https://sourceforge.net/p/graphicsmagick/code/ci/056042125005b891a94c9834eae0623de20be2b5/ that adds two diagnostic pop without the corresponding diagnostic push before to change Clang diagnostic messages at the file beginning.
On Wed, 28 Nov 2018, Roland Denis wrote:
What version of clang is being used when these warnings are produced?
Perhaps the warning needs to be supported by the compiler before it
can be ignored or a minimum clang version is required to support this
feature.
I am not seeing this with clang 4.0 or 6.0.
Bob
This simple code
triggers both warnings under Ubuntu 16.04 using Clang 4.0, 5.0 and 6.0. Adding the same number of
diagnostic pushat the beginning of the file (before thediagnostic ignored) solves the issue on my side.This issue should be fixed by changeset 15850:d4a5e3d16957. Please verify that it is fixed on your end. It is odd that this warning was not produced when compiling the Magick++ test programs and demos.
May some warnings be disabled in the test and demo suite ? Anyway, I confirm you that this commit fixes the issue on my side.
Thanks for your work!