This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Remove SCCS_DIRECTIVE, allow #sccs everywhere
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 17 Jul 2002 20:26:05 +0100
- Subject: Remove SCCS_DIRECTIVE, allow #sccs everywhere
As discussed a couple of weeks ago, there seems little to
gain apart from pollution of config/ by restricting #sccs to
certain systems. This patch removes the target macro and
we allow #sccs everywhere, but do nothing.
Neil.
* cpplib.c (do_sccs): Handle #sccs on all systems.
* system.h (SCCS_DIRECTIVE): Poison.
* config/darwin.h, config/freebsd.h, config/netbsd.h,
config/ptx4.h, config/svr3.h, config/svr4.h, config/alpha/elf.h,
config/arm/linux-elf.h, config/c4x/c4x.h, config/d30v/d30v.h,
config/i370/i370.h, config/i386/gas.h, config/i386/sco5.h,
config/i960/i960.h, config/m68hc11/m68hc11.h, config/m68k/3b1.h,
config/m68k/3b1g.h, config/m68k/crds.h, config/m68k/mot3300.h,
config/m68k/pbb.h, config/m88k/m88k.h, config/mips/mips.h,
config/sparc/pbd.h, config/stormy16/stormy16.h, config/vax/vaxv.h:
Remove all references to SCCS_DIRECTIVE.
* doc/cpp.texi, doc/tm.texi: Update.
============================================================
Index: gcc/cpplib.c
*** gcc/cpplib.c 9 Jul 2002 22:21:36 -0000 1.318
--- gcc/cpplib.c 17 Jul 2002 19:20:51 -0000
*************** D(ident, T_IDENT, EXTENSION, IN_I) /*
*** 162,175 ****
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 */ \
! SCCS_ENTRY /* 0 SVR4? */
!
! /* #sccs is not always recognized. */
! #ifdef SCCS_DIRECTIVE
! # define SCCS_ENTRY D(sccs, T_SCCS, EXTENSION, 0)
! #else
! # define SCCS_ENTRY /* nothing */
! #endif
/* Use the table to generate a series of prototypes, an enum for the
directive names, and an array of directive handlers. */
--- 162,168 ----
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? */
/* Use the table to generate a series of prototypes, an enum for the
directive names, and an array of directive handlers. */
*************** _cpp_do__Pragma (pfile)
*** 1319,1332 ****
}
}
! /* Just ignore #sccs, on systems where we define it at all. */
! #ifdef SCCS_DIRECTIVE
static void
do_sccs (pfile)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{
}
- #endif
/* Handle #ifdef. */
static void
--- 1312,1323 ----
}
}
! /* Just ignore #sccs on all systems. */
static void
do_sccs (pfile)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{
}
/* Handle #ifdef. */
static void
============================================================
Index: gcc/system.h
*** gcc/system.h 4 Jun 2002 07:08:03 -0000 1.128
--- gcc/system.h 17 Jul 2002 19:20:52 -0000
*************** typedef char _Bool;
*** 620,626 ****
NO_BUILTIN_PTRDIFF_TYPE NO_BUILTIN_WCHAR_TYPE NO_BUILTIN_WINT_TYPE \
BLOCK_PROFILER BLOCK_PROFILER_CODE FUNCTION_BLOCK_PROFILER \
FUNCTION_BLOCK_PROFILER_EXIT MACHINE_STATE_SAVE \
! MACHINE_STATE_RESTORE
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
--- 620,626 ----
NO_BUILTIN_PTRDIFF_TYPE NO_BUILTIN_WCHAR_TYPE NO_BUILTIN_WINT_TYPE \
BLOCK_PROFILER BLOCK_PROFILER_CODE FUNCTION_BLOCK_PROFILER \
FUNCTION_BLOCK_PROFILER_EXIT MACHINE_STATE_SAVE \
! MACHINE_STATE_RESTORE SCCS_DIRECTIVE
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
============================================================
Index: gcc/config/darwin.h
*** gcc/config/darwin.h 17 Jul 2002 00:19:29 -0000 1.32
--- gcc/config/darwin.h 17 Jul 2002 19:20:52 -0000
*************** Boston, MA 02111-1307, USA. */
*** 103,112 ****
#undef DOLLARS_IN_IDENTIFIERS
#define DOLLARS_IN_IDENTIFIERS 2
- /* Allow #sccs (but don't do anything). */
-
- #define SCCS_DIRECTIVE
-
/* We use Dbx symbol format. */
#define DBX_DEBUGGING_INFO
--- 103,108 ----
============================================================
Index: gcc/config/freebsd.h
*** gcc/config/freebsd.h 7 May 2002 21:07:16 -0000 1.16
--- gcc/config/freebsd.h 17 Jul 2002 19:20:52 -0000
*************** Boston, MA 02111-1307, USA. */
*** 67,76 ****
#undef NO_IMPLICIT_EXTERN_C
#define NO_IMPLICIT_EXTERN_C 1
- /* Allow #sccs in preprocessor. */
- #undef SCCS_DIRECTIVE
- #define SCCS_DIRECTIVE 1
-
/* Make gcc agree with FreeBSD's standard headers (<machine/ansi.h>, etc...) */
#undef WCHAR_TYPE
--- 67,72 ----
============================================================
Index: gcc/config/netbsd.h
*** gcc/config/netbsd.h 29 May 2002 01:12:56 -0000 1.16
--- gcc/config/netbsd.h 17 Jul 2002 19:20:52 -0000
*************** Boston, MA 02111-1307, USA. */
*** 128,138 ****
fprintf ((STREAM), "void __fini() {\n\t%s();\n}\n", (FUNC)); \
} while (0)
- /* Allow #sccs in preprocessor. */
-
- #undef SCCS_DIRECTIVE
- #define SCCS_DIRECTIVE
-
#undef TARGET_HAS_F_SETLKW
#define TARGET_HAS_F_SETLKW
--- 128,133 ----
============================================================
Index: gcc/config/ptx4.h
*** gcc/config/ptx4.h 27 Feb 2002 18:47:23 -0000 1.15
--- gcc/config/ptx4.h 17 Jul 2002 19:20:52 -0000
*************** Boston, MA 02111-1307, USA.
*** 180,189 ****
%{!ansi:values-Xa.o%s} \
crtbegin.o%s"
- /* Allow #sccs in preprocessor. */
-
- #define SCCS_DIRECTIVE
-
/* Don't use bcopy, which doesn't handle overlaps before DYNIX/ptx 4.6. */
#undef HAVE_BCOPY
--- 180,185 ----
============================================================
Index: gcc/config/svr3.h
*** gcc/config/svr3.h 18 May 2002 23:47:09 -0000 1.14
--- gcc/config/svr3.h 17 Jul 2002 19:20:52 -0000
*************** Boston, MA 02111-1307, USA.
*** 113,122 ****
#define LINK_SPEC "%{T*} %{z:-lm}"
#endif
- /* Allow #sccs in preprocessor. */
-
- #define SCCS_DIRECTIVE
-
/* Output #ident as a .ident. */
#undef ASM_OUTPUT_IDENT
--- 113,118 ----
============================================================
Index: gcc/config/svr4.h
*** gcc/config/svr4.h 27 Feb 2002 18:47:23 -0000 1.26
--- gcc/config/svr4.h 17 Jul 2002 19:20:52 -0000
*************** Boston, MA 02111-1307, USA.
*** 192,201 ****
%{!ansi:values-Xa.o%s} \
crtbegin.o%s"
- /* Allow #sccs in preprocessor. */
-
- #define SCCS_DIRECTIVE
-
/* The numbers used to denote specific machine registers in the System V
Release 4 DWARF debugging information are quite likely to be totally
different from the numbers used in BSD stabs debugging information
--- 192,197 ----
============================================================
Index: gcc/config/alpha/elf.h
*** gcc/config/alpha/elf.h 24 May 2002 18:30:48 -0000 1.58
--- gcc/config/alpha/elf.h 17 Jul 2002 19:20:52 -0000
*************** do { \
*** 68,76 ****
#undef IDENT_ASM_OP
#define IDENT_ASM_OP "\t.ident\t"
- /* Allow #sccs in preprocessor. */
- #define SCCS_DIRECTIVE
-
/* Output #ident as a .ident. */
#undef ASM_OUTPUT_IDENT
#define ASM_OUTPUT_IDENT(FILE, NAME) \
--- 68,73 ----
============================================================
Index: gcc/config/arm/linux-elf.h
*** gcc/config/arm/linux-elf.h 14 May 2002 17:35:48 -0000 1.34
--- gcc/config/arm/linux-elf.h 17 Jul 2002 19:20:52 -0000
*************** Boston, MA 02111-1307, USA. */
*** 99,107 ****
builtin_assert ("system=posix"); \
} while (0)
- /* Allow #sccs in preprocessor. */
- #define SCCS_DIRECTIVE
-
/* This is how we tell the assembler that two symbols have the same value. */
#define ASM_OUTPUT_DEF(FILE, NAME1, NAME2) \
do \
--- 99,104 ----
============================================================
Index: gcc/config/c4x/c4x.h
*** gcc/config/c4x/c4x.h 16 Jul 2002 02:16:36 -0000 1.110
--- gcc/config/c4x/c4x.h 17 Jul 2002 19:20:53 -0000
*************** do { \
*** 1793,1802 ****
#define DOUBLE_TYPE_SIZE 32
#define LONG_DOUBLE_TYPE_SIZE 64 /* Actually only 40. */
- /* Allow #sccs in preprocessor. */
-
- #define SCCS_DIRECTIVE
-
/* Output #ident as a .ident. */
#define ASM_OUTPUT_IDENT(FILE, NAME) \
--- 1793,1798 ----
============================================================
Index: gcc/config/d30v/d30v.h
*** gcc/config/d30v/d30v.h 16 Jul 2002 20:58:57 -0000 1.63
--- gcc/config/d30v/d30v.h 17 Jul 2002 19:20:55 -0000
*************** fprintf (STREAM, "\t.word .L%d\n", VALUE
*** 4286,4297 ****
should be used on RISC machines. */
/* #define INTEGRATE_THRESHOLD(DECL) */
- /* Define this if the preprocessor should ignore `#sccs' directives and print
- no error message.
-
- Defined in svr4.h. */
- /* #define SCCS_DIRECTIVE */
-
/* Define this macro if the system header files support C++ as well as C. This
macro inhibits the usual method of using system header files in C++, which
is to pretend that the file's contents are enclosed in `extern "C" {...}'. */
--- 4286,4291 ----
============================================================
Index: gcc/config/i370/i370.h
*** gcc/config/i370/i370.h 2 Jun 2002 22:27:32 -0000 1.45
--- gcc/config/i370/i370.h 17 Jul 2002 19:20:55 -0000
*************** abort(); \
*** 1905,1913 ****
( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
- /* Allow #sccs in preprocessor. */
- #define SCCS_DIRECTIVE
-
/* Implicit library calls should use memcpy, not bcopy, etc. */
#define TARGET_MEM_FUNCTIONS
--- 1905,1910 ----
============================================================
Index: gcc/config/i386/gas.h
*** gcc/config/i386/gas.h 5 Jun 2002 17:01:30 -0000 1.17
--- gcc/config/i386/gas.h 17 Jul 2002 19:20:56 -0000
*************** Boston, MA 02111-1307, USA. */
*** 45,54 ****
#define SDB_DEBUGGING_INFO
- /* Allow #sccs in preprocessor. */
-
- #define SCCS_DIRECTIVE
-
/* Output #ident as a .ident. */
#define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME);
--- 45,50 ----
============================================================
Index: gcc/config/i386/sco5.h
*** gcc/config/i386/sco5.h 16 Jun 2002 21:13:10 -0000 1.67
--- gcc/config/i386/sco5.h 17 Jul 2002 19:20:57 -0000
*************** init_section () \
*** 541,549 ****
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
fputc ('\n', FILE); } while (0)
- #undef SCCS_DIRECTIVE
- #define SCCS_DIRECTIVE 1
-
/*
* Define sizes and types
*/
--- 541,546 ----
============================================================
Index: gcc/config/i960/i960.h
*** gcc/config/i960/i960.h 16 Jul 2002 20:58:59 -0000 1.59
--- gcc/config/i960/i960.h 17 Jul 2002 19:20:57 -0000
*************** struct cum_args { int ca_nregparms; int
*** 1151,1159 ****
/* Define this as 1 if `char' should by default be signed; else as 0. */
#define DEFAULT_SIGNED_CHAR 0
- /* Allow and ignore #sccs directives. */
- #define SCCS_DIRECTIVE
-
/* Max number of bytes we can move from memory to memory
in one reasonably fast instruction. */
#define MOVE_MAX 16
--- 1151,1156 ----
============================================================
Index: gcc/config/m68hc11/m68hc11.h
*** gcc/config/m68hc11/m68hc11.h 16 Jul 2002 02:16:39 -0000 1.46
--- gcc/config/m68hc11/m68hc11.h 17 Jul 2002 19:20:57 -0000
*************** do {
*** 1706,1714 ****
purposes) so give the MEM rtx a byte's mode. */
#define FUNCTION_MODE QImode
- /* define SCCS_DIRECTIVE if SCCS directives should be ignored */
- #define SCCS_DIRECTIVE 1
-
/* Allow $ in identifiers */
#define DOLLARS_IN_IDENTIFIERS 1
--- 1706,1711 ----
============================================================
Index: gcc/config/m68k/3b1.h
*** gcc/config/m68k/3b1.h 20 Dec 2001 17:36:36 -0000 1.14
--- gcc/config/m68k/3b1.h 17 Jul 2002 19:20:57 -0000
*************** Boston, MA 02111-1307, USA. */
*** 50,59 ****
"%{!shlib:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\
%{shlib:crt0s.o%s shlib.ifile%s} "
- /* cpp has to support a #sccs directive for the /usr/include files */
-
- #define SCCS_DIRECTIVE
-
/* Make output for SDB. */
#define SDB_DEBUGGING_INFO
--- 50,55 ----
============================================================
Index: gcc/config/m68k/3b1g.h
*** gcc/config/m68k/3b1g.h 1 Nov 2001 14:49:32 -0000 1.4
--- gcc/config/m68k/3b1g.h 17 Jul 2002 19:20:57 -0000
*************** Boston, MA 02111-1307, USA. */
*** 43,51 ****
/* This is (not really) BSD, so (but) it wants DBX format. */
#define DBX_DEBUGGING_INFO
- /* Brain damage. */
- #define SCCS_DIRECTIVE
-
/* Specify how to pad function arguments.
Value should be `upward', `downward' or `none'.
Same as the default, except no padding for large or variable-size args. */
--- 43,48 ----
============================================================
Index: gcc/config/m68k/crds.h
*** gcc/config/m68k/crds.h 20 Dec 2001 17:36:36 -0000 1.13
--- gcc/config/m68k/crds.h 17 Jul 2002 19:20:58 -0000
*************** Boston, MA 02111-1307, USA. */
*** 68,77 ****
#undef CC1_SPEC
#define CC1_SPEC "%{O2:-fstrength-reduce}"
- /* cpp has to support a #sccs directive for the /usr/include files */
-
- #define SCCS_DIRECTIVE
-
/* Make output for SDB. */
/* #define SDB_DEBUGGING_INFO UNOS casm has no debugging :-( */
--- 68,73 ----
============================================================
Index: gcc/config/m68k/mot3300.h
*** gcc/config/m68k/mot3300.h 20 Dec 2001 17:36:36 -0000 1.24
--- gcc/config/m68k/mot3300.h 17 Jul 2002 19:20:58 -0000
*************** Boston, MA 02111-1307, USA. */
*** 118,127 ****
#undef PARM_BOUNDARY
#define PARM_BOUNDARY 16
- /* cpp has to support a #sccs directive for the /usr/include files */
-
- #define SCCS_DIRECTIVE
-
/* Make output for SDB. */
#define SDB_DEBUGGING_INFO
--- 118,123 ----
============================================================
Index: gcc/config/m68k/pbb.h
*** gcc/config/m68k/pbb.h 1 Nov 2001 14:49:33 -0000 1.5
--- gcc/config/m68k/pbb.h 17 Jul 2002 19:20:58 -0000
*************** Boston, MA 02111-1307, USA. */
*** 83,92 ****
#define ENDFILE_SPEC "crtn.o%s"
- /* cpp has to support a #sccs directive for the /usr/include files */
-
- #define SCCS_DIRECTIVE
-
/* GAS register prefix assembly syntax: */
/* User labels have no prefix */
--- 83,88 ----
============================================================
Index: gcc/config/m88k/m88k.h
*** gcc/config/m88k/m88k.h 16 Jul 2002 20:59:00 -0000 1.63
--- gcc/config/m88k/m88k.h 17 Jul 2002 19:20:59 -0000
*************** enum reg_class { NO_REGS, AP_REG, XRF_RE
*** 1446,1454 ****
/* The 88open ABI says size_t is unsigned int. */
#define SIZE_TYPE "unsigned int"
- /* Allow and ignore #sccs directives */
- #define SCCS_DIRECTIVE
-
/* Handle #pragma pack and sometimes #pragma weak. */
#define HANDLE_SYSV_PRAGMA
--- 1446,1451 ----
============================================================
Index: gcc/config/mips/mips.h
*** gcc/config/mips/mips.h 17 Jul 2002 09:24:08 -0000 1.199
--- gcc/config/mips/mips.h 17 Jul 2002 19:21:00 -0000
*************** do { \
*** 4350,4358 ****
#define ASM_OUTPUT_ASCII(STREAM, STRING, LEN) \
mips_output_ascii (STREAM, STRING, LEN)
- /* Handle certain cpp directives used in header files on sysV. */
- #define SCCS_DIRECTIVE
-
/* Output #ident as a in the read-only data section. */
#undef ASM_OUTPUT_IDENT
#define ASM_OUTPUT_IDENT(FILE, STRING) \
--- 4350,4355 ----
============================================================
Index: gcc/config/sparc/pbd.h
*** gcc/config/sparc/pbd.h 27 Mar 2002 10:30:43 -0000 1.10
--- gcc/config/sparc/pbd.h 17 Jul 2002 19:21:01 -0000
*************** Boston, MA 02111-1307, USA. */
*** 59,68 ****
#define ENDFILE_SPEC "crtn.o%s"
- /* cpp has to support a #sccs directive for the /usr/include files */
-
- #define SCCS_DIRECTIVE
-
/* LINK_SPEC is needed only for SunOS 4. */
#undef LINK_SPEC
--- 59,64 ----
============================================================
Index: gcc/config/stormy16/stormy16.h
*** gcc/config/stormy16/stormy16.h 16 Jul 2002 20:59:07 -0000 1.51
--- gcc/config/stormy16/stormy16.h 17 Jul 2002 19:21:02 -0000
*************** do { \
*** 3923,3934 ****
should be used on RISC machines. */
/* #define INTEGRATE_THRESHOLD(DECL) */
- /* Define this if the preprocessor should ignore `#sccs' directives and print
- no error message.
-
- Defined in svr4.h. */
- /* #define SCCS_DIRECTIVE */
-
/* Define this macro if the system header files support C++ as well as C. This
macro inhibits the usual method of using system header files in C++, which
is to pretend that the file's contents are enclosed in `extern "C" {...}'. */
--- 3923,3928 ----
============================================================
Index: gcc/config/vax/vaxv.h
*** gcc/config/vax/vaxv.h 12 Jun 2002 00:02:07 -0000 1.8
--- gcc/config/vax/vaxv.h 17 Jul 2002 19:21:02 -0000
*************** along with GNU CC; see the file COPYING.
*** 18,27 ****
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
- /* Cope with these under SysV */
-
- #define SCCS_DIRECTIVE
-
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
--- 18,23 ----
============================================================
Index: gcc/doc/cpp.texi
*** gcc/doc/cpp.texi 9 Jul 2002 22:21:37 -0000 1.37
--- gcc/doc/cpp.texi 17 Jul 2002 19:21:04 -0000
*************** This directive is not part of the C stan
*** 3252,3259 ****
GNU extension either. We believe it came from System V@.
@findex #sccs
! The @samp{#sccs} directive is recognized on some systems, because it
! appears in their header files. 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.
--- 3252,3259 ----
GNU extension either. We believe it came from System V@.
@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.
============================================================
Index: gcc/doc/tm.texi
*** gcc/doc/tm.texi 16 Jul 2002 02:16:45 -0000 1.145
--- gcc/doc/tm.texi 17 Jul 2002 19:21:08 -0000
*************** Defining @code{STDC_0_IN_SYSTEM_HEADERS}
*** 8584,8594 ****
convention when processing system header files, but when processing user
files @code{__STDC__} will always expand to 1.
- @findex SCCS_DIRECTIVE
- @item SCCS_DIRECTIVE
- Define this if the preprocessor should ignore @code{#sccs} directives
- and print no error message.
-
@findex NO_IMPLICIT_EXTERN_C
@item NO_IMPLICIT_EXTERN_C
Define this macro if the system header files support C++ as well as C@.
--- 8584,8589 ----