Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Static Analysis Framework for CDT


> BTW the checker thinks that this statement has no effect in Hello World
> application:
> cout << "!!!Hello World!!!" << endl;

I should turn of for c++ probably. You can overload + to do something as well...
>
> also you cover a+b; case. A statement a; could be added as it has no
> effect either (except any side effect of course).
What do you mean? If + is not overload, the resulting value has no effect regardless of what a or b is.

That's not strictly true: either a or b may have a coercion operator that is implied by the use of '+' - that coercion may have side-effects, but then the programmer should be shot.
 
Yes there should be a checker to catch that. 

Andrew


Back to the top