Hi Art,

> This morning's build on sparc-sun-solaris2.10 failed for me; the error
> message in 'stage_2' is below:
>
> 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]
> cc1: all warnings being treated as errors
>
> My build on Friday worked, so the likely culprit is this change
> from today:
>
> 2011-03-28  Joseph Myers  <jos...@codesourcery.com>
>
>       * config/sparc/sparc-opts.h: New.
>       * config/sparc/sparc.c (sparc_handle_option, sparc_select,
>       sparc_cpu, fpu_option_set, TARGET_HANDLE_OPTION): Remove.
>       (sparc_option_override): Store processor_type enumeration rather
>       than string in cpu_default.  Remove name and enumeration from
>       cpu_table.  Directly default -mcpu then default -mtune from -mcpu
>       without using sparc_select.  Use target_flags_explicit instead of
>       fpu_option_set.
>       * config/sparc/sparc.h (enum processor_type): Move to
>       sparc-opts.h.
>       (sparc_cpu, struct sparc_cpu_select, sparc_select): Remove.
>       * config/sparc/sparc.opt (config/sparc/sparc-opts.h): New
>       HeaderInclude entry.
>       (mcpu=, mtune=): Use Var and Enum.
>       (sparc_processor_type): New Enum and EnumValue entries.
>
> The relevant lines of the auto-generated 'options.c' file look like this:
>
> 752:  0, /* sparc_cmodel_string */
> 753:  0, /* sparc_cpu_and_features */
> 754:  0, /* sparc_std_struct_return */
> 755:  0, /* sparc_cpu */
> 756:  0, /* asm_file_name */

I've just run into this myself and filed PR bootstrap/48337 for the
issue.  In general, you should do so yourself and Cc: the maintainers
and patch author.  It's a better way to get attention than just posting
to the gcc list.

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to