CVS difference for acats/new/cxb30231.am
--- acats/new/cxb30231.am 2015/12/05 07:10:44 1.2
+++ acats/new/cxb30231.am 2015/12/10 02:22:09 1.3
@@ -83,29 +83,26 @@
-- don't want to assume AI12-0174-1 is implemented);
-- renamed, used interface names from IMPDEF, added
-- Applicability Criteria.
--- ed use of non-language-defined function and
--- iable test.
+-- 09 Dec 2015 RLB Removed pointer case, which used a non-language-defined
+-- function and unreliable assumptions.
--!
with Interfaces.C.Strings; use Interfaces;
with Ada.Text_IO;
-with System;
-
with Report, ImpDef;
procedure CXB30231 is
package C_Float_IO is new Ada.Text_IO.Float_IO (Num => C.C_float);
- type Data_Kind is (C_int, C_char, C_string, C_float, C_void_pointer);
+ type Data_Kind is (C_int, C_char, C_string, C_float);
pragma Convention (C, Data_Kind);
for Data_Kind use (C_int => 0,
C_char => 1,
C_string => 2,
- C_float => 3,
- C_void_pointer => 4);
+ C_float => 3);
type C_Variant (Format : Data_Kind := C_int) is
record
@@ -122,9 +119,6 @@
when C_float =>
float_Val : C.C_float;
- when C_void_pointer =>
- pointer_Val : System.Address;
-
end case;
end record;
pragma Convention (C, C_Variant);
@@ -171,15 +165,6 @@
return "Type: Real, Val: " & Result;
end;
-
- when C_void_pointer =>
- raise Program_Error;
- --return "Type: Pointer, Val: " &
- -- ??'Image (Item.Variant.pointer_Val);
- -- No Image function here, and even if we converted to
- -- Integer_Address, there's no reason to assume that
- -- System.Address is the same as a C Pointer. So we don't
- -- test this branch.
end case;
end Ada_Format_Variant;
Questions? Ask the ACAA Technical Agent