diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-06-20 14:31:47 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-06-20 14:31:47 +0200 |
commit | 20250fb87c79d840eb23c51bbe63467910c14fd9 (patch) | |
tree | 8b386d757c16c16568dbb9d414547e2d7eda794a /gcc/ada/g-socket.adb | |
parent | 9e3be36e465b0699d161e1e1ff9a78fd216c2c60 (diff) | |
download | gcc-20250fb87c79d840eb23c51bbe63467910c14fd9.zip gcc-20250fb87c79d840eb23c51bbe63467910c14fd9.tar.gz gcc-20250fb87c79d840eb23c51bbe63467910c14fd9.tar.bz2 |
[multiple changes]
2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
* make.adb, gnatbind.adb, g-socket.adb, sem_ch13.adb: Minor
reformatting.
* lib.ads, sem_util.adb: Minor typo in comment.
2016-06-20 Yannick Moy <moy@adacore.com>
* sem_prag.adb, sem_prag.ads (Build_Pragma_Check_Equivalent):
Add parameter Keep_Pragma_Id to optionally keep
the identifier of the pragma instead of converting
to pragma Check. Also set type of new function call
appropriately. (Collect_Inherited_Class_Wide_Conditions):
Call Build_Pragma_Check_Equivalent with the new parameter
Keep_Pragma_Id set to True to keep the identifier of the copied
pragma.
* sinfo.ads: Add comment.
2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Build_Invariant_Procedure_Body):
Always install the scope of the invariant procedure
in order to produce better error messages. Do not
insert the body when the context is a generic unit.
(Build_Invariant_Procedure_Declaration): Perform minimal
decoration of the invariant procedure and its formal parameter
in case they are not analyzed. Do not insert the declaration
when the context is a generic unit.
From-SVN: r237600
Diffstat (limited to 'gcc/ada/g-socket.adb')
-rw-r--r-- | gcc/ada/g-socket.adb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb index a4a7d4f..75dc58d 100644 --- a/gcc/ada/g-socket.adb +++ b/gcc/ada/g-socket.adb @@ -1505,27 +1505,26 @@ package body GNAT.Sockets is function Is_IP_Address (Name : String) return Boolean is Dots : Natural := 0; + begin - -- Perform a cursory check for a dotted quad: we must have 1 to 3 - -- dots, and there must be at least one digit around each. + -- Perform a cursory check for a dotted quad: we must have 1 to 3 dots, + -- and there must be at least one digit around each. for J in Name'Range loop if Name (J) = '.' then - -- Check that the dot is not in first or last position, and - -- that it is followed by a digit. Note that we already know - -- that it is preceded by a digit, or we would have returned - -- earlier on. + -- Check that the dot is not in first or last position, and that + -- it is followed by a digit. Note that we already know that it is + -- preceded by a digit, or we would have returned earlier on. if J in Name'First + 1 .. Name'Last - 1 and then Name (J + 1) in '0' .. '9' then Dots := Dots + 1; - else - - -- Definitely not a proper dotted quad + -- Definitely not a proper dotted quad + else return False; end if; |