diff mbox series

[libobjc] : Avoid "DFmode" redefinition warning

Message ID CAFULd4aY0bPkO_erdCCP1qt92TRnpsTN_VqWLgP7hzsNJW89Vg@mail.gmail.com
State New
Headers show
Series [libobjc] : Avoid "DFmode" redefinition warning | expand

Commit Message

Uros Bizjak March 6, 2019, 1:45 p.m. UTC
The attached patch removes

/space/homedirs/uros/gcc-svn/trunk/libobjc/encoding.c:84: warning:
"DFmode" redefined
   84 | #define DFmode          _C_DBL
      |
In file included from ../.././gcc/tm.h:36,
                 from /space/homedirs/uros/gcc-svn/trunk/libobjc/encoding.c:37:
../.././gcc/insn-modes.h:210: note: this is the location of the
previous definition
  210 | #define DFmode (scalar_float_mode
((scalar_float_mode::from_int) E_DFmode))
      |

warning.

2019-03-06  Uroš Bizjak  <ubizjak@gmail.com>

    * encoding.c (DFmode): #undef before #define.

Bootstrapped on x86_64-linux-gnu {,-m32}.

OK for mainline?

Uros.

Comments

Jakub Jelinek March 6, 2019, 1:47 p.m. UTC | #1
On Wed, Mar 06, 2019 at 02:45:23PM +0100, Uros Bizjak wrote:
> The attached patch removes
> 
> /space/homedirs/uros/gcc-svn/trunk/libobjc/encoding.c:84: warning:
> "DFmode" redefined
>    84 | #define DFmode          _C_DBL
>       |
> In file included from ../.././gcc/tm.h:36,
>                  from /space/homedirs/uros/gcc-svn/trunk/libobjc/encoding.c:37:
> ../.././gcc/insn-modes.h:210: note: this is the location of the
> previous definition
>   210 | #define DFmode (scalar_float_mode
> ((scalar_float_mode::from_int) E_DFmode))
>       |
> 
> warning.
> 
> 2019-03-06  Uroš Bizjak  <ubizjak@gmail.com>
> 
>     * encoding.c (DFmode): #undef before #define.
> 
> Bootstrapped on x86_64-linux-gnu {,-m32}.
> 
> OK for mainline?

Ok, thanks.

	Jakub
diff mbox series

Patch

diff --git a/libobjc/encoding.c b/libobjc/encoding.c
index adac546..ef34fc8 100644
--- a/libobjc/encoding.c
+++ b/libobjc/encoding.c
@@ -81,6 +81,7 @@  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define DECL_MODE(TYPE) *(TYPE)
 #define TYPE_MODE(TYPE) *(TYPE)
 
+#undef  DFmode
 #define DFmode          _C_DBL
 
 #define strip_array_types(TYPE)      ({const char *_field = (TYPE); \