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]

Removing __HONOR_STD


This patch removes the preprocessor define __HONOR_STD from g++. It
was introduced because the original ignore-std hack would not process

namespace std{
  void foo(){}
}

This has been fixed since, namespace std is ignored everywhere unless
-fhonor-std is given.

This change is not an incompatibility with egcs 1.1: the macro is not
documented, unlike the command line option (which is mentioned in
NEWS), so no user code should rely on it.

The only impact this change may have is that header files containing
'namespace std' will make g++ 2.8 sorry.

Martin

1998-08-23  Martin von L÷wis  <loewis@informatik.hu-berlin.de>

	* lang-specs.h: Remove __HONOR_STD.
	* inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.

Index: lang-specs.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/lang-specs.h,v
retrieving revision 1.7
diff -c -p -r1.7 lang-specs.h
*** lang-specs.h	1998/06/25 08:24:51	1.7
--- lang-specs.h	1998/08/23 18:27:08
*************** Boston, MA 02111-1307, USA.  */
*** 36,42 ****
  	-undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\
  	%{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
  	%{!fno-exceptions:-D__EXCEPTIONS}\
-         %{fhonor-std:-D__HONOR_STD} %{fnew-abi:-D__HONOR_STD}\
          %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}\n}\
--- 36,41 ----
*************** Boston, MA 02111-1307, USA.  */
*** 46,52 ****
                              -D__GNUC_MINOR__=%v2\
                              %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
                              %{!fno-exceptions:-D__EXCEPTIONS}\
-                             %{fhonor-std:-D__HONOR_STD} %{fnew-abi:-D__HONOR_STD}\
                              %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
                              %{trigraphs}\
  			    %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
--- 45,50 ----
*************** Boston, MA 02111-1307, USA.  */
*** 66,72 ****
  	-undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\
  	%{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
  	%{!fno-exceptions:-D__EXCEPTIONS}\
-         %{fhonor-std:-D__HONOR_STD} %{fnew-abi:-D__HONOR_STD}\
          %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.ii}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
--- 64,69 ----
Index: inc/exception
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/inc/exception,v
retrieving revision 1.5
diff -c -p -r1.5 exception
*** exception	1998/07/22 17:54:26	1.5
--- exception	1998/08/23 18:27:40
***************
*** 8,16 ****
  
  extern "C++" {
  
- #ifdef __HONOR_STD
  namespace std {
- #endif
  
  class exception {
  public:
--- 8,14 ----
*************** unexpected_handler set_unexpected (unexp
*** 34,42 ****
  void unexpected () __attribute__ ((__noreturn__));
  bool uncaught_exception ();
  
- #ifdef __HONOR_STD
  } // namespace std
- #endif
  
  } // extern "C++"
  
--- 32,38 ----
Index: inc/new
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/inc/new,v
retrieving revision 1.3
diff -c -p -r1.3 new
*** new	1998/05/08 02:06:24	1.3
--- new	1998/08/23 18:27:41
***************
*** 10,18 ****
  
  extern "C++" {
  
- #ifdef __HONOR_STD
  namespace std {
- #endif
  
    class bad_alloc : public exception {
    public:
--- 10,16 ----
*************** namespace std {
*** 24,32 ****
    typedef void (*new_handler)();
    new_handler set_new_handler (new_handler);
  
- #ifdef __HONOR_STD
  } // namespace std
- #endif
  
  // replaceable signatures
  void *operator new (size_t) throw (std::bad_alloc);
--- 22,28 ----
Index: inc/new.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/inc/new.h,v
retrieving revision 1.2
diff -c -p -r1.2 new.h
*** new.h	1998/05/08 02:06:25	1.2
--- new.h	1998/08/23 18:27:41
***************
*** 5,13 ****
  
  #include <new>
  
- #ifdef __HONOR_STD
  using std::new_handler;
  using std::set_new_handler;
- #endif
  
  #endif // __NEW_H__
--- 5,11 ----
Index: inc/typeinfo
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/inc/typeinfo,v
retrieving revision 1.2
diff -c -p -r1.2 typeinfo
*** typeinfo	1998/05/08 02:06:26	1.2
--- typeinfo	1998/08/23 18:27:41
***************
*** 8,16 ****
  
  extern "C++" {
  
- #ifdef __HONOR_STD
  namespace std {
- #endif
  
  class type_info {
  private:
--- 8,14 ----
*************** class bad_typeid : public exception {
*** 63,71 ****
    virtual ~bad_typeid () { }
  };
  
- #ifdef __HONOR_STD
  } // namespace std
- #endif
  
  } // extern "C++"
  #endif
--- 61,67 ----



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