aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1996-04-17 12:35:54 -0700
committerJim Wilson <wilson@gcc.gnu.org>1996-04-17 12:35:54 -0700
commit5bb43f8f715b48c2a085e564ff1037d9d9932bc7 (patch)
treeadbcc5d975ee3dffbea75efee082f4f9cab28eab /gcc
parentf72bbc3739258fd167d81b4b575a241e71643378 (diff)
downloadgcc-5bb43f8f715b48c2a085e564ff1037d9d9932bc7.zip
gcc-5bb43f8f715b48c2a085e564ff1037d9d9932bc7.tar.gz
gcc-5bb43f8f715b48c2a085e564ff1037d9d9932bc7.tar.bz2
(process_pragma): Take the IDENTIFIER_POINTER tree
node instead of a character. From-SVN: r11844
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/h8300/h8300.c37
1 files changed, 12 insertions, 25 deletions
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 4ea0cfa..6b0d285 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -618,36 +618,23 @@ eq_operator (x, mode)
with this attribute may be safely used in an interrupt vector. */
int
-handle_pragma (file, c)
+handle_pragma (file, t)
FILE *file;
- int c;
+ tree t;
{
- char pbuf[20];
- int psize = 0;
+ int retval = 0;
+ register char *pname;
- while (c == ' ' || c == '\t')
- c = getc (file);
-
- if (c != '\n' & c != EOF)
- {
- while (psize < sizeof (pbuf) - 1
- && isalpha (c))
- {
- pbuf[psize++] = c;
- c = getc (file);
- }
- pbuf[psize] = 0;
-
- if (strcmp (pbuf, "interrupt") == 0)
- interrupt_handler = 1;
- else if (strcmp (pbuf, "saveall") == 0)
- pragma_saveall = 1;
+ if (TREE_CODE (t) != IDENTIFIER_NODE)
+ return 0;
- while (c != '\n' && c != EOF)
- c = getc (file);
- }
+ pname = IDENTIFIER_POINTER (t);
+ if (strcmp (pname, "interrupt") == 0)
+ interrupt_handler = retval = 1;
+ else if (strcmp (pname, "saveall") == 0)
+ pragma_saveall = retval = 1;
- return c;
+ return retval;
}
/* If the next arg with MODE and TYPE is to be passed in a register, return