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] Rejecting duplicate stubs


The compiler did not reject duplicate stubs for task bodies.

Compiling dupsep.adb  must yield:

   dupsep.adb:5:04: duplicate stub for task

---
package Dupsep is
   procedure Start;
end Dupsep;
---
package body Dupsep is
   task type Bugger is
   end Bugger;
   task body bugger is separate;
   task body bugger is separate;
   procedure Start is
   begin
      null;
   end Start;
end Dupsep;
---
separate (Dupsep)
task body Bugger is
begin
   null;
end Bugger;

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

2010-10-05  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch10.adb (Analyze_Task_Body_Stub): Diagnose duplicate stub for
	task.

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]