aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2003-01-01 12:27:02 +0000
committerNeil Booth <neil@gcc.gnu.org>2003-01-01 12:27:02 +0000
commitc58b209a5dbfc740b7fa58b54fcf876fe37fd941 (patch)
tree084056090b17ca08c6d590d93ec42d45ceee9b53 /gcc
parent7347c2c511c96c1300b8eaa1570107f4a5251016 (diff)
downloadgcc-c58b209a5dbfc740b7fa58b54fcf876fe37fd941.zip
gcc-c58b209a5dbfc740b7fa58b54fcf876fe37fd941.tar.gz
gcc-c58b209a5dbfc740b7fa58b54fcf876fe37fd941.tar.bz2
c-pragma.c (c_register_pragma): New.
* 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. From-SVN: r60740
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog19
-rw-r--r--gcc/c-pragma.c26
-rw-r--r--gcc/c-pragma.h17
-rw-r--r--gcc/config/arm/arm.h10
-rw-r--r--gcc/config/c4x/c4x.h27
-rw-r--r--gcc/config/darwin.h14
-rw-r--r--gcc/config/h8300/h8300.h14
-rw-r--r--gcc/config/i370/i370.h7
-rw-r--r--gcc/config/i960/i960.h6
-rw-r--r--gcc/config/ia64/hpux.h6
-rw-r--r--gcc/config/rs6000/rs6000.h6
-rw-r--r--gcc/config/sh/sh.h12
-rw-r--r--gcc/config/v850/v850.h20
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/lex.c27
-rw-r--r--gcc/cpplib.h5
-rw-r--r--gcc/doc/tm.texi13
17 files changed, 124 insertions, 111 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f924aac..b441b78 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,22 @@
+2003-01-01 Neil Booth <neil@daikokuya.co.uk>
+
+ * 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
+
2002-12-31 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300-protos.h: Update the prototypes.
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c
index a2e4c68..d489cdc 100644
--- a/gcc/c-pragma.c
+++ b/gcc/c-pragma.c
@@ -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, asmname)
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
}
diff --git a/gcc/c-pragma.h b/gcc/c-pragma.h
index 7911c5a..d90be3d 100644
--- a/gcc/c-pragma.h
+++ b/gcc/c-pragma.h
@@ -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));
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 186664c..0339641 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -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_string;
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. */
diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h
index e75769b..e073374 100644
--- a/gcc/config/c4x/c4x.h
+++ b/gcc/config/c4x/c4x.h
@@ -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. */
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 88efab4..020bc1f 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -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
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index 384ddd2..07a011f 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -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) \
diff --git a/gcc/config/i370/i370.h b/gcc/config/i370/i370.h
index 8021033..2011742 100644
--- a/gcc/config/i370/i370.h
+++ b/gcc/config/i370/i370.h
@@ -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. */
diff --git a/gcc/config/i960/i960.h b/gcc/config/i960/i960.h
index 3ce98e2..3b84d04 100644
--- a/gcc/config/i960/i960.h
+++ b/gcc/config/i960/i960.h
@@ -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. */
diff --git a/gcc/config/ia64/hpux.h b/gcc/config/ia64/hpux.h
index 1e6f699..d11d8ec 100644
--- a/gcc/config/ia64/hpux.h
+++ b/gcc/config/ia64/hpux.h
@@ -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
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index b447dcc..b5876bd 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -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. */
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 4d27e64..474fa73 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -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_reorg_phase;
#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. */
diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h
index aab4dd9..29c9921 100644
--- a/gcc/config/v850/v850.h
+++ b/gcc/config/v850/v850.h
@@ -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
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b872bb0..f5b3fd2 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2003-01-01 Neil Booth <neil@daikokuya.co.uk>
+
+ * lex.c: Remove superfluous include of cpplib.h.
+ (CONSTRAINT): Define without conditions.
+ (init_cp_pragma): Use c_register_pragma.
+
2002-12-31 Neil Booth <neil@daikokuya.co.uk>
* .cvsignore: Remove.
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 693e75d..2975399 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -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
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index fe1f89c..271a755 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -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, Boston, MA 02111-1307, USA.
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;
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 8436e89..76160f0 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -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 must use
@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 pragma lines are not expanded. All
@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