diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-06-08 21:12:58 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-06-08 21:12:58 +0000 |
commit | 75e58045e17f2e1dd2e7a7e54b15bed0aeb52428 (patch) | |
tree | 21e6490717a162645e050e15baf822932c9f48e1 /gcc/assert.h | |
parent | 27b69f05173b73612b198319d5586a69629874da (diff) | |
download | gcc-75e58045e17f2e1dd2e7a7e54b15bed0aeb52428.tar.gz |
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1183 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/assert.h')
-rw-r--r-- | gcc/assert.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/assert.h b/gcc/assert.h index 59aafd9c487..c7c91833786 100644 --- a/gcc/assert.h +++ b/gcc/assert.h @@ -18,10 +18,16 @@ #else -#ifdef __STDC__ +#if defined(__STDC__) || defined (__cplusplus) /* Defined in libgcc.a */ +#ifdef __cplusplus +extern "C" { extern void __eprintf (const char *, const char *, int, const char *); +} +#else +extern void __eprintf (const char *, const char *, int, const char *); +#endif #define assert(expression) \ ((void) ((expression) ? 0 : __assert (#expression, __FILE__, __LINE__))) @@ -30,7 +36,7 @@ extern void __eprintf (const char *, const char *, int, const char *); (__eprintf ("%s:%u: failed assertion `%s'\n", \ file, line, expression), 0) -#else /* no __STDC__; i.e. -traditional. */ +#else /* no __STDC__ and not C++; i.e. -traditional. */ extern void __eprintf (); /* Defined in libgcc.a */ @@ -41,6 +47,6 @@ extern void __eprintf (); /* Defined in libgcc.a */ (__eprintf ("%s:%u: failed assertion `%s'\n", \ file, lineno, "expression"), 0) -#endif /* no __STDC__; i.e. -traditional. */ +#endif /* no __STDC__ and not C++; i.e. -traditional. */ #endif /* no __GNU__; i.e., /bin/cc. */ #endif |