Re: strange bug that doesn't occur in Linux, OpenBSD or ITS

2012-02-24 Thread Dave Korn
On 18/02/2012 18:32, Jeremiah Bishop wrote: > the bash commands used are: 1) gcc "cygwin puzzle.c" > > 2) ./a.out a b > Now either version used on a file with a shorter set of lines, works just > fine but strangely, that single digit difference aborts the program without > throwing any error on t

Re: strange bug that doesn't occur in Linux, OpenBSD or ITS

2012-02-20 Thread Earnie Boyd
On Mon, Feb 20, 2012 at 3:48 AM, Csaba Raduly wrote: > On Sun, Feb 19, 2012 at 1:29 AM, Mark Geisert  wrote: >> >> 4. You've coded functions nested inside main().  I haven't seen that practice >> in C language before but apparently it works.  Color me impressed. > > It's a non-portable GCC extensio

Re: strange bug that doesn't occur in Linux, OpenBSD or ITS

2012-02-20 Thread Csaba Raduly
On Sun, Feb 19, 2012 at 1:29 AM, Mark Geisert wrote: > > 4. You've coded functions nested inside main().  I haven't seen that practice > in C language before but apparently it works.  Color me impressed. It's a non-portable GCC extension: http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html#N

Re: strange bug that doesn't occur in Linux, OpenBSD or ITS

2012-02-18 Thread Mark Geisert
Jeremiah Bishop writes: > the  bash commands used are: > 1) gcc "cygwin puzzle.c" > > 2) ./a.out a b > Now either version used on a file with a shorter set of lines, works just fine but strangely, that single > digit difference aborts the program without throwing any error on the sample input or