Commit 68523ddb by Arnaud Charlet

[multiple changes]

2009-10-28  Bob Duff  <duff@adacore.com>

	* s-fileio.adb: Give more information in exception messages.

2009-10-28  Robert Dewar  <dewar@adacore.com>

	* gnat_ugn.texi: Document new -gnatyt requirement for space after right
	paren if next token starts with digit or letter.
	* styleg.adb (Check_Right_Paren): New rule for space after if next
	character is a letter or digit.

From-SVN: r153663
parent 66a63e0d
2009-10-28 Bob Duff <duff@adacore.com>
* s-fileio.adb: Give more information in exception messages.
2009-10-28 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Document new -gnatyt requirement for space after right
paren if next token starts with digit or letter.
* styleg.adb (Check_Right_Paren): New rule for space after if next
character is a letter or digit.
2009-10-28 Thomas Quinot <quinot@adacore.com> 2009-10-28 Thomas Quinot <quinot@adacore.com>
* s-crtl.ads (System.CRTL.strerror): New function. * s-crtl.ads (System.CRTL.strerror): New function.
......
...@@ -6434,6 +6434,10 @@ If the token preceding a left parenthesis ends with a letter or digit, then ...@@ -6434,6 +6434,10 @@ If the token preceding a left parenthesis ends with a letter or digit, then
a space must separate the two tokens. a space must separate the two tokens.
@item @item
if the token following a right parenthesis starts with a letter or digit, then
a space must separate the two tokens.
@item
A right parenthesis must either be the first non-blank character on A right parenthesis must either be the first non-blank character on
a line, or it must be preceded by a non-blank character. a line, or it must be preceded by a non-blank character.
...@@ -6524,8 +6528,6 @@ the exception of ORDERED_SUBPROGRAMS, UNNECESSARY_BLANK_LINES, ...@@ -6524,8 +6528,6 @@ the exception of ORDERED_SUBPROGRAMS, UNNECESSARY_BLANK_LINES,
XTRA_PARENS, and DOS_LINE_ENDINGS. In addition XTRA_PARENS, and DOS_LINE_ENDINGS. In addition
@end ifset @end ifset
The switch The switch
@ifclear vms @ifclear vms
@option{-gnatyN} @option{-gnatyN}
...@@ -813,12 +813,17 @@ package body Styleg is ...@@ -813,12 +813,17 @@ package body Styleg is
-- Check_Right_Paren -- -- Check_Right_Paren --
----------------------- -----------------------
-- In check tokens mode (-gnatyt), right paren must never be preceded by -- In check tokens mode (-gnatyt), right paren must not be immediately
-- followed by an identifier character, and must never be preceded by
-- a space unless it is the initial non-blank character on the line. -- a space unless it is the initial non-blank character on the line.
procedure Check_Right_Paren is procedure Check_Right_Paren is
begin begin
if Style_Check_Tokens then if Style_Check_Tokens then
if Identifier_Char (Source (Token_Ptr + 1)) then
Error_Space_Required (Token_Ptr + 1);
end if;
Check_No_Space_Before; Check_No_Space_Before;
end if; end if;
end Check_Right_Paren; end Check_Right_Paren;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment