Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20030907080017.29863.qmail@web14410.mail.yahoo.com> Date: Sun, 7 Sep 2003 01:00:17 -0700 (PDT) From: Gerry Reno Subject: gcc simple program crashing To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 converter: #include int main (int argc, char *argv[]) { int ch; while ( (ch = getc(stdin)) && ! feof(stdin) ) { if (ch == '\n') { putc('\n',stdout); putc('\r',stdout); } 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 ---------------------------------------------- ~/dev The NTVDM has encountered an illegal instruction. CS:0000 IP:0077 OP:f0 37 05 0e 02 Choose 'Close' to terminate the application. ---------------------------------------------- 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): http://www.cygwin.com/ml/cygwin/2002-07/msg01598.html thx, Gerry Reno __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- 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/