diff options
author | Robert Dewar <dewar@adacore.com> | 2009-04-07 14:18:13 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-07 16:18:13 +0200 |
commit | c27f2f15fde7c742e7b6fa996a7b35cf5e8c9f66 (patch) | |
tree | d65b03473be892ceb27cc44836f2954c06de5996 /gcc/ada/styleg.adb | |
parent | afb90d93a4a9a67c2ba19d6e7e571309cf743968 (diff) | |
download | gcc-c27f2f15fde7c742e7b6fa996a7b35cf5e8c9f66.zip gcc-c27f2f15fde7c742e7b6fa996a7b35cf5e8c9f66.tar.gz gcc-c27f2f15fde7c742e7b6fa996a7b35cf5e8c9f66.tar.bz2 |
checks.adb: Remove Assume_Valid parameter from In_Subrange_Of calls
2009-04-07 Robert Dewar <dewar@adacore.com>
* checks.adb:
Remove Assume_Valid parameter from In_Subrange_Of calls
* sem_eval.adb:
(Is_Subrange_Of): Remove Assume_Valid parameter, not needed
(Is_In_Range): Remove incorrect use of Assume_Valid
(Is_Out_Of_Range): Remove incorrect use of Assume_Valid
* sem_eval.ads:
(Is_Subrange_Of): Remove Assume_Valid parameter, not needed
(Is_In_Range): Documentation cleanup
(Is_Out_Of_Range): Documentation cleanup
* gnat_rm.texi:
Add documentation for Assume_No_Invalid_Values pragma
* sem_ch12.adb: Minor reformatting
* sem_ch6.adb: (Check_Conformance): Avoid cascaded errors
* sem_prag.adb: Improve error message.
* gnatchop.adb, osint.ads, sinput.adb, sinput.ads, styleg.adb:
LF/CR no longer recognized as line terminator
* switch.ads: Minor documentation improvement
* vms_data.ads: Minor reformatting
From-SVN: r145675
Diffstat (limited to 'gcc/ada/styleg.adb')
-rw-r--r-- | gcc/ada/styleg.adb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb index f54ab35..2bb6b35 100644 --- a/gcc/ada/styleg.adb +++ b/gcc/ada/styleg.adb @@ -605,16 +605,20 @@ package body Styleg is end if; end if; - -- Check DOS line terminator (ignore EOF, since we only get called - -- with an EOF if it is the last character in the buffer, and was - -- therefore not present in the sources + -- Check DOS line terminator if Style_Check_DOS_Line_Terminator then + + -- Ignore EOF, since we only get called with an EOF if it is the last + -- character in the buffer (and was therefore not in the source file), + -- since the terminating EOF is added to stop the scan. + if Source (Scan_Ptr) = EOF then null; - elsif Source (Scan_Ptr) /= LF - or else Source (Scan_Ptr + 1) = CR - then + + -- Bad terminator if we don't have an LF + + elsif Source (Scan_Ptr) /= LF then Error_Msg_S ("(style) incorrect line terminator"); end if; end if; |