aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@gcc.gnu.org>1995-05-12 20:23:47 +0000
committerKen Raeburn <raeburn@gcc.gnu.org>1995-05-12 20:23:47 +0000
commita9ce110c91e426dc609a1046176eecb4c0837126 (patch)
tree8c7255c714aa9680b1d33a0799f5212e1c26eed8
parent27027a6034c9f7bbf99af08f9c618227ac0e1779 (diff)
downloadgcc-a9ce110c91e426dc609a1046176eecb4c0837126.zip
gcc-a9ce110c91e426dc609a1046176eecb4c0837126.tar.gz
gcc-a9ce110c91e426dc609a1046176eecb4c0837126.tar.bz2
(enum node_type): Add T_IMMEDIATE_PREFIX_TYPE.
(special_symbol): Handle it; emit value of IMMEDIATE_PREFIX. (IMMEDIATE_PREFIX): Default to empty string. (initialize_builtins): Install __IMMEDIATE_PREFIX__ builtin, parallel to __REGISTER_PREFIX__. From-SVN: r9661
-rw-r--r--gcc/cccp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 7f31e78..fa15572 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -804,6 +804,7 @@ enum node_type {
T_WCHAR_TYPE, /* `__WCHAR_TYPE__' */
T_USER_LABEL_PREFIX_TYPE, /* `__USER_LABEL_PREFIX__' */
T_REGISTER_PREFIX_TYPE, /* `__REGISTER_PREFIX__' */
+ T_IMMEDIATE_PREFIX_TYPE, /* `__IMMEDIATE_PREFIX__' */
T_TIME, /* `__TIME__' */
T_CONST, /* Constant value, used by `__STDC__' */
T_MACRO, /* macro defined by `#define' */
@@ -884,6 +885,12 @@ char * wchar_type = WCHAR_TYPE;
#ifndef REGISTER_PREFIX
#define REGISTER_PREFIX ""
#endif
+
+/* The string value for __IMMEDIATE_PREFIX__ */
+
+#ifndef IMMEDIATE_PREFIX
+#define IMMEDIATE_PREFIX ""
+#endif
/* In the definition of a #assert name, this structure forms
a list of the individual values asserted.
@@ -4162,6 +4169,10 @@ special_symbol (hp, op)
buf = REGISTER_PREFIX;
break;
+ case T_IMMEDIATE_PREFIX_TYPE:
+ buf = IMMEDIATE_PREFIX;
+ break;
+
case T_CONST:
buf = hp->value.cpval;
if (pcp_inside_if && pcp_outfile)
@@ -9579,6 +9590,8 @@ initialize_builtins (inp, outp)
NULL_PTR, -1);
install ((U_CHAR *) "__REGISTER_PREFIX__", -1, T_REGISTER_PREFIX_TYPE,
NULL_PTR, -1);
+ install ((U_CHAR *) "__IMMEDIATE_PREFIX__", -1, T_IMMEDIATE_PREFIX_TYPE,
+ NULL_PTR, -1);
install ((U_CHAR *) "__TIME__", -1, T_TIME, NULL_PTR, -1);
if (!traditional) {
install ((U_CHAR *) "__STDC__", -1, T_CONST, "1", -1);