Opened 17 years ago
Last modified 16 years ago
#526 new enhancement
Result depends on evaluation order of a(z) and b(z)
| Reported by: | ettlmartin | Owned by: | noone |
|---|---|---|---|
| Priority: | Milestone: | ||
| Component: | New check | Version: | |
| Keywords: | Cc: |
Description
#include <iostream>
int a( int x)
{
return x;
//...
}
int b( int & y)
{
// ...
y++;
return y;
}
int c( int z )
{
return a(z) + b(z);
}
int main()
{
}
The returned result from function c() depends of the calling order of a(z) and b(z). In other words, b(z)+a(z) computes another result as a(z)+b(z).
Mayba cppcheck could raise a warning in this cases, because these errors are hard to find.
Best regards
Martin
Change History (2)
comment:1 by , 16 years ago
| Summary: | Result depends on evaluation oder of a(z) and b(z) → Result depends on evaluation order of a(z) and b(z) |
|---|
Note:
See TracTickets
for help on using tickets.
spell checking the ticket name