end if;
end if;
- -- If we got here we meed to transform the string literal into the
+ -- If we got here, we need to transform the string literal into the
-- equivalent qualified positional array aggregate. This is rather
-- heavy artillery for this situation, but it is hard work to avoid.
declare
Lits : constant List_Id := New_List;
+ Lit : Node_Id;
P : Source_Ptr := Loc + 1;
C : Char_Code;
C := Get_String_Char (Str, J);
Set_Character_Literal_Name (C);
- Append_To (Lits,
+ Lit :=
Make_Character_Literal (P,
Chars => Name_Find,
- Char_Literal_Value => UI_From_CC (C)));
+ Char_Literal_Value => UI_From_CC (C));
+ Preserve_Comes_From_Source (Lit, N);
+ Append_To (Lits, Lit);
if In_Character_Range (C) then
P := P + 1;
--- /dev/null
+-- { dg-do compile }
+-- { dg-options "-gnatwu" }
+
+procedure Warn35 is
+
+ type Bit is ('0', '1');
+
+ type Bit_Array is array (1 .. 2) of Bit;
+
+ Bits : constant Bit_Array := ("01");
+
+ B : Bit;
+
+begin
+ B := Bits (1);
+end;