[PATCH] RE: gcc for syntax check only (C): need to read source from stdin

2005-04-15 Thread Dave Korn
Original Message >From: Zack Weinberg >Sent: 12 April 2005 18:31 > "Dave Korn" <[EMAIL PROTECTED]> writes: > >> Then the error message *really* ought to say >> >> gcc: -E or -x required when input is from standard input >> >> since it is thoroughly obtuse and non-explanatory as it sta

RE: gcc for syntax check only (C): need to read source from stdin

2005-04-14 Thread Dave Korn
Original Message >From: James E Wilson >Sent: 13 April 2005 20:29 > Dave Korn wrote: >> [EMAIL PROTECTED] /gnu/testing/obj-HEAD> make check 2>&1 | tee check.log > > Always use "make -k check". Some testsuites exit with an error if one > or more tests failed, and because this is the norma

Re: gcc for syntax check only (C): need to read source from stdin

2005-04-13 Thread James E Wilson
Dave Korn wrote: [EMAIL PROTECTED] /gnu/testing/obj-HEAD> make check 2>&1 | tee check.log Always use "make -k check". Some testsuites exit with an error if one or more tests failed, and because this is the normal situation for almost all testsuites, this means the only way to get meaningful resu

RE: gcc for syntax check only (C): need to read source from stdin

2005-04-13 Thread Dave Korn
Original Message >From: Bernardo Innocenti >Sent: 13 April 2005 08:05 > Zack Weinberg wrote: >> "Dave Korn" writes: >> >> >>> No write perms mate! However I'll check out HEAD and do a >>> before-and-after testsuite run overnight, and get back to you in the >>> morning with the results

Re: gcc for syntax check only (C): need to read source from stdin

2005-04-13 Thread Bernardo Innocenti
Zack Weinberg wrote: > "Dave Korn" <[EMAIL PROTECTED]> writes: > > >> No write perms mate! However I'll check out HEAD and do a >>before-and-after testsuite run overnight, and get back to you in the morning >>with the results (UK time). Will "--enable-languages=c,c++" be enough, or >>do you wa

RE: gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Dave Korn
Original Message >From: Dave Korn >Sent: 12 April 2005 18:45 > No write perms mate! However I'll check out HEAD and do a > before-and-after testsuite run overnight, and get back to you in the > morning with the results (UK time). I spoke too soon. [EMAIL PROTECTED] /gnu/testing/ob

Re: gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Zack Weinberg
"Dave Korn" <[EMAIL PROTECTED]> writes: > No write perms mate! However I'll check out HEAD and do a > before-and-after testsuite run overnight, and get back to you in the morning > with the results (UK time). Will "--enable-languages=c,c++" be enough, or > do you want me to test against all de

RE: gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Dave Korn
Original Message >From: Zack Weinberg >Sent: 12 April 2005 18:31 > Yes, I think this is the right thing. Please test against mainline > and apply it there if successful. I don't think it is important > enough to put into 4.0.0, but you should put it on the 4.0 branch > after the release,

Re: gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Zack Weinberg
"Dave Korn" <[EMAIL PROTECTED]> writes: > Then the error message *really* ought to say > > gcc: -E or -x required when input is from standard input > > since it is thoroughly obtuse and non-explanatory as it stands. The > attached is against 4.0 RC1, but I imagine it'll apply cleanly to HEAD wi

Re: gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Dimitry Golubovsky
Zack, Now this works. Thanks a lot. And with -pipe, no temporary files at all (checked -v output). Could this be possibly placed in some FAQ? I tried to google for this first but did not get such a definitive (and simple) answer. On 4/12/05, Zack Weinberg <[EMAIL PROTECTED]> wrote: > In order

RE: gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Dave Korn
Original Message >From: Dave Korn >Sent: 12 April 2005 18:19 > > > 2005-12-04 Dave Korn <[EMAIL PROTECTED]> Oops. Please forgive mixed-endian date! It is of course the 12th of April and not the 4th of December today! 2005-04-12 Dave Korn <[EMAIL PROTECTED]> * gcc.c (

RE: gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Dave Korn
Original Message >From: Zack Weinberg >Sent: 12 April 2005 18:02 > Dimitry Golubovsky <[EMAIL PROTECTED]> writes: > >> Devang, >> >> Thanks for your relpy. >> >> This addresses only compiler's action problem (no output produced), >> but does not address the stdin problem. >> >> When I

Re: gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Zack Weinberg
Dimitry Golubovsky <[EMAIL PROTECTED]> writes: > Devang, > > Thanks for your relpy. > > This addresses only compiler's action problem (no output produced), > but does not address the stdin problem. > > When I try > > % cat a.c | gcc -fsyntax-only - > > I get > > gcc: -E required when input is fro

Re: gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Dimitry Golubovsky
Devang, Thanks for your relpy. This addresses only compiler's action problem (no output produced), but does not address the stdin problem. When I try % cat a.c | gcc -fsyntax-only - I get gcc: -E required when input is from standard input again and when I use -E it only runs the preprocess

Re: gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Devang Patel
To read source from stdin use "-". preprocessor man page says, Either infile or outfile may be -, which as infile means to read from standard input and as outfile means to write to standard output. On Apr 12, 2005, at 7:10 AM, Dimitry Golubovsky wrote: Hi, A program I am working on

Re: gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Devang Patel
Try -fsyntax-only On Apr 12, 2005, at 7:10 AM, Dimitry Golubovsky wrote: Hi, A program I am working on generates some C code on the fly, and I would like to check its syntax right after generation. I might save this code fragment in a temporary file and gun gcc -c over it, watching for exit code (0

gcc for syntax check only (C): need to read source from stdin

2005-04-12 Thread Dimitry Golubovsky
Hi, A program I am working on generates some C code on the fly, and I would like to check its syntax right after generation. I might save this code fragment in a temporary file and gun gcc -c over it, watching for exit code (0: syntax OK, 1: incorrect). This is fine with the one exception that I h