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
0df69870
Commit
0df69870
authored
Feb 27, 1993
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New builtins: __REGISTER_PREFIX__ and __USER_LABEL_PREFIX__
From-SVN: r3552
parent
0a111fa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
gcc/cccp.c
+26
-0
No files found.
gcc/cccp.c
View file @
0df69870
...
...
@@ -738,6 +738,8 @@ enum node_type {
T_SIZE_TYPE
,
/* `__SIZE_TYPE__' */
T_PTRDIFF_TYPE
,
/* `__PTRDIFF_TYPE__' */
T_WCHAR_TYPE
,
/* `__WCHAR_TYPE__' */
T_USER_LABEL_PREFIX_TYPE
,
/* `__USER_LABEL_PREFIX__' */
T_REGISTER_PREFIX_TYPE
,
/* `__REGISTER_PREFIX__' */
T_TIME
,
/* `__TIME__' */
T_CONST
,
/* Constant value, used by `__STDC__' */
T_MACRO
,
/* macro defined by `#define' */
...
...
@@ -804,6 +806,18 @@ static char *predefs = "";
#ifndef WCHAR_TYPE
#define WCHAR_TYPE "int"
#endif
/* The string value for __USER_LABEL_PREFIX__ */
#ifndef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX ""
#endif
/* The string value for __REGISTER_PREFIX__ */
#ifndef REGISTER_PREFIX
#define REGISTER_PREFIX ""
#endif
/* In the definition of a #assert name, this structure forms
a list of the individual values asserted.
...
...
@@ -3622,6 +3636,16 @@ special_symbol (hp, op)
sprintf
(
buf
,
"%s"
,
WCHAR_TYPE
);
break
;
case
T_USER_LABEL_PREFIX_TYPE
:
buf
=
(
char
*
)
alloca
(
3
+
strlen
(
USER_LABEL_PREFIX
));
sprintf
(
buf
,
"%s"
,
USER_LABEL_PREFIX
);
break
;
case
T_REGISTER_PREFIX_TYPE
:
buf
=
(
char
*
)
alloca
(
3
+
strlen
(
REGISTER_PREFIX
));
sprintf
(
buf
,
"%s"
,
REGISTER_PREFIX
);
break
;
case
T_CONST
:
buf
=
(
char
*
)
alloca
(
4
*
sizeof
(
int
));
sprintf
(
buf
,
"%d"
,
hp
->
value
.
ival
);
...
...
@@ -8380,6 +8404,8 @@ initialize_builtins (inp, outp)
install
(
"__PTRDIFF_TYPE__ "
,
-
1
,
T_PTRDIFF_TYPE
,
0
,
0
,
-
1
);
#endif
install
(
"__WCHAR_TYPE__"
,
-
1
,
T_WCHAR_TYPE
,
0
,
0
,
-
1
);
install
(
"__USER_LABEL_PREFIX__"
,
-
1
,
T_USER_LABEL_PREFIX_TYPE
,
0
,
0
,
-
1
);
install
(
"__REGISTER_PREFIX__"
,
-
1
,
T_REGISTER_PREFIX_TYPE
,
0
,
0
,
-
1
);
install
(
"__TIME__"
,
-
1
,
T_TIME
,
0
,
0
,
-
1
);
if
(
!
traditional
)
install
(
"__STDC__"
,
-
1
,
T_CONST
,
STDC_VALUE
,
0
,
-
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