This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/48337] [4.7 regression] options.c doesn't compile on SPARC
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Mar 2011 14:51:21 +0000
- Subject: [Bug bootstrap/48337] [4.7 regression] options.c doesn't compile on SPARC
- Auto-submitted: auto-generated
- References: <bug-48337-4@http.gcc.gnu.org/bugzilla/>
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.