Checking Side Effects
Specification:void set_insert (set s, int e) { modifies s;}void set_union(set s, set t) { modifies s;}
Code (in set.c) :void set_union (set s, set t) { int i; for (i = 0; i < s->size; i++) set_insert(t, s->elements[i]); }
Message:
- set.c:35, 27: Called procedure set_insert may modify t: set_insert(t, s->elements[i])