当前位置:网站首页>error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attr

error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attr

2022-08-11 11:33:00 大魔法师云中君

Since the 3.0.3 release of gperf (made in May 2007), 
	the generated func has had the gnu_inline attribute applied to it.  
	The gcc source however
has not been updated to include that which has lead to a mismatch.

In practice, this hasn't been an issue for two reasons: (1) Before gcc-5, the default standard was (gnu) C89, and gcc does not warn or throw an error in this mode. (2) Starting with gcc-4.8, the compiler driver used to build gcc was changed to C++, and g++ does not warn or throw an error in this mode. This error does show up though when using gcc-5 to build gcc-4.7 or older as then the default is (gnu) C11 and the C compiler driver is used. That failure looks like: In file included from .../gcc-4.7.4/gcc/cp/except.c:990:0: cfns.gperf: At top level: cfns.gperf:101:1: error: 'gnu_inline' attribute present on 'libc_name_p'
		cfns.gperf:26:14: error: but not here
原网站

版权声明
本文为[大魔法师云中君]所创,转载请带上原文链接,感谢
https://wkisme.blog.csdn.net/article/details/126277981