diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-05 17:17:37 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-05 17:17:37 +0200 |
commit | a2773bd3e6fd84714d9568ebc9e15bc46dcd1c6f (patch) | |
tree | ba708f88b444bcbc812ada1c70ff45ef811962f8 /gcc/ada/styleg.adb | |
parent | aca0b0b315f6e5a0ee60981fd4b0cbc9a7f59096 (diff) | |
download | gcc-a2773bd3e6fd84714d9568ebc9e15bc46dcd1c6f.zip gcc-a2773bd3e6fd84714d9568ebc9e15bc46dcd1c6f.tar.gz gcc-a2773bd3e6fd84714d9568ebc9e15bc46dcd1c6f.tar.bz2 |
[multiple changes]
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).
From-SVN: r177453
Diffstat (limited to 'gcc/ada/styleg.adb')
-rw-r--r-- | gcc/ada/styleg.adb | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb index fd6cbae..7cb4d82 100644 --- a/gcc/ada/styleg.adb +++ b/gcc/ada/styleg.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- -- @@ -507,7 +507,9 @@ package body Styleg is S := Scan_Ptr + 2; while Source (S) >= ' ' loop if Source (S) /= '-' then - if Is_Box_Comment then + if Is_Box_Comment + or else Style_Check_Comments_Spacing = 1 + then Error_Space_Required (Scan_Ptr + 2); else Error_Msg -- CODEFIX @@ -522,14 +524,17 @@ package body Styleg is -- If we are followed by a blank, then the comment is OK if the -- character following this blank is another blank or a format - -- effector. + -- effector, or if the required comment spacing is 1. - elsif Source (Scan_Ptr + 3) <= ' ' then + elsif Source (Scan_Ptr + 3) <= ' ' + or else Style_Check_Comments_Spacing = 1 + then return; - -- Here is the case where we only have one blank after the two - -- minus signs, which is an error unless the line ends with two - -- minus signs, the case of a box comment. + -- Here is the case where we only have one blank after the two minus + -- signs, with Style_Check_Comments_Spacing set to 2, which is an + -- error unless the line ends with two minus signs, the case of a + -- box comment. elsif not Is_Box_Comment then Error_Space_Required (Scan_Ptr + 3); |