This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Some extra decorations


Hi,
re-merging to pretty-ipa shown that there are few extra simple cases
where I missed to add annotations.

I am now looking if I can get the warnings into low enough noise so it
can be used by default.  There are some problems with that, in
particular stuff in throw_condtioinally defined in throw-allocator.h
It seems to be plain externally visible function that is defined in
system header.  Why we do so?
It don't seem to be exported from libstdc++ nor useful in application
(i.e. if I include throw-allocator in multiple source files I get link
error).  How these headers are supposed to be used?

Honza

	* include/parallel/settings.h (get): Mark const.
	* libsupc++/unwind-cxx.h (__cxa_call_terminate): Mark throw ().
	* libsupc++/eh_call.cc (__cxa_call_terminate): Mark throw ().
	* config/io/basic_file_stdio.cc (sys_open, is_open, fd, seekoff): Mark
	throw ().
	* config/io/basic_file_stdio.h (__basic_file, sys_open): Mark throw ().
	(is_open, fd): Mark pure and throw ().
	(seekoff): Mark throw ().
Index: include/parallel/settings.h
===================================================================
--- include/parallel/settings.h	(revision 147073)
+++ include/parallel/settings.h	(working copy)
@@ -265,7 +265,7 @@ namespace __gnu_parallel
     sequence_index_t 		qsb_steals;
 
     /// Get the global settings.
-    static const _Settings&
+    _GLIBCXX_CONST static const _Settings&
     get() throw();
 
     /// Set the global settings.
Index: libsupc++/unwind-cxx.h
===================================================================
--- libsupc++/unwind-cxx.h	(revision 147073)
+++ libsupc++/unwind-cxx.h	(working copy)
@@ -187,7 +187,7 @@ extern "C" void __cxa_bad_typeid () __at
 // throws, and if bad_exception needs to be thrown.  Called from the
 // compiler.
 extern "C" void __cxa_call_unexpected (void *) __attribute__((noreturn));
-extern "C" void __cxa_call_terminate (_Unwind_Exception*) __attribute__((noreturn));
+extern "C" void __cxa_call_terminate (_Unwind_Exception*) throw () __attribute__((noreturn));
 
 #ifdef __ARM_EABI_UNWINDER__
 // Arm EABI specified routines.
Index: libsupc++/eh_call.cc
===================================================================
--- libsupc++/eh_call.cc	(revision 147073)
+++ libsupc++/eh_call.cc	(working copy)
@@ -37,7 +37,7 @@ using namespace __cxxabiv1;
 // terminate.
 
 extern "C" void
-__cxa_call_terminate(_Unwind_Exception* ue_header)
+__cxa_call_terminate(_Unwind_Exception* ue_header) throw ()
 {
 
   if (ue_header)
Index: config/io/basic_file_stdio.cc
===================================================================
--- config/io/basic_file_stdio.cc	(revision 147073)
+++ config/io/basic_file_stdio.cc	(working copy)
@@ -210,7 +210,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   }
   
   __basic_file<char>*
-  __basic_file<char>::sys_open(int __fd, ios_base::openmode __mode)
+  __basic_file<char>::sys_open(int __fd, ios_base::openmode __mode) throw ()
   {
     __basic_file* __ret = NULL;
     const char* __c_mode = fopen_mode(__mode);
@@ -247,15 +247,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   }
   
   bool 
-  __basic_file<char>::is_open() const 
+  __basic_file<char>::is_open() const throw ()
   { return _M_cfile != 0; }
   
   int 
-  __basic_file<char>::fd() 
+  __basic_file<char>::fd() throw ()
   { return fileno(_M_cfile); }
   
   __c_file*
-  __basic_file<char>::file() 
+  __basic_file<char>::file() throw ()
   { return _M_cfile; }
   
   __basic_file<char>* 
@@ -315,7 +315,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   }
 
   streamoff
-  __basic_file<char>::seekoff(streamoff __off, ios_base::seekdir __way)
+  __basic_file<char>::seekoff(streamoff __off, ios_base::seekdir __way) throw ()
   {
 #ifdef _GLIBCXX_USE_LFS
     return lseek64(this->fd(), __off, __way);
Index: config/io/basic_file_stdio.h
===================================================================
--- config/io/basic_file_stdio.h	(revision 147073)
+++ config/io/basic_file_stdio.h	(working copy)
@@ -58,7 +58,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       bool 		_M_cfile_created;
 
     public:
-      __basic_file(__c_lock* __lock = 0);
+      __basic_file(__c_lock* __lock = 0) throw ();
 
       __basic_file* 
       open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
@@ -67,19 +67,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       sys_open(__c_file* __file, ios_base::openmode);
 
       __basic_file*
-      sys_open(int __fd, ios_base::openmode __mode);
+      sys_open(int __fd, ios_base::openmode __mode) throw ();
 
       __basic_file* 
       close(); 
 
-      bool 
-      is_open() const;
+      _GLIBCXX_PURE bool 
+      is_open() const throw ();
 
-      int 
-      fd();
+      _GLIBCXX_PURE int 
+      fd() throw ();
 
-      __c_file*
-      file();
+      _GLIBCXX_PURE __c_file*
+      file() throw ();
 
       ~__basic_file();
 
@@ -94,7 +94,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       xsgetn(char* __s, streamsize __n);
 
       streamoff
-      seekoff(streamoff __off, ios_base::seekdir __way);
+      seekoff(streamoff __off, ios_base::seekdir __way) throw ();
 
       int 
       sync();


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