This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Making gcc read from the standard input


On Jan 10, 2007, at 10:29 PM, Tathagato Rai Dastidar wrote:
Is there a way I can make GCC read a C or C++ code from the standard input instead of from a file?

$ echo 'int i;' | gcc -S -xc - -o - .comm _i,16 .subsections_via_symbols

Also, some systems have things like /dev/fd0 and /dev/stdin. They are files that can be read, even if gcc didn't support the "-" filename.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]