gcc simple program crashing

Gerry Reno grenoml@yahoo.com
Sun Sep 7 08:00:00 GMT 2003

  I wrote, compiled and ran a very simple program today that is
producing the weirdest results.  I began googling the errors and came
across multiple accounts of people experiencing the exact same
behavior. The program is just a simple dos/unix line termination

#include <stdio.h>

int main (int argc, char *argv[])
  int ch;
  while ( (ch = getc(stdin)) && ! feof(stdin) ) {
    if (ch == '\n') {
    } else putc(ch,stdout);

gcc -o filter.exe -c filter.c

The errors:
./filter.exe 8: Syntax error: EOF in backquote substitution

and sometimes:
16-bit MS-DOS Subsystem
The NTVDM has encountered an illegal instruction.
CS:0000 IP:0077 OP:f0 37 05 0e 02 Choose 'Close' to terminate the

Also, when I run the program from a DOS box the cursor starts jumping
all over the screen and you have to kill the DOS box to stop it.

I've tried this under Cygwin and MinGW with same result.

I'm using gcc 3.2 series in both cases:

gcc --version
gcc.exe (GCC) 3.2.3 (mingw special 20030504-1)

gcc --version
gcc (GCC) 3.2 20020927 (prerelease)

  Anyone know what is causing this behavior?  Another poster with this
problem was using g++ (GCC) 3.1.1 20020718 (prerelease):

Gerry Reno

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list