[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.o


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.o