Commit 1ed17cd5 by Zack Weinberg

directives.c (#sccs table entry): Mark IN_I, consistent with #ident.

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.

From-SVN: r99623
parent 4588b604
......@@ -3372,18 +3372,15 @@ current file to be treated as if it came from a system header.
@chapter Other Directives
@findex #ident
@findex #sccs
The @samp{#ident} directive takes one argument, a string constant. On
some systems, that string constant is copied into a special segment of
the object file. On other systems, the directive is ignored.
This directive is not part of the C standard, but it is not an official
GNU extension either. We believe it came from System V@.
the object file. On other systems, the directive is ignored. The
@samp{#sccs} directive is a synonym for @samp{#ident}.
@findex #sccs
The @samp{#sccs} directive is recognized, because it appears in the
header files of some systems. It is a very old, obscure, extension
which we did not invent, and we have been unable to find any
documentation of what it should do, so GCC simply ignores it.
These directives are not part of the C standard, but they are not
official GNU extensions either. What historical information we have
been able to find, suggests they originated with System V@.
@cindex null directive
The @dfn{null directive} consists of a @samp{#} followed by a newline,
......
2005-05-12 Zack Weinberg <zack@codesourcery.com>
* 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.
2005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
PR bootstrap/21230
......@@ -26,7 +32,7 @@
fflush, fgetc, fgets, ferror, fread): Redefine to the associated
_unlocked function.
(fwrite_unlocked): Fix prototype.
* configure, config.in: Regenerate.
2005-04-05 Jakub Jelinek <jakub@redhat.com>
......@@ -58,7 +64,7 @@
* lex.c (forms_identifier_p): Disable UCNs in C89 mode.
2005-03-14 Geoffrey Keating <geoffk@apple.com>
* init.c (cpp_create_reader): Default warn_normalize to normalized_C.
* charset.c: Update for new format of ucnid.h.
(ucn_valid_in_identifier): Update for new format of ucnid.h.
......@@ -119,7 +125,7 @@
* directives.c (do_line): Save sysp early before line table is
realloc'ed.
2005-02-20 Zack Weinberg <zack@codesourcery.com>
PR 18785
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment