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] enum cast fix (svn revision 146752)


Hi,

While building gcc on my fedora 9 (gnu/linux) x86_64 box, I had a compile 
problem:

/home/bradh/devel/gcc-svn/host-x86_64-unknown-linux-gnu/prev-gcc/xgcc -B/home/bradh/devel/gcc-svn/host-x86_64-unknown-linux-gnu/prev-gcc/ -B/opt/gccsvn/x86_64-unknown-linux-gnu/bin/ -c  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include  -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/bid -I../libdecnumber    ../.././gcc/ira.c -o 
ira.o                                         
/home/bradh/devel/gcc-svn/host-x86_64-unknown-linux-gnu/prev-gcc/xgcc -B/home/bradh/devel/gcc-svn/host-x86_64-unknown-linux-gnu/prev-gcc/ -B/opt/gccsvn/x86_64-unknown-linux-gnu/bin/ -c  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include  -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/bid -I../libdecnumber    ../.././gcc/ira-build.c -o 
ira-build.o                             
cc1: warnings being treated as errors                                                                                                       
../.././gcc/ira.c: In function âsetup_cover_and_important_classesâ:                                                                         
../.././gcc/ira.c:763: error: enum conversion in assignment is invalid in C++  

Index: gcc/ira.c
===================================================================
--- gcc/ira.c   (revision 146752)
+++ gcc/ira.c   (working copy)
@@ -760,7 +760,7 @@
              break;
          if (j < CONSTRAINT__LIMIT)
            {
-             classes[n++] = i;
+             classes[n++] = (enum reg_class) i;
              continue;
            }
 #endif

[In case of doubt, this patch is deemed trivial. Copyright does not apply to 
this change, or if it does, that copyright is to the owners of the copyright 
on the patched file.]

Brad


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