This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[Patch/RFC] libstdc++/19343
- From: Paolo Carlini <pcarlini at suse dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Sun, 23 Jan 2005 00:14:53 +0100
- Subject: [Patch/RFC] libstdc++/19343
Hi,
so, we agree that, after all, given the current code, Andreas original
analysis was correct and we should mark these helpers as 'noreturn'?
Tested on x86-linux, will wait 'til tomorrow...
Paolo.
///////////////
2005-01-23 Paolo Carlini <pcarlini@suse.de>
Andreas Jaeger <aj@suse.de>
PR libstdc++/19343
* include/bits/functexcept.h: Mark the helpers as 'noreturn'.
diff -urN libstdc++-v3-orig/include/bits/functexcept.h libstdc++-v3/include/bits/functexcept.h
--- libstdc++-v3-orig/include/bits/functexcept.h 2004-11-24 05:11:09.000000000 +0100
+++ libstdc++-v3/include/bits/functexcept.h 2005-01-23 00:04:08.000000000 +0100
@@ -1,6 +1,6 @@
// Function-Based Exception Support -*- C++ -*-
-// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -44,50 +44,50 @@
{
// Helper for exception objects in <except>
void
- __throw_bad_exception(void);
+ __throw_bad_exception(void) __attribute__((noreturn));
// Helper for exception objects in <new>
void
- __throw_bad_alloc(void);
+ __throw_bad_alloc(void) __attribute__((noreturn));
// Helper for exception objects in <typeinfo>
void
- __throw_bad_cast(void);
+ __throw_bad_cast(void) __attribute__((noreturn));
void
- __throw_bad_typeid(void);
+ __throw_bad_typeid(void) __attribute__((noreturn));
// Helpers for exception objects in <stdexcept>
void
- __throw_logic_error(const char* __s);
+ __throw_logic_error(const char* __s) __attribute__((noreturn));
void
- __throw_domain_error(const char* __s);
+ __throw_domain_error(const char* __s) __attribute__((noreturn));
void
- __throw_invalid_argument(const char* __s);
+ __throw_invalid_argument(const char* __s) __attribute__((noreturn));
void
- __throw_length_error(const char* __s);
+ __throw_length_error(const char* __s) __attribute__((noreturn));
void
- __throw_out_of_range(const char* __s);
+ __throw_out_of_range(const char* __s) __attribute__((noreturn));
void
- __throw_runtime_error(const char* __s);
+ __throw_runtime_error(const char* __s) __attribute__((noreturn));
void
- __throw_range_error(const char* __s);
+ __throw_range_error(const char* __s) __attribute__((noreturn));
void
- __throw_overflow_error(const char* __s);
+ __throw_overflow_error(const char* __s) __attribute__((noreturn));
void
- __throw_underflow_error(const char* __s);
+ __throw_underflow_error(const char* __s) __attribute__((noreturn));
// Helpers for exception objects in basic_ios
void
- __throw_ios_failure(const char* __s);
+ __throw_ios_failure(const char* __s) __attribute__((noreturn));
} // namespace std
#endif