public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR 55473
@ 2013-03-06  7:44 Shakthi Kannan
  2013-03-07  7:54 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Shakthi Kannan @ 2013-03-06  7:44 UTC (permalink / raw)
  To: gcc-patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix PR 55473
  2013-03-06  7:44 [PATCH] Fix PR 55473 Shakthi Kannan
@ 2013-03-07  7:54 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2013-03-07  7:54 UTC (permalink / raw)
  To: Shakthi Kannan; +Cc: gcc-patches

On Wed, Mar 06, 2013 at 01:14:45PM +0530, Shakthi Kannan wrote:
> 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.

Thanks, committed (with different ChangeLog entry, both for formatting
and description).

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-07  7:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-06  7:44 [PATCH] Fix PR 55473 Shakthi Kannan
2013-03-07  7:54 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).