This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR 55473


The libquadmath/quadmath.h file cannot be used with C++. The
following patch allows inclusion and use of the quadmath.h header
file.

2013-03-06 Shakthi Kannan <shakthimaan@gmail.com>

    PR libquadmath/55473
    * quadmath.h: Add ifdef __cplusplus macros.

---
 libquadmath/quadmath.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libquadmath/quadmath.h b/libquadmath/quadmath.h
index 863fe44..aa9ef51 100644
--- a/libquadmath/quadmath.h
+++ b/libquadmath/quadmath.h
@@ -23,6 +23,10 @@ Boston, MA 02110-1301, USA.  */

 #include <stdlib.h>

+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Define the complex type corresponding to __float128
    ("_Complex __float128" is not allowed) */
 typedef _Complex float __attribute__((mode(TC))) __complex128;
@@ -189,4 +193,8 @@ __quadmath_nth (conjq (__complex128 __z))
   return __extension__ ~__z;
 }

+#ifdef __cplusplus
+}
+#endif
+
 #endif
-- 
1.7.11.7


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]