Re: Strange C++ error with GCC 9.0.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan, thanks for the tip! It works now!

How cool is that we have a lot of experts in almost every aspect of
software development around?


ср, 27 мар. 2019 г. в 17:43, Jonathan Wakely <jwakely@xxxxxxxxxxxxxxxxx>:
>
> 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.
>
>


-- 
With best regards, Peter Lemenkov.
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux