summaryrefslogtreecommitdiff
path: root/gcc/ada/stylesw.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-19 11:12:05 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-19 11:12:05 +0000
commitde178ec5ce5b5415a4cf538f7951e21c21fc4bda (patch)
tree4b251dd34ac027c2b9fc4f1c8b26a9994b34fbe3 /gcc/ada/stylesw.ads
parent7491b41bd8c2cdf96ac251af9dd5b67f687f01eb (diff)
downloadgcc-de178ec5ce5b5415a4cf538f7951e21c21fc4bda.tar.gz
2014-02-19 Robert Dewar <dewar@adacore.com>
* par-ch6.adb (P_Return): For extended return, end column lines up with RETURN. * par.adb: Minor documentation clarification. 2014-02-19 Yannick Moy <moy@adacore.com> * sem_prag.adb (Check_Loop_Pragma_Placement): Add check that Loop_Invariant and Loop_Variant appear consecutively. * gnat_rm.texi Update documentation of Loop_Invariant and Loop_Variant pragmas. 2014-02-19 Robert Dewar <dewar@adacore.com> * debug.adb: Document -gnatd.X. * par-ch5.adb (P_If_Statement): Always check THEN, even if not first token (Check_Then_Column): Ditto. * styleg.adb (Check_Then): Allow THEN on line after IF. (Check_Then): Check THEN placement under control of -gnatd.X * styleg.ads (Check_Then): Now called even if THEN is not first token on line. * stylesw.ads (Style_Check_If_Then_Layout): Document new relaxed rules. * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF. 2014-02-19 Robert Dewar <dewar@adacore.com> * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb, a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb, prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb, vms_conv.adb: Fix bad layout of IF statements git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207893 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/stylesw.ads')
-rw-r--r--gcc/ada/stylesw.ads9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ada/stylesw.ads b/gcc/ada/stylesw.ads
index 6de206481a6..bb24f278b98 100644
--- a/gcc/ada/stylesw.ads
+++ b/gcc/ada/stylesw.ads
@@ -127,8 +127,8 @@ package Stylesw is
Style_Check_If_Then_Layout : Boolean := False;
-- This can be set True by using the -gnatyi switch. If it is True, then a
- -- THEN keyword may not appear on the line that immediately follows the
- -- line containing the corresponding IF.
+ -- THEN keyword must either appear on the same line as the IF, or on a line
+ -- all on its own.
--
-- This permits one of two styles for IF-THEN layout. Either the IF and
-- THEN keywords are on the same line, where the condition is short enough,
@@ -141,10 +141,13 @@ package Stylesw is
-- and then Y < Z
-- then
--
+ -- if X > Y and then Z > 0
+ -- then
+ --
-- are allowed, but
--
-- if X > Y
- -- then
+ -- and then B > C then
--
-- is not allowed.