summaryrefslogtreecommitdiff
path: root/libcpp/directives.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-12 18:31:38 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-12 18:31:38 +0000
commit81e19b315c09e2f08de19bd5838caa8221eb3a99 (patch)
tree9ebe805cfe29bfc038fef679e1dd507371ffc36c /libcpp/directives.c
parent04d822b8d4f6221888e67925808b18e35e880532 (diff)
downloadgcc-81e19b315c09e2f08de19bd5838caa8221eb3a99.tar.gz
libcpp:
* directives.c (#sccs table entry): Mark IN_I, consistent with #ident. (do_sccs): Delete function definition, #define to do_ident. (do_ident): Don't hardwire directive name. gcc: * doc/cpp.texi: Document that #sccs is a synonym for #ident. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99623 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r--libcpp/directives.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c
index 957e879caec..672415b8d61 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -157,7 +157,10 @@ D(ident, T_IDENT, EXTENSION, IN_I) /* 11 */ \
D(import, T_IMPORT, EXTENSION, INCL | EXPAND) /* 0 ObjC */ \
D(assert, T_ASSERT, EXTENSION, 0) /* 0 SVR4 */ \
D(unassert, T_UNASSERT, EXTENSION, 0) /* 0 SVR4 */ \
-D(sccs, T_SCCS, EXTENSION, 0) /* 0 SVR4? */
+D(sccs, T_SCCS, EXTENSION, IN_I) /* 0 SVR4? */
+
+/* #sccs is synonymous with #ident. */
+#define do_sccs do_ident
/* Use the table to generate a series of prototypes, an enum for the
directive names, and an array of directive handlers. */
@@ -953,7 +956,8 @@ do_ident (cpp_reader *pfile)
const cpp_token *str = cpp_get_token (pfile);
if (str->type != CPP_STRING)
- cpp_error (pfile, CPP_DL_ERROR, "invalid #ident directive");
+ cpp_error (pfile, CPP_DL_ERROR, "invalid #%s directive",
+ pfile->directive->name);
else if (pfile->cb.ident)
pfile->cb.ident (pfile, pfile->directive_line, &str->val.str);
@@ -1474,12 +1478,6 @@ cpp_handle_deferred_pragma (cpp_reader *pfile, const cpp_string *s)
CPP_OPTION (pfile, defer_pragmas) = saved_defer_pragmas;
}
-/* Ignore #sccs on all systems. */
-static void
-do_sccs (cpp_reader *pfile ATTRIBUTE_UNUSED)
-{
-}
-
/* Handle #ifdef. */
static void
do_ifdef (cpp_reader *pfile)