天天看点

MAC编译OpenJDK8:error: ‘&&‘ within ‘||‘ [-Werror,-Wlogical-op-parentheses]

具体错误:

/Users/tsit/tsjdk8-project/tsjdk8/hotspot/src/share/vm/adlc/archDesc.cpp:311:35: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
        !instr->is_ideal_branch() && instr->label_position() != -1) {
        ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      

解决办法:

编译脚本中加入:

export COMPILER_WARNINGS_FATAL=false      

继续阅读