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]

Re: GCC build failed for native with your patch on 2003-10-11T03:17:08Z.




ess/tbox/cvs-gcc/gcc/gcc -I/Users/regress/tbox/cvs-gcc
/gcc/gcc/. -I/Users/regress/tbox/cvs-gcc/gcc/gcc/../include -I../intl insn-modes.c -o insn-modes.o
insn-modes.c:404:1: "MASK" redefined
In file included from /usr/include/machine/param.h:30,
                 from /usr/include/sys/param.h:102,
                 from /Users/regress/tbox/cvs-gcc/gcc/gcc/system.h:161,
                 from insn-modes.c:7:
/usr/include/ppc/param.h:120:1: this is the location of the previous definition
Looks like the problem is that darwin defines a variable called MASK.

Here is a workaround and one that describes the macro better:
Ok?

Thanks,
Andrew Pinski

ChangeLog:
* genmodes.c (emit_mode_mask) Change MASK to MODE_MASK.


Index: genmodes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genmodes.c,v
retrieving revision 1.1
diff -u -d -b -w -u -p -r1.1 genmodes.c
--- genmodes.c  10 Oct 2003 20:33:05 -0000      1.1
+++ genmodes.c  11 Oct 2003 03:47:43 -0000
@@ -790,18 +790,18 @@ emit_mode_mask (void)
   print_decl ("unsigned HOST_WIDE_INT", "mode_mask_array",
              "NUM_MACHINE_MODES");
   puts ("\
-#define MASK(m)                               \\\n\
+#define MODE_MASK(m)                               \\\n\
   ((m) >= HOST_BITS_PER_WIDE_INT)             \\\n\
    ? ~(unsigned HOST_WIDE_INT) 0              \\\n\
    : ((unsigned HOST_WIDE_INT) 1 << (m)) - 1\n");
 
   for_all_modes (c, m)
     if (m->bitsize != (unsigned int)-1)
-      tagged_printf ("MASK (%u)", m->bitsize, m->name);
+      tagged_printf ("MODE_MASK (%u)", m->bitsize, m->name);
     else
-      tagged_printf ("MASK (%u*BITS_PER_UNIT)", m->bytesize, m->name);
+      tagged_printf ("MODE_MASK (%u*BITS_PER_UNIT)", m->bytesize, m->name);
 
-  puts ("#undef MASK");
+  puts ("#undef MODE_MASK");
   print_closer ();
 }


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