This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
What is really a new line in most compilers
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 26 Oct 2005 16:09:24 -0400 (EDT)
- Subject: What is really a new line in most compilers
Take the following C program, and try to compile the resulting
code it outputs:
#include <stdio.h>
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 it as \r is not considered a newline.
This seems inconstaint for ICC as it considers \r\n as a newline but \r as a white space.
-- Pinski