diff options
-rw-r--r-- | pb.h | 3 | ||||
-rw-r--r-- | tests/SConstruct | 3 |
2 files changed, 6 insertions, 0 deletions
@@ -183,6 +183,9 @@ extern "C" { # define PB_STATIC_ASSERT(COND,MSG) #endif +/* Test that PB_STATIC_ASSERT works */ +PB_STATIC_ASSERT(1, STATIC_ASSERT_IS_NOT_WORKING) + /* Number of required fields to keep track of. */ #ifndef PB_MAX_REQUIRED_FIELDS #define PB_MAX_REQUIRED_FIELDS 64 diff --git a/tests/SConstruct b/tests/SConstruct index b2b8b36..0c17460 100644 --- a/tests/SConstruct +++ b/tests/SConstruct @@ -192,6 +192,9 @@ if not env.get('NODEFARGS'): # More strict checks on the nanopb core env.Append(CORECFLAGS = '/W4') + # Enable C11 standard + env.Append(CFLAGS = ' /std:c11 ') + # Disable warning about sizeof(union{}) construct that is used in # message size macros, in e.g. multiple_files testcase. The C construct # itself is valid, but quite rare, which causes Visual C++ to give a warning |