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
[libpas] pas_utils.c fails to build due to missing parameter names in pas_crash_with_info_impl() #1878
Conversation
Why does it cause warnings? They are not used, and they do not have parameter names. I think this code should be fine. |
@@ -147,7 +147,18 @@ PAS_NEVER_INLINE PAS_NO_RETURN static void pas_crash_with_info_impl(uint64_t rea | |||
|
|||
#else | |||
|
|||
PAS_NEVER_INLINE PAS_NO_RETURN static void pas_crash_with_info_impl(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t) { __builtin_trap(); } | |||
PAS_NEVER_INLINE PAS_NO_RETURN static void pas_crash_with_info_impl(uint64_t reason, uint64_t misc1, uint64_t misc2, uint64_t misc3, uint64_t misc4, uint64_t misc5, uint64_t misc6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's suppress warnings instead. We strongly want to keep this function having only __builtin_trap
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's use PAS_IGNORE_GCC_WARNINGS_{BEGIN,END}
This source file is C (not C++), and parameter names in function declarations are mandatory. At least until the C2x spec is published and used in WebKit. I remember seeing warnings about “C source being compiled in C++ mode” shown during compilation in the past so that's why we haven't seen the errors before. I can change the void statements to |
|
@@ -147,7 +147,18 @@ PAS_NEVER_INLINE PAS_NO_RETURN static void pas_crash_with_info_impl(uint64_t rea | |||
|
|||
#else | |||
|
|||
PAS_NEVER_INLINE PAS_NO_RETURN static void pas_crash_with_info_impl(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t) { __builtin_trap(); } | |||
PAS_NEVER_INLINE PAS_NO_RETURN static void pas_crash_with_info_impl(uint64_t reason, uint64_t misc1, uint64_t misc2, uint64_t misc3, uint64_t misc4, uint64_t misc5, uint64_t misc6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's use PAS_IGNORE_GCC_WARNINGS_{BEGIN,END}
cdd4151
to
b08103e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
Thanks @Constellation! |
… pas_crash_with_info_impl() https://bugs.webkit.org/show_bug.cgi?id=242090 Reviewed by Yusuke Suzuki. * Source/bmalloc/libpas/src/libpas/pas_utils.c: (pas_crash_with_info_impl): Add missing parameter names, and use PAS_IGNORE_WARNINGS_{BEGIN,END} to avoid compiler warnings about unused variables. Canonical link: https://commits.webkit.org/251986@main
b08103e
to
ff4150d
Compare
Committed 251986@main (ff4150d): https://commits.webkit.org/251986@main Reviewed commits have been landed. Closing PR #1878 and removing active labels. |
ff4150d