| Issue |
165875
|
| Summary |
catch function argument evaluation order bugs with -Wsometimes-uninitialized
|
| Labels |
clang:diagnostics
|
| Assignees |
|
| Reporter |
zmodem
|
Consider something like:
```
int init(int* p);
void g(int a, int b);
void f(void) {
int x;
g(init(&x), x);
}
```
Assuming that `init` initializes `*p`, `x` may or may not be initialized in the call to `g` depending on the order in which the function call arguments are evaluated, which is unspecified.
Catching order of evaluation bugs in general is tricky, but in cases like this, it seems `-Wsometimes-uninitialized` could warn.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs