Skip to content
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

[C++] DCHECK custom messages are unreachable in release #15968

Closed
asfimport opened this issue Feb 9, 2019 · 4 comments
Closed

[C++] DCHECK custom messages are unreachable in release #15968

asfimport opened this issue Feb 9, 2019 · 4 comments

Comments

@asfimport
Copy link

asfimport commented Feb 9, 2019

For release builds, DCHECK( x ) << y << z; currently expands to

((void)(x)); 
while (false) ::arrow::util::ArrowLogBase() << y << z;

This is unreachable which is an error using clang-7

Reporter: Ben Kietzman / @bkietz
Assignee: Ben Kietzman / @bkietz

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-4520. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Wes McKinney / @wesm:
Issue resolved by pull request 3599
#3599

@asfimport
Copy link
Author

Ben Kietzman / @bkietz:
After #3854 clang is complaining that custom messages are unreachable again; arguments to the DCHECK macros need to be explicitly ignored and the NullLog needs to be voidified

@asfimport
Copy link
Author

Wes McKinney / @wesm:
This issue only arises with -DBUILD_WARNING_LEVEL=CHECKIN which enables a bunch of warnings in addition to -Werror. We have not strived for a warning-free build in release mode so I think we should close this and perhaps raise a CMake error if the user tries to use Release and CHECKIN together

@asfimport
Copy link
Author

Wes McKinney / @wesm:
I'll submit a PR to improve the developer documentation about this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants