I wrote a quick matrix multiplier in C. It compiles and runs fine on my MBA. When I compile and run on my schools Linux box though, I get stuck in an infinite loop.
This is my gcc compile
gcc -Wall prog1.c -o prog1
This is the version of gcc I have on my MBA
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build
2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This is the version of gcc on the schools server.
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Here is a link to the code.
EDIT: Sorry! I get an infinite loop on the input verification. I've been using printf statements to debug my code but even still I have a hard time understanding why it gets stuck there. What happens is the for() on line 181 keeps looping after it encounters a '+' or '-'.
Sixteen command line parameters because it fills two matrices with 8 integers each.
I'm not absolutely positive it's a problem with different compilers or my code! I just figured that was it because I get expected results on my MBA but not on the Red Hat machine.