public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/62205] New: GNAT does not accept class types for Default_Iterator
@ 2014-08-20 16:42 porton at narod dot ru
  2014-10-29 22:25 ` [Bug ada/62205] " porton at narod dot ru
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: porton at narod dot ru @ 2014-08-20 16:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62205

            Bug ID: 62205
           Summary: GNAT does not accept class types for Default_Iterator
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: porton at narod dot ru

Created attachment 33370
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33370&action=edit
An Ada file whose semantics does not verify

I attach an Ada package file which does not verify:

gprbuild -q -c -gnatc -u -P/home/porton/t/default.gpr test.ads --subdirs=check
-cargs:Ada -g -O0 -gnato -fstack-check -gnatVa -cargs:C -g -O0 -fstack-check
-cargs:C++ -g -O0 -fstack-check
test.ads:19:28: Default Iterator must be a primitive of "Descriptions_List"
gprbuild: *** compilation phase failed

But from Ada Reference Manual 2012 (5.5.1 8/3):

[[[
Default_Iterator

This aspect is specified by a name that denotes exactly one function declared
immediately within the same declaration list in which T is declared, whose
first parameter is of type T or T'Class or an access parameter whose designated
type is type T or T'Class, whose other parameters, if any, have default
expressions, and whose result type is an iterator type.
]]]

That is T'Class (in our case Descriptions_List'Class) should work.

I think this is a bug in GNAT 4.9.1.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-07 14:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 16:42 [Bug ada/62205] New: GNAT does not accept class types for Default_Iterator porton at narod dot ru
2014-10-29 22:25 ` [Bug ada/62205] " porton at narod dot ru
2015-03-08 19:13 ` porton at narod dot ru
2015-04-07 11:11 ` demoonlit at panathenaia dot halfmoon.jp
2015-04-07 14:37 ` [Bug c/62205] " charlet at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).