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] |
The compiler complains when a limited private type has a full type that is a protected type extending an interface, thinking that the partial view is not limited. The compiler was incorrectly checking that the partial view satisfies Is_Limited_Composite rather than simply testing for limitedness. The following test must compile quietly with -gnat05: package Priv_Prot_Extension_Bug is type Protected_Interface is protected interface; type Priv is limited private; private protected type Priv is new Protected_Interface with end Priv; end Priv_Prot_Extension_Bug; package body Priv_Prot_Extension_Bug is protected body Priv is end Priv; end Priv_Prot_Extension_Bug; Tested on x86_64-pc-linux-gnu, committed on trunk 2011-09-06 Gary Dismukes <dismukes@adacore.com> * sem_ch9.adb (Check_Interfaces): Test Is_Limited_Type rather than Is_Limited_Record when checking that the partial view of a synchronized full view must be limited.
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] |