diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/meson.build | 9 | ||||
-rw-r--r-- | test/test_inline_cpp.cpp | 23 |
2 files changed, 18 insertions, 14 deletions
diff --git a/test/meson.build b/test/meson.build index e16e818..56ec0d7 100644 --- a/test/meson.build +++ b/test/meson.build @@ -27,11 +27,6 @@ if get_option('strict') and is_variable('cpp') '-Wno-documentation', # Cairo '-Wno-documentation-unknown-command', # Cairo '-Wno-old-style-cast', - '-Wno-padded', - ] - elif cpp.get_id() == 'gcc' - test_cpp_args += [ - '-Wno-padded', ] endif @@ -102,7 +97,7 @@ if cairo_dep.found() foreach test : cairo_tests test(test, executable('test_' + test, 'test_@0@.c'.format(test), - c_args: test_c_args, + c_args: test_c_args + cairo_args, include_directories: include_directories(includes), dependencies: [pugl_dep, cairo_backend_dep]), suite: 'unit') @@ -181,7 +176,7 @@ elif is_variable('cpp') ] elif cpp.get_id() == 'msvc' unified_args += [ - '/wd4464' # relative include path contains '..' + '/wd4464', # relative include path contains '..' ] endif diff --git a/test/test_inline_cpp.cpp b/test/test_inline_cpp.cpp index b08656c..5b5278e 100644 --- a/test/test_inline_cpp.cpp +++ b/test/test_inline_cpp.cpp @@ -7,10 +7,19 @@ #if defined(__clang__) # pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" +# pragma clang diagnostic ignored "-Wmissing-field-initializers" # pragma clang diagnostic ignored "-Wold-style-cast" +# pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" +# if __has_warning("-Wreserved-identifier") +# pragma clang diagnostic ignored "-Wreserved-identifier" +# endif #elif defined(__GNUC__) # pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wconversion" +# pragma GCC diagnostic ignored "-Wmissing-field-initializers" +# pragma GCC diagnostic ignored "-Wredundant-tags" +# pragma GCC diagnostic ignored "-Wsuggest-attribute=const" +# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #endif @@ -44,14 +53,14 @@ # endif #endif -#if defined(__clang__) -# pragma clang diagnostic pop -#elif defined(__GNUC__) -# pragma GCC diagnostic pop -#endif - int main() { return 0; } + +#if defined(__clang__) +# pragma clang diagnostic pop +#elif defined(__GNUC__) +# pragma GCC diagnostic pop +#endif |