I am working on a project, in which I use the new c++11 standard.
Because of that, few include-headers from a library now generate the warning -Wliteral-suffix
, which I would supress for that includes.
I have found an easy solution for that using pragmas, but it doesn't work for me
How to suppress GCC warnings from library headers?
This is my current code:
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wliteral-suffix"
#include <pylon/PylonBase.h>
#include <pylon/InstantCamera.h>
#include <pylon/TlFactory.h>
#pragma GCC diagnostic pop
All current Warnings generated by the library look like this:
/opt/pylon3/genicam/library/CPP/include/Base/GCException.h:272:105: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
I am using gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
I think you must use just the opposite: -Wno-literal-suffix
. I'm also getting more problems with this version than with the old 4.7.2 (finest).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With