Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
d6ca724c
Commit
d6ca724c
authored
May 26, 2008
by
Arnaud Charlet
Committed by
Arnaud Charlet
May 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ceinfo.adb, csinfo.adb: Remove warnings. Update headers.
From-SVN: r135912
parent
c654b659
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
67 deletions
+76
-67
gcc/ada/ChangeLog
+4
-0
gcc/ada/ceinfo.adb
+17
-19
gcc/ada/csinfo.adb
+55
-48
No files found.
gcc/ada/ChangeLog
View file @
d6ca724c
2008
-
05
-
26
Arnaud
Charlet
<
charlet
@
adacore
.
com
>
*
ceinfo
.
adb
,
csinfo
.
adb
:
Remove
warnings
.
Update
headers
.
2008
-
05
-
26
Eric
Botcazou
<
ebotcazou
@
adacore
.
com
>
2008
-
05
-
26
Eric
Botcazou
<
ebotcazou
@
adacore
.
com
>
*
gigi
.
h
(
gigi
):
Remove
bogus
ATTRIBUTE_UNUSED
marker
.
*
gigi
.
h
(
gigi
):
Remove
bogus
ATTRIBUTE_UNUSED
marker
.
gcc/ada/ceinfo.adb
View file @
d6ca724c
...
@@ -6,18 +6,17 @@
...
@@ -6,18 +6,17 @@
--
--
--
--
--
B
o
d
y
--
--
B
o
d
y
--
--
--
--
--
--
Copyright
(
C
)
1998
Free
Software
Foundation
,
Inc
.
--
--
Copyright
(
C
)
1998
-
2007
,
Free
Software
Foundation
,
Inc
.
--
--
--
--
--
--
GNAT
is
free
software
;
you
can
redistribute
it
and
/
or
modify
it
under
--
--
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
-
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
--
ware
Foundation
;
either
version
2
,
or
(
at
your
option
)
any
later
ver
-
--
--
ware
Foundation
;
either
version
3
,
or
(
at
your
option
)
any
later
ver
-
--
--
sion
.
GNAT
is
distributed
in
the
hope
that
it
will
be
useful
,
but
WITH
-
--
--
sion
.
GNAT
is
distributed
in
the
hope
that
it
will
be
useful
,
but
WITH
-
--
--
OUT
ANY
WARRANTY
;
without
even
the
implied
warranty
of
MERCHANTABILITY
--
--
OUT
ANY
WARRANTY
;
without
even
the
implied
warranty
of
MERCHANTABILITY
--
--
or
FITNESS
FOR
A
PARTICULAR
PURPOSE
.
See
the
GNU
General
Public
License
--
--
or
FITNESS
FOR
A
PARTICULAR
PURPOSE
.
See
the
GNU
General
Public
License
--
--
for
more
details
.
You
should
have
received
a
copy
of
the
GNU
General
--
--
for
more
details
.
You
should
have
received
a
copy
of
the
GNU
General
--
--
Public
License
distributed
with
GNAT
;
see
file
COPYING
.
If
not
,
write
--
--
Public
License
distributed
with
GNAT
;
see
file
COPYING3
.
If
not
,
go
to
--
--
to
the
Free
Software
Foundation
,
51
Franklin
Street
,
Fifth
Floor
,
--
--
http
://
www
.
gnu
.
org
/
licenses
for
a
complete
copy
of
the
license
.
--
--
Boston
,
MA
02110
-
1301
,
USA
.
--
--
--
--
--
--
GNAT
was
originally
developed
by
the
GNAT
team
at
New
York
University
.
--
--
GNAT
was
originally
developed
by
the
GNAT
team
at
New
York
University
.
--
--
Extensive
contributions
were
provided
by
Ada
Core
Technologies
Inc
.
--
--
Extensive
contributions
were
provided
by
Ada
Core
Technologies
Inc
.
--
...
@@ -43,9 +42,6 @@ procedure CEinfo is
...
@@ -43,9 +42,6 @@ procedure CEinfo is
Infil
:
File_Type
;
Infil
:
File_Type
;
Lineno
:
Natural
:=
0
;
Lineno
:
Natural
:=
0
;
Err
:
exception
;
--
Raised
on
fatal
error
Fieldnm
:
VString
;
Fieldnm
:
VString
;
Accessfunc
:
VString
;
Accessfunc
:
VString
;
Line
:
VString
;
Line
:
VString
;
...
@@ -53,25 +49,27 @@ procedure CEinfo is
...
@@ -53,25 +49,27 @@ procedure CEinfo is
Fields
:
GNAT
.
Spitbol
.
Table_VString
.
Table
(
500
);
Fields
:
GNAT
.
Spitbol
.
Table_VString
.
Table
(
500
);
--
Maps
field
names
to
underlying
field
access
name
--
Maps
field
names
to
underlying
field
access
name
UC
:
Pattern
:=
Any
(
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
);
UC
:
constant
Pattern
:=
Any
(
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
);
Fnam
:
Pattern
:=
(
UC
&
Break
(
' '
))
*
Fieldnm
;
Fnam
:
constant
Pattern
:=
(
UC
&
Break
(
' '
))
*
Fieldnm
;
Field_Def
:
Pattern
:=
"-- "
&
Fnam
&
" ("
&
Break
(
')'
)
*
Accessfunc
;
Field_Def
:
constant
Pattern
:=
"-- "
&
Fnam
&
" ("
&
Break
(
')'
)
*
Accessfunc
;
Field_Ref
:
Pattern
:=
" -- "
&
Fnam
&
Break
(
'('
)
&
Len
(
1
)
&
Field_Ref
:
constant
Pattern
:=
Break
(
')'
)
*
Accessfunc
;
" -- "
&
Fnam
&
Break
(
'('
)
&
Len
(
1
)
&
Break
(
')'
)
*
Accessfunc
;
Field_Com
:
Pattern
:=
" -- "
&
Fnam
&
Span
(
' '
)
&
Field_Com
:
constant
Pattern
:=
" -- "
&
Fnam
&
Span
(
' '
)
&
(
Break
(
' '
)
or
Rest
)
*
Accessfunc
;
(
Break
(
' '
)
or
Rest
)
*
Accessfunc
;
Func_Hedr
:
Pattern
:=
" function "
&
Fnam
;
Func_Hedr
:
constant
Pattern
:=
" function "
&
Fnam
;
Func_Retn
:
Pattern
:=
" return "
&
Break
(
' '
)
*
Accessfunc
;
Func_Retn
:
constant
Pattern
:=
" return "
&
Break
(
' '
)
*
Accessfunc
;
Proc_Hedr
:
Pattern
:=
" procedure "
&
Fnam
;
Proc_Hedr
:
constant
Pattern
:=
" procedure "
&
Fnam
;
Proc_Setf
:
Pattern
:=
" Set_"
&
Break
(
' '
)
*
Accessfunc
;
Proc_Setf
:
constant
Pattern
:=
" Set_"
&
Break
(
' '
)
*
Accessfunc
;
procedure
Next_Line
;
procedure
Next_Line
;
--
Read
next
line
trimmed
from
Infil
into
Line
and
bump
Lineno
--
Read
next
line
trimmed
from
Infil
into
Line
and
bump
Lineno
...
...
gcc/ada/csinfo.adb
View file @
d6ca724c
...
@@ -6,18 +6,17 @@
...
@@ -6,18 +6,17 @@
--
--
--
--
--
B
o
d
y
--
--
B
o
d
y
--
--
--
--
--
--
Copyright
(
C
)
1992
-
200
5
Free
Software
Foundation
,
Inc
.
--
--
Copyright
(
C
)
1992
-
200
8
,
Free
Software
Foundation
,
Inc
.
--
--
--
--
--
--
GNAT
is
free
software
;
you
can
redistribute
it
and
/
or
modify
it
under
--
--
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
-
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
--
ware
Foundation
;
either
version
2
,
or
(
at
your
option
)
any
later
ver
-
--
--
ware
Foundation
;
either
version
3
,
or
(
at
your
option
)
any
later
ver
-
--
--
sion
.
GNAT
is
distributed
in
the
hope
that
it
will
be
useful
,
but
WITH
-
--
--
sion
.
GNAT
is
distributed
in
the
hope
that
it
will
be
useful
,
but
WITH
-
--
--
OUT
ANY
WARRANTY
;
without
even
the
implied
warranty
of
MERCHANTABILITY
--
--
OUT
ANY
WARRANTY
;
without
even
the
implied
warranty
of
MERCHANTABILITY
--
--
or
FITNESS
FOR
A
PARTICULAR
PURPOSE
.
See
the
GNU
General
Public
License
--
--
or
FITNESS
FOR
A
PARTICULAR
PURPOSE
.
See
the
GNU
General
Public
License
--
--
for
more
details
.
You
should
have
received
a
copy
of
the
GNU
General
--
--
for
more
details
.
You
should
have
received
a
copy
of
the
GNU
General
--
--
Public
License
distributed
with
GNAT
;
see
file
COPYING
.
If
not
,
write
--
--
Public
License
distributed
with
GNAT
;
see
file
COPYING3
.
If
not
,
go
to
--
--
to
the
Free
Software
Foundation
,
51
Franklin
Street
,
Fifth
Floor
,
--
--
http
://
www
.
gnu
.
org
/
licenses
for
a
complete
copy
of
the
license
.
--
--
Boston
,
MA
02110
-
1301
,
USA
.
--
--
--
--
--
--
GNAT
was
originally
developed
by
the
GNAT
team
at
New
York
University
.
--
--
GNAT
was
originally
developed
by
the
GNAT
team
at
New
York
University
.
--
--
Extensive
contributions
were
provided
by
Ada
Core
Technologies
Inc
.
--
--
Extensive
contributions
were
provided
by
Ada
Core
Technologies
Inc
.
--
...
@@ -55,7 +54,7 @@ procedure CSinfo is
...
@@ -55,7 +54,7 @@ procedure CSinfo is
Done
:
exception
;
Done
:
exception
;
--
Raised
after
error
is
found
to
terminate
run
--
Raised
after
error
is
found
to
terminate
run
WSP
:
Pattern
:=
Span
(
' '
&
ASCII
.
HT
);
WSP
:
constant
Pattern
:=
Span
(
' '
&
ASCII
.
HT
);
Fields
:
TV
.
Table
(
300
);
Fields
:
TV
.
Table
(
300
);
Fields1
:
TV
.
Table
(
300
);
Fields1
:
TV
.
Table
(
300
);
...
@@ -87,50 +86,56 @@ procedure CSinfo is
...
@@ -87,50 +86,56 @@ procedure CSinfo is
Flags
:
TV
.
Table
(
20
);
Flags
:
TV
.
Table
(
20
);
--
Maps
flag
numbers
to
letters
--
Maps
flag
numbers
to
letters
N_Fields
:
Pattern
:=
BreakX
(
"JL"
);
N_Fields
:
constant
Pattern
:=
BreakX
(
"JL"
);
E_Fields
:
Pattern
:=
BreakX
(
"5EFGHIJLOP"
);
E_Fields
:
constant
Pattern
:=
BreakX
(
"5EFGHIJLOP"
);
U_Fields
:
Pattern
:=
BreakX
(
"1345EFGHIJKLOPQ"
);
U_Fields
:
constant
Pattern
:=
BreakX
(
"1345EFGHIJKLOPQ"
);
B_Fields
:
Pattern
:=
BreakX
(
"12345EFGHIJKLOPQ"
);
B_Fields
:
constant
Pattern
:=
BreakX
(
"12345EFGHIJKLOPQ"
);
Line
:
VString
;
Line
:
VString
;
Bad
:
Boolean
;
Bad
:
Boolean
;
Field
:
VString
:=
Nul
;
Field
:
constant
VString
:=
Nul
;
Fields_Used
:
VString
:=
Nul
;
Fields_Used
:
VString
:=
Nul
;
Name
:
VString
:=
Nul
;
Name
:
constant
VString
:=
Nul
;
Next
:
VString
:=
Nul
;
Next
:
constant
VString
:=
Nul
;
Node
:
VString
:=
Nul
;
Node
:
VString
:=
Nul
;
Ref
:
VString
:=
Nul
;
Ref
:
VString
:=
Nul
;
Synonym
:
VString
:=
Nul
;
Synonym
:
constant
VString
:=
Nul
;
Nxtref
:
VString
:=
Nul
;
Nxtref
:
constant
VString
:=
Nul
;
Which_Field
:
aliased
VString
:=
Nul
;
Which_Field
:
aliased
VString
:=
Nul
;
Node_Search
:
Pattern
:=
WSP
&
"-- N_"
&
Rest
*
Node
;
Node_Search
:
constant
Pattern
:=
WSP
&
"-- N_"
&
Rest
*
Node
;
Break_Punc
:
Pattern
:=
Break
(
" .,"
);
Break_Punc
:
constant
Pattern
:=
Break
(
" .,"
);
Plus_Binary
:
Pattern
:=
WSP
&
"-- plus fields for binary operator"
;
Plus_Binary
:
constant
Pattern
:=
WSP
Plus_Unary
:
Pattern
:=
WSP
&
"-- plus fields for unary operator"
;
&
"-- plus fields for binary operator"
;
Plus_Expr
:
Pattern
:=
WSP
&
"-- plus fields for expression"
;
Plus_Unary
:
constant
Pattern
:=
WSP
Break_Syn
:
Pattern
:=
WSP
&
"-- "
&
Break
(
' '
)
*
Synonym
&
&
"-- plus fields for unary operator"
;
" ("
&
Break
(
')'
)
*
Field
;
Plus_Expr
:
constant
Pattern
:=
WSP
Break_Field
:
Pattern
:=
BreakX
(
'-'
)
*
Field
;
&
"-- plus fields for expression"
;
Get_Field
:
Pattern
:=
BreakX
(
Decimal_Digit_Set
)
&
Break_Syn
:
constant
Pattern
:=
WSP
&
"-- "
Span
(
Decimal_Digit_Set
)
*
Which_Field
;
&
Break
(
' '
)
*
Synonym
Break_WFld
:
Pattern
:=
Break
(
Which_Field
'Access);
&
" ("
&
Break
(
')'
)
*
Field
;
Get_Funcsyn : Pattern := WSP & "function " & Rest * Synonym;
Break_Field
:
constant
Pattern
:=
BreakX
(
'-'
)
*
Field
;
Extr_Field : Pattern := BreakX ('
-
') & "-- " & Rest * Field;
Get_Field
:
constant
Pattern
:=
BreakX
(
Decimal_Digit_Set
)
Get_Procsyn : Pattern := WSP & "procedure Set_" & Rest * Synonym;
&
Span
(
Decimal_Digit_Set
)
*
Which_Field
;
Get_Inline : Pattern := WSP & "pragma Inline (" & Break ('
)
') * Name;
Break_WFld
:
constant
Pattern
:=
Break
(
Which_Field
'Access);
Set_Name : Pattern := "Set_" & Rest * Name;
Get_Funcsyn : constant Pattern := WSP & "function " & Rest * Synonym;
Func_Rest : Pattern := " function " & Rest * Synonym;
Extr_Field : constant Pattern := BreakX ('
-
') & "-- " & Rest * Field;
Get_Nxtref : Pattern := Break ('
,
') * Nxtref & '
,
';
Get_Procsyn : constant Pattern := WSP & "procedure Set_" & Rest * Synonym;
Test_Syn : Pattern := Break ('
=
') & "= N_" &
Get_Inline : constant Pattern := WSP & "pragma Inline ("
(Break (" ,)") or Rest) * Next;
& Break ('
)
') * Name;
Chop_Comma : Pattern := BreakX ('
,
') * Next;
Set_Name : constant Pattern := "Set_" & Rest * Name;
Return_Fld : Pattern := WSP & "return " & Break ('
') * Field;
Func_Rest : constant Pattern := " function " & Rest * Synonym;
Set_Syn : Pattern := " procedure Set_" & Rest * Synonym;
Get_Nxtref : constant Pattern := Break ('
,
') * Nxtref & '
,
';
Set_Fld : Pattern := WSP & "Set_" & Break ('
') * Field & " (N, Val)";
Test_Syn : constant Pattern := Break ('
=
') & "= N_"
Break_With : Pattern := Break ('
_
') ** Field & "_With_Parent";
& (Break (" ,)") or Rest) * Next;
Chop_Comma : constant Pattern := BreakX ('
,
') * Next;
Return_Fld : constant Pattern := WSP & "return " & Break ('
') * Field;
Set_Syn : constant Pattern := " procedure Set_" & Rest * Synonym;
Set_Fld : constant Pattern := WSP & "Set_" & Break ('
') * Field
& " (N, Val)";
Break_With : constant Pattern := Break ('
_
') ** Field & "_With_Parent";
type VStringA is array (Natural range <>) of VString;
type VStringA is array (Natural range <>) of VString;
...
@@ -187,9 +192,9 @@ begin
...
@@ -187,9 +192,9 @@ begin
Set (Flags, "17", V ("Q"));
Set (Flags, "17", V ("Q"));
Set (Flags, "18", V ("R"));
Set (Flags, "18", V ("R"));
-- Special fields table. The following
field
s are not recorded or checked
-- Special fields table. The following
name
s are not recorded or checked
-- by Csinfo, since they are specially handled. This means that
both the
-- by Csinfo, since they are specially handled. This means that
any field
--
field definitions, and the corresponding subprograms are
ignored.
--
definition or subprogram with a matching name is
ignored.
Set (Special, "Analyzed", True);
Set (Special, "Analyzed", True);
Set (Special, "Assignment_OK", True);
Set (Special, "Assignment_OK", True);
...
@@ -214,7 +219,9 @@ begin
...
@@ -214,7 +219,9 @@ begin
Set (Special, "Is_Static_Expression", True);
Set (Special, "Is_Static_Expression", True);
Set (Special, "Left_Opnd", True);
Set (Special, "Left_Opnd", True);
Set (Special, "Must_Not_Freeze", True);
Set (Special, "Must_Not_Freeze", True);
Set (Special, "Nkind_In", True);
Set (Special, "Parens", True);
Set (Special, "Parens", True);
Set (Special, "Pragma_Name", True);
Set (Special, "Raises_Constraint_Error", True);
Set (Special, "Raises_Constraint_Error", True);
Set (Special, "Right_Opnd", True);
Set (Special, "Right_Opnd", True);
...
@@ -334,7 +341,7 @@ begin
...
@@ -334,7 +341,7 @@ begin
Put_Line ("Check for missing functions");
Put_Line ("Check for missing functions");
declare
declare
List : TV.Table_Array := Convert_To_Array (Fields1);
List :
constant
TV.Table_Array := Convert_To_Array (Fields1);
begin
begin
if List'
Length
>
0
then
if List'
Length
>
0
then
...
@@ -385,7 +392,7 @@ begin
...
@@ -385,7 +392,7 @@ begin
Put_Line
(
"Check for missing set procedures"
);
Put_Line
(
"Check for missing set procedures"
);
declare
declare
List
:
TV
.
Table_Array
:=
Convert_To_Array
(
Fields1
);
List
:
constant
TV
.
Table_Array
:=
Convert_To_Array
(
Fields1
);
begin
begin
if
List
'Length > 0 then
if
List
'Length > 0 then
...
@@ -424,7 +431,7 @@ begin
...
@@ -424,7 +431,7 @@ begin
Put_Line ("Check no pragma Inlines were omitted");
Put_Line ("Check no pragma Inlines were omitted");
declare
declare
List : TV.Table_Array := Convert_To_Array (Fields);
List :
constant
TV.Table_Array := Convert_To_Array (Fields);
Nxt : VString := Nul;
Nxt : VString := Nul;
begin
begin
...
@@ -523,7 +530,7 @@ begin
...
@@ -523,7 +530,7 @@ begin
Put_Line
(
"Check for missing functions in body"
);
Put_Line
(
"Check for missing functions in body"
);
declare
declare
List
:
TV
.
Table_Array
:=
Convert_To_Array
(
Refs
);
List
:
constant
TV
.
Table_Array
:=
Convert_To_Array
(
Refs
);
begin
begin
if
List
'Length /= 0 then
if
List
'Length /= 0 then
...
@@ -613,7 +620,7 @@ begin
...
@@ -613,7 +620,7 @@ begin
Put_Line ("Check for missing set procedures in body");
Put_Line ("Check for missing set procedures in body");
declare
declare
List : TV.Table_Array := Convert_To_Array (Fields1);
List :
constant
TV.Table_Array := Convert_To_Array (Fields1);
begin
begin
if List'
Length
/=
0
then
if List'
Length
/=
0
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment