* Tiny error in GNAT: wrong message about unknown discrimant @ 2011-05-25 17:08 Yannick Duchêne (Hibou57) 2011-05-27 8:45 ` Georg Bauhaus 0 siblings, 1 reply; 3+ messages in thread From: Yannick Duchêne (Hibou57) @ 2011-05-25 17:08 UTC (permalink / raw) Hello, Create a type with an unknown discriminant in the public part of a package (and optionally a concrete discriminant in the full definition). Declare an instance of that type in a procedure outside of that package, and do so without any initialization, and instead, erroneously add a discriminant. GNAT will complain “invalid constraint: type has no discriminant”. This is inconsistent, as the type has a discriminated view; it should instead say “invalid constraint: type discriminant is unknown”. Not sure it is worth a bug report, but at least, this is probably confusing enough for beginners. -- Si les chats miaulent et font autant de vocalises bizarres, c’est pas pour les chiens. “ c++; /* this makes c bigger but returns the old value */ ” [Anonymous] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Tiny error in GNAT: wrong message about unknown discrimant 2011-05-25 17:08 Tiny error in GNAT: wrong message about unknown discrimant Yannick Duchêne (Hibou57) @ 2011-05-27 8:45 ` Georg Bauhaus 2011-05-27 14:14 ` Yannick Duchêne (Hibou57) 0 siblings, 1 reply; 3+ messages in thread From: Georg Bauhaus @ 2011-05-27 8:45 UTC (permalink / raw) Yannick Duchêne (Hibou57 ) <yannick_duchene@yahoo.fr> wrote: > > Not sure it is worth a bug report, but at least, this is probably > confusing enough for beginners. The GCC bugzilla has a choice list for qualifying reports. You can choose "enhancement". ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Tiny error in GNAT: wrong message about unknown discrimant 2011-05-27 8:45 ` Georg Bauhaus @ 2011-05-27 14:14 ` Yannick Duchêne (Hibou57) 0 siblings, 0 replies; 3+ messages in thread From: Yannick Duchêne (Hibou57) @ 2011-05-27 14:14 UTC (permalink / raw) Le Fri, 27 May 2011 10:45:41 +0200, Georg Bauhaus <rm-host.bauhaus@maps.arcor.de> a écrit: > Yannick Duchêne (Hibou57 ) <yannick_duchene@yahoo.fr> wrote: > >> >> Not sure it is worth a bug report, but at least, this is probably >> confusing enough for beginners. > > The GCC bugzilla has a choice list for qualifying reports. > You can choose "enhancement". Thanks for the point (never noticed this entry). Done: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49192 -- “Syntactic sugar causes cancer of the semi-colons.” [Epigrams on Programming — Alan J. — P. Yale University] “Structured Programming supports the law of the excluded muddle.” [Idem] “c++; /* this makes c bigger but returns the old value */” [Anonymous] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-27 14:14 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-05-25 17:08 Tiny error in GNAT: wrong message about unknown discrimant Yannick Duchêne (Hibou57) 2011-05-27 8:45 ` Georg Bauhaus 2011-05-27 14:14 ` Yannick Duchêne (Hibou57)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox