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]

C++ PATCH: PR 15815


This patch deprecates "#pragma interface" and "#pragma implementation"
as per PR 15815.  I'll remove these before 3.5.0.

Gerald, are we supposed to add to the top of gcc-3.4/changes.html or
make a new file to announce these kinds of changes?

Tested on i686-pc-linux-gnu, applied on the 3.4 branch and the
mainline.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2004-06-07  Mark Mitchell  <mark@codesourcery.com>

	PR c++/15815
	* lex.c (handle_pragma_interface): Deprecate.
	(handle_pragma_implementation): Likewise.

2004-06-07  Mark Mitchell  <mark@codesourcery.com>

	PR c++/15815
	* doc/extend.texi: Deprecate #pragma interface and #pragma
	implementation.

Index: cp/lex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/lex.c,v
retrieving revision 1.323.2.2
diff -c -5 -p -r1.323.2.2 lex.c
*** cp/lex.c	1 Mar 2004 20:39:10 -0000	1.323.2.2
--- cp/lex.c	7 Jun 2004 19:16:00 -0000
*************** handle_pragma_interface (cpp_reader* dfi
*** 528,537 ****
--- 528,540 ----
  {
    tree fname = parse_strconst_pragma ("interface", 1);
    struct c_fileinfo *finfo;
    const char *main_filename;
  
+   warning ("`#pragma interface' is deprecated and will be removed in a "
+ 	   "future version of GCC");
+ 
    if (fname == (tree)-1)
      return;
    else if (fname == 0)
      main_filename = lbasename (input_filename);
    else
*************** handle_pragma_implementation (cpp_reader
*** 570,579 ****
--- 573,585 ----
  {
    tree fname = parse_strconst_pragma ("implementation", 1);
    const char *main_filename;
    struct impl_files *ifiles = impl_file_chain;
  
+   warning ("`#pragma implementation' is deprecated and will be removed in a "
+ 	   "future version of GCC");
+ 
    if (fname == (tree)-1)
      return;
  
    if (fname == 0)
      {
Index: doc/extend.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/extend.texi,v
retrieving revision 1.177.4.9
diff -c -5 -p -r1.177.4.9 extend.texi
*** doc/extend.texi	15 May 2004 10:04:03 -0000	1.177.4.9
--- doc/extend.texi	7 Jun 2004 19:16:00 -0000
*************** use of the header file.
*** 7968,7977 ****
--- 7968,7980 ----
  
  @table @code
  @item #pragma interface
  @itemx #pragma interface "@var{subdir}/@var{objects}.h"
  @kindex #pragma interface
+ This @samp{#pragma} has been deprecated and will be removed in a
+ future release of GCC.
+ 
  Use this directive in @emph{header files} that define object classes, to save
  space in most of the object files that use those classes.  Normally,
  local copies of certain information (backup copies of inline member
  functions, debugging information, and the internal tables that implement
  virtual functions) must be kept in each object file that includes class
*************** use this form, you must specify the same
*** 7988,7997 ****
--- 7991,8003 ----
  implementation}.
  
  @item #pragma implementation
  @itemx #pragma implementation "@var{objects}.h"
  @kindex #pragma implementation
+ This @samp{#pragma} has been deprecated and will be removed in a
+ future release of GCC.
+ 
  Use this pragma in a @emph{main input file}, when you want full output from
  included header files to be generated (and made globally visible).  The
  included header file, in turn, should use @samp{#pragma interface}.
  Backup copies of inline member functions, debugging information, and the
  internal tables used to implement virtual functions are all generated in


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