summaryrefslogtreecommitdiff
path: root/gcc/ada/stylesw.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-05 15:17:37 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-05 15:17:37 +0000
commitffd8b3a5ecc3dd7d1a7c3e1938b6caa1ff221ded (patch)
treeba708f88b444bcbc812ada1c70ff45ef811962f8 /gcc/ada/stylesw.adb
parent84600db505c8a0540d2b6c1be6287e3a3631aff4 (diff)
downloadgcc-ffd8b3a5ecc3dd7d1a7c3e1938b6caa1ff221ded.tar.gz
2011-08-05 Thomas Quinot <quinot@adacore.com>
* sem_ch11.adb: Add comment. 2011-08-05 Robert Dewar <dewar@adacore.com> * exp_util.adb: Minor comment fix. 2011-08-05 Robert Dewar <dewar@adacore.com> * scng.adb (Error_Unterminated_String): Improve flag position when comma present. 2011-08-05 Matthew Heaney <heaney@adacore.com> * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway tree containers). * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded multiway tree containers. 2011-08-05 Robert Dewar <dewar@adacore.com> * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2 * stylesw.adb: Implement -gnatyC to control comment spacing * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by -gnatyc/C). * usage.adb: Add line for -gnatyC. 2011-08-05 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Document -gnatyC for J505-006 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a synonym for COMMENTS2). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177453 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/stylesw.adb')
-rw-r--r--gcc/ada/stylesw.adb17
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ada/stylesw.adb b/gcc/ada/stylesw.adb
index 7c9d462cc23..cce2b8ff745 100644
--- a/gcc/ada/stylesw.adb
+++ b/gcc/ada/stylesw.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2011, 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- --
@@ -160,7 +160,13 @@ package body Stylesw is
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);
+
+ if Style_Check_Comments_Spacing = 2 then
+ Add ('c', Style_Check_Comments);
+ elsif Style_Check_Comments_Spacing = 1 then
+ Add ('C', Style_Check_Comments);
+ end if;
+
Add ('d', Style_Check_DOS_Line_Terminator);
Add ('e', Style_Check_End_Labels);
Add ('f', Style_Check_Form_Feeds);
@@ -322,6 +328,11 @@ package body Stylesw is
when 'c' =>
Style_Check_Comments := True;
+ Style_Check_Comments_Spacing := 2;
+
+ when 'C' =>
+ Style_Check_Comments := True;
+ Style_Check_Comments_Spacing := 1;
when 'd' =>
Style_Check_DOS_Line_Terminator := True;
@@ -484,7 +495,7 @@ package body Stylesw is
when 'B' =>
Style_Check_Boolean_And_Or := False;
- when 'c' =>
+ when 'c' | 'C' =>
Style_Check_Comments := False;
when 'd' =>