File: usp.i

package info (click to toggle)
frama-c 20161101%2Bsilicon%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 42,324 kB
  • ctags: 35,695
  • sloc: ml: 200,142; ansic: 31,465; makefile: 2,334; sh: 1,643; lisp: 259; python: 85; asm: 26
file content (20 lines) | stat: -rw-r--r-- 474 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
int a = -12;
int b;
unsigned int *p=&a;
unsigned int *q=&b;
int X, Y, Z, T;

main(int c){
  b = c ? -1 : 5;
  if (*p == 3) 
    X = *p;
  else
    Y = *p;
  if (*q == ((unsigned int)-1)) // Evaluating this condition changes the value of b to a set of unsigned values. This is not ideal, but not really problematic either, as we always recast binary representations to the good type.
    Z = *q;
  else
    T = *q;
  Frama_C_show_each(b);
  Frama_C_dump_each();
  b = b+0;
}