diff options
author | Joseph Myers <joseph@codesourcery.com> | 2010-11-17 12:21:39 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2010-11-17 12:21:39 +0000 |
commit | f79616a446e17b2e69769a57939cf9b1c65064f2 (patch) | |
tree | b39ee88c80f1cb4465e67a064b92dfbe761842e0 /gcc | |
parent | b57849d4193dff39ec6e68b0fc27de912278ca62 (diff) | |
download | gcc-f79616a446e17b2e69769a57939cf9b1c65064f2.zip gcc-f79616a446e17b2e69769a57939cf9b1c65064f2.tar.gz gcc-f79616a446e17b2e69769a57939cf9b1c65064f2.tar.bz2 |
opts.c (target_handle_option): Do not assert that loc == UNKNOWN_LOCATION.
* opts.c (target_handle_option): Do not assert that loc ==
UNKNOWN_LOCATION.
From-SVN: r166866
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/opts.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 91ae63e..a131549 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-11-17 Joseph Myers <joseph@codesourcery.com> + + * opts.c (target_handle_option): Do not assert that loc == + UNKNOWN_LOCATION. + 2010-11-17 Jakub Jelinek <jakub@redhat.com> Richard Guenther <rguenther@suse.de> @@ -521,7 +521,7 @@ target_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, const struct cl_decoded_option *decoded, unsigned int lang_mask ATTRIBUTE_UNUSED, int kind, - location_t loc, + location_t loc ATTRIBUTE_UNUSED, const struct cl_option_handlers *handlers ATTRIBUTE_UNUSED, diagnostic_context *dc) { @@ -530,7 +530,10 @@ target_handle_option (struct gcc_options *opts, gcc_assert (dc == global_dc); gcc_assert (decoded->canonical_option_num_elements <= 2); gcc_assert (kind == DK_UNSPECIFIED); - gcc_assert (loc == UNKNOWN_LOCATION); + /* Although the location is not passed down to + targetm.handle_option, do not make assertions about its value; + options may come from optimize attributes and having the correct + location in the handler is not generally important. */ return targetm.handle_option (decoded->opt_index, decoded->arg, decoded->value); } |