]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
freeze.adb (Freeze_Entity): Check for size clause for boolean warning
authorRobert Dewar <dewar@adacore.com>
Mon, 4 Aug 2008 08:37:47 +0000 (10:37 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 4 Aug 2008 08:37:47 +0000 (10:37 +0200)
2008-08-04  Robert Dewar  <dewar@adacore.com>

* freeze.adb (Freeze_Entity): Check for size clause for boolean warning

From-SVN: r138577

gcc/ada/freeze.adb

index 31f93985c44c492c0ef2a7e24338e244376bfc55..a2dd517c509cfdc78d6474555c46fc34100a1662 100644 (file)
@@ -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 "