#1831 - Touchstone - Fri Jan 24, 2003 12:11 am
I keep getting the error "stray '\312'" when compiling a C file with gcc 3.0.4 running on Mac OS X (which is supposedly based on Unix). Have anyone else seen this error and know how to avoid it or even reproduce it? To me it seems to pop up randomly, most often when I'm really eager to try out a new build. :P
Often it's possible to work my way around the error by splitting up the code over several lines. The original erroneous line doesn't have to be complex at all though. For example, I got the error on this line once:
After changing the code around i managed to get it to compile, the working code looked like this:
That worked, that was nice, but I reverted my code back to look like it did from the beginning, without changing anything else in the file or other files, and this time around I didn't get that stray error.
I've read that "stray '\'" errors can come from files being saved with Windows EOL (CRLF) format instead of Unix EOL (LF), and that atleast gcc 3.0.4 for cygwin has trouble handling CRLF correctly, but I'm using Unix EOL so that's not the problem. I've also heard that this could be because my drive is mounted as binary instead of text. I don't know what this means but if anyone can help me re-mount my drive as text I'd appreciate it.
So, anyone know how I can reproduce and/or avoid the "stray '\312'" error?
Cheers,
Touchstone
_________________
You can't beat our meat
Often it's possible to work my way around the error by splitting up the code over several lines. The original erroneous line doesn't have to be complex at all though. For example, I got the error on this line once:
Code: |
g_pBackbuff[x] = a; |
After changing the code around i managed to get it to compile, the working code looked like this:
Code: |
{
s32* pApa = g_pBackbuff; pApa[x] = a; } |
That worked, that was nice, but I reverted my code back to look like it did from the beginning, without changing anything else in the file or other files, and this time around I didn't get that stray error.
I've read that "stray '\'" errors can come from files being saved with Windows EOL (CRLF) format instead of Unix EOL (LF), and that atleast gcc 3.0.4 for cygwin has trouble handling CRLF correctly, but I'm using Unix EOL so that's not the problem. I've also heard that this could be because my drive is mounted as binary instead of text. I don't know what this means but if anyone can help me re-mount my drive as text I'd appreciate it.
So, anyone know how I can reproduce and/or avoid the "stray '\312'" error?
Cheers,
Touchstone
_________________
You can't beat our meat