-
- Downloads
ada: Fix bogus Constraint_Error for 'Wide_Wide_Value on wide enumeration literal
The problem is that 'Wide_Wide_Value is piggybacked on 'Value and the latter invokes System.Val_Util.Normalize_String, which incorrectly normalizes the input string in the presence of enumeration literals with wide characters. gcc/ada/ChangeLog: PR ada/115507 * exp_imgv.adb (Expand_Valid_Value_Attribute): Add actual parameter for Is_Wide formal in the call to Valid_Value_Enumeration_NN. (Expand_Value_Attribute): Likewise. * libgnat/s-vaen16.ads (Value_Enumeration_16): Add Is_Wide formal. (Valid_Value_Enumeration_16): Likewise. * libgnat/s-vaen32.ads (Value_Enumeration_32): Likewise. (Valid_Value_Enumeration_32): Likewise. * libgnat/s-vaenu8.ads (Value_Enumeration_8): Likewise. (Valid_Value_Enumeration_8): Likewise. * libgnat/s-valboo.adb (Value_Boolean): Pass True for To_Upper_Case formal parameter in call to Normalize_String. * libgnat/s-valcha.adb (Value_Character): Likewise. * libgnat/s-valuen.ads (Value_Enumeration): Add Is_Wide formal. (Valid_Value_Enumeration): Likewise. * libgnat/s-valuen.adb (Value_Enumeration_Pos): Likewise and pass its negation for To_Upper_Case formal in call to Normalize_String. (Valid_Value_Enumeration): Add Is_Wide formal and forward it in call to Value_Enumeration_Pos. (Value_Enumeration): Likewise. * libgnat/s-valuti.ads (Normalize_String): Add To_Upper_Case formal parameter and adjust post-condition accordingly. * libgnat/s-valuti.adb (Normalize_String): Add To_Upper_Case formal parameter and adjust implementation accordingly. * libgnat/s-valwch.adb (Value_Wide_Wide_Character): Pass False for To_Upper_Case formal parameter in call to Normalize_String.
Showing
- gcc/ada/exp_imgv.adb 33 additions, 9 deletionsgcc/ada/exp_imgv.adb
- gcc/ada/libgnat/s-vaen16.ads 2 additions, 0 deletionsgcc/ada/libgnat/s-vaen16.ads
- gcc/ada/libgnat/s-vaen32.ads 2 additions, 0 deletionsgcc/ada/libgnat/s-vaen32.ads
- gcc/ada/libgnat/s-vaenu8.ads 2 additions, 0 deletionsgcc/ada/libgnat/s-vaenu8.ads
- gcc/ada/libgnat/s-valboo.adb 1 addition, 1 deletiongcc/ada/libgnat/s-valboo.adb
- gcc/ada/libgnat/s-valcha.adb 3 additions, 1 deletiongcc/ada/libgnat/s-valcha.adb
- gcc/ada/libgnat/s-valuen.adb 8 additions, 3 deletionsgcc/ada/libgnat/s-valuen.adb
- gcc/ada/libgnat/s-valuen.ads 4 additions, 1 deletiongcc/ada/libgnat/s-valuen.ads
- gcc/ada/libgnat/s-valuti.adb 5 additions, 4 deletionsgcc/ada/libgnat/s-valuti.adb
- gcc/ada/libgnat/s-valuti.ads 8 additions, 6 deletionsgcc/ada/libgnat/s-valuti.ads
- gcc/ada/libgnat/s-valwch.adb 1 addition, 1 deletiongcc/ada/libgnat/s-valwch.adb
Loading
Please register or sign in to comment