You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
281 B
20 lines
281 B
5 years ago
|
A value is read before it has been initialized. For example, in C:
|
||
|
|
||
|
```C
|
||
|
struct coordinates {
|
||
|
int x;
|
||
|
int y;
|
||
|
};
|
||
|
|
||
|
void foo() {
|
||
|
struct coordinates c;
|
||
|
c.x = 42;
|
||
|
c.y++; // uninitialized value c.y!
|
||
|
|
||
|
int z;
|
||
|
if (z == 0) { // uninitialized value z!
|
||
|
// something
|
||
|
}
|
||
|
}
|
||
|
```
|