Joerg Schilling wrote: > Alan Coopersmith <Alan.Coopersmith at Sun.COM> wrote: > >> While not a stopper, since we can easily fix every time we hit it, it would >> be amazingly nice if Sun Studio learned how to ignore \r at the end of lines, >> so that those of us working on cross-platform open source projects don't face >> thousands of "Invalid whitespace errors" every time someone checks in code >> with >> Windows linebreaks. gcc seems to manage to ignore them properly. >> (Including >> not treating it as the escaped character when a line ends in \\r\n and >> breaking >> line continuations.) > > I have seen a lot of code written on microsoft and compiled iside a single > source tree on many platforms using the schily makefile system. I've never > seen > the problem you describe. What is the exact problem you see?
I don't see what your makefile system has to do with anything, but if you want a trivial example: alanc at x11x:/tmp [8:12am - 9] cat > foo.c #include <stdio.h> int main(int argc, char **argv) { printf("Goodbye cruel world\n"); } alanc at x11x:/tmp [8:13am - 10] perl -i -p -e 's/\n/\r\n/' foo.c alanc at x11x:/tmp [8:13am - 11] cc foo.c "foo.c", line 1: warning: invalid white space character in directive -- -Alan Coopersmith- alan.coopersmith at sun.com Sun Microsystems, Inc. - X Window System Engineering