OSDN Git Service

2005-03-17 Thomas Quinot <quinot@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Mar 2005 11:48:35 +0000 (11:48 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Mar 2005 11:48:35 +0000 (11:48 +0000)
commit0b9d81c1cdb1f3d9278217393338eb655abbc7af
treed59347be747a5b2ef697914ddc0433ddb62ab540
parent0b4c28a81d19829411a753eca93c24ee6c405db3
2005-03-17  Thomas Quinot  <quinot@adacore.com>

* exp_ch3.adb (Check_Attr): New subprogram.
(Check_Stream_Attribute): Move the code for 13.13.2(9/1) enforcement
into a new Check_Attr subprogram, in order to provide a more
explanatory error message (including the name of the missing attribute).
(Stream_Operation_OK): Renamed from Stream_Operations_OK. This
subprogram determines whether a default implementation exists for a
given stream attribute.
(Make_Predefined_Primitive_Specs, Predefined_Primitive_Bodies):
Determine whether to generate a default implementation for each stream
attribute separately, as this depends on the specific attribute.

* exp_strm.adb (Make_Field_Attribute): For the case of an illegal
limited extension where a stream attribute is missing for a limited
component (which will have been flagged in Exp_Ch3.Sem_Attr), do not
generate a bogus reference to the missing attribute to prevent
cascaded errors. Instead, generate a null statement.

* sem_attr.adb (Check_Stream_Attribute): A stream attribute is
available for a limited type if it has been specified for an ancestor
of the type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96666 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/exp_ch3.adb
gcc/ada/exp_strm.adb
gcc/ada/sem_attr.adb