"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/verify.h" between
le-1.16.5.tar.gz and le-1.16.6.tar.gz

About: le is a terminal text editor (many block operations with stream and rectangular blocks, tunable syntax highlighting, etc.).

verify.h  (le-1.16.5):verify.h  (le-1.16.6)
/* Compile-time assert-like macros. /* Compile-time assert-like macros.
Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or the Free Software Foundation; either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
#ifndef _GL_VERIFY_H #ifndef _GL_VERIFY_H
#define _GL_VERIFY_H #define _GL_VERIFY_H
/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. /* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
This is supported by GCC 4.6.0 and later, in C mode, and its use This is supported by GCC 4.6.0 and later, in C mode, and its use
here generates easier-to-read diagnostics when verify (R) fails. here generates easier-to-read diagnostics when verify (R) fails.
Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
This will likely be supported by future GCC versions, in C++ mode. This is supported by GCC 6.1.0 and later, in C++ mode.
Use this only with GCC. If we were willing to slow 'configure' Use this only with GCC. If we were willing to slow 'configure'
down we could also use it with other compilers, but since this down we could also use it with other compilers, but since this
affects only the quality of diagnostics, why bother? */ affects only the quality of diagnostics, why bother? */
#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \ #if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
&& (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \ && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \
&& !defined __cplusplus) && !defined __cplusplus)
# define _GL_HAVE__STATIC_ASSERT 1 # define _GL_HAVE__STATIC_ASSERT 1
#endif #endif
/* The condition (99 < __GNUC__) is temporary, until we know about the #if (6 <= __GNUC__) && defined __cplusplus
first G++ release that supports static_assert. */
#if (99 < __GNUC__) && defined __cplusplus
# define _GL_HAVE_STATIC_ASSERT 1 # define _GL_HAVE_STATIC_ASSERT 1
#endif #endif
/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other /* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
system headers, defines a conflicting _Static_assert that is no system headers, defines a conflicting _Static_assert that is no
better than ours; override it. */ better than ours; override it. */
#ifndef _GL_HAVE_STATIC_ASSERT #ifndef _GL_HAVE_STATIC_ASSERT
# include <stddef.h> # include <stddef.h>
# undef _Static_assert # undef _Static_assert
#endif #endif
skipping to change at line 278 skipping to change at line 276
#elif 1200 <= _MSC_VER #elif 1200 <= _MSC_VER
# define assume(R) __assume (R) # define assume(R) __assume (R)
#elif ((defined GCC_LINT || defined lint) \ #elif ((defined GCC_LINT || defined lint) \
&& (__has_builtin (__builtin_trap) \ && (__has_builtin (__builtin_trap) \
|| 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__)))) || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))))
/* Doing it this way helps various packages when configured with /* Doing it this way helps various packages when configured with
--enable-gcc-warnings, which compiles with -Dlint. It's nicer --enable-gcc-warnings, which compiles with -Dlint. It's nicer
when 'assume' silences warnings even with older GCCs. */ when 'assume' silences warnings even with older GCCs. */
# define assume(R) ((R) ? (void) 0 : __builtin_trap ()) # define assume(R) ((R) ? (void) 0 : __builtin_trap ())
#else #else
# define assume(R) ((void) (0 && (R))) /* Some tools grok NOTREACHED, e.g., Oracle Studio 12.6. */
# define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0)
#endif #endif
/* @assert.h omit end@ */ /* @assert.h omit end@ */
#endif #endif
 End of changes. 5 change blocks. 
7 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)