Re: bug report : -save-temps and stdin

2012-10-29 Thread Georg-Johann Lay
Richard Biener schrieb: Joseph S. Myers wrote: I think the fix should be to give an early error message for compiling from stdin with -save-temps, and then stop the compilation because there's nowhere to save the intermediate files (given the lack of an input file name). Alternatively, inform

Re: bug report : -save-temps and stdin

2012-10-29 Thread Mike Dupont
On Mon, Oct 29, 2012 at 2:57 PM, Richard Biener wrote: > Alternatively, inform the user that -save-temps is ignored and continue ... > (I can see people annoyed by foreign Makefiles and tying to get at > preprocessed > source with CFLAGS="... -save-temps") that also makes sense, and would be mor

Re: bug report : -save-temps and stdin

2012-10-29 Thread Richard Biener
On Sun, Oct 28, 2012 at 6:40 PM, Joseph S. Myers wrote: > On Sun, 28 Oct 2012, Mike Dupont wrote: > >> is this known? should I report a bug? any ideas on fixing it, I might >> be able to do so, it should be simple. > > I think the fix should be to give an early error message for compiling > from

Re: bug report : -save-temps and stdin

2012-10-29 Thread Mike Dupont
On Mon, Oct 29, 2012 at 11:20 AM, Jonathan Wakely wrote: > Creating the temp file yourself has the advantage you know what the > name is, whereas if GCC creates it you need to look for new files or > check timestamps to find what name it used. so we can have three options that I would suggest :

Re: bug report : -save-temps and stdin

2012-10-29 Thread Mike Dupont
On Mon, Oct 29, 2012 at 11:19 AM, Jonathan Wakely wrote: > On 29 October 2012 09:25, Mike Dupont wrote: >> Well in this case, what about a random temp file name? tmpfile ? >> something with the timestamp as well. >> I would like to have those files if possible. would that be acceptable? > > Why n

Re: bug report : -save-temps and stdin

2012-10-29 Thread Jonathan Wakely
On 29 October 2012 10:19, Jonathan Wakely wrote: > On 29 October 2012 09:25, Mike Dupont wrote: >> Well in this case, what about a random temp file name? tmpfile ? >> something with the timestamp as well. >> I would like to have those files if possible. would that be acceptable? > > Why not just w

Re: bug report : -save-temps and stdin

2012-10-29 Thread Jonathan Wakely
On 29 October 2012 09:25, Mike Dupont wrote: > Well in this case, what about a random temp file name? tmpfile ? > something with the timestamp as well. > I would like to have those files if possible. would that be acceptable? Why not just write the source to the temp file then invoke GCC on it?

Re: bug report : -save-temps and stdin

2012-10-29 Thread Mike Dupont
Well in this case, what about a random temp file name? tmpfile ? something with the timestamp as well. I would like to have those files if possible. would that be acceptable? mike On Sun, Oct 28, 2012 at 6:40 PM, Joseph S. Myers wrote: > On Sun, 28 Oct 2012, Mike Dupont wrote: > >> is this known

Re: bug report : -save-temps and stdin

2012-10-28 Thread Joseph S. Myers
On Sun, 28 Oct 2012, Mike Dupont wrote: > is this known? should I report a bug? any ideas on fixing it, I might > be able to do so, it should be simple. I think the fix should be to give an early error message for compiling from stdin with -save-temps, and then stop the compilation because ther