From a36c1c3e43ff4da71ddfb65d123519f58365981b Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Wed, 22 Jul 2009 10:25:57 +0000 Subject: sem_res.adb (Check_No_Direct_Boolean_Operators): Add check for -gnatyB 2009-07-22 Robert Dewar * sem_res.adb (Check_No_Direct_Boolean_Operators): Add check for -gnatyB * style.ads, styleg.adb, styleg.ads (Check_Boolean_Operator): New procedure. * usage.adb, stylesw.ads, stylesw.adb: Add handling of -gnatyB switch * gnat_ugn.texi: Add documentation of -gnatyB * vms_data.ads: Add entry for -gnatyB (STYLE=BOOLEAN_OPERATORS) From-SVN: r149923 --- gcc/ada/stylesw.adb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gcc/ada/stylesw.adb') diff --git a/gcc/ada/stylesw.adb b/gcc/ada/stylesw.adb index 8adb741..41275b7 100644 --- a/gcc/ada/stylesw.adb +++ b/gcc/ada/stylesw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -39,6 +39,7 @@ package body Stylesw is Style_Check_Attribute_Casing := False; Style_Check_Blanks_At_End := False; Style_Check_Blank_Lines := False; + Style_Check_Boolean_And_Or := False; Style_Check_Comments := False; Style_Check_DOS_Line_Terminator := False; Style_Check_End_Labels := False; @@ -122,6 +123,7 @@ package body Stylesw is Add ('a', Style_Check_Attribute_Casing); Add ('A', Style_Check_Array_Attribute_Index); Add ('b', Style_Check_Blanks_At_End); + Add ('B', Style_Check_Boolean_And_Or); Add ('c', Style_Check_Comments); Add ('d', Style_Check_DOS_Line_Terminator); Add ('e', Style_Check_End_Labels); @@ -279,6 +281,9 @@ package body Stylesw is when 'b' => Style_Check_Blanks_At_End := True; + when 'B' => + Style_Check_Boolean_And_Or := True; + when 'c' => Style_Check_Comments := True; @@ -440,6 +445,9 @@ package body Stylesw is when 'b' => Style_Check_Blanks_At_End := False; + when 'B' => + Style_Check_Boolean_And_Or := False; + when 'c' => Style_Check_Comments := False; -- cgit v1.1