Author: sebor
Date: Tue Apr 22 21:55:38 2008
New Revision: 650742
URL: http://svn.apache.org/viewvc?rev=650742&view=rev
Log:
2008-04-22 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-890
* include/rw/_defs.h (_RWSTD_ATTRIBUTE_NORETURN): Defined macro
to be empty when not yet #defined.
(__rw_assert_fail): Replaced _RWSTD_GNUC_ATTRIBUTE ((noreturn))
with _RWSTD_ATTRIBUTE_NORETURN.
* include/rw/_config-acc.h [aCC 6] (_RWSTD_ATTRIBUTE_NORETURN):
Defined macro to __attribute__((noreturn)) for HP aCC 6 and
better.
* include/rw/_config-gcc.h (_RWSTD_ATTRIBUTE_NORETURN): Defined
macro to __attribute__((noreturn)) for all versions of gcc.
Modified:
stdcxx/branches/4.2.x/include/rw/_config-acc.h
stdcxx/branches/4.2.x/include/rw/_config-gcc.h
stdcxx/branches/4.2.x/include/rw/_defs.h
Modified: stdcxx/branches/4.2.x/include/rw/_config-acc.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_config-acc.h?rev=650742&r1=650741&r2=650742&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_config-acc.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_config-acc.h Tue Apr 22 21:55:38 2008
@@ -25,7 +25,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -97,4 +97,10 @@
# define _RWSTD_NO_EXCEPTIONS
# endif // _RWSTD_NO_EXCEPTIONS
#endif // __HPACC_NOEH
+
+#if 6 <= _RWSTD_HP_aCC_MAJOR
+ // aCC 6 attribute((noreturn)) to indicate that a function
+ // doesn't return (it may exit by throwing an exception)
+# define _RWSTD_ATTRIBUTE_NORETURN __attribute__ ((noreturn))
+#endif // aCC >= 6
Modified: stdcxx/branches/4.2.x/include/rw/_config-gcc.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_config-gcc.h?rev=650742&r1=650741&r2=650742&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_config-gcc.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_config-gcc.h Tue Apr 22 21:55:38 2008
@@ -25,7 +25,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -83,6 +83,10 @@
#endif //__GNUG__ <= 2 && __GNUC_MINOR__ < 97 && _RWSTD_NO_HONOR_STD
#define _RWSTD_GNUC_ATTRIBUTE(attr) __attribute__ (attr)
+
+// gcc attribute((noreturn)) to indicate that a function doesn't return
+// (it may still exit by throwing an exception or by calling longjmp)
+#define _RWSTD_ATTRIBUTE_NORETURN _RWSTD_GNUC_ATTRIBUTE ((noreturn))
#ifdef _RWSTD_OS_LINUX
Modified: stdcxx/branches/4.2.x/include/rw/_defs.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_defs.h?rev=650742&r1=650741&r2=650742&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_defs.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_defs.h Tue Apr 22 21:55:38 2008
@@ -25,7 +25,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -1128,6 +1128,12 @@
# define _RWSTD_ASSUME(expr) _RWSTD_ASSERT (expr)
#endif // _RWSTD_ASSUME
+#ifndef _RWSTD_ATTRIBUTE_NORETURN
+ // gcc (and others) __attribute__ ((noreturn))
+# define _RWSTD_ATTRIBUTE_NORETURN /* empty */
+#endif // _RWSTD_ATTR_NORETURN
+
+
// compile-time assertion - asserts constant expressions during
// compilation with no runtime overhead; failed assertions are reported
// as compilation errors
@@ -1149,7 +1155,7 @@
// called for failed assertions
void _RWSTD_EXPORT
__rw_assert_fail (const char*, const char*, int, const char*)
- _RWSTD_GNUC_ATTRIBUTE ((noreturn));
+ _RWSTD_ATTRIBUTE_NORETURN;
} // extern "C++"