-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v10.x does not compile with clang++ 11 #33040
Comments
@sam-github I’m guessing for this particular issue, you could replace |
@addaleax The errors are in v8, and we don't modify our v8 dep (do we?) unless the change has already landed upstream, so we can't directly modify the C++ code to fix the problem. I don't even know if I could submit patches to v8 which would eventually be cherry-pickable back to node, because this is v8 6.8, and they are up to 8.1 ATM, so might not accept them. Thus the ping to @nodejs/v8, in the hopes they understand better whether there are specific changes upstream we can cherry pick back to 6.8, and @nodejs/build to see if this is even considered an issue, or more of a "don't do that, it doesn't work". |
@sam-github I don’t think V8 would accept upstream patches for unsupported versions, but I don’t see any issue with modifying the source code directly in that case. |
We do modify V8 occasionally when we need to and yes, upstream doesn't accept patches for unsupported versions. V8 stopped using antlr4 and removed +1 to floating a small patch like @addaleax proposed |
Fixes: nodejs#33040 error: type 'antlr4::tree::TerminalNode *' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing] ParameterList result{{}, {}, context->VARARGS(), {}}; Occurs twice: ../../deps/v8/src/torque/ast-generator.cc:123:32: ../../deps/v8/src/torque/ast-generator.cc:144:32:
Fixes: nodejs#33040 error: type 'antlr4::tree::TerminalNode *' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing] ParameterList result{{}, {}, context->VARARGS(), {}}; Occurs twice: ../../deps/v8/src/torque/ast-generator.cc:123:32: ../../deps/v8/src/torque/ast-generator.cc:144:32:
Fixes: #33040 error: type 'antlr4::tree::TerminalNode *' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing] ParameterList result{{}, {}, context->VARARGS(), {}}; Occurs twice: ../../deps/v8/src/torque/ast-generator.cc:123:32: ../../deps/v8/src/torque/ast-generator.cc:144:32: PR-URL: #33094 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Fixed in 89a306b. |
I'm not sure if this is a general problem, or just a problem for me, since I'm using clang 11 on Linux, and try not to have to change the compiler I use depending on the LTS branch I'm building.
As clang 11 becomes more common, maybe other people will notice this.
Interestingly, @nodejs/build doesn't specificy "maximum" supported compiler versions, just minimum, so whether its expected that as new versions of supported compilers come out our LTS branches will work with them might be a grey areas.
@nodejs/v8 Is this expected? Does it have an easy patch? If not, we can just close this, and I'll deal with it in my local dev environment.
What steps will reproduce the bug?
Build fails with:
The text was updated successfully, but these errors were encountered: