This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Carriage returns in files



While I know the Unix standard is for LF's at the end of lines, not CR/LF
EOL's, using GCC in a cross platform environment is quite tricky. Windows
systems add CR/LF at EOL, which confuses the preprocessor.

Example:    (J's represent LF's, M's represent CR's)

#define TEST   testing \JM
               1       \JM
               2       \JM
               3

Instead of replacing TEST with 4 lines, it replaces TEST with "testing \"
which is obviously incorrect. When looking for \'s to continue the end of
line, would it be possible to treat \CRLF the same as \LF?

I know this violates Unix standards, but it's hard defending this as the
correct thing, because Microsoft's and Borland's compilers will work fine
with either EOL mode.

Any thoughts on this matter? If I were to come up with a patch, would it be
accepted?

-- 
Kevin Day
toasty@dragondata.com - kevin@stileproject.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]