Skip to content
This repository has been archived by the owner on Sep 2, 2018. It is now read-only.

"err_typecheck_ordered_comparison_of_pointer_and_zero : error" can be disabled? #14

Open
GeekMin opened this issue Dec 3, 2016 · 4 comments

Comments

@GeekMin
Copy link

GeekMin commented Dec 3, 2016

Recently, I upgrade my clang...
But when compiling, a error interrupt the compiling...
i.e. ordered comparison between pointer and zero

hmmm, after searching the source code... I found this belongs to a new feature..
I do not find any place to prove that it can not be disabled...
Based on the source code, I think I do not find the flag to do this job...?

@dylanmckay
Copy link
Member

Do you have the stacktrace and full error that occurred?

@GeekMin
Copy link
Author

GeekMin commented Dec 3, 2016

Hmmmm.. I think what I said is not clear..

here, Clang 4.0 really has been installed..
my real question is happening during the usage.. Like:
If ( ptr != 0) , clang will give u an error: ordered comparison between pointer and zero...

But Old clang did not report this issue.. I look into the source code ..this feature is added after Oct.2016.. And SemaExpr.cpp(including the implement)
tells me that using debugger-support can skip this checking...
Hmmm, so I try using Clang -fdebugger-support.. tool tells me that... this options is not recogonized...

That's all...~?

@dylanmckay
Copy link
Member

Null checks should work fine - could you post a snippet of your code?

@GeekMin
Copy link
Author

GeekMin commented Dec 4, 2016

In a nutshell, Why clang not support -fdebugger-support option now? (To skip this added checking:
https:/llvm-mirror/clang/commits/master/include/clang/Basic/DiagnosticSemaKinds.td?after=QxyrQIs5b1W3c9iJaVHJ9xhVhAMrMzQ%3D)

(Code:
char *ptr;
If (ptr != 0) ;
)

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

No branches or pull requests

2 participants