Re: What is really a new line in most compilers

2005-10-27 Thread Mike Stump
On Oct 27, 2005, at 12:06 AM, Paolo Bonzini wrote: Unfortunately, GUI programs such as TextEdit seem not to know this, Odd, I just created a file and saved it: mrs $ od -c -x ~/Desktop/barfoo.c 000m i k e \n w a s \n h e r e \n 6d696b650a77

Re: What is really a new line in most compilers

2005-10-27 Thread Paolo Bonzini
Just a nit: 5 years ago that was true. Now \n is "native" Was that part of the OS/X migration, or otherwise? Just curious. Part of the migration. OS X /is/ unix. Ok, I'm sure that's an inaccurate statement and I trust the more experienced Apple guys here will gently correct me. But

Re: What is really a new line in most compilers

2005-10-26 Thread Howard Hinnant
On Oct 26, 2005, at 5:17 PM, DJ Delorie wrote: Just a nit: 5 years ago that was true. Now \n is "native" Was that part of the OS/X migration, or otherwise? Just curious. Part of the migration. OS X /is/ unix. Ok, I'm sure that's an inaccurate statement and I trust the more experi

Re: What is really a new line in most compilers

2005-10-26 Thread DJ Delorie
> Just a nit: 5 years ago that was true. Now \n is "native" Was that part of the OS/X migration, or otherwise? Just curious. > but most Mac software is pretty tolerant of newline representation > due to its history. Of course, that only makes it *more* of a mess, and *less* likely that gcc i

Re: What is really a new line in most compilers

2005-10-26 Thread Howard Hinnant
On Oct 26, 2005, at 4:58 PM, DJ Delorie wrote: To add to that, Mac text files use a bare \r as a newline. Just a nit: 5 years ago that was true. Now \n is "native" but most Mac software is pretty tolerant of newline representation due to its history. -Howard

Re: What is really a new line in most compilers

2005-10-26 Thread DJ Delorie
> This seems inconstaint for ICC as it considers \r\n as a newline but > \r as a white space. Note that on Windows/DOS/CPM based platforms, \r\n *is* a newline. It is not defined what happens if you see those characters separately in a text file, and different applications do different things up

What is really a new line in most compilers

2005-10-26 Thread Andrew Pinski
Take the following C program, and try to compile the resulting code it outputs: #include int main(void) { printf("// \\\r\n a\n int i;\n"); printf("// \\\r a\r int i1;\n"); printf("int f(void) { return i1;}\n"); } Here is the results: GCC accepts it as \r is consider a newline ICC rejects i