[patch, fortran] warnings on truncated lines with \r\n line-endings

Tobias Burnus burnus@net-b.de
Wed Feb 18 16:43:00 GMT 2009


Daniel,

Daniel Franke wrote:
> Attached mini-patch fixes this by skipping the '\r' character without 
> setting 'trunc_flag'. 
>
> I'd claim it's obvious for 4.5, but would it be ok for 4.4 as well?
>   
This patch is OK since we don't support the old Mac format of having
'\r' instead of '\n' or '\r\n'. I think it is trivial enough to be OK
for 4.4, but I'm also open for other comments.

Any idea what goes wrong with your PR 39229 (which definitely looks more
like 4.5 item)?

Tobias

> 	  /* Truncate the rest of the line.  */
>  	  for (;;)
>  	    {
>  	      c = getc (input);
> +	      if (c == '\r')
> +	        continue;
> +
>  	      if (c == '\n' || c == EOF)
>  		break;
> 	      trunc_flag = 1;
>             }
>   



More information about the Gcc-patches mailing list