public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/24212]  New: Non conformity with the Ada95 language standard.
@ 2005-10-05 10:22 grimalseverine at yahoo dot fr
  2005-10-05 12:13 ` [Bug ada/24212] " pinskia at gcc dot gnu dot org
  2005-10-05 17:55 ` laurent at guerby dot net
  0 siblings, 2 replies; 3+ messages in thread
From: grimalseverine at yahoo dot fr @ 2005-10-05 10:22 UTC (permalink / raw)
  To: gcc-bugs

According to the standard, the instruction S'Remainder(X,Y) must raised a
Constraint_Error is raised if Y is zero (Annex A.5.3, point 47).

The following code, if build and launch (with gnat v3.15) returns 3.0 instead
of raising an exception.

package Test is
   type T_Master is digits 8;
   type T is new T_Master range 0.0 .. 10.0;
   subtype S is T range 0.0 .. 1.0;
end Test;

with System;
with Ada.Text_Io; use Ada.Text_Io;
with Test; use Test;
procedure Main is
   typ: T;
   Fraction: T:=3.0;
   package Float_Io is new Ada.Text_IO.Float_IO (T);

begin
   Typ:=S'Remainder(Fraction,0.0);  -- must raise a CONSTRAINT_ERROR
   Put("remainder: ");
   Float_Io.Put(Typ);          
   New_Line;

end Main;


-- 
           Summary: Non conformity with the Ada95 language standard.
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: grimalseverine at yahoo dot fr
 GCC build triplet: ?
  GCC host triplet: ?
GCC target triplet: ?


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24212


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

* [Bug ada/24212] Non conformity with the Ada95 language standard.
  2005-10-05 10:22 [Bug ada/24212] New: Non conformity with the Ada95 language standard grimalseverine at yahoo dot fr
@ 2005-10-05 12:13 ` pinskia at gcc dot gnu dot org
  2005-10-05 17:55 ` laurent at guerby dot net
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-05 12:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-10-05 12:13 -------
Fixed in 4.0.0 at least.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24212


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

* [Bug ada/24212] Non conformity with the Ada95 language standard.
  2005-10-05 10:22 [Bug ada/24212] New: Non conformity with the Ada95 language standard grimalseverine at yahoo dot fr
  2005-10-05 12:13 ` [Bug ada/24212] " pinskia at gcc dot gnu dot org
@ 2005-10-05 17:55 ` laurent at guerby dot net
  1 sibling, 0 replies; 3+ messages in thread
From: laurent at guerby dot net @ 2005-10-05 17:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from laurent at guerby dot net  2005-10-05 17:55 -------
Also fixed in 4.1.0 20051001 (experimental).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24212


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

end of thread, other threads:[~2005-10-05 17:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-05 10:22 [Bug ada/24212] New: Non conformity with the Ada95 language standard grimalseverine at yahoo dot fr
2005-10-05 12:13 ` [Bug ada/24212] " pinskia at gcc dot gnu dot org
2005-10-05 17:55 ` laurent at guerby dot net

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).