avr-libc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-commit] [2526] Fix #41689: Add static_assert to assert.h


From: pitchumani . s
Subject: [avr-libc-commit] [2526] Fix #41689: Add static_assert to assert.h
Date: Wed, 19 Oct 2016 10:36:48 +0000 (UTC)

Revision: 2526
          http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2526
Author:   pitchumani
Date:     2016-10-19 10:36:48 +0000 (Wed, 19 Oct 2016)
Log Message:
-----------
Fix #41689: Add static_assert to assert.h

Modified Paths:
--------------
    trunk/avr-libc/ChangeLog
    trunk/avr-libc/NEWS
    trunk/avr-libc/include/assert.h

Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog    2016-09-15 10:24:25 UTC (rev 2525)
+++ trunk/avr-libc/ChangeLog    2016-10-19 10:36:48 UTC (rev 2526)
@@ -1,3 +1,8 @@
+2016-10-19  azudem
+
+       Fix for bug #41689: add static_assert to assert.h
+       * include/assert.h (static_assert): Define if C11 std or >= gcc-4.6 
used.
+
 2016-09-15  Pitchumani Sivanupandi <address@hidden>
 
        Fix for bug ##48898: power_usart3_* functions no more defined in power.h

Modified: trunk/avr-libc/NEWS
===================================================================
--- trunk/avr-libc/NEWS 2016-09-15 10:24:25 UTC (rev 2525)
+++ trunk/avr-libc/NEWS 2016-10-19 10:36:48 UTC (rev 2526)
@@ -3,6 +3,7 @@
 * Bugs fixed:
 
   [#36933] Documentation no longer correctly describes how to declare
+  [#41689] add static_assert to assert.h
   [#48898] power_usart3_* functions no more defined in power.h
   [#49020] dtostre() flags documentation error
   strings for storage in program memory

Modified: trunk/avr-libc/include/assert.h
===================================================================
--- trunk/avr-libc/include/assert.h     2016-09-15 10:24:25 UTC (rev 2525)
+++ trunk/avr-libc/include/assert.h     2016-10-19 10:36:48 UTC (rev 2526)
@@ -95,6 +95,12 @@
 #  endif /* NDEBUG */
 #endif /* DOXYGEN */
 
+#if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L) || \
+    ((_GNUC_ > 4 || (_GNUC_ == 4 && _GNUC_MINOR_ >= 6)) && !defined 
__cplusplus)
+#  undef static_assert
+#  define static_assert _Static_assert
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]