What is really a new line in most compilers
Andrew Pinski
pinskia@physics.uc.edu
Wed Oct 26 21:12:00 GMT 2005
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
More information about the Gcc
mailing list