*** empty log message ***
authorRichard Stallman <rms@gnu.org>
Mon, 8 Jun 1992 21:12:58 +0000 (21:12 +0000)
committerRichard Stallman <rms@gnu.org>
Mon, 8 Jun 1992 21:12:58 +0000 (21:12 +0000)
From-SVN: r1183

gcc/assert.h

index 59aafd9c487d2db035b85b591ab8dbfcba5b83d9..c7c91833786a29c952003223656adc8f9b5cebb3 100644 (file)
 
 #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