aboutsummaryrefslogtreecommitdiff
path: root/gcc/scan-decls.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2000-04-30 17:30:25 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-04-30 17:30:25 +0000
commit6d2c2047b5760b68cc9eb98fba1ad00a2539fc12 (patch)
treeb4d768db6e949f31e3dc54159c98b6eb77a9dea5 /gcc/scan-decls.c
parent638d694d84aedb360309dd956b261e428d85f092 (diff)
downloadgcc-6d2c2047b5760b68cc9eb98fba1ad00a2539fc12.zip
gcc-6d2c2047b5760b68cc9eb98fba1ad00a2539fc12.tar.gz
gcc-6d2c2047b5760b68cc9eb98fba1ad00a2539fc12.tar.bz2
cpplex.c (cpp_idcmp): New function.
* cpplex.c (cpp_idcmp): New function. * cpplib.h: Prototype it. * scan_decls.c (scan_decls): Use it to inspect token names. * fix-header.c (read_scan_file): Likewise. Set system_header_p on the file being run through the preprocessor. (check_macro_names): Provide length of token to cpp_defined. * Makefile.in: Remove stale warning message. From-SVN: r33552
Diffstat (limited to 'gcc/scan-decls.c')
-rw-r--r--gcc/scan-decls.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/scan-decls.c b/gcc/scan-decls.c
index 3c33a1c..8953da5 100644
--- a/gcc/scan-decls.c
+++ b/gcc/scan-decls.c
@@ -191,9 +191,7 @@ scan_decls (pfile, argc, argv)
maybe_handle_comma:
if (token != CPP_COMMA)
goto new_statement;
-#if 0
- handle_comma:
-#endif
+
/* Handle multiple declarators in a single declaration,
as in: extern char *strcpy (), *strcat (), ... ; */
if (declarator_start == 0)
@@ -202,12 +200,14 @@ scan_decls (pfile, argc, argv)
break;
case CPP_NAME:
/* "inline" and "extern" are recognized but skipped */
- if (strcmp (pfile->token_buffer, "inline") == 0)
+ if (!cpp_idcmp (pfile->token_buffer,
+ CPP_WRITTEN (pfile), "inline"))
{
saw_inline = 1;
CPP_SET_WRITTEN (pfile, start_written);
}
- if (strcmp (pfile->token_buffer, "extern") == 0)
+ else if (!cpp_idcmp (pfile->token_buffer,
+ CPP_WRITTEN (pfile), "extern"))
{
saw_extern = 1;
CPP_SET_WRITTEN (pfile, start_written);