This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: read source input file
- From: Ian Lance Taylor <iant at google dot com>
- To: dodegy <dodegy at upb dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: 01 Jul 2007 18:50:09 -0700
- Subject: Re: read source input file
- References: <11387024.post@talk.nabble.com>
dodegy <dodegy@upb.de> writes:
> I have a little question. I need to know where in the gcc source the
> functions for reading input source files are. I want to substitute this to
> use a fix string instead reading file.
Look at libcpp/files.c.
> Also the output must be written to a
> string.
That would be more difficult. The output is written in many different
places. Probably the only way to do with without a lot of hackery
would be to somehow invent a FILE which wrote to a string. Note that
gcc's output is just assembler code which is normally passed to the
assembler; what would you expect to do with that?
> Is it possible to compile a fix source string without a file system?
It's not possible with the sources as they stand, but it is probably
possible to do it without an excessive amount of work.
Ian