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] | |
An aggregate with a single association of form "others => <>" is allowed in Ada 2005 for a record type with no components (per approved Ada 2005 Issue AI05-00016). The compiler was rejecting such an aggregate with an error that the record aggregate be have null (though for tagged types this only occurred in semantics-only mode, such as with -gnatc). The test for this Ada 95 error case is now bypassed when compiling for Ada 2005. Later code catches aggregates for null record types that do not have a single association of form "others => <>". See gnat.dg/null_aggr_bug.adb Tested on i686-pc-linux-gnu, committed on trunk 2008-07-31 Gary Dismukes <dismukes@adacore.com> * sem_aggr.adb: (Resolve_Record_Aggregate): Bypass error that a type without components must have a "null record" aggregate when compiling for Ada 2005, since it's legal to give an aggregate of form (others => <>) for such a type.
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] |