...
Code Block | ||||
---|---|---|---|---|
| ||||
#include <stddef.h> #include <stdio.h> void f(size_t n) { /* n must be incremented */ size_t a = sizeof(int[++n]); /* n need not be incremented */ size_t b = sizeof(int[++n % 1 + 1]); printf("%z%zu, %z%zu, %z%zu\n", a, b, n); /* ... */ } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
#include <stddef.h> #include <stdio.h> void f(size_t n) { size_t a = sizeof(int[n + 1]); ++n; size_t b = sizeof(int[n % 1 + 1]); ++n; printf("%z%zu, %z%zu, %z%zu\n", a, b, n); /* ... */ } |
...
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
Clang |
| -Wunevaluated-expression | |||||||
|
|
| |||||||
| CC2.EXP06 | Fully implemented | |||||||
| 54 S, 653 S | Fully implemented | |||||||
Parasoft C/C++test | 9.5 | JSF-166{b,c} | Fully implemented | ||||||
PRQA QA-C |
| 3307 | Fully implemented | ||||||
Clang |
| -Wunevaluated-expression |
...