On 27/03/19 16:37 +0000, Jonathan Wakely wrote:
On 27/03/19 16:13 +0100, Jakub Jelinek wrote:
On Wed, Mar 27, 2019 at 04:08:59PM +0100, Peter Lemenkov wrote:
Jakub, thanks for the tip! Now I moved a little further. I've added
-save-temps to CXXFLAGS and indeed there is something wrong. Here is
how this cstddef file was included:

===========
# 1 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stddef.h" 1 3 4
# 51 "/usr/include/c++/9/cstddef" 2 3


# 52 "/usr/include/c++/9/cstddef" 3
     "C++"

Wow, somebody did something very silly.

And here it is:
https://github.com/SIPp/sipp/blob/fc348b8539949b0533a259e81923ed64e22f4657/include/logger.hpp#L10

A less ridiculous way to do that would be:

#ifdef GLOBALS_FULL_DEFINITION
#define MAYBE_EXTERN
#define _DEFVAL(value) = value
#else
#define MAYBE_EXTERN extern
#define _DEFVAL(value)
#endif

and then use MAYBE_EXTERN instead of extern.

The _DEFVAL is also undefined behaviour, because that's a reserved
name. It should be DEFVAL.

_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to