Article 5ES2E [SOLVED] Different result of using gcc in way that source from pipe/stdin

[SOLVED] Different result of using gcc in way that source from pipe/stdin

by
BudiKusasi
from LinuxQuestions.org on (#5ES2E)
Why is the output/result of using gcc in way that source from pipe/stdin different from the normal way, ie. from the text source file ?

Code:$ cat>u.c <<<'void main(){ int o=9;}'
$ gcc u.c -c

$ gcc -xc - <<<'void main(){ int o=9;}'

$ diff u.o a.out
Binary files u.o and a.out differ

$ ls -s u.o a.out
20 a.out 4 u.olatest?d=yIl2AUoC8zA latest?i=oW4kmjmZfyM:jjMArZZTxGs:F7zBnMy latest?i=oW4kmjmZfyM:jjMArZZTxGs:V_sGLiP latest?d=qj6IDK7rITs latest?i=oW4kmjmZfyM:jjMArZZTxGs:gIN9vFwoW4kmjmZfyM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments