This is the mail archive of the gcc-bugs@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]

[Bug bootstrap/48337] [4.7 regression] options.c doesn't compile on SPARC


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48337

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-03-29 14:51:01 UTC ---
On Tue, 29 Mar 2011, ro at gcc dot gnu.org wrote:

> options.c:753:3: error: enum conversion in initialization is invalid in C++
> [-Werror=c++-compat]
> options.c:753:3: error: (near initialization for
> 'global_options_init.x_sparc_cpu_and_features') [-Werror=c++-compat]
> options.c:755:3: error: enum conversion in initialization is invalid in C++
> [-Werror=c++-compat]
> options.c:755:3: error: (near initialization for
> 'global_options_init.x_sparc_cpu') [-Werror=c++-compat]

Try adding Init(PROCESSOR_V7) to the lines in sparc.opt defining sparc_cpu 
and sparc_cpu_and_features.  It appears an explicit initializer of 0 for 
these enums isn't being accepted even where an implicit 0 from the lack of 
initializer (when a variable rather than a field was used) was accepted.


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