diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-28 15:55:52 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-28 15:55:52 +0000 |
commit | 73dc8e415ac8fabea2c9b19f3b3f50117d49fd39 (patch) | |
tree | 3bccfd1647078c9c205e84d4e5d4c610e788dbde /gcc/ada/sinput-p.adb | |
parent | 516a3f757c712d5bda130e7ef165f75b1668acc6 (diff) | |
download | gcc-73dc8e415ac8fabea2c9b19f3b3f50117d49fd39.tar.gz |
2008-05-28 Vincent Celier <celier@adacore.com>
* sinput-p.adb (Source_File_Is_Subunit): Allow special character used
for preprocessing
* sinput-p.ads: Minor comment update and reformatting
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136112 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sinput-p.adb')
-rw-r--r-- | gcc/ada/sinput-p.adb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/sinput-p.adb b/gcc/ada/sinput-p.adb index 9719d1b646c..b57c73bf957 100644 --- a/gcc/ada/sinput-p.adb +++ b/gcc/ada/sinput-p.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2008, 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- -- @@ -95,6 +95,11 @@ package body Sinput.P is begin Prj.Err.Scanner.Initialize_Scanner (X); + -- No error for special characters that are used for preprocessing + + Prj.Err.Scanner.Set_Special_Character ('#'); + Prj.Err.Scanner.Set_Special_Character ('$'); + -- We scan past junk to the first interesting compilation unit -- token, to see if it is SEPARATE. We ignore WITH keywords during -- this and also PRIVATE. The reason for ignoring PRIVATE is that @@ -108,6 +113,8 @@ package body Sinput.P is Prj.Err.Scanner.Scan; end loop; + Prj.Err.Scanner.Reset_Special_Characters; + return Token = Tok_Separate; end Source_File_Is_Subunit; |