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
ba09c753
Commit
ba09c753
authored
Dec 24, 1993
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(attrib): Allow expressions instead of constants.
From-SVN: r6299
parent
fe873240
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
gcc/c-parse.in
+12
-10
No files found.
gcc/c-parse.in
View file @
ba09c753
/* YACC parser for C syntax and for Objective C. -*-c-*-
Copyright (C) 1987, 1988, 1989, 1992 Free Software Foundation, Inc.
Copyright (C) 1987, 1988, 1989, 1992
, 1993
Free Software Foundation, Inc.
This file is part of GNU CC.
...
...
@@ -1072,8 +1072,13 @@ attrib
$$
=
$
1
;
}
|
TYPE_QUAL
|
IDENTIFIER
'('
IDENTIFIER
')'
{
/* If not "mode (m)", then issue warning. */
if
(
strcmp
(
IDENTIFIER_POINTER
(
$
1
),
"mode"
)
!=
0
)
{
/* If not "mode (m)" or "aligned", then issue warning.
If "aligned", this will later produce an error in decl_attributes
since an identifier is not a valid constant, but we want to give
an error instead of a warning when the attribute name is
recognized but has an improper argument. */
if
(
strcmp
(
IDENTIFIER_POINTER
(
$
1
),
"mode"
)
!=
0
&&
strcmp
(
IDENTIFIER_POINTER
(
$
1
),
"aligned"
)
!=
0
)
{
warning
(
"`%s' attribute directive ignored"
,
IDENTIFIER_POINTER
(
$
1
));
...
...
@@ -1081,10 +1086,9 @@ attrib
}
else
$$
=
tree_cons
(
$
1
,
$
3
,
NULL_TREE
);
}
|
IDENTIFIER
'('
CONSTANT
')'
|
IDENTIFIER
'('
expr_no_commas
')'
{
/* if not "aligned(n)", then issue warning */
if
(
strcmp
(
IDENTIFIER_POINTER
(
$
1
),
"aligned"
)
!=
0
||
TREE_CODE
(
$
3
)
!=
INTEGER_CST
)
if
(
strcmp
(
IDENTIFIER_POINTER
(
$
1
),
"aligned"
)
!=
0
)
{
warning
(
"`%s' attribute directive ignored"
,
IDENTIFIER_POINTER
(
$
1
));
...
...
@@ -1092,11 +1096,9 @@ attrib
}
else
$$
=
tree_cons
(
$
1
,
$
3
,
NULL_TREE
);
}
|
IDENTIFIER
'('
IDENTIFIER
','
CONSTANT
','
CONSTANT
')'
|
IDENTIFIER
'('
IDENTIFIER
','
expr_no_commas
','
expr_no_commas
')'
{
/* if not "format(...)", then issue warning */
if
(
strcmp
(
IDENTIFIER_POINTER
(
$
1
),
"format"
)
!=
0
||
TREE_CODE
(
$
5
)
!=
INTEGER_CST
||
TREE_CODE
(
$
7
)
!=
INTEGER_CST
)
if
(
strcmp
(
IDENTIFIER_POINTER
(
$
1
),
"format"
)
!=
0
)
{
warning
(
"`%s' attribute directive ignored"
,
IDENTIFIER_POINTER
(
$
1
));
...
...
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