-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
src: ignore GCC -Wcast-function-type for v8.h #32679
Conversation
Currently, the following warnings are emitted during compilation: In file included from ../src/string_bytes.h:29, from ../src/string_bytes.cc:22: ../deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak( P*,typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::BaseObject; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)]’: ../src/base_object-inl.h:135:42: required from here ../deps/v8/include/v8.h:10732:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::BaseObject>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] 10732 | reinterpret_cast<Callback>(callback), type); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And the same from test/cctest/test_aliased_buffer.cc We have an open pull request against v8 for this: https://chromium-review.googlesource.com/c/v8/v8/+/2080361
How does that work? We include v8.h in numerous places, not just those two files. It also wouldn't silence the warnings when building V8 itself, right? Apropos the V8 CL, you picked Yang as a reviewer but I don't think he is on the V8 team anymore. |
We have previously added these kinda of ignores in 3ff2aec. At that point in time I only focused on the ones that were being generated. Hopefully this is only temporary and this will be added in upstream v8.
As far as I can tell CFLAGS_Release := \
-pthread \
-Wno-unused-parameter \
-m64 \
-Wno-return-type \
-fno-strict-aliasing \
-m64 \
-O3 \
-fno-omit-frame-pointer \
-fdata-sections \
-ffunction-sections \
\
-O3 Adding
Thanks, I've updated it now and added someone else. |
Oh, I understand now - it's stripped from cflags ( node/tools/v8_gypfiles/toolchain.gypi Line 171 in 6ed912d
I'm good with the pragma approach if it's temporary. |
Re-run of failing node-test-commit-linux ✔️ |
Landed in f21cf45. |
Currently, the following warnings are emitted during compilation: In file included from ../src/string_bytes.h:29, from ../src/string_bytes.cc:22: ../deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak( P*,typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::BaseObject; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)]’: ../src/base_object-inl.h:135:42: required from here ../deps/v8/include/v8.h:10732:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::BaseObject>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] 10732 | reinterpret_cast<Callback>(callback), type); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And the same from test/cctest/test_aliased_buffer.cc We have an open pull request against v8 for this: https://chromium-review.googlesource.com/c/v8/v8/+/2080361 PR-URL: #32679 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Currently, the following warnings are emitted during compilation: In file included from ../src/string_bytes.h:29, from ../src/string_bytes.cc:22: ../deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak( P*,typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::BaseObject; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)]’: ../src/base_object-inl.h:135:42: required from here ../deps/v8/include/v8.h:10732:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::BaseObject>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] 10732 | reinterpret_cast<Callback>(callback), type); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And the same from test/cctest/test_aliased_buffer.cc We have an open pull request against v8 for this: https://chromium-review.googlesource.com/c/v8/v8/+/2080361 PR-URL: #32679 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Currently, the following warnings are emitted during compilation: In file included from ../src/string_bytes.h:29, from ../src/string_bytes.cc:22: ../deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak( P*,typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::BaseObject; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)]’: ../src/base_object-inl.h:135:42: required from here ../deps/v8/include/v8.h:10732:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::BaseObject>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] 10732 | reinterpret_cast<Callback>(callback), type); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And the same from test/cctest/test_aliased_buffer.cc We have an open pull request against v8 for this: https://chromium-review.googlesource.com/c/v8/v8/+/2080361 PR-URL: nodejs#32679 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Currently, the following warnings are emitted during compilation: In file included from ../src/string_bytes.h:29, from ../src/string_bytes.cc:22: ../deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak( P*,typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::BaseObject; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)]’: ../src/base_object-inl.h:135:42: required from here ../deps/v8/include/v8.h:10732:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::BaseObject>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] 10732 | reinterpret_cast<Callback>(callback), type); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And the same from test/cctest/test_aliased_buffer.cc We have an open pull request against v8 for this: https://chromium-review.googlesource.com/c/v8/v8/+/2080361 PR-URL: #32679 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Currently, the following warnings are emitted during compilation: In file included from ../src/string_bytes.h:29, from ../src/string_bytes.cc:22: ../deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak( P*,typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::BaseObject; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)]’: ../src/base_object-inl.h:135:42: required from here ../deps/v8/include/v8.h:10732:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::BaseObject>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] 10732 | reinterpret_cast<Callback>(callback), type); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And the same from test/cctest/test_aliased_buffer.cc We have an open pull request against v8 for this: https://chromium-review.googlesource.com/c/v8/v8/+/2080361 PR-URL: #32679 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Currently, the following warnings are emitted during compilation:
And the same from test/cctest/test_aliased_buffer.cc
We have an open pull request against v8 for this:
https://chromium-review.googlesource.com/c/v8/v8/+/2080361
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes