From: Robert Dewar Date: Mon, 4 Aug 2008 08:37:47 +0000 (+0200) Subject: freeze.adb (Freeze_Entity): Check for size clause for boolean warning X-Git-Tag: releases/gcc-4.4.0~3448 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=671985569714a1e9f974e6a56d0b554059420c46;p=thirdparty%2Fgcc.git 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 --- 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 "