summaryrefslogtreecommitdiff
path: root/src/sysdeps/trynullispointer.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-05-03 07:17:05 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-05-03 07:17:05 +0000
commit191d21f2acde7c2fa3003972a8b04bc080d64e2d (patch)
treec9e9b90181018d2feaec9c3b42d6431d3a2bc4d6 /src/sysdeps/trynullispointer.c
parent57459439db1f48dbbace1ab059117798fa26d203 (diff)
downloadskalibs-191d21f2acde7c2fa3003972a8b04bc080d64e2d.tar.xz
Add nullispointer sysdep
Diffstat (limited to 'src/sysdeps/trynullispointer.c')
-rw-r--r--src/sysdeps/trynullispointer.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sysdeps/trynullispointer.c b/src/sysdeps/trynullispointer.c
new file mode 100644
index 0000000..cbb3340
--- /dev/null
+++ b/src/sysdeps/trynullispointer.c
@@ -0,0 +1,12 @@
+/* ISC license. */
+
+/* Explanation: http://www.openwall.com/lists/musl/2013/01/09/13 */
+
+#include <stddef.h>
+
+int main (void)
+{
+ char s[1][1+(int)NULL] ;
+ int i = 0 ;
+ return sizeof s[i++], !i ;
+}