This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: patch to convert input character set to source character set


Zack Weinberg wrote:-

> > Sorry, I didn't look hard initially, I was put off by the claim that
> > you'd reviewed it.
> 
> I reviewed it to the extent I was able, but you know that area of the
> code much better than me.

Ah, OK.  I'll look a bit closer then...


Chandra Chavva wrote:-

> *************** _cpp_clean_line (cpp_reader *pfile)
> *** 164,169 ****
> --- 166,175 ----
>   	s++;
>       }
>   
> +   len = s - start;
> + 
> +   pfile->buffer->cur = _cpp_input_to_utf8 (pfile, start, len);
> + 
>     *d = '\n';
>     /* A sentinel note that should never be processed.  */
>     add_line_note (buffer, d + 1, '\n');

This is incorrect - you're deciding to convert a line after you've
decided where it ends.  But how can you know where a line ends unless you
have converted it?  The above code will work for the ASCII supersets
only.

Neil.


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