aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/styleg.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-04-25 14:01:32 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-04-25 14:01:32 +0200
commitbac865a217a819eb5cf90af6962904241168f167 (patch)
tree749056594c0f63c918c4588fddb18fca5ccd6e3b /gcc/ada/styleg.adb
parent321c24f75dde674402481f1df0025c8169aa9cdd (diff)
downloadgcc-bac865a217a819eb5cf90af6962904241168f167.zip
gcc-bac865a217a819eb5cf90af6962904241168f167.tar.gz
gcc-bac865a217a819eb5cf90af6962904241168f167.tar.bz2
Code clenups.
From-SVN: r247193
Diffstat (limited to 'gcc/ada/styleg.adb')
-rw-r--r--gcc/ada/styleg.adb9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb
index 58fd3fd..f785205 100644
--- a/gcc/ada/styleg.adb
+++ b/gcc/ada/styleg.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2016, 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- --
@@ -492,10 +492,13 @@ package body Styleg is
-- Start of processing for Check_Comment
begin
- -- Can never have a non-blank character preceding the first minus
+ -- Can never have a non-blank character preceding the first minus.
+ -- The "+ 3" is to leave room for a possible byte order mark (BOM);
+ -- we want to avoid a warning for a comment at the start of the
+ -- file just after the BOM.
if Style_Check_Comments then
- if Scan_Ptr > Source_First (Current_Source_File)
+ if Scan_Ptr > Source_First (Current_Source_File) + 3
and then Source (Scan_Ptr - 1) > ' '
then
Error_Msg_S -- CODEFIX