summaryrefslogtreecommitdiff
path: root/gcc/ada/scng.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-09 12:31:35 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-09 12:31:35 +0000
commit240887aae5365d5f04cecb616c4053f28701422e (patch)
tree9bcd2dc0363cc5444998418b53a4a6358f45d5df /gcc/ada/scng.adb
parent1d81d3c9e66fa1790778b365b8b257a38e761dfa (diff)
downloadgcc-240887aae5365d5f04cecb616c4053f28701422e.tar.gz
2010-09-09 Thomas Quinot <quinot@adacore.com>
* s-strxdr.adb, gnat_rm.texi, s-stratt-xdr.adb, s-stratt.ads: Rename s-strxdr.adb to s-stratt-xdr.adb 2010-09-09 Robert Dewar <dewar@adacore.com> * ali-util.adb (Obsolescent_Check): Removed. * gprep.adb (Obsolescent_Check): Removed. Remove Obsolescent_Check parameter in Scng instantiation * prj-err.adb (Obsolescent_Check): Removed. * prj-err.ads (Obsolescent_Check): Removed. Remove Obsolescent_Check parameter in Scng instantiation * scans.ads (Based_Literal_Uses_Colon): New flag * scn.adb (Obsolscent_Check_Flag): Removed (Obsolscent_Check): Removed (Set_Obsolescent_Check): Removed (Post_Scan): Add handling for obsolescent features * scn.ads (Obsolscent_Check): Removed (Set_Obsolescent_Check): Removed (Post_Scan): Can no longer be inlined Remove Obsolescent_Check from instantiation of Scng * scng.adb (Nlit): Set Based_Literal_Uses_Colon (Nlit): Remove handling of obsolescent check (Scan, case '%'): Remove handling of obsolescent check (Scan, case '|'): Call Post_Scan (Scan, case '!'): Remove handling of obsolescent check, call Post_Scan * scng.ads Remove Obsolescent_Check argument from Scng generic (Post_Scan): Now called for Tok_Vertical_Bar * sinput-l.adb: Remove calls to Set_Obsolescent_Check git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164081 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/scng.adb')
-rw-r--r--gcc/ada/scng.adb44
1 files changed, 9 insertions, 35 deletions
diff --git a/gcc/ada/scng.adb b/gcc/ada/scng.adb
index d4005b47989..bc34eab49ed 100644
--- a/gcc/ada/scng.adb
+++ b/gcc/ada/scng.adb
@@ -516,6 +516,7 @@ package body Scng is
Base := 10;
UI_Base := Uint_10;
UI_Int_Value := Uint_0;
+ Based_Literal_Uses_Colon := False;
Scale := 0;
Scan_Integer;
Point_Scanned := False;
@@ -568,20 +569,14 @@ package body Scng is
or else
Source (Scan_Ptr + 1) in 'a' .. 'z'))
then
- if C = ':' then
- Obsolescent_Check (Scan_Ptr);
-
- if Warn_On_Obsolescent_Feature then
- Error_Msg_S
- ("use of "":"" is an obsolescent feature (RM J.2(3))?");
- Error_Msg_S ("\use ""'#"" instead?");
- end if;
- end if;
-
Accumulate_Checksum (C);
Base_Char := C;
UI_Base := UI_Int_Value;
+ if Base_Char = ':' then
+ Based_Literal_Uses_Colon := True;
+ end if;
+
if UI_Base < 2 or else UI_Base > 16 then
Error_Msg_SC ("base not 2-16");
UI_Base := Uint_16;
@@ -753,7 +748,6 @@ package body Scng is
end if;
Accumulate_Token_Checksum;
-
return;
end Nlit;
@@ -1579,24 +1573,9 @@ package body Scng is
end if;
end Minus_Case;
- -- Double quote starting a string literal
-
- when '"' =>
- Slit;
- Post_Scan;
- return;
-
- -- Percent starting a string literal
-
- when '%' =>
- Obsolescent_Check (Token_Ptr);
-
- if Warn_On_Obsolescent_Feature then
- Error_Msg_S
- ("use of ""'%"" is an obsolescent feature (RM J.2(4))?");
- Error_Msg_S ("\use """""" instead?");
- end if;
+ -- Double quote or percent starting a string literal
+ when '"' | '%' =>
Slit;
Post_Scan;
return;
@@ -1808,6 +1787,7 @@ package body Scng is
Style.Check_Vertical_Bar;
end if;
+ Post_Scan;
return;
end if;
end Vertical_Bar_Case;
@@ -1816,13 +1796,6 @@ package body Scng is
when '!' => Exclamation_Case : begin
Accumulate_Checksum ('!');
- Obsolescent_Check (Token_Ptr);
-
- if Warn_On_Obsolescent_Feature then
- Error_Msg_S
- ("use of ""'!"" is an obsolescent feature (RM J.2(2))?");
- Error_Msg_S ("\use ""'|"" instead?");
- end if;
if Source (Scan_Ptr + 1) = '=' then
Error_Msg_S -- CODEFIX
@@ -1834,6 +1807,7 @@ package body Scng is
else
Scan_Ptr := Scan_Ptr + 1;
Token := Tok_Vertical_Bar;
+ Post_Scan;
return;
end if;
end Exclamation_Case;