This commit makes the emission of -gnatw_q warnings pass node information
so as to handle the enclosing subprogram display of -gnatdJ instead of
crashing.
gcc/ada/
* exp_ch4.adb (Expand_Composite_Equality): Call Error_Msg_N
instead of Error_Msg.
pragma Assert
(Is_First_Subtype (Outer_Type)
or else Is_Generic_Actual_Type (Outer_Type));
- Error_Msg_Node_1 := Outer_Type;
Error_Msg_Node_2 := Comp_Type;
- Error_Msg
- ("?_q?""="" for type & uses predefined ""="" for }", Loc);
+ Error_Msg_N
+ ("?_q?""="" for type & uses predefined ""="" for }",
+ Outer_Type);
Error_Msg_Sloc := Sloc (Op);
- Error_Msg ("\?_q?""="" # is ignored here", Loc);
+ Error_Msg_N ("\?_q?""="" # is ignored here", Outer_Type);
end if;
end;