-
Notifications
You must be signed in to change notification settings - Fork 153
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
Fix warnings produced when compiling with clang #14
Conversation
Is the DynC regeneration also for clang warning cleanup? |
Yes, it was throwing a lot of warnings about the deprecated register keyword, and regenerating the parser/lexer with the latest bison/flex versions seemed like the best solution. |
Great. Let's get the clang and CI moving then, and this can come in on top of those. |
Rebased onto the clang pull request. |
Depends on #13 |
Now that #13 has been merged, this PR is ready for review and merging. |
On second thought, this can wait until after the 9.2 release. |
Now that 9.2 has been released, this is ready for review. |
What's up with the warnings about comparing typeids? That's in there for speed; if there's an accuracy problem obviously that needs fixing... |
Clang produces this warning for usages of typeid(*var): warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression] I'm not conversant enough with RTTI to be able to safely determine if this warning can be ignored. |
It looks like https://github.com/llvm-mirror/clang/blob/master/lib/Sema/SemaExprCXX.cpp#L451 might be where the warning is coming from, but I'm not totally sure. |
It appears that llvm-mirror/clang@f1a2b53 is the commit that introduced the warning. |
I think those warnings are safe in our context--the operation in question is a shared_ptr dereference the majority of the time. From what I've seen in profiling typeid is faster in the cases where we have what we expect (and not by a small amount). That may have changed, though--the last time I profiled that code was years ago and with IIRC gcc 4.1.2. If there's no longer a practical speed advantage to typeid, we may as well use dynamic_cast and make the compiler happy. |
So is this ok for merging or do I need to rework anything? |
Should be okay now; I'll let you know if it's not. Letting this one be a test case for my Jenkins setup, if you don't mind, though. |
Sure, no rush. |
Clean under Jenkins, though it's not updating status correctly. |
RHEL6's GCC 4.4 doesn't support these new |
It is, and I'm not sure why my Jenkins setup (which should be using system gcc) didn't catch it. |
The system gcc (4.4.7) on Follis is complaining about it for me |
No description provided.