diff mbox

Fix Wundef warning for __cplusplus

Message ID 20140708180437.GA20824@spoyarek.pnq.redhat.com
State New
Headers show

Commit Message

Siddhesh Poyarekar July 8, 2014, 6:04 p.m. UTC
All current uses of the __cplusplus macro only check if it is defined
or not.  Fix this #if to use $ifdef like the rest of the code.

This fixes the warning on i386.

Siddhesh

	* sysdeps/generic/unwind-pe.h: Only check if __cplusplus is
	defined.

---
 sysdeps/generic/unwind-pe.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Will Newton July 8, 2014, 7:28 p.m. UTC | #1
On 8 July 2014 19:04, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> All current uses of the __cplusplus macro only check if it is defined
> or not.  Fix this #if to use $ifdef like the rest of the code.
>
> This fixes the warning on i386.
>
> Siddhesh
>
>         * sysdeps/generic/unwind-pe.h: Only check if __cplusplus is
>         defined.
>
> ---
>  sysdeps/generic/unwind-pe.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Looks ok to me.

> diff --git a/sysdeps/generic/unwind-pe.h b/sysdeps/generic/unwind-pe.h
> index a4afe5c..a6ee414 100644
> --- a/sysdeps/generic/unwind-pe.h
> +++ b/sysdeps/generic/unwind-pe.h
> @@ -22,7 +22,7 @@
>     than duplicating code, however.  */
>
>  /* If using C++, references to abort have to be qualified with std::.  */
> -#if __cplusplus
> +#ifdef __cplusplus
>  #define __gxx_abort std::abort
>  #else
>  #define __gxx_abort abort
> --
> 1.9.3
>
diff mbox

Patch

diff --git a/sysdeps/generic/unwind-pe.h b/sysdeps/generic/unwind-pe.h
index a4afe5c..a6ee414 100644
--- a/sysdeps/generic/unwind-pe.h
+++ b/sysdeps/generic/unwind-pe.h
@@ -22,7 +22,7 @@ 
    than duplicating code, however.  */
 
 /* If using C++, references to abort have to be qualified with std::.  */
-#if __cplusplus
+#ifdef __cplusplus
 #define __gxx_abort std::abort
 #else
 #define __gxx_abort abort