This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Get rid of cpplib.h dependency on c-pragma.h


This is an old and unnecessary dependency, which gets in the way,
particularly as we want to move cpplib.h out of the gcc/ directory.

The patch is little more than a search/replace.

Bootstrapped x86 Linux and on compiled on a powerpc-eabisim cross,
applied.

Neil.

	* c-pragma.c (c_register_pragma): New.
	(init_pragma): Use it.
	* c-pragma.h (cpp_register_pragma): Don't declare.
	(c_register_pragma): New.
	* cpplib.h: Remove #ifdef GCC_C_PRAGMA_H.
	* config/darwin.h (REGISTER_TARGET_PRAGMAS): Update.
	* config/arm/arm.h (REGISTER_TARGET_PRAGMAS): Update.
	* config/c4x/c4x.h (REGISTER_TARGET_PRAGMAS): Update.
	* config/h8300/h8300.h (REGISTER_TARGET_PRAGMAS): Update.
	* config/i370/i370.h (REGISTER_TARGET_PRAGMAS): Update.
	* config/i960/i960.h (REGISTER_TARGET_PRAGMAS): Update.
	* config/ia64/hpux.h (REGISTER_TARGET_PRAGMAS): Update.
	* config/rs6000/rs6000.h (REGISTER_TARGET_PRAGMAS): Update.
	* config/sh/sh.h (REGISTER_TARGET_PRAGMAS): Update.
	* config/v850/v850.h (REGISTER_TARGET_PRAGMAS): Update.
	* doc/tm.texi (REGISTER_TARGET_PRAGMAS): Update
cp:
	* lex.c: Remove superfluous include of cpplib.h.
	(CONSTRAINT): Define without conditions.
	(init_cp_pragma): Use c_register_pragma.

============================================================
Index: gcc/c-pragma.c
--- gcc/c-pragma.c	16 Dec 2002 18:19:04 -0000	1.55
+++ gcc/c-pragma.c	1 Jan 2003 12:22:33 -0000
@@ -1,5 +1,5 @@
 /* Handle #pragma, system V.4 style.  Supports #pragma weak and #pragma pack.
-   Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002
+   Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -483,26 +483,36 @@ maybe_apply_renaming_pragma (decl, asmna
   return asmname;
 }
 
+/* Front-end wrapper for pragma registration to avoid dragging
+   cpplib.h in almost everywhere.  */
+void
+c_register_pragma (space, name, handler)
+     const char *space;
+     const char *name;
+     void (*handler) PARAMS ((struct cpp_reader *));
+{
+  cpp_register_pragma (parse_in, space, name, handler);
+}
+
+/* Set up front-end pragmas.  */
 void
 init_pragma ()
 {
 #ifdef HANDLE_PRAGMA_PACK
-  cpp_register_pragma (parse_in, 0, "pack", handle_pragma_pack);
+  c_register_pragma (0, "pack", handle_pragma_pack);
 #endif
 #ifdef HANDLE_PRAGMA_WEAK
-  cpp_register_pragma (parse_in, 0, "weak", handle_pragma_weak);
+  c_register_pragma (0, "weak", handle_pragma_weak);
 #endif
 #ifdef HANDLE_PRAGMA_REDEFINE_EXTNAME
-  cpp_register_pragma (parse_in, 0, "redefine_extname",
-		       handle_pragma_redefine_extname);
+  c_register_pragma (0, "redefine_extname", handle_pragma_redefine_extname);
 #endif
 #ifdef HANDLE_PRAGMA_EXTERN_PREFIX
-  cpp_register_pragma (parse_in, 0, "extern_prefix",
-		       handle_pragma_extern_prefix);
+  c_register_pragma (0, "extern_prefix", handle_pragma_extern_prefix);
 #endif
 
 #ifdef REGISTER_TARGET_PRAGMAS
-  REGISTER_TARGET_PRAGMAS (parse_in);
+  REGISTER_TARGET_PRAGMAS ();
 #endif
 }
 
============================================================
Index: gcc/c-pragma.h
--- gcc/c-pragma.h	8 Jul 2002 17:53:24 -0000	1.31
+++ gcc/c-pragma.h	1 Jan 2003 12:22:33 -0000
@@ -1,5 +1,5 @@
 /* Pragma related interfaces.
-   Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002
+   Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -50,16 +50,11 @@ extern struct cpp_reader* parse_in;
 
 extern void init_pragma PARAMS ((void));
 
-/* Duplicate prototypes for the register_pragma stuff and the typedef for
-   cpp_reader, to avoid dragging cpplib.h in almost everywhere...  */
-#ifndef GCC_CPPLIB_H
-typedef struct cpp_reader cpp_reader;
-
-extern void cpp_register_pragma PARAMS ((cpp_reader *,
-					 const char *, const char *,
-					 void (*) PARAMS ((cpp_reader *))));
-#endif
-
+/* Front-end wrapper for pragma registration to avoid dragging
+   cpplib.h in almost everywhere.  */
+extern void c_register_pragma
+	PARAMS ((const char *, const char *,
+		 void (*) PARAMS ((struct cpp_reader *))));
 extern void maybe_apply_pragma_weak PARAMS ((tree));
 extern tree maybe_apply_renaming_pragma PARAMS ((tree, tree));
 extern void add_to_renaming_pragma_list PARAMS ((tree, tree));
============================================================
Index: gcc/cpplib.h
--- gcc/cpplib.h	16 Dec 2002 18:19:18 -0000	1.238
+++ gcc/cpplib.h	1 Jan 2003 12:22:34 -0000
@@ -1,5 +1,5 @@
 /* Definitions for CPP library.
-   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Written by Per Bothner, 1994-95.
 
@@ -31,10 +31,7 @@ Foundation, 59 Temple Place - Suite 330,
 extern "C" {
 #endif
 
-/* For complex reasons, cpp_reader is also typedefed in c-pragma.h.  */
-#ifndef GCC_C_PRAGMA_H
 typedef struct cpp_reader cpp_reader;
-#endif
 typedef struct cpp_buffer cpp_buffer;
 typedef struct cpp_options cpp_options;
 typedef struct cpp_token cpp_token;
============================================================
Index: gcc/config/darwin.h
--- gcc/config/darwin.h	19 Dec 2002 23:46:48 -0000	1.45
+++ gcc/config/darwin.h	1 Jan 2003 12:22:34 -0000
@@ -1,5 +1,5 @@
 /* Target definitions for Darwin (Mac OS X) systems.
-   Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002
+   Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Contributed by Apple Computer Inc.
 
@@ -793,12 +793,12 @@ enum machopic_addr_class {
 
 #define TARGET_TERMINATE_DW2_EH_FRAME_INFO false
 
-#define DARWIN_REGISTER_TARGET_PRAGMAS(PFILE)				\
-  do {									\
-    cpp_register_pragma (PFILE, 0, "mark", darwin_pragma_ignore);	\
-    cpp_register_pragma (PFILE, 0, "options", darwin_pragma_options);	\
-    cpp_register_pragma (PFILE, 0, "segment", darwin_pragma_ignore);	\
-    cpp_register_pragma (PFILE, 0, "unused", darwin_pragma_unused);	\
+#define DARWIN_REGISTER_TARGET_PRAGMAS()			\
+  do {								\
+    c_register_pragma (0, "mark", darwin_pragma_ignore);	\
+    c_register_pragma (0, "options", darwin_pragma_options);	\
+    c_register_pragma (0, "segment", darwin_pragma_ignore);	\
+    c_register_pragma (0, "unused", darwin_pragma_unused);	\
   } while (0)
 
 #undef ASM_APP_ON
============================================================
Index: gcc/config/arm/arm.h
--- gcc/config/arm/arm.h	16 Dec 2002 18:20:56 -0000	1.169
+++ gcc/config/arm/arm.h	1 Jan 2003 12:22:35 -0000
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for ARM.
    Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002 Free Software Foundation, Inc.
+   2001, 2002, 2003 Free Software Foundation, Inc.
    Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
    and Martin Simmons (@harleqn.co.uk).
    More major hacks by Richard Earnshaw (rearnsha@arm.com)
@@ -2438,10 +2438,10 @@ extern const char * arm_pic_register_str
 extern int making_const_table;
 
 /* Handle pragmas for compatibility with Intel's compilers.  */
-#define REGISTER_TARGET_PRAGMAS(PFILE) do { \
-  cpp_register_pragma (PFILE, 0, "long_calls", arm_pr_long_calls); \
-  cpp_register_pragma (PFILE, 0, "no_long_calls", arm_pr_no_long_calls); \
-  cpp_register_pragma (PFILE, 0, "long_calls_off", arm_pr_long_calls_off); \
+#define REGISTER_TARGET_PRAGMAS() do {					\
+  c_register_pragma (0, "long_calls", arm_pr_long_calls);		\
+  c_register_pragma (0, "no_long_calls", arm_pr_no_long_calls);		\
+  c_register_pragma (0, "long_calls_off", arm_pr_long_calls_off);	\
 } while (0)
 
 /* Condition code information. */
============================================================
Index: gcc/config/c4x/c4x.h
--- gcc/config/c4x/c4x.h	20 Dec 2002 04:30:41 -0000	1.118
+++ gcc/config/c4x/c4x.h	1 Jan 2003 12:22:36 -0000
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.  TMS320C[34]x
-   Copyright (C) 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+   2003 Free Software Foundation, Inc.
 
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
               and Herman Ten Brugge (Haj.Ten.Brugge@net.HCC.nl).
@@ -1837,18 +1837,17 @@ do {						\
 #define PRINT_OPERAND_ADDRESS(FILE, X) c4x_print_operand_address(FILE, X)
 
 /* C4x specific pragmas.  */
-#define REGISTER_TARGET_PRAGMAS(PFILE) do {				\
-  cpp_register_pragma (PFILE, 0, "CODE_SECTION", c4x_pr_CODE_SECTION);	\
-  cpp_register_pragma (PFILE, 0, "DATA_SECTION", c4x_pr_DATA_SECTION);	\
-  cpp_register_pragma (PFILE, 0, "FUNC_CANNOT_INLINE", c4x_pr_ignored);	\
-  cpp_register_pragma (PFILE, 0, "FUNC_EXT_CALLED", c4x_pr_ignored);	\
-  cpp_register_pragma (PFILE, 0, "FUNC_IS_PURE", c4x_pr_FUNC_IS_PURE);	\
-  cpp_register_pragma (PFILE, 0, "FUNC_IS_SYSTEM", c4x_pr_ignored);	\
-  cpp_register_pragma (PFILE, 0, "FUNC_NEVER_RETURNS",			\
-		       c4x_pr_FUNC_NEVER_RETURNS);			\
-  cpp_register_pragma (PFILE, 0, "FUNC_NO_GLOBAL_ASG", c4x_pr_ignored);	\
-  cpp_register_pragma (PFILE, 0, "FUNC_NO_IND_ASG", c4x_pr_ignored);	\
-  cpp_register_pragma (PFILE, 0, "INTERRUPT", c4x_pr_INTERRUPT);	\
+#define REGISTER_TARGET_PRAGMAS() do {					  \
+  c_register_pragma (0, "CODE_SECTION", c4x_pr_CODE_SECTION);		  \
+  c_register_pragma (0, "DATA_SECTION", c4x_pr_DATA_SECTION);		  \
+  c_register_pragma (0, "FUNC_CANNOT_INLINE", c4x_pr_ignored);		  \
+  c_register_pragma (0, "FUNC_EXT_CALLED", c4x_pr_ignored);		  \
+  c_register_pragma (0, "FUNC_IS_PURE", c4x_pr_FUNC_IS_PURE);		  \
+  c_register_pragma (0, "FUNC_IS_SYSTEM", c4x_pr_ignored);		  \
+  c_register_pragma (0, "FUNC_NEVER_RETURNS", c4x_pr_FUNC_NEVER_RETURNS); \
+  c_register_pragma (0, "FUNC_NO_GLOBAL_ASG", c4x_pr_ignored);		  \
+  c_register_pragma (0, "FUNC_NO_IND_ASG", c4x_pr_ignored);		  \
+  c_register_pragma (0, "INTERRUPT", c4x_pr_INTERRUPT);			  \
 } while (0)
 
 /* Assembler Commands for Alignment.  */
============================================================
Index: gcc/config/h8300/h8300.h
--- gcc/config/h8300/h8300.h	31 Dec 2002 18:31:59 -0000	1.128
+++ gcc/config/h8300/h8300.h	1 Jan 2003 12:22:36 -0000
@@ -1,7 +1,7 @@
 /* Definitions of target machine for GNU compiler.
    Hitachi H8/300 version generating coff
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002 Free Software Foundation, Inc.
+   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    Contributed by Steve Chamberlain (sac@cygnus.com),
    Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
 
@@ -1257,12 +1257,12 @@ struct cum_arg
 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
 
 /* H8300 specific pragmas.  */
-#define REGISTER_TARGET_PRAGMAS(PFILE)					\
-  do									\
-    {									\
-      cpp_register_pragma (PFILE, 0, "saveall", h8300_pr_saveall);	\
-      cpp_register_pragma (PFILE, 0, "interrupt", h8300_pr_interrupt);	\
-    }									\
+#define REGISTER_TARGET_PRAGMAS()				\
+  do								\
+    {								\
+      c_register_pragma (0, "saveall", h8300_pr_saveall);	\
+      c_register_pragma (0, "interrupt", h8300_pr_interrupt);	\
+    }								\
   while (0)
 
 #define FINAL_PRESCAN_INSN(insn, operand, nop)	\
============================================================
Index: gcc/config/i370/i370.h
--- gcc/config/i370/i370.h	16 Dec 2002 18:21:16 -0000	1.54
+++ gcc/config/i370/i370.h	1 Jan 2003 12:22:37 -0000
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.  System/370 version.
-   Copyright (C) 1989, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-   Free Software Foundation, Inc.
+   Copyright (C) 1989, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+   2003 Free Software Foundation, Inc.
    Contributed by Jan Stein (jan@cd.chalmers.se).
    Modified for OS/390 LanguageEnvironment C by Dave Pitts (dpitts@cozx.com)
    Hacked for Linux-ELF/390 by Linas Vepstas (linas@linas.org)
@@ -150,8 +150,7 @@ extern int mvs_function_name_length;
 
 #ifdef TARGET_HLASM
 /* HLASM requires #pragma map.  */
-#define REGISTER_TARGET_PRAGMAS(PFILE) \
-  cpp_register_pragma (PFILE, 0, "map", i370_pr_map)
+#define REGISTER_TARGET_PRAGMAS() c_register_pragma (0, "map", i370_pr_map)
 #endif /* TARGET_HLASM */
 
 /* Define maximum length of page minus page escape overhead.  */
============================================================
Index: gcc/config/i960/i960.h
--- gcc/config/i960/i960.h	16 Dec 2002 18:21:23 -0000	1.70
+++ gcc/config/i960/i960.h	1 Jan 2003 12:22:37 -0000
@@ -130,9 +130,9 @@ Boston, MA 02111-1307, USA.  */
 extern int i960_maxbitalignment;
 extern int i960_last_maxbitalignment;
 
-#define REGISTER_TARGET_PRAGMAS(PFILE) do {			\
-  cpp_register_pragma (PFILE, 0, "align", i960_pr_align);	\
-  cpp_register_pragma (PFILE, 0, "noalign", i960_pr_noalign);	\
+#define REGISTER_TARGET_PRAGMAS() do {			\
+  c_register_pragma (0, "align", i960_pr_align);	\
+  c_register_pragma (0, "noalign", i960_pr_noalign);	\
 } while (0)
 
 /* Run-time compilation parameters selecting different hardware subsets.  */
============================================================
Index: gcc/config/ia64/hpux.h
--- gcc/config/ia64/hpux.h	9 Dec 2002 18:07:58 -0000	1.20
+++ gcc/config/ia64/hpux.h	1 Jan 2003 12:22:37 -0000
@@ -1,5 +1,5 @@
 /* Definitions of target machine GNU compiler.  IA-64 version.
-   Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    Contributed by Steve Ellcey <sje@cup.hp.com> and
                   Reva Cuthbertson <reva@cup.hp.com>
 
@@ -130,8 +130,8 @@ do {								\
 #undef PAD_VARARGS_DOWN
 #define PAD_VARARGS_DOWN (!AGGREGATE_TYPE_P (type))
 
-#define REGISTER_TARGET_PRAGMAS(PFILE) \
-  cpp_register_pragma (PFILE, 0, "builtin", ia64_hpux_handle_builtin_pragma)
+#define REGISTER_TARGET_PRAGMAS() \
+  c_register_pragma (0, "builtin", ia64_hpux_handle_builtin_pragma)
 
 /* Tell ia64.c that we are using the HP linker and we should delay output of
    function extern declarations so that we don't output them for functions
============================================================
Index: gcc/config/rs6000/rs6000.h
--- gcc/config/rs6000/rs6000.h	31 Dec 2002 01:05:21 -0000	1.241
+++ gcc/config/rs6000/rs6000.h	1 Jan 2003 12:22:38 -0000
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for IBM RS/6000.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002 Free Software Foundation, Inc.
+   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
 
 This file is part of GNU CC.
@@ -460,8 +460,8 @@ extern int rs6000_default_long_calls;
 #define CAN_DEBUG_WITHOUT_FP
 
 /* Target pragma.  */
-#define REGISTER_TARGET_PRAGMAS(PFILE) do { \
-  cpp_register_pragma (PFILE, 0, "longcall", rs6000_pragma_longcall); \
+#define REGISTER_TARGET_PRAGMAS() do {				\
+  c_register_pragma (0, "longcall", rs6000_pragma_longcall);	\
 } while (0)
 
 /* Target #defines.  */
============================================================
Index: gcc/config/sh/sh.h
--- gcc/config/sh/sh.h	16 Dec 2002 18:21:55 -0000	1.181
+++ gcc/config/sh/sh.h	1 Jan 2003 12:22:40 -0000
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler for Hitachi / SuperH SH.
-   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-   Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+   2003 Free Software Foundation, Inc.
    Contributed by Steve Chamberlain (sac@cygnus.com).
    Improved by Jim Wilson (wilson@cygnus.com).
 
@@ -3165,10 +3165,10 @@ extern enum mdep_reorg_phase_e mdep_reor
 #define TARGET_MEM_FUNCTIONS
 
 /* Handle Hitachi compiler's pragmas.  */
-#define REGISTER_TARGET_PRAGMAS(PFILE) do {				    \
-  cpp_register_pragma (PFILE, 0, "interrupt", sh_pr_interrupt);		    \
-  cpp_register_pragma (PFILE, 0, "trapa", sh_pr_trapa);			    \
-  cpp_register_pragma (PFILE, 0, "nosave_low_regs", sh_pr_nosave_low_regs); \
+#define REGISTER_TARGET_PRAGMAS() do {					\
+  c_register_pragma (0, "interrupt", sh_pr_interrupt);			\
+  c_register_pragma (0, "trapa", sh_pr_trapa);				\
+  c_register_pragma (0, "nosave_low_regs", sh_pr_nosave_low_regs);	\
 } while (0)
 
 /* Set when processing a function with pragma interrupt turned on.  */
============================================================
Index: gcc/config/v850/v850.h
--- gcc/config/v850/v850.h	16 Dec 2002 18:22:02 -0000	1.76
+++ gcc/config/v850/v850.h	1 Jan 2003 12:22:40 -0000
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler. NEC V850 series
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Contributed by Jeff Law (law@cygnus.com).
 
@@ -1413,15 +1413,15 @@ zbss_section ()								\
 #define FUNCTION_MODE QImode
 
 /* Tell compiler we want to support GHS pragmas */
-#define REGISTER_TARGET_PRAGMAS(PFILE) do {				  \
-  cpp_register_pragma (PFILE, "ghs", "interrupt", ghs_pragma_interrupt);  \
-  cpp_register_pragma (PFILE, "ghs", "section",   ghs_pragma_section);    \
-  cpp_register_pragma (PFILE, "ghs", "starttda",  ghs_pragma_starttda);   \
-  cpp_register_pragma (PFILE, "ghs", "startsda",  ghs_pragma_startsda);   \
-  cpp_register_pragma (PFILE, "ghs", "startzda",  ghs_pragma_startzda);   \
-  cpp_register_pragma (PFILE, "ghs", "endtda",    ghs_pragma_endtda);	  \
-  cpp_register_pragma (PFILE, "ghs", "endsda",    ghs_pragma_endsda);	  \
-  cpp_register_pragma (PFILE, "ghs", "endzda",    ghs_pragma_endzda);	  \
+#define REGISTER_TARGET_PRAGMAS() do {				\
+  c_register_pragma ("ghs", "interrupt", ghs_pragma_interrupt);	\
+  c_register_pragma ("ghs", "section",   ghs_pragma_section);	\
+  c_register_pragma ("ghs", "starttda",  ghs_pragma_starttda);	\
+  c_register_pragma ("ghs", "startsda",  ghs_pragma_startsda);	\
+  c_register_pragma ("ghs", "startzda",  ghs_pragma_startzda);	\
+  c_register_pragma ("ghs", "endtda",    ghs_pragma_endtda);	\
+  c_register_pragma ("ghs", "endsda",    ghs_pragma_endsda);	\
+  c_register_pragma ("ghs", "endzda",    ghs_pragma_endzda);	\
 } while (0)
 
 /* enum GHS_SECTION_KIND is an enumeration of the kinds of sections that
============================================================
Index: gcc/cp/lex.c
--- gcc/cp/lex.c	1 Jan 2003 11:58:57 -0000	1.297
+++ gcc/cp/lex.c	1 Jan 2003 12:22:40 -0000
@@ -1,6 +1,6 @@
 /* Separate lexical analyzer for GNU C++.
    Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    Hacked by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GCC.
@@ -61,13 +61,7 @@ static void init_operators PARAMS ((void
 static void copy_lang_type PARAMS ((tree));
 
 /* A constraint that can be tested at compile time.  */
-#ifdef __STDC__
 #define CONSTRAINT(name, expr) extern int constraint_##name [(expr) ? 1 : -1]
-#else
-#define CONSTRAINT(name, expr) extern int constraint_/**/name [(expr) ? 1 : -1]
-#endif
-
-#include "cpplib.h"
 
 /* Functions and data structures for #pragma interface.
 
@@ -403,18 +397,13 @@ init_reswords ()
 static void
 init_cp_pragma ()
 {
-  cpp_register_pragma (parse_in, 0, "vtable", handle_pragma_vtable);
-  cpp_register_pragma (parse_in, 0, "unit", handle_pragma_unit);
-
-  cpp_register_pragma (parse_in, 0, "interface", handle_pragma_interface);
-  cpp_register_pragma (parse_in, 0, "implementation",
-		       handle_pragma_implementation);
-
-  cpp_register_pragma (parse_in, "GCC", "interface", handle_pragma_interface);
-  cpp_register_pragma (parse_in, "GCC", "implementation",
-		       handle_pragma_implementation);
-  cpp_register_pragma (parse_in, "GCC", "java_exceptions",
-		       handle_pragma_java_exceptions);
+  c_register_pragma (0, "vtable", handle_pragma_vtable);
+  c_register_pragma (0, "unit", handle_pragma_unit);
+  c_register_pragma (0, "interface", handle_pragma_interface);
+  c_register_pragma (0, "implementation", handle_pragma_implementation);
+  c_register_pragma ("GCC", "interface", handle_pragma_interface);
+  c_register_pragma ("GCC", "implementation", handle_pragma_implementation);
+  c_register_pragma ("GCC", "java_exceptions", handle_pragma_java_exceptions);
 }
 
 /* Initialize the C++ front end.  This function is very sensitive to
============================================================
Index: gcc/doc/tm.texi
--- gcc/doc/tm.texi	23 Dec 2002 16:39:36 -0000	1.185
+++ gcc/doc/tm.texi	1 Jan 2003 12:22:44 -0000
@@ -1,5 +1,5 @@
-@c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002
-@c Free Software Foundation, Inc.
+@c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,
+@c 2002, 2003 Free Software Foundation, Inc.
 @c This is part of the GCC manual.
 @c For copying conditions, see the file gcc.texi.
 
@@ -8785,11 +8785,10 @@ This macro is no longer supported.  You 
 @findex REGISTER_TARGET_PRAGMAS
 @findex #pragma
 @findex pragma
-@item REGISTER_TARGET_PRAGMAS (@var{pfile})
+@item REGISTER_TARGET_PRAGMAS ()
 Define this macro if you want to implement any target-specific pragmas.
 If defined, it is a C expression which makes a series of calls to
-@code{cpp_register_pragma} for each pragma, with @var{pfile} passed as
-the first argument to to these functions.  The macro may also do any
+@code{c_register_pragma} for each pragma.  The macro may also do any
 setup required for the pragmas.
 
 The primary reason to define this macro is to provide compatibility with
@@ -8803,9 +8802,9 @@ Preprocessor macros that appear on pragm
 @samp{#pragma} directives that do not match any registered pragma are
 silently ignored, unless the user specifies @option{-Wunknown-pragmas}.
 
-@deftypefun void cpp_register_pragma (cpp_reader *@var{pfile}, const char *@var{space}, const char *@var{name}, void (*@var{callback}) (cpp_reader *))
+@deftypefun void c_register_pragma (const char *@var{space}, const char *@var{name}, void (*@var{callback}) (struct cpp_reader *))
 
-Each call to @code{cpp_register_pragma} establishes one pragma.  The
+Each call to @code{c_register_pragma} establishes one pragma.  The
 @var{callback} routine will be called when the preprocessor encounters a
 pragma of the form
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]