From c59ddd2b82fd68d7976f70173d3eb9c0ef66bd14 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 22 Mar 2011 22:26:37 +0000 Subject: [PATCH] alpha.c (alpha_handle_option): Access target_flags via opts pointer. * config/alpha/alpha.c (alpha_handle_option): Access target_flags via opts pointer. Use error_at. Don't assert that global structures are in use. From-SVN: r171311 --- gcc/ChangeLog | 6 ++++++ gcc/config/alpha/alpha.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 79b42782025..9f72500864b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-22 Joseph Myers + + * config/alpha/alpha.c (alpha_handle_option): Access target_flags + via opts pointer. Use error_at. Don't assert that global + structures are in use. + 2011-03-22 Joseph Myers * config/i386/i386.c (ix86_isa_flags_explicit): Remove. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 48046c631c5..f97b2aaa3ac 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -213,32 +213,30 @@ static const struct default_options alpha_option_optimization_table[] = /* Implement TARGET_HANDLE_OPTION. */ static bool -alpha_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, +alpha_handle_option (struct gcc_options *opts, + struct gcc_options *opts_set ATTRIBUTE_UNUSED, const struct cl_decoded_option *decoded, - location_t loc ATTRIBUTE_UNUSED) + location_t loc) { size_t code = decoded->opt_index; const char *arg = decoded->arg; int value = decoded->value; - gcc_assert (opts == &global_options); - gcc_assert (opts_set == &global_options_set); - switch (code) { case OPT_mfp_regs: if (value == 0) - target_flags |= MASK_SOFT_FP; + opts->x_target_flags |= MASK_SOFT_FP; break; case OPT_mieee: case OPT_mieee_with_inexact: - target_flags |= MASK_IEEE_CONFORMANT; + opts->x_target_flags |= MASK_IEEE_CONFORMANT; break; case OPT_mtls_size_: if (value != 16 && value != 32 && value != 64) - error ("bad value %qs for -mtls-size switch", arg); + error_at (loc, "bad value %qs for -mtls-size switch", arg); break; } -- 2.30.2