From: Ludovic Brenta <ludovic.brenta@insalien.org>
Subject: Re: Is this definition legal?
Date: Sun, 19 Sep 2004 01:44:40 +0200
Date: 2004-09-19T01:47:11+02:00 [thread overview]
Message-ID: <87mzznjg5z.fsf@insalien.org> (raw)
In-Reply-To: Vx33d.3580$d5.27722@newsb.telia.net
Björn Persson writes:
> GCC-Gnat 3.4.0 is having serious problems with the definition of
> Character_Encoding below:
[elided]
> Gnat often crashes with a bug box on a reference to
> Character_Encoding. For example, when I declare a variable of this
> type I have to initialize it at the declaration to avoid a bug
> box. Also, the predefined "=" for Character_Encoding sometimes
> returns False for values that should be equal.
>
> Once when I converted a Character_Encoding to a
> Unified_Encoding_Record, the field OS was set to NT, even though
> This_OS = Linux. The next conversion raised Constraint_Error with
> the message "invalid data".
Whether or not your code is legal, a bug box is a bug. I would be
interested in a short test case for each of your issues (one for the
bug box upon declaring a Character_Encoding without an initialiser;
one for the conversion that alters OS, and one where the conversions
raises Constraint_Error.
> My first question is: Is this definition of Character_Encoding legal
> and I should work around the problems until Gnat gets fixed, or is
> it illegal code that Gnat fails to reject, and I should find another
> way to do it?
Sorry, I don't know. It seems okay to me at first glance, but I've
been wrong about such things before :)
--
Ludovic Brenta.
next prev parent reply other threads:[~2004-09-18 23:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-18 23:29 Is this definition legal? Björn Persson
2004-09-18 23:44 ` Ludovic Brenta [this message]
2004-09-19 14:07 ` Björn Persson
2004-09-19 20:21 ` Ludovic Brenta
2004-09-23 21:18 ` Björn Persson
2004-09-19 14:17 ` Björn Persson
2004-09-19 8:42 ` Martin Krischik
2004-09-19 11:25 ` Simon Wright
2004-09-20 7:32 ` Martin Krischik
2004-09-20 13:44 ` Björn Persson
2004-09-20 16:01 ` Martin Krischik
2004-09-20 21:20 ` Randy Brukardt
2004-09-20 17:12 ` Florian Weimer
2004-09-21 7:58 ` Martin Krischik
2004-09-19 11:30 ` Simon Wright
2004-09-19 11:53 ` Martin Dowie
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox