yyzybb537 / libgo

Go-style concurrency in C++11
MIT License
3.2k stars 756 forks source link

使用g++11等高版本的编译器去编译master分支,会出现编译错误 #296

Open ZsGyao opened 1 year ago

ZsGyao commented 1 year ago

Describe the bug (描述bug) compile failed with error "error: macro "__has_attribute" requires an identifier".

我提交了一个方法去避免这种错误

bethebest0622 commented 8 months ago

同遇到这个问题 用c++20编译的话 源码有错误,这个库好久没有维护,挺好的库 看来是凉了

gooker commented 8 months ago

同遇到这个问题 用c++20编译的话 源码有错误,这个库好久没有维护,挺好的库 看来是凉了

c++20 没问题.gcc version 10.2.1 20210130 (Red Hat 10.2.1-11) (GCC)

bethebest0622 commented 8 months ago

同遇到这个问题 用c++20编译的话 源码有错误,这个库好久没有维护,挺好的库 看来是凉了

c++20 没问题.gcc version 10.2.1 20210130 (Red Hat 10.2.1-11) (GCC)

我是centos stream 8 gcc-toolset-13

报了一堆

/opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/ios_base.h:208:38: error: expected an identifier for the attribute name
  208 |   [[__nodiscard__, __gnu__::__const__]]

这种问题

gaowanlu commented 3 weeks ago

大家有解决掉吗

paradiseforgithub commented 3 weeks ago

已收到您的邮件,如有问题会尽快给您回复. 

gaowanlu commented 3 weeks ago

同遇到这个问题 用c++20编译的话 源码有错误,这个库好久没有维护,挺好的库 看来是凉了

c++20 没问题.gcc version 10.2.1 20210130 (Red Hat 10.2.1-11) (GCC)

我是centos stream 8 gcc-toolset-13

报了一堆

/opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/ios_base.h:208:38: error: expected an identifier for the attribute name
  208 |   [[__nodiscard__, __gnu__::__const__]]

这种问题

centos stream 10 ,gcc14 -std=c++同样报错

gaowanlu commented 3 weeks ago

同遇到这个问题 用c++20编译的话 源码有错误,这个库好久没有维护,挺好的库 看来是凉了

c++20 没问题.gcc version 10.2.1 20210130 (Red Hat 10.2.1-11) (GCC)

我是centos stream 8 gcc-toolset-13 报了一堆

/opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/ios_base.h:208:38: error: expected an identifier for the attribute name
  208 |   [[__nodiscard__, __gnu__::__const__]]

这种问题

centos stream 10 ,gcc14 -std=c++同样报错

暂时解决了问题,屏蔽一个宏 https://github.com/yyzybb537/libgo/issues/312