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] fix warning with slice assignment in task entry


Tested under i686-linux, committed on mainline.

The appearance of (a component of) an entry formal on the left-hand
side of an assignment indicates that the formal is modified. The case
of a slice assignment was missing, leading to spurious warnings.
The following must compile quietly:
gcc -c p.adb
--
procedure p is
   task tsk is entry e (msg: out string); end tsk;
   task body tsk is
   begin
      accept e (msg : out string) do msg (1..msg'last) := (others => '?'); end;
   end;
begin null; end;

2005-03-17  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch2.adb (In_Assignment_Context): Recognize slice assignments to
	entry formals.

Attachment: difs.6
Description: Text document


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