From 671985569714a1e9f974e6a56d0b554059420c46 Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Mon, 4 Aug 2008 10:37:47 +0200 Subject: [PATCH] freeze.adb (Freeze_Entity): Check for size clause for boolean warning 2008-08-04 Robert Dewar * freeze.adb (Freeze_Entity): Check for size clause for boolean warning From-SVN: r138577 --- gcc/ada/freeze.adb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 31f93985c44c..a2dd517c509c 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -2398,6 +2398,8 @@ package body Freeze is elsif Root_Type (F_Type) = Standard_Boolean and then Convention (F_Type) = Convention_Ada + and then not Has_Warnings_Off (F_Type) + and then not Has_Size_Clause (F_Type) then Error_Msg_N ("?& is an 8-bit Ada Boolean, " @@ -2543,6 +2545,7 @@ package body Freeze is and then Convention (R_Type) = Convention_Ada and then not Has_Warnings_Off (E) and then not Has_Warnings_Off (R_Type) + and then not Has_Size_Clause (R_Type) then Error_Msg_N ("?return type of & is an 8-bit " -- 2.47.3