language: C (gcc-4.7.2)
date: 1083 days 15 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
main() 
{ 
  int i=3; 
  float *pf; 
  pf = (float *)&i; 
  *pf = 100.00; 
  printf("%f", i); 
} 
prog.c:2: warning: return type defaults to ‘int’
prog.c: In function ‘main’:
prog.c:7: warning: implicit declaration of function ‘printf’
prog.c:7: warning: incompatible implicit declaration of built-in function ‘printf’
prog.c:7: warning: format ‘%f’ expects type ‘double’, but argument 2 has type ‘int’
prog.c:8: warning: control reaches end of non-void function
prog.c:5: warning: likely type-punning may break strict-aliasing rules: object ‘*pf’ of main type ‘float’ is referenced at or around prog.c:6 and may be aliased to object ‘i’ of main type ‘int’ which is referenced at or around prog.c:3.