risemeup1 opened a new issue, #2140: URL: https://github.com/apache/brpc/issues/2140
**Describe the bug (描述bug)** gcc12在CPU下编译paddle/Paddle/build/third_party/brpc/src/extern_brpc/src/brpc/policy/consistent_hashing_load_balancer.cpp时候报错 <img width="1255" alt="image" src="https://user-images.githubusercontent.com/62429225/221874726-cbcbfb77-3607-42b2-a7d8-7ff984a0096b.png"> **To Reproduce (复现方法)** **Expected behavior (期望行为)** **Versions (各种版本)** OS: Compiler:gcc12 brpc:1.2.0 protobuf:v.21.12 **Additional context/screenshots (更多上下文/截图)** In file included from /paddle/Paddle/build/third_party/brpc/src/extern_brpc/src/brpc/policy/consistent_hashing_load_balancer.cpp:20: /usr/local/gcc-12.2/include/c++/12.2.0/array:130:27: error: expected an identifier for the attribute name 130 | [[__gnu__::__const__, __nodiscard__]] | ^ /usr/local/gcc-12.2/include/c++/12.2.0/array:130:18: error: expected ‘]’ before ‘,’ token 130 | [[__gnu__::__const__, __nodiscard__]] | ^ ~ | ] /usr/local/gcc-12.2/include/c++/12.2.0/array:140:27: error: expected an identifier for the attribute name 140 | [[__gnu__::__const__, __nodiscard__]] | ^ /usr/local/gcc-12.2/include/c++/12.2.0/array:140:18: error: expected ‘]’ before ‘,’ token 140 | [[__gnu__::__const__, __nodiscard__]] | ^ ~ | ] /usr/local/gcc-12.2/include/c++/12.2.0/array:150:27: error: expected an identifier for the attribute name 150 | [[__gnu__::__const__, __nodiscard__]] | ^ /usr/local/gcc-12.2/include/c++/12.2.0/array:150:18: error: expected ‘]’ before ‘,’ token 150 | [[__gnu__::__const__, __nodiscard__]] | ^ ~ | ] /usr/local/gcc-12.2/include/c++/12.2.0/array:160:27: error: expected an identifier for the attribute name 160 | [[__gnu__::__const__, __nodiscard__]] | ^ /usr/local/gcc-12.2/include/c++/12.2.0/array:160:18: error: expected ‘]’ before ‘,’ token 160 | [[__gnu__::__const__, __nodiscard__]] | ^ ~ | ] /usr/local/gcc-12.2/include/c++/12.2.0/array:191:27: error: expected an identifier for the attribute name 191 | [[__gnu__::__const__, __nodiscard__]] | ^ /usr/local/gcc-12.2/include/c++/12.2.0/array:191:18: error: expected ‘]’ before ‘,’ token 191 | [[__gnu__::__const__, __nodiscard__]] | ^ ~ | ] /usr/local/gcc-12.2/include/c++/12.2.0/array:195:27: error: expected an identifier for the attribute name 195 | [[__gnu__::__const__, __nodiscard__]] | ^ /usr/local/gcc-12.2/include/c++/12.2.0/array:195:18: error: expected ‘]’ before ‘,’ token 195 | [[__gnu__::__const__, __nodiscard__]] | ^ ~ | ] /usr/local/gcc-12.2/include/c++/12.2.0/array:199:27: error: expected an identifier for the attribute name 199 | [[__gnu__::__const__, __nodiscard__]] | ^ /usr/local/gcc-12.2/include/c++/12.2.0/array:199:18: error: expected ‘]’ before ‘,’ token 199 | [[__gnu__::__const__, __nodiscard__]] | ^ ~ | ] /usr/local/gcc-12.2/include/c++/12.2.0/array:281:27: error: expected an identifier for the attribute name 281 | [[__gnu__::__const__, __nodiscard__]] | ^ /usr/local/gcc-12.2/include/c++/12.2.0/array:281:18: error: expected ‘]’ before ‘,’ token 281 | [[__gnu__::__const__, __nodiscard__]] | ^ ~ | ] /usr/local/gcc-12.2/include/c++/12.2.0/array: In member function ‘void std::array<_Tp, _Nm>::fill(const value_type&)’: /usr/local/gcc-12.2/include/c++/12.2.0/array:122:30: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive] 122 | { std::fill_n(begin(), size(), __u); } | ^~~~ /usr/local/gcc-12.2/include/c++/12.2.0/array:122:30: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
