When trying to build on Sparc/Sun-Solaris 2.8 with cc command from SUN Forte 6.2, we have compilation error because of assignation between const and non const variables. I have patched the source code with problem (2 files) in order to compile it. The patch file is joined with this bug report to allow you to analyze it.
Created attachment 17599 [details] Modofed source files in order to compile on Sun/Solaris 2.8 with forte 6.2 C compiler
This Bugzilla is for *GCC*, which has nothing to do with the Sun compiler.
But the patch is against gcc and we support building with other host compilers.
Ah, by *compile* they mean *building* GCC iself ;) Ok, then this PR should be tweaked quite a bit (C++?)
Yes, but building GCC (as said) with Sun compiler (or other) has to do with GCC. (In reply to comment #2) > This Bugzilla is for *GCC*, which has nothing to do with the Sun compiler. >
Yes, but please fix your report: the issue has nothing to do with c++, I guess. Also Host / Target / Build should likely be just sparc-sun-solaris2.8, no?
(In reply to comment #6) > Yes, but please fix your report: the issue has nothing to do with c++, I guess. > Also Host / Target / Build should likely be just sparc-sun-solaris2.8, no? > I don't know if it is C++, I am not very aware of this; the files involved are: gcc/fixed-value.c and gcc/tree-ssa-loop-ivopts.c I saw compilation errors on this files and tried to fix it: it was only assignment errors (there is many other warnings about assignment error). I only said that it is gcc (built for c, c++ and fortran languages only) and I don't know which part of the gcc suite they belong to.
/* This was a conditional expression but it triggered a bug in Sun C 5.5. */ if (subtract_p) temp = double_int_neg (b->data); else temp = b->data; /* This was a conditional expression but it triggered a bug in Sun C 5.5. */ if (ivs->bad_uses) return infinite_cost; else return ivs->cost; Fixed by: 2008-12-08 Andrew Haley <aph@redhat.com> Kamaraju Kusumanchi <raju.mailinglists@gmail.com> * gimple.h (gimple_build_try): Fix declaration. * builtins.c (fold_builtin_sqrt): Don't use a conditional operator. * fixed-value.c (do_fixed_add): Likewise. * tree-ssa-loop-ivopts.c (iv_ca_cost): Likewise.