Re: [patch][libcpp] PR53690 - wrong code for C++11 UCN

2012-07-09 Thread Jason Merrill
On 07/09/2012 09:07 AM, Andreas Schwab wrote: You also get 0 for a partial UCN, which is significant for forms_identifier_p. Right. Since 0 is a valid UCN, we can't use the return value both for the UCN and the predicate; I'd suggest returning the UCN by pointer parameter. Jason

Re: [patch][libcpp] PR53690 - wrong code for C++11 UCN

2012-07-09 Thread Andreas Schwab
Steven Bosscher writes: > In any case, it's valid for C++11. Jason modified charset.c to > implement the C++11 change and handle the differences between C99 and > C++11 (*) but I think he overlooked the two lines at the bottom that > convert a 0 result to 1. You also get 0 for a partial UCN, whi

[patch][libcpp] PR53690 - wrong code for C++11 UCN

2012-07-08 Thread Steven Bosscher
Hello, In PR53690, a UCN is incorrectly interpreted in C++11 mode. The value should be 0 but is converted to 1 by libcpp U'\U'. The reason is that _cpp_valid_ucn converts all 0 results to 1, by default. I am not 100% sure why that is (there is no comment and the code has been like that si