You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/11/15 23:40:14 UTC

[GitHub] [mynewt-core] kasjer commented on issue #2040: Build failure due to implicit declaration of 'static_assert'

kasjer commented on issue #2040: Build failure due to implicit declaration of 'static_assert'
URL: https://github.com/apache/mynewt-core/issues/2040#issuecomment-554571476
 
 
   I would opt to change assert.h not to check compiler version when static_assert is defined.
   It is mentioned in cppreference that convenience macro is defined for _Static_assert starting from C11 but it may be visible on gcc without C11.
   Then if _Static_assert keyword is not present compilation will fail anyway.
   ```
   #if !defined __cplusplus
   #define static_assert _Static_assert
   #endif
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services