-
Notifications
You must be signed in to change notification settings - Fork 588
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
ares__iface_ip_flags_t cannot have the value 0. #723
Comments
Is this actually emitting some warning somewhere ? This is valid in C to use an enum as a flags value, however C++ doesn't allow this. Are you trying to compile c-ares as C++ code? |
yes, this warning caused a compilation issue: |
Before the last changes, c-ares was C++ compatible. And I hope it will be the same in the future. |
I'm not sure I understand why you'd compile C code with a C++ compiler, can you provide the reason why this is desirable? Is this some limitation of some embedded environment? Or are you just compiling with a warning flag to force this behavior? |
Looking at it |
Just tested it, it does warn when you combine 2 enum values as flags:
|
I have checked our code. |
Can this warning flag be excluded, or at least be excluded from -Werror in your project? That's a non-standard flag. |
0 is not a possible value for ares__iface_ip_flags_t, but in several places, it takes this value:
The text was updated successfully, but these errors were encountered: