]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Silence warning for 32-bit targets
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 9 Sep 2024 10:27:25 +0000 (12:27 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Mon, 9 Sep 2024 10:32:10 +0000 (12:32 +0200)
gcc/testsuite
PR ada/115250
* gnat.dg/opt58_pkg.ads: Convert to Unix line ending.
* gnat.dg/opt58.adb: Likewise and pass -gnatws to the compiler.

gcc/testsuite/gnat.dg/opt58.adb
gcc/testsuite/gnat.dg/opt58_pkg.ads

index ac39cc06056e029bc745411c6a7f97dfc3c192f7..16326ae615f2aecc4121517f378b9f0cfb975984 100644 (file)
@@ -1,19 +1,19 @@
--- { dg-do compile }\r
--- { dg-options "-O" }\r
-\r
-with Unchecked_Conversion;\r
-with System; use System;\r
-with Opt58_Pkg; use Opt58_Pkg;\r
-\r
-procedure Opt58 is\r
-\r
-   function Convert is new Unchecked_Conversion (Integer, Rec);\r
-\r
-   Dword : Integer := 0;\r
-   I : Small_Int := F1 (Convert (Dword));\r
-\r
-begin\r
-   if F2 (Null_Address, I = 0) then\r
-      null;\r
-   end if;\r
-end Opt58;\r
+-- { dg-do compile }
+-- { dg-options "-O -gnatws" }
+
+with Unchecked_Conversion;
+with System; use System;
+with Opt58_Pkg; use Opt58_Pkg;
+
+procedure Opt58 is
+
+   function Convert is new Unchecked_Conversion (Integer, Rec);
+
+   Dword : Integer := 0;
+   I : Small_Int := F1 (Convert (Dword));
+
+begin
+   if F2 (Null_Address, I = 0) then
+      null;
+   end if;
+end Opt58;
index 9cb7f3a2540f65ee7ed024aca367bc61662f2d55..02a374fd1e95517ad84fc330305cdda4b1963cc8 100644 (file)
@@ -1,19 +1,19 @@
-with System; use System;\r
-\r
-package Opt58_Pkg is\r
-\r
-   pragma Pure (Opt58_Pkg);\r
-\r
-   type Small_Int is range 0 .. 255;\r
-\r
-   type Rec is record\r
-     D1, D2, D3, D4 : Small_Int;\r
-   end record;\r
-   pragma Pack (Rec);\r
-   for Rec'Size use 32;\r
-\r
-   function F1 (R : Rec) return Small_Int;\r
-\r
-   function F2 (A : Address; B : Boolean) return Boolean;\r
-\r
-end Opt58_Pkg;\r
+with System; use System;
+
+package Opt58_Pkg is
+
+   pragma Pure (Opt58_Pkg);
+
+   type Small_Int is range 0 .. 255;
+
+   type Rec is record
+     D1, D2, D3, D4 : Small_Int;
+   end record;
+   pragma Pack (Rec);
+   for Rec'Size use 32;
+
+   function F1 (R : Rec) return Small_Int;
+
+   function F2 (A : Address; B : Boolean) return Boolean;
+
+end Opt58_Pkg;