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 jos...@codesourcery.com wrote: On Sun, 28 Oct 2012, Mike Dupont

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 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 write the

Re: bug report : -save-temps and stdin

2012-10-29 Thread Mike Dupont
On Mon, Oct 29, 2012 at 11:19 AM, Jonathan Wakely jwakely@gmail.com 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

Re: bug report : -save-temps and stdin

2012-10-29 Thread Mike Dupont
On Mon, Oct 29, 2012 at 11:20 AM, Jonathan Wakely jwakely@gmail.com 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

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 jos...@codesourcery.com 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

Re: bug report : -save-temps and stdin

2012-10-29 Thread Mike Dupont
On Mon, Oct 29, 2012 at 2:57 PM, Richard Biener richard.guent...@gmail.com 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

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

bug report : -save-temps and stdin

2012-10-28 Thread Mike Dupont
using a very recent : gcc version 4.8.0 20121021 (experimental) (GCC) h4ck3rm1k3@gcc10:~/experiments/build/glibc$ echo int x; | g++ -save-temps -x c - cc1: error: unrecognized command line option ā€˜-.iā€™ this causes problems compiling glibc with -save-temps. is this known? should I report a

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