diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-01-27 17:52:29 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-01-27 17:52:29 +0100 |
commit | 29077c18417c523c5fd2790613ba4ea2988660c4 (patch) | |
tree | e5e8e81614a2a9517430d8c729e77035019f2b70 /gcc/ada/scn.adb | |
parent | 2757c5bf1817db84c51f0297ae8c27acfaea2ad3 (diff) | |
download | gcc-29077c18417c523c5fd2790613ba4ea2988660c4.zip gcc-29077c18417c523c5fd2790613ba4ea2988660c4.tar.gz gcc-29077c18417c523c5fd2790613ba4ea2988660c4.tar.bz2 |
[multiple changes]
2014-01-27 Robert Dewar <dewar@adacore.com>
* scn.adb (Check_End_Of_Line): Removed.
(Error_Long_Line): Removed.
(Determine_License): Use versions of above routines from Scanner.
* scng.adb (Check_End_Of_Line): Moved to spec.
(Error_Long_Line): Removed, no longer used.
* scng.ads (Check_End_Of_Line): Moved here from body.
2014-01-27 Tristan Gingold <gingold@adacore.com>
* exp_ch7.adb (Build_Cleanup_Statements): Call
Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
for protected body.
* exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
Remove Service_Name variable.
(Build_Protected_SUbprogam_Call_Cleanup): New procedure that
factorize code from the above subprograms.
* exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
From-SVN: r207143
Diffstat (limited to 'gcc/ada/scn.adb')
-rw-r--r-- | gcc/ada/scn.adb | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/gcc/ada/scn.adb b/gcc/ada/scn.adb index 9f8ce207..cc88ab9 100644 --- a/gcc/ada/scn.adb +++ b/gcc/ada/scn.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2013, 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- -- @@ -25,7 +25,6 @@ with Atree; use Atree; with Csets; use Csets; -with Hostparm; use Hostparm; with Namet; use Namet; with Opt; use Opt; with Restrict; use Restrict; @@ -44,32 +43,11 @@ package body Scn is -- make sure that we only post an error message for incorrect use of a -- keyword as an identifier once for a given keyword). - procedure Check_End_Of_Line; - -- Called when end of line encountered. Checks that line is not too long, - -- and that other style checks for the end of line are met. - function Determine_License return License_Type; -- Scan header of file and check that it has an appropriate GNAT-style -- header with a proper license statement. Returns GPL, Unrestricted, -- or Modified_GPL depending on header. If none of these, returns Unknown. - procedure Error_Long_Line; - -- Signal error of excessively long line - - ----------------------- - -- Check_End_Of_Line -- - ----------------------- - - procedure Check_End_Of_Line is - Len : constant Int := Int (Scan_Ptr) - Int (Current_Line_Start); - begin - if Style_Check then - Style.Check_Line_Terminator (Len); - elsif Len > Max_Line_Length then - Error_Long_Line; - end if; - end Check_End_Of_Line; - ----------------------- -- Determine_License -- ----------------------- @@ -182,7 +160,7 @@ package body Scn is Skip_EOL; - Check_End_Of_Line; + Scanner.Check_End_Of_Line; if Source (Scan_Ptr) /= EOF then @@ -219,17 +197,6 @@ package body Scn is return Scanner.Determine_Token_Casing; end Determine_Token_Casing; - --------------------- - -- Error_Long_Line -- - --------------------- - - procedure Error_Long_Line is - begin - Error_Msg - ("this line is too long", - Current_Line_Start + Source_Ptr (Max_Line_Length)); - end Error_Long_Line; - ------------------------ -- Initialize_Scanner -- ------------------------ |