|Subject:||Re: undefined behaviour findings in bitset|
|Date:||Mon, 18 Mar 2019 09:16:06 +0100|
Le 17 mars 2019 à 20:27, Bruno Haible <address@hidden> a écrit :
Shouldn't it be like this:
Yes, of course :( Thanks! Fixed and pushed,
Wouldn't it be useful to have a file that defines macros such as
Actually I was thinking about putting this in config.h, so that we
would even benefit from it at configure-time.
It would also help casual gnulib contributors like me be shielded
from compilers that pretend to be GCC. For instance we should
probably tune the snippet above even further, since Clang 7
pretends to be GCC 4.2 (__GNUC__ __GNUC_MINOR__).
Also, in this case the code duplication is between a file in m4/ and
Yep, I can see the problem. But I would probably have tried to deal
with it the other way round: generate the *.h file from the macro.
Yet I don't know all the places where _Noreturn.h is used, so maybe
it's not (easily) doable.
Also, the relationship with noreturn.h is not completely clear for
me either. For instance I see it already has the above fix for
GCC 4.7, but in a different way.
/* Use ISO C++11 syntax when the compiler supports it. */
# if (__cplusplus >= 201103 && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
|| (_MSC_VER >= 1900)
# define _GL_NORETURN_FUNC [[noreturn]]
And I just discovered stdnoreturn.in.h which has a third approach,
|[Prev in Thread]||Current Thread||[Next in Thread]|