Wed May 29 16:00:02 2019 UTC ()
Pull up following revision(s) (requested by maya in ticket #1275):

	include/assert.h: revision 1.23

Limit static_assert visibility to C11.

The existing definition caused issues as GCC only provides _Static_assert
when building C11 code.

This follows the C standard: static_assert available since C11.

Fixes https://rt.perl.org/Public/Bug/Display.html?id=134023


(martin)
diff -r1.22 -r1.22.6.1 src/include/assert.h

cvs diff -r1.22 -r1.22.6.1 src/include/assert.h (expand / switch to unified diff)

--- src/include/assert.h 2016/10/03 12:08:39 1.22
+++ src/include/assert.h 2019/05/29 16:00:02 1.22.6.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: assert.h,v 1.22 2016/10/03 12:08:39 kamil Exp $ */ 1/* $NetBSD: assert.h,v 1.22.6.1 2019/05/29 16:00:02 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1992, 1993 4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * (c) UNIX System Laboratories, Inc. 6 * (c) UNIX System Laboratories, Inc.
7 * All or some portions of this file are derived from material licensed 7 * All or some portions of this file are derived from material licensed
8 * to the University of California by American Telephone and Telegraph 8 * to the University of California by American Telephone and Telegraph
9 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 9 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
10 * the permission of UNIX System Laboratories, Inc. 10 * the permission of UNIX System Laboratories, Inc.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
@@ -95,18 +95,18 @@ @@ -95,18 +95,18 @@
95#define __assert_function__ (__static_cast(const void *,0)) 95#define __assert_function__ (__static_cast(const void *,0))
96#endif 96#endif
97 97
98#ifndef __ASSERT_DECLARED 98#ifndef __ASSERT_DECLARED
99#define __ASSERT_DECLARED 99#define __ASSERT_DECLARED
100__BEGIN_DECLS 100__BEGIN_DECLS
101__dead void __assert(const char *, int, const char *); 101__dead void __assert(const char *, int, const char *);
102__dead void __assert13(const char *, int, const char *, const char *); 102__dead void __assert13(const char *, int, const char *, const char *);
103void __diagassert(const char *, int, const char *); 103void __diagassert(const char *, int, const char *);
104void __diagassert13(const char *, int, const char *, const char *); 104void __diagassert13(const char *, int, const char *, const char *);
105__END_DECLS 105__END_DECLS
106#endif /* __ASSERT_DECLARED */ 106#endif /* __ASSERT_DECLARED */
107 107
108#if ((__cplusplus - 0) < 201103L) 108#if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L
109#ifndef static_assert 109#ifndef static_assert
110#define static_assert _Static_assert 110#define static_assert _Static_assert
111#endif /* static_assert */ 111#endif /* static_assert */
112#endif 112#endif