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]

[Ada] Handle invalid data for UTF_32_To_Char_Sequence


While working on improving the compile time folding of comparisons,
it was noticed that there is a comparison here against which is
always false given the bounds of type UTF_32_Code. This was not
caught, but with the new improved code we got a warning. So this
patch changes to proper use of 'Valid to detect invalid codes. No
test is needed, since using the existing compiler, invalid codes
were properly detected in any case, this is just removing a latent
bug (which would have shown up when we install the new improved
comparison folding circuit).

Tested on x86_64-pc-linux-gnu, committed on trunk

2009-06-19  Robert Dewar  <dewar@adacore.com>

	* s-wchcnv.adb (UTF_32_To_Char_Sequence): Handle invalid data properly

Attachment: difs
Description: Text document


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