public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6019] opts: do not do sanity check when an error is seen
@ 2021-12-16 16:52 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-12-16 16:52 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:54e6d3ef5021d7df936132ba961f9c360239e717

commit r12-6019-g54e6d3ef5021d7df936132ba961f9c360239e717
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Dec 16 13:33:00 2021 +0100

    opts: do not do sanity check when an error is seen
    
            PR target/103709
    
    gcc/c-family/ChangeLog:
    
            * c-pragma.c (handle_pragma_pop_options): Do not check
            global options modification when an error is seen in parsing
            of options (pragmas or attributes).

Diff:
---
 gcc/c-family/c-pragma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c
index c4ed4205820..0772c34342a 100644
--- a/gcc/c-family/c-pragma.c
+++ b/gcc/c-family/c-pragma.c
@@ -1132,7 +1132,7 @@ handle_pragma_pop_options (cpp_reader *ARG_UNUSED(dummy))
 				      p->optimize_binary);
       optimization_current_node = p->optimize_binary;
     }
-  if (flag_checking)
+  if (flag_checking && !seen_error ())
     {
       cl_optimization_compare (p->saved_global_options, &global_options);
       free (p->saved_global_options);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-16 16:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 16:52 [gcc r12-6019] opts: do not do sanity check when an error is seen Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).