aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-07-21 06:41:39 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-07-21 06:41:39 +0000
commit1b493b8185a04b875c99c0dc4ef63005bb5fc54b (patch)
treee7fbeece18db671ef3328f933a6ed570f4533766 /gcc/cp/cp-tree.h
parent117c9b1c9ddc571a39b46c8151df72e50a2c41e0 (diff)
downloadgcc-1b493b8185a04b875c99c0dc4ef63005bb5fc54b.zip
gcc-1b493b8185a04b875c99c0dc4ef63005bb5fc54b.tar.gz
gcc-1b493b8185a04b875c99c0dc4ef63005bb5fc54b.tar.bz2
cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
* cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__. Define my_friendly_assert and my_friendly_abort as macros which may call friendly_abort. Prototype friendly abort, not my_friendly_abort or my_friendly_assert. * decl.c (signal_catch): Report the signal caught in the error message. Call fatal directly. * typeck2.c (ack, my_friendly_assert): Delete. (my_friendly_abort): Rename to friendly_abort. Expect file, line, and function parameters. Report the abort code, then call fancy_abort. Do not mask an abort if errors have already occurred. * g++.old-deja/g++.brendan/crash16.C, g++.old-deja/g++.brendan/parse3.C, g++.old-deja/g++.brendan/redecl1.C, g++.old-deja/g++.ns/template13.C, g++.old-deja/g++.other/decl4.C, g++.old-deja/g++.pt/spec14.C: Mark as crash test, expected to fail. From-SVN: r35169
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index bba76fe..901e749 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -161,8 +161,8 @@ Boston, MA 02111-1307, USA. */
({ const tree __t = NODE; \
enum tree_code __c = TREE_CODE(__t); \
if (__c != VAR_DECL && __c != FUNCTION_DECL) \
- tree_check_failed (__t, VAR_DECL, __FILE__, \
- __LINE__, __PRETTY_FUNCTION__); \
+ tree_check_failed (__t, VAR_DECL, __FILE__, __LINE__, \
+ __FUNCTION__); \
__t; })
#define VAR_FUNCTION_OR_PARM_DECL_CHECK(NODE) \
@@ -171,8 +171,8 @@ Boston, MA 02111-1307, USA. */
if (__c != VAR_DECL \
&& __c != FUNCTION_DECL \
&& __c != PARM_DECL) \
- tree_check_failed (__t, VAR_DECL, __FILE__, \
- __LINE__, __PRETTY_FUNCTION__); \
+ tree_check_failed (__t, VAR_DECL, __FILE__, __LINE__, \
+ __FUNCTION__); \
__t; })
#define VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK(NODE) \
@@ -182,16 +182,16 @@ Boston, MA 02111-1307, USA. */
&& __c != FUNCTION_DECL \
&& __c != TYPE_DECL \
&& __c != TEMPLATE_DECL) \
- tree_check_failed (__t, VAR_DECL, __FILE__, \
- __LINE__, __PRETTY_FUNCTION__); \
+ tree_check_failed (__t, VAR_DECL, __FILE__, __LINE__, \
+ __FUNCTION__); \
__t; })
#define RECORD_OR_UNION_TYPE_CHECK(NODE) \
({ const tree __t = NODE; \
enum tree_code __c = TREE_CODE(__t); \
if (__c != RECORD_TYPE && __c != UNION_TYPE) \
- tree_check_failed (__t, RECORD_TYPE, __FILE__, \
- __LINE__, __PRETTY_FUNCTION__); \
+ tree_check_failed (__t, RECORD_TYPE, __FILE__, __LINE__, \
+ __FUNCTION__); \
__t; })
#else /* not ENABLE_TREE_CHECKING, or not gcc */
@@ -4629,9 +4629,15 @@ extern tree binfo_or_else PARAMS ((tree, tree));
extern void readonly_error PARAMS ((tree, const char *, int));
extern int abstract_virtuals_error PARAMS ((tree, tree));
extern void incomplete_type_error PARAMS ((tree, tree));
-extern void my_friendly_abort PARAMS ((int))
+extern void friendly_abort PARAMS ((int, const char *,
+ int, const char *))
ATTRIBUTE_NORETURN;
-extern void my_friendly_assert PARAMS ((int, int));
+
+#define my_friendly_abort(N) \
+ friendly_abort (N, __FILE__, __LINE__, __FUNCTION__)
+#define my_friendly_assert(EXP, N) \
+ (((EXP) == 0) ? (friendly_abort (N, __FILE__, __LINE__, __FUNCTION__), 0) : 0)
+
extern tree store_init_value PARAMS ((tree, tree));
extern tree digest_init PARAMS ((tree, tree, tree *));
extern tree build_scoped_ref PARAMS ((tree, tree));