Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 7 years ago

Language

Compiler

Options

Author

anonymous

about 7 years ago

a.h

$
prog.cc: In function 'int main()':
prog.cc:9:26: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     printf("%i\n", j = *((short*)&a));
                         ~^~~~~~~~~~~
prog.cc:10:26: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     printf("%i\n", j = *((int*)&f));
                         ~^~~~~~~~~
1
0
1
Exit Code:
0