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
caab5771
Commit
caab5771
authored
Nov 30, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(decl_attribute): Allow special names (e.g, `word') for mode
attribute. From-SVN: r8582
parent
077e4b01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
19 deletions
+28
-19
gcc/c-common.c
+28
-19
No files found.
gcc/c-common.c
View file @
caab5771
...
@@ -297,27 +297,36 @@ found_attr:;
...
@@ -297,27 +297,36 @@ found_attr:;
&&
TREE_CODE
(
TREE_VALUE
(
args
))
==
IDENTIFIER_NODE
)
&&
TREE_CODE
(
TREE_VALUE
(
args
))
==
IDENTIFIER_NODE
)
{
{
int
i
;
int
i
;
char
*
specified_name
char
*
specified_name
=
IDENTIFIER_POINTER
(
TREE_VALUE
(
args
));
=
IDENTIFIER_POINTER
(
TREE_VALUE
(
args
));
enum
machine_mode
mode
=
VOIDmode
;
tree
typefm
;
/* Give this decl a type with the specified mode.
First check for the special modes. */
if
(
!
strcmp
(
specified_name
,
"byte"
)
||
!
strcmp
(
specified_name
,
"__byte__"
))
mode
=
byte_mode
;
else
if
(
!
strcmp
(
specified_name
,
"word"
)
||
!
strcmp
(
specified_name
,
"__word__"
))
mode
=
word_mode
;
else
if
(
!
strcmp
(
specified_name
,
"pointer"
)
||
!
strcmp
(
specified_name
,
"__pointer__"
))
mode
=
ptr_mode
;
else
for
(
i
=
0
;
i
<
NUM_MACHINE_MODES
;
i
++
)
if
(
!
strcmp
(
specified_name
,
GET_MODE_NAME
(
i
)))
mode
=
(
enum
machine_mode
)
i
;
/* Give this decl a type with the specified mode. */
if
(
mode
==
VOIDmode
)
for
(
i
=
0
;
i
<
NUM_MACHINE_MODES
;
i
++
)
if
(
!
strcmp
(
specified_name
,
GET_MODE_NAME
(
i
)))
{
tree
typefm
=
type_for_mode
(
i
,
TREE_UNSIGNED
(
type
));
if
(
typefm
!=
0
)
{
TREE_TYPE
(
decl
)
=
type
=
typefm
;
DECL_SIZE
(
decl
)
=
0
;
layout_decl
(
decl
,
0
);
}
else
error
(
"no data type for mode `%s'"
,
specified_name
);
break
;
}
if
(
i
==
NUM_MACHINE_MODES
)
error_with_decl
(
decl
,
"unknown machine mode `%s'"
,
specified_name
);
error_with_decl
(
decl
,
"unknown machine mode `%s'"
,
specified_name
);
else
if
((
typefm
=
type_for_mode
(
mode
,
TREE_UNSIGNED
(
type
)))
==
0
)
error_with_decl
(
decl
,
"no data type for mode `%s'"
,
specified_name
);
else
{
TREE_TYPE
(
decl
)
=
type
=
typefm
;
DECL_SIZE
(
decl
)
=
0
;
layout_decl
(
decl
,
0
);
}
}
}
else
if
((
!
strcmp
(
IDENTIFIER_POINTER
(
name
),
"section"
)
else
if
((
!
strcmp
(
IDENTIFIER_POINTER
(
name
),
"section"
)
||
!
strcmp
(
IDENTIFIER_POINTER
(
name
),
"__section__"
))
||
!
strcmp
(
IDENTIFIER_POINTER
(
name
),
"__section__"
))
...
...
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