When build hotspot with clang on Linux, following error is reported. The code in question violate C++ 11 spec, and clang is enforcing that rule.
C++11: §8.3.6.4 [dcl.fct.default]
"If a friend declaration specifies a default argument expression,
that declaration shall be a definition and shall be the only declaration
of the function or function template in the translation unit."
--- Error messages ---
/home/hjen/ws/9dev/hotspot/src/share/vm/code/relocInfo.hpp:367:27: error: friend declaration specifying a default argument must be a definition
inline friend relocInfo prefix_relocInfo(int datalen = 0);
^
/home/hjen/ws/9dev/hotspot/src/share/vm/code/relocInfo.hpp:462:18: error: friend declaration specifying a default argument must be the only declaration
inline relocInfo prefix_relocInfo(int datalen) {
^
/home/hjen/ws/9dev/hotspot/src/share/vm/code/relocInfo.hpp:367:27: note: previous declaration is here
inline friend relocInfo prefix_relocInfo(int datalen = 0);
C++11: §8.3.6.4 [dcl.fct.default]
"If a friend declaration specifies a default argument expression,
that declaration shall be a definition and shall be the only declaration
of the function or function template in the translation unit."
--- Error messages ---
/home/hjen/ws/9dev/hotspot/src/share/vm/code/relocInfo.hpp:367:27: error: friend declaration specifying a default argument must be a definition
inline friend relocInfo prefix_relocInfo(int datalen = 0);
^
/home/hjen/ws/9dev/hotspot/src/share/vm/code/relocInfo.hpp:462:18: error: friend declaration specifying a default argument must be the only declaration
inline relocInfo prefix_relocInfo(int datalen) {
^
/home/hjen/ws/9dev/hotspot/src/share/vm/code/relocInfo.hpp:367:27: note: previous declaration is here
inline friend relocInfo prefix_relocInfo(int datalen = 0);
- duplicates
-
JDK-8023033 PPC64 (part 13): Basic shared changes for AIX
- Resolved