From 2b672e358d4022363e398446ff6efbf9b55e066e Mon Sep 17 00:00:00 2001 From: Vincent Celier Date: Wed, 28 May 2008 17:55:52 +0200 Subject: sinput-p.adb (Source_File_Is_Subunit): Allow special character used for preprocessing 2008-05-28 Vincent Celier * sinput-p.adb (Source_File_Is_Subunit): Allow special character used for preprocessing * sinput-p.ads: Minor comment update and reformatting From-SVN: r136112 --- gcc/ada/sinput-p.adb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sinput-p.adb') diff --git a/gcc/ada/sinput-p.adb b/gcc/ada/sinput-p.adb index 9719d1b..b57c73b 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; -- cgit v1.1