Not a bug, but a suggestion

Michael McTernan Michael.McTernan.2001@cs.bris.ac.uk
Fri Jan 18 08:50:00 GMT 2002


Hi,

> And, as an added bonus 'gcc -o /dev/null ...' works fine under cygwin.

Not always.  Let me demonstrate...

mm1@MM1-DELL ~/test
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
gcc version 2.95.3-5 (cygwin special)

mm1@MM1-DELL ~/test
$ gcc hello.c -o /dev/null
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld:
cann
ot open output file /dev/null.exe: No such file or directory
collect2: ld returned 1 exit status

mm1@MM1-DELL ~/test
$ cat hello.c

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Hello world\n");

    exit (1);
}
mm1@MM1-DELL ~/test
$

However, if used with the -c options it is ok.  e.g.

mm1@MM1-DELL ~/test
$ gcc -c hello.c -o /dev/null

mm1@MM1-DELL ~/test
$ ls -l
total 1
-rw-r--r--    1 mm1      None          108 Jan 18 16:45 hello.c

mm1@MM1-DELL ~/test
$

Cheers,

Mike


> -----Original Message-----
> From: Christopher Faylor [mailto:cgf@redhat.com]
> Sent: 18 January 2002 16:42
> To: Michael McTernan
> Cc: Adrian von Bidder; nathan@compsci.bristol.ac.uk;
> gcc-bugs@gcc.gnu.org
> Subject: Re: Not a bug, but a suggestion
>
>
> On Fri, Jan 18, 2002 at 10:36:45AM -0000, Michael McTernan wrote:
> >Ooops,
> >
> >My fault for not looking fully - sorry guys!
>
> And, as an added bonus 'gcc -o /dev/null ...' works fine under cygwin.
>
> cgf
>
> >> -----Original Message-----
> >> From: Adrian von Bidder [mailto:avbidder@acter.ch]
> >> Sent: 18 January 2002 10:13
> >> To: Michael McTernan
> >> Cc: gcc-bugs@gcc.gnu.org
> >> Subject: Re: Not a bug, but a suggestion
> >>
> >>
> >> On Thu, 2002-01-17 at 21:16, Michael McTernan wrote:
> >>>Hi Guys,
> >>>
> >>>GCC is great - well done.  Anyhow, now that gcc obseletes lint and
> >>>similar programs (well, maybe not lclint, but that doesn't count) is it
> >>>possible to add an option to gcc that will only print the warnings and
> >>>errors in the usual way, but without actually writing anything?
> >>
> >>man gcc
> >>
> >>the -fsyntax-only option is documented and, imho, not really hidden.
>
> --
> Please do not send me personal email with cygwin questions.
> Use the resources at http://cygwin.com/ .
>



More information about the Gcc-bugs mailing list