Hi! On Thu, Nov 07, 2019 at 06:44:17PM +0100, Egeyar Bagcioglu wrote: > On 11/7/19 9:03 AM, Segher Boessenkool wrote: > >>+ ASM_OUTPUT_ASCII(asm_out_file, cmdline, cmdline_length); > >>+ } > >>+ cmdline[0] = 0; > >>+ ASM_OUTPUT_ASCII(asm_out_file, cmdline, 1); > >>+ > >>+ /* The return value is currently ignored by the caller, but must be 0. > >>*/ > >>+ return 0; > >>+} > >A temporary file like this isn't so great. > > GCC operates with temporary files, doesn't it? What is the concern that > is specific to this one? That is the most reasonable way I found to pass > the argv of gcc to child processes for saving. Other ways of passing it > that I could think of, or the idea of saving it in the driver were > actually very bad ideas.
Oh, this is for passing something to another process? I guess I didn't read it closely enough, sorry, never mind. > >Opening a file as "r" but then > >accessing it with "fread" is peculiar, too. > > I am not sure what you mean here. Is it that you prefer "wb" and "rb" > instead of "w" and "r"? I thought it was enough to use a consistent pair. I'd use fgets or similar, not fread. Segher