shebs       02/08/11 12:22:09

  Modified:    gcc      cppinit.c
               gcc/cp   cp-lang.c cp-tree.h lang-specs.h lex.c
               gcc/objc lang-specs.h objc-lang.c
               gcc/objcp lang-specs.h
               gcc/testsuite/lib objc++.exp
  Removed:     gcc      c-lang.h
               gcc/cp   cp-lang.h
  Log:
  Fix ObjC++ testing, fix ObjC++ problems revealed thereby, fix lang-specs.h
  in general.
  
  Revision  Changes    Path
  1.64      +0 -1      gcc3/gcc/cppinit.c
  
  Index: cppinit.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cppinit.c,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- cppinit.c 2002/08/07 03:13:07     1.63
  +++ cppinit.c 2002/08/11 19:22:05     1.64
  @@ -578,7 +578,6 @@
     /* Suppress warnings about missing newlines at ends of files.  */
     CPP_OPTION (pfile, warn_newline_at_eof) = 0;
     /* APPLE LOCAL end -Wnewline-eof 2001-08-23 sts */
  -  CPP_OPTION (pfile, warn_import) = 1;
     CPP_OPTION (pfile, warn_multichar) = 1;
     CPP_OPTION (pfile, discard_comments) = 1;
     CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1;
  
  
  
  1.16      +71 -6     gcc3/gcc/cp/cp-lang.c
  
  Index: cp-lang.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cp/cp-lang.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- cp-lang.c 2002/08/08 03:20:00     1.15
  +++ cp-lang.c 2002/08/11 19:22:06     1.16
  @@ -30,26 +30,28 @@
   
   /* APPLE LOCAL PFE */
   #include "pfe/pfe.h"
  +#ifdef OBJCPLUS
  +#include "pfe/objc-freeze-thaw.h"
  +#else
   #include "pfe/cp-freeze-thaw.h"
  +#endif
   
   static HOST_WIDE_INT cxx_get_alias_set PARAMS ((tree));
   static bool ok_to_generate_alias_set_for_type PARAMS ((tree));
   static bool cxx_warn_unused_global_decl PARAMS ((tree));
   
   #undef LANG_HOOKS_NAME
  -/* APPLE LOCAL begin Objective-C++  */
  -#ifdef OBJCPLUS
  -#define LANG_HOOKS_NAME "GNU Objective-C++"
  -#else
   #define LANG_HOOKS_NAME "GNU C++"
  -#endif
  -/* APPLE LOCAL end Objective-C++ */
   #undef LANG_HOOKS_INIT
   #define LANG_HOOKS_INIT cxx_init
   #undef LANG_HOOKS_FINISH
   #define LANG_HOOKS_FINISH cxx_finish
   #undef LANG_HOOKS_CLEAR_BINDING_STACK
   #define LANG_HOOKS_CLEAR_BINDING_STACK pop_everything
  +/* APPLE LOCAL begin finish file hook  */
  +#undef LANG_HOOKS_FINISH_FILE
  +#define LANG_HOOKS_FINISH_FILE cxx_finish_file
  +/* APPLE LOCAL end finish file hook  */
   #undef LANG_HOOKS_INIT_OPTIONS
   #define LANG_HOOKS_INIT_OPTIONS cxx_init_options
   #undef LANG_HOOKS_DECODE_OPTION
  @@ -112,6 +114,25 @@
   #undef LANG_HOOKS_ATTRIBUTE_TABLE
   #define LANG_HOOKS_ATTRIBUTE_TABLE cxx_attribute_table
   
  +/* APPLE LOCAL PFE */
  +#ifdef PFE
  +#undef LANG_HOOKS_PFE_LANG_INIT
  +#define LANG_HOOKS_PFE_LANG_INIT cxx_pfe_lang_init
  +#undef LANG_HOOKS_PFE_FREEZE_THAW_COMPILER_STATE
  +#define LANG_HOOKS_PFE_FREEZE_THAW_COMPILER_STATE cxx_freeze_thaw_compiler_state
  +#undef LANG_HOOKS_PFE_FREEZE_THAW_DECL
  +#define LANG_HOOKS_PFE_FREEZE_THAW_DECL cxx_pfe_freeze_thaw_decl
  +#undef LANG_HOOKS_PFE_FREEZE_THAW_TYPE
  +#define LANG_HOOKS_PFE_FREEZE_THAW_TYPE cxx_pfe_freeze_thaw_type
  +#undef LANG_HOOKS_PFE_FREEZE_THAW_SPECIAL
  +#define LANG_HOOKS_PFE_FREEZE_THAW_SPECIAL cxx_pfe_freeze_thaw_special
  +#undef LANG_HOOKS_PFE_CHECK_ALL_STRUCT_SIZES
  +#define LANG_HOOKS_PFE_CHECK_ALL_STRUCT_SIZES cxx_pfe_check_all_struct_sizes
  +#undef LANG_HOOKS_PFE_CHECK_SETTINGS
  +#define LANG_HOOKS_PFE_CHECK_SETTINGS cxx_pfe_check_settings
  +#endif
  +/* APPLE LOCAL end PFE */
  +
   #undef LANG_HOOKS_TREE_INLINING_WALK_SUBTREES
   #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES \
     cp_walk_subtrees
  @@ -161,6 +182,40 @@
   #undef LANG_HOOKS_TYPE_PROMOTES_TO
   #define LANG_HOOKS_TYPE_PROMOTES_TO cxx_type_promotes_to
   
  +/* APPLE LOCAL begin Objective-C++  */
  +/* Redefine the hooks that need to be different for ObjC++.  */
  +#ifdef OBJCPLUS
  +static void objcplus_init_options                   PARAMS ((void));
  +#include "objc/objc-act.h"
  +#undef LANG_HOOKS_NAME
  +#define LANG_HOOKS_NAME "GNU Objective-C++"
  +#undef LANG_HOOKS_INIT
  +#define LANG_HOOKS_INIT objc_init
  +#undef LANG_HOOKS_FINISH_FILE
  +#define LANG_HOOKS_FINISH_FILE objc_finish_file
  +#undef LANG_HOOKS_INIT_OPTIONS
  +#define LANG_HOOKS_INIT_OPTIONS objcplus_init_options
  +#undef LANG_HOOKS_DECODE_OPTION
  +#define LANG_HOOKS_DECODE_OPTION objc_decode_option
  +/* APPLE LOCAL begin PFE */
  +#undef LANG_HOOKS_PFE_LANG_INIT
  +#define LANG_HOOKS_PFE_LANG_INIT objc_pfe_lang_init
  +#undef LANG_HOOKS_PFE_FREEZE_THAW_COMPILER_STATE
  +#define LANG_HOOKS_PFE_FREEZE_THAW_COMPILER_STATE objc_freeze_thaw_compiler_state
  +#undef LANG_HOOKS_PFE_FREEZE_THAW_DECL
  +#define LANG_HOOKS_PFE_FREEZE_THAW_DECL objc_pfe_freeze_thaw_decl
  +#undef LANG_HOOKS_PFE_FREEZE_THAW_TYPE
  +#define LANG_HOOKS_PFE_FREEZE_THAW_TYPE objc_pfe_freeze_thaw_type
  +#undef LANG_HOOKS_PFE_FREEZE_THAW_SPECIAL
  +#define LANG_HOOKS_PFE_FREEZE_THAW_SPECIAL objc_pfe_freeze_thaw_special
  +#undef LANG_HOOKS_PFE_CHECK_ALL_STRUCT_SIZES
  +#define LANG_HOOKS_PFE_CHECK_ALL_STRUCT_SIZES objc_pfe_check_all_struct_sizes
  +#undef LANG_HOOKS_PFE_CHECK_SETTINGS
  +#define LANG_HOOKS_PFE_CHECK_SETTINGS objc_pfe_check_settings
  +/* APPLE LOCAL end PFE */
  +#endif /* OBJCPLUS */
  +/* APPLE LOCAL end Objective-C++ */
  +
   /* Each front end provides its own hooks, for toplev.c.  */
   const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
   
  @@ -308,3 +363,13 @@
   
     return true;
   }
  +
  +#ifdef OBJCPLUS
  +static void 
  +objcplus_init_options ()
  +{
  +  /* APPLE LOCAL compiling_objc  */
  +  compiling_objc = 1;
  +  cxx_init_options ();
  +}
  +#endif
  
  
  
  1.65      +0 -2      gcc3/gcc/cp/cp-tree.h
  
  Index: cp-tree.h
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cp/cp-tree.h,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- cp-tree.h 2002/08/08 03:20:00     1.64
  +++ cp-tree.h 2002/08/11 19:22:06     1.65
  @@ -4006,8 +4006,6 @@
   extern const char *cxx_init                  PARAMS ((const char *));
   extern void cxx_finish PARAMS ((void));
   extern void cxx_init_options PARAMS ((void));
  -/* APPLE LOCAL Objective-C++  */
  -extern void cxx_post_options PARAMS ((void));
   
   /* in method.c */
   extern void init_method                              PARAMS ((void));
  
  
  
  1.24      +13 -45    gcc3/gcc/cp/lang-specs.h
  
  Index: lang-specs.h
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cp/lang-specs.h,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- lang-specs.h      2002/08/02 10:08:16     1.23
  +++ lang-specs.h      2002/08/11 19:22:07     1.24
  @@ -38,31 +38,25 @@
      /* APPLE LOCAL begin cpp-precomp dpatel */
      /* Add support to invoke cpp-precomp with -precomp 
         or -cpp-precomp, and optionally with -E.  */
  -    "%{M|MM:cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
  -       %{!Wno-deprecated:-D__DEPRECATED}\
  -       %{!fno-exceptions:-D__EXCEPTIONS}\
  -       -D__GXX_ABI_VERSION=100\
  -       %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\
  -      %{E|S:%{@:%e-E and -S are not allowed with multiple -arch flags}}\
  -      %{E:\
  +   "%{M|MM:cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
  +      %{ansi:-std=c++98} %(cpp_options) %2 %(cpp_debug_options)}\
  +    %{E|S:%{@:%e-E and -S are not allowed with multiple -arch flags}}\
  +    %{E:\
          %{cpp-precomp:\
            %(cpp_precomp) -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
                %{!Wno-deprecated:-D__DEPRECATED}\
                %{!fno-exceptions:-D__EXCEPTIONS}\
                -D__cplusplus -D__GXX_ABI_VERSION=100\
  -             %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_precomp_options) %y1}\
  +             %{ansi:-std=c++98} %(cpp_precomp_options) %y1}\
          %{!cpp-precomp:\
  -         cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
  -             %{!Wno-deprecated:-D__DEPRECATED}\
  -             %{!fno-exceptions:-D__EXCEPTIONS}\
  -             -D__GXX_ABI_VERSION=100\
  -             %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}}\
  +         cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
  +           %{ansi:-std=c++98} %(cpp_options) %2 %(cpp_debug_options)}}\
        %{precomp: %(cpp_precomp) -lang-c++ \
          %{!no-gcc:-D__GNUG__=%v1}\
          %{!Wno-deprecated:-D__DEPRECATED}\
          %{!fno-exceptions:-D__EXCEPTIONS}\
          -D__GXX_ABI_VERSION=100\
  -       %{ansi:-D__STRICT_ANSI__ -trigraphs -$}\
  +       %{ansi:-std=c++98}\
          -D__cplusplus %(cpp_precomp_options) %y1\
          %{@:-o %f%u.pp}%{!@:%W{o}%W{!o*:-o %b-gcc3.pp}} \n}\
        %{!E:%{!M:%{!MM:%{!precomp:\
  @@ -71,32 +65,21 @@
                            %{!Wno-deprecated:-D__DEPRECATED}\
                    %{!fno-exceptions:-D__EXCEPTIONS}\
                    -D__GXX_ABI_VERSION=100\
  -                 %{ansi:-D__STRICT_ANSI__ -trigraphs -$}\
  +                 %{ansi:-std=c++98}\
                    -D__cplusplus %(cpp_precomp_options) %y1 %d%g.ii \n}}}}}\
          %{save-temps|no-integrated-cpp:%{!cpp-precomp|fdump=*|fload=*:cpp0 -lang-c++ 
\
  -                 %{!no-gcc:-D__GNUG__=%v1}\
  -                         %{!Wno-deprecated:-D__DEPRECATED}\
  -                 %{!fno-exceptions:-D__EXCEPTIONS}\
  -                 -D__GXX_ABI_VERSION=100\
  -                 %{ansi:-D__STRICT_ANSI__ -trigraphs -$}\
  -                 %(cpp_options) %b.ii \n}}\
  +                 %{ansi:-std=c++98} %(cpp_options) %b.ii \n}}\
          
%{save-temps|no-integrated-cpp:%{cpp-precomp:%{!fdump=*:%{!fload=*:%(cpp_precomp) 
-lang-c++ \
                    %{!no-gcc:-D__GNUG__=%v1}\
                            %{!Wno-deprecated:-D__DEPRECATED}\
                    %{!fno-exceptions:-D__EXCEPTIONS}\
                    -D__GXX_ABI_VERSION=100\
  -                 %{ansi:-D__STRICT_ANSI__ -trigraphs -$}\
  +                 %{ansi:-D__STRICT_ANSI__}\
                    %(cpp_precomp_options) %y1 %b.ii \n}}}}\
         cc1plus %{save-temps|no-integrated-cpp:%{!cpp-precomp:-fpreprocessed} 
%{cpp-precomp:-cpp-precomp} %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
                 
%{!save-temps:%{!no-integrated-cpp:%{cpp-precomp:%{!fload=*:%{!fdump=*:-cpp-precomp 
%d%{save-temps:%b.ii} %{!save-temps:%g.ii}}}}}}\
  -              %{!save-temps:%{!cpp-precomp|fload=*|fdump=*:%(cpp_unique_options)\
  -                         %{!no-gcc:-D__GNUG__=%v1} \
  -                                 %{!Wno-deprecated:-D__DEPRECATED}\
  -                         %{!fno-exceptions:-D__EXCEPTIONS}\
  -                         -D__GXX_ABI_VERSION=100\
  -                         %{ansi:-D__STRICT_ANSI__}}}\
  -       %{ansi:-trigraphs -$}\
  -       %(cc1_options) %2 %{+e1*}\
  +              %{!save-temps:%{!cpp-precomp|fload=*|fdump=*:%(cpp_unique_options)}}\
  +       %{ansi:-std=c++98} %(cc1_options) %2 %{+e1*}\
          %{!fsyntax-only:%(invoke_as)}}}}}",
        CPLUSPLUS_CPP_SPEC},
      /* APPLE LOCAL end cpp-precomp dpatel */
  @@ -107,18 +90,3 @@
      "%{!M:%{!MM:%{!E:\
       cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
       %{!fsyntax-only:%{!precomp:%(invoke_as)}}}}}", 0},
  -
  -#if 0 /* APPLE MERGE need to lift from this */
  -     /* We should convert -ansi to -std=c++98 even if -fpreprocessed,
  -     to get dollars in identifiers correct.  */
  -    "%{E|M|MM:cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
  -       %{ansi:-std=c++98} %(cpp_options) %2 %(cpp_debug_options)}\
  -     %{!E:%{!M:%{!MM:\
  -       %{save-temps:cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
  -             %{ansi:-std=c++98} %(cpp_options) %2 %b.ii \n}\
  -      cc1plus %{save-temps:-fpreprocessed %b.ii}\
  -           %{!save-temps:%(cpp_unique_options) %{!no-gcc:-D__GNUG__=%v1}}\
  -     %{ansi:-std=c++98} %(cc1_options) %2 %{+e1*}\
  -       %{!fsyntax-only:%(invoke_as)}}}}",
  -#endif
  -
  
  
  
  1.51      +6 -33     gcc3/gcc/cp/lex.c
  
  Index: lex.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cp/lex.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- lex.c     2002/08/08 03:20:01     1.50
  +++ lex.c     2002/08/11 19:22:07     1.51
  @@ -209,10 +209,6 @@
   void
   cxx_init_options ()
   {
  -#ifdef OBJCPLUS
  -  compiling_objc = 1;
  -#endif
  -
     c_common_init_options (clk_cplusplus);
   
     /* Default exceptions on.  */
  @@ -703,25 +699,6 @@
                       handle_pragma_java_exceptions);
   }
   
  -/* Adds the tree codes specific to the C++ front end to the list of all
  -   tree codes.  */
  -
  -void 
  -add_cpp_tree_codes ()
  -{
  -#if 0 /* APPLE MERGE */
  -  memcpy (tree_code_type + (int) LAST_C_TREE_CODE,
  -       cplus_tree_code_type,
  -       (int)LAST_CPLUS_TREE_CODE - (int)LAST_C_TREE_CODE);
  -  memcpy (tree_code_length + (int) LAST_C_TREE_CODE,
  -       cplus_tree_code_length,
  -       (LAST_CPLUS_TREE_CODE - (int)LAST_C_TREE_CODE) * sizeof (int));
  -  memcpy (tree_code_name + (int) LAST_C_TREE_CODE,
  -       cplus_tree_code_name,
  -       (LAST_CPLUS_TREE_CODE - (int)LAST_C_TREE_CODE) * sizeof (char *));
  -#endif
  -}
  -
   /* Initialize the C++ front end.  This function is very sensitive to
      the exact order that things are done here.  It would be nice if the
      initialization done by this routine were moved to its subroutines,
  @@ -737,10 +714,6 @@
     init_spew ();
     init_tree ();
     init_cp_semantics ();
  -#if 0 /* APPLE MERGE might need this */
  -  add_c_tree_codes ();
  -  add_cpp_tree_codes ();
  -#endif
     init_operators ();
     init_method ();
     init_error ();
  @@ -1272,7 +1245,8 @@
        int parsing;
        tree args;
   {
  -  register tree id;
  +  /* APPLE LOCAL Objective-C++  */   
  +  tree id;
     int lexing = (parsing == 1);
   
     /* APPLE LOCAL Objective-C++ */
  @@ -1320,11 +1294,10 @@
       {
         if (current_template_parms)
        return build_min_nt (LOOKUP_EXPR, token);
  -#if 0 /* APPLE MERGE orphaned? */
  -      /* APPLE LOCAL Objective-C++  */       
  +      /* APPLE LOCAL begin Objective-C++  */ 
         else if (objcp_lookup_identifier (token, &id, 0))
        ;
  -#endif
  +      /* APPLE LOCAL end Objective-C++  */   
         else if (IDENTIFIER_TYPENAME_P (token))
        /* A templated conversion operator might exist.  */
        return token;
  @@ -1334,10 +1307,10 @@
          return error_mark_node;
        }
       }
  -
  -  /* APPLE LOCAL Objective-C++ */
  +  /* APPLE LOCAL begin Objective-C++ */
     else
       objcp_lookup_identifier (token, &id, 1);
  +  /* APPLE LOCAL end Objective-C++ */
         
     id = check_for_out_of_scope_variable (id);
   
  
  
  
  1.24      +2 -3      gcc3/gcc/objc/lang-specs.h
  
  Index: lang-specs.h
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/objc/lang-specs.h,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- lang-specs.h      2002/08/08 03:20:05     1.23
  +++ lang-specs.h      2002/08/11 19:22:08     1.24
  @@ -49,8 +49,7 @@
                     %{precomp:%{@:-o %f%u.p}%{!@:%W{o}%W{!o*:-o %b-gcc3.p}}} }\
          %{!save-temps:%{!no-integrated-cpp:\
            %{traditional|ftraditional|traditional-cpp:%{!cpp-precomp:\
  -             tradcpp0 -lang-objc -D__OBJC__ %{ansi:-std=c89} %(cpp_options) 
%{!pipe:%g.mi} |\n\
  -                 cc1obj -fpreprocessed %{!pipe:%g.mi} %(cc1_options) %{gen-decls}}}\
  +%eGNU Objective C no longer supports traditional compilation}}\
            
%{!fdump=*:%{!fload=*:%{!no-cpp-precomp|cpp-precomp:%{!precomp:%{!traditional-cpp:\
                %(cpp_precomp) -lang-objc -D__OBJC__ %{ansi:-std=c89}\
                  %(cpp_precomp_options) %y0 %{!pipe:%g.mi} |\n\
  @@ -61,7 +60,7 @@
                     %{precomp:%{@:-o %f%u.p}%{!@:%W{o}%W{!o*:-o %b-gcc3.p}}} }\
            %{!traditional:%{!ftraditional:%{!traditional-cpp:\
                %{fload=*|fdump=*|no-cpp-precomp:%{!precomp:\
  -                 cc1obj -lang-objc -D__OBJC__ %{ansi:-std=c89} 
%(cpp_unique_options) %(cc1_options) %{gen-decls}}}}}}}}\
  +                 cc1obj %{ansi:-std=c89} %(cpp_unique_options) %(cc1_options) 
%{gen-decls}}}}}}}}\
           %{!fsyntax-only:%{!precomp:%(invoke_as)}}}}}", 0},
      /* APPLE LOCAL end cpp-precomp dpatel */
     {".mi", "@objc-cpp-output", 0},
  
  
  
  1.19      +1 -27     gcc3/gcc/objc/objc-lang.c
  
  Index: objc-lang.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/objc/objc-lang.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- objc-lang.c       2002/08/08 03:20:05     1.18
  +++ objc-lang.c       2002/08/11 19:22:08     1.19
  @@ -41,17 +41,8 @@
   
   static void objc_init_options                   PARAMS ((void));
   
  -/* APPLE LOCAL begin Objective-C++  */
  -#ifdef OBJCPLUS
  -#include "cp-lang.h"
   #undef LANG_HOOKS_NAME
  -#define LANG_HOOKS_NAME "GNU Objective-C++"
  -#else
  -#undef LANG_HOOKS_NAME
   #define LANG_HOOKS_NAME "GNU Objective-C"
  -#endif
  -/* APPLE LOCAL end Objective-C++ */
  -
   #undef LANG_HOOKS_INIT
   #define LANG_HOOKS_INIT objc_init
   #undef LANG_HOOKS_FINISH
  @@ -65,10 +56,7 @@
   #undef LANG_HOOKS_DECODE_OPTION
   #define LANG_HOOKS_DECODE_OPTION objc_decode_option
   #undef LANG_HOOKS_POST_OPTIONS
  -#define LANG_HOOKS_POST_OPTIONS objc_post_options
  -
  -/* APPLE LOCAL Objective-C++ */
  -/* Don't define LANG_HOOKS_STATICP etc here, get from c{p}-lang.h.  */
  +#define LANG_HOOKS_POST_OPTIONS c_common_post_options
   
   /* APPLE LOCAL begin PFE */
   #undef LANG_HOOKS_PFE_LANG_INIT
  @@ -87,7 +75,6 @@
   #define LANG_HOOKS_PFE_CHECK_SETTINGS objc_pfe_check_settings
   /* APPLE LOCAL end PFE */
   
  -#define LANG_HOOKS_POST_OPTIONS c_common_post_options
   #undef LANG_HOOKS_GET_ALIAS_SET
   #define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
   #undef LANG_HOOKS_SAFE_FROM_P
  @@ -160,15 +147,6 @@
   /* Each front end provides its own hooks, for toplev.c.  */
   const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
   
  -/* APPLE LOCAL ??? */
  -/* Post-switch processing.  */
  -
  -static void
  -objc_post_options ()
  -{
  -  c_common_post_options ();
  -}
  -
   /* Define the special tree codes that we use.  */
   
   /* Table indexed by tree code giving a string containing a character
  @@ -218,9 +196,5 @@
   {
     /* APPLE LOCAL compiling_objc  */
     compiling_objc = 1;
  -#ifdef OBJCPLUS
  -  cxx_init_options ();
  -#else
     c_common_init_options (clk_c);
  -#endif  
   } 
  
  
  
  1.12      +12 -31    gcc3/gcc/objcp/lang-specs.h
  
  Index: lang-specs.h
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/objcp/lang-specs.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- lang-specs.h      2002/04/15 23:37:58     1.11
  +++ lang-specs.h      2002/08/11 19:22:08     1.12
  @@ -35,11 +35,8 @@
      /* APPLE LOCAL begin cpp-precomp dpatel */
      /* Add support to invoke cpp-precomp with -precomp 
         or -cpp-precomp, and optionally with -E.  */
  -    "%{M|MM:cpp0 -lang-objc++ %{!no-gcc:-D__GNUG__=%v1}\
  -       %{!Wno-deprecated:-D__DEPRECATED}\
  -       %{!fno-exceptions:-D__EXCEPTIONS}\
  -       -D__GXX_ABI_VERSION=100\
  -       %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\
  +    "%{M|MM:cc1objplus -E %{!no-gcc:-D__GNUG__=%v1}\
  +       %{ansi:-std=c++98} %(cpp_options) %2 %(cpp_debug_options)}\
         %{E|S:%{@:%e-E and -S are not allowed with multiple -arch flags}}\
         %{E:\
          %{cpp-precomp:\
  @@ -47,20 +44,16 @@
                %{!Wno-deprecated:-D__DEPRECATED}\
                %{!fno-exceptions:-D__EXCEPTIONS}\
                -D__OBJC__ -D__cplusplus -D__GXX_ABI_VERSION=100\
  -             %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_precomp_options) %y1}\
  +             %{ansi:-std=c++98} %(cpp_precomp_options) %y1}\
          %{!cpp-precomp:\
  -         cpp0 -lang-objc++ %{!no-gcc:-D__GNUG__=%v1}\
  -             %{!Wno-deprecated:-D__DEPRECATED}\
  -             %{!fno-exceptions:-D__EXCEPTIONS}\
  -             -D__GXX_ABI_VERSION=100\
  -             %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}}\
  +         cc1objplus -E %{!no-gcc:-D__GNUG__=%v1}\
  +           %{ansi:-std=c++98} %(cpp_options) %2 %(cpp_debug_options)}}\
        %{precomp: %(cpp_precomp) -lang-objc++ \
          %{!no-gcc:-D__GNUG__=%v1}\
          %{!Wno-deprecated:-D__DEPRECATED}\
          %{!fno-exceptions:-D__EXCEPTIONS}\
          -D__GXX_ABI_VERSION=100\
  -       %{ansi:-D__STRICT_ANSI__ -trigraphs -$}\
  -       -D__OBJC__ -D__cplusplus %(cpp_precomp_options) %y1\
  +       %{ansi:-std=c++98} -D__OBJC__ -D__cplusplus %(cpp_precomp_options) %y1\
          %{@:-o %f%u.pp}%{!@:%W{o}%W{!o*:-o %b-gcc3.pp}} \n}\
        %{!E:%{!M:%{!MM:%{!precomp:\
          
%{!save-temps:%{!no-integrated-cpp:%{!fload=*:%{!fdump=*:%{cpp-precomp:%(cpp_precomp) 
-lang-objc++ \
  @@ -68,32 +61,20 @@
                            %{!Wno-deprecated:-D__DEPRECATED}\
                    %{!fno-exceptions:-D__EXCEPTIONS}\
                    -D__GXX_ABI_VERSION=100\
  -                 %{ansi:-D__STRICT_ANSI__ -trigraphs -$}\
  +                 %{ansi:-std=c++98}\
                    -D__OBJC__ -D__cplusplus %(cpp_precomp_options) %y1 %d%g.mii 
\n}}}}}\
  -       %{save-temps|no-integrated-cpp:%{!cpp-precomp|fdump=*|fload=*:cpp0 
-lang-objc++ \
  -                 %{!no-gcc:-D__GNUG__=%v1}\
  -                         %{!Wno-deprecated:-D__DEPRECATED}\
  -                 %{!fno-exceptions:-D__EXCEPTIONS}\
  -                 -D__GXX_ABI_VERSION=100\
  -                 %{ansi:-D__STRICT_ANSI__ -trigraphs -$}\
  -                 %(cpp_options) %b.mii \n}}\
  +       %{save-temps|no-integrated-cpp:%{!cpp-precomp|fdump=*|fload=*:cc1objplus -E \
  +                 %{ansi:-std=c++98} %(cpp_options) %2 %b.mii \n}}\
          
%{save-temps|no-integrated-cpp:%{cpp-precomp:%{!fdump=*:%{!fload=*:%(cpp_precomp) 
-lang-objc++ \
                    %{!no-gcc:-D__GNUG__=%v1}\
                            %{!Wno-deprecated:-D__DEPRECATED}\
                    %{!fno-exceptions:-D__EXCEPTIONS}\
                    -D__GXX_ABI_VERSION=100\
  -                 %{ansi:-D__STRICT_ANSI__ -trigraphs -$}\
  -                 %(cpp_precomp_options) %y1 %b.mii \n}}}}\
  +                 %{ansi:-std=c++98} %(cpp_precomp_options) %y1 %b.mii \n}}}}\
         cc1objplus %{save-temps|no-integrated-cpp:%{!cpp-precomp:-fpreprocessed} 
%{cpp-precomp:-cpp-precomp} %b.mii}\
                 %{cpp-precomp:%{!fload=*:%{!fdump=*:-cpp-precomp %d%b.mii}}}\
  -              
%{!save-temps:%{!no-integrated-cpp:%{!cpp-precomp|fload=*|fdump=*:%(cpp_options)\
  -                         %{!no-gcc:-D__GNUG__=%v1} \
  -                                 %{!Wno-deprecated:-D__DEPRECATED}\
  -                         %{!fno-exceptions:-D__EXCEPTIONS}\
  -                         -D__GXX_ABI_VERSION=100\
  -                         %{ansi:-D__STRICT_ANSI__}}}}\
  -       %{ansi:-trigraphs -$}\
  -       %(cc1_options) %{gen-decls} %2 %{+e1*}\
  +              
%{!save-temps:%{!no-integrated-cpp:%{!cpp-precomp|fload=*|fdump=*:%(cpp_unique_options)
 %{!no-gcc:-D__GNUG__=%v1}}}}\
  +       %{ansi:-std=c++98} %(cc1_options) %{gen-decls} %2 %{+e1*}\
          %{!fsyntax-only:%(invoke_as)}}}}}",
        OBJCPLUSPLUS_CPP_SPEC},
      /* APPLE LOCAL end cpp-precomp dpatel */
  
  
  
  1.2       +2 -0      gcc3/gcc/testsuite/lib/objc++.exp
  
  Index: objc++.exp
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/testsuite/lib/objc++.exp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- objc++.exp        2002/06/03 23:27:41     1.1
  +++ objc++.exp        2002/08/11 19:22:08     1.2
  @@ -106,6 +106,8 @@
        }
       }
       set OBJCXX_UNDER_TEST "$OBJCXX_UNDER_TEST -x objective-c++"
  +    global GXX_UNDER_TEST
  +    set GXX_UNDER_TEST "$OBJCXX_UNDER_TEST"
   
       if ![info exists tmpdir] then {
        set tmpdir /tmp
  
  
  


Reply via email to