This is the mail archive of the 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] Remove special handling for package declaring abstract state

On the basis of further discussion, we decided not to implement the
rule saying that a package body must be required for some other
reason if an abstract state is declared. Now we just say a package
body is required if a non-null abstract state and that's it! This
change undoes the error message. So if we compile the following
with -gnatd.V -gnatld7 (but without -gnatc), we get

cannot generate code for file (package spec)


     1. package NNAS
     2.    with Abstract_State => State
     3. is
     4.    --  package declarations with non-null
     5.    --  Abstract State shall have bodies.
     6. end NNAS;

 6 lines: No errors

The "cannot generate" line reflects the fact that this package
spec requires a body, so the spec cannot be compiled alone.

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

2013-10-17  Robert Dewar  <>

	* sem_ch7.adb (Analyze_Package_Specification): Remove circuit
	for ensuring that a package spec requires a body for some other
	reason than that it contains the declaration of an abstract state.

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]