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
2749b01b
Commit
2749b01b
authored
Feb 25, 2014
by
Eric Botcazou
Committed by
Arnaud Charlet
Feb 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
From-SVN: r208149
parent
e7ba564f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
gcc/ada/ChangeLog
+4
-0
gcc/ada/gcc-interface/trans.c
+21
-4
No files found.
gcc/ada/ChangeLog
View file @
2749b01b
2014
-
02
-
25
Eric
Botcazou
<
ebotcazou
@
adacore
.
com
>
*
gcc
-
interface
/
trans
.
c
(
Pragma_to_gnu
):
Deal
with
Warning_As_Error
.
2014
-
02
-
25
Robert
Dewar
<
dewar
@
adacore
.
com
>
*
rtsfind
.
adb
(
Is_RTE
):
Protect
against
entity
with
no
scope
...
...
gcc/ada/gcc-interface/trans.c
View file @
2749b01b
...
...
@@ -1194,6 +1194,7 @@ static tree
Pragma_to_gnu
(
Node_Id
gnat_node
)
{
tree
gnu_result
=
alloc_stmt_list
();
unsigned
char
pragma_id
;
Node_Id
gnat_temp
;
/* Do nothing if we are just annotating types and check for (and ignore)
...
...
@@ -1202,7 +1203,8 @@ Pragma_to_gnu (Node_Id gnat_node)
||
!
Is_Pragma_Name
(
Chars
(
Pragma_Identifier
(
gnat_node
))))
return
gnu_result
;
switch
(
Get_Pragma_Id
(
Chars
(
Pragma_Identifier
(
gnat_node
))))
pragma_id
=
Get_Pragma_Id
(
Chars
(
Pragma_Identifier
(
gnat_node
)));
switch
(
pragma_id
)
{
case
Pragma_Inspection_Point
:
/* Do nothing at top level: all such variables are already viewable. */
...
...
@@ -1319,6 +1321,7 @@ Pragma_to_gnu (Node_Id gnat_node)
post_error
(
"must specify -g?"
,
gnat_node
);
break
;
case
Pragma_Warning_As_Error
:
case
Pragma_Warnings
:
{
Node_Id
gnat_expr
;
...
...
@@ -1331,12 +1334,26 @@ Pragma_to_gnu (Node_Id gnat_node)
gnat_temp
=
First
(
Pragma_Argument_Associations
(
gnat_node
));
/* This is the String form: pragma Warning
s
(String). */
/* This is the String form: pragma Warning
{s|_As_Error}
(String). */
if
(
Nkind
(
Expression
(
gnat_temp
))
==
N_String_Literal
)
{
kind
=
DK_WARNING
;
switch
(
pragma_id
)
{
case
Pragma_Warning_As_Error
:
kind
=
DK_ERROR
;
imply
=
false
;
break
;
case
Pragma_Warnings
:
kind
=
DK_WARNING
;
imply
=
true
;
break
;
default
:
gcc_unreachable
();
}
gnat_expr
=
Expression
(
gnat_temp
);
imply
=
true
;
}
/* This is the On/Off form: pragma Warnings (On | Off [,String]). */
...
...
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