@@ -4289,7 +4289,7 @@ kind indicates which of the above is being processed.
42894289
42904290static a_boolean process_gnu_diagnostic_pragma (a_pending_pragma_ptr ppp )
42914291/*
4292- Handle "#pragma GCC diagnostic push/pop" (GCC 4.6 and later) and
4292+ Handle "#pragma GCC diagnostic push/pop" (GCC 4.6 and later, and clang ) and
42934293"#pragma GCC diagnostic kind "option"", where kind is "error", "warning",
42944294"ignored", "fatal" (clang only), or "ignored_attributes" (GCC 12 and later).
42954295The pragmas are only accepted: they do not affect the front end's own
@@ -4303,7 +4303,7 @@ form is not recognized by the compiler being emulated.
43034303 (void )get_token ();
43044304 if (curr_token == tok_identifier ) {
43054305 a_const_char * str = locator_for_curr_id .symbol_header -> identifier ;
4306- if (gnu_version >= 40600 &&
4306+ if (( clang_mode || gnu_version >= 40600 ) &&
43074307 (strcmp (str , "push" ) == 0 || strcmp (str , "pop" ) == 0 )) {
43084308 recognized = TRUE;
43094309 } else if (strcmp (str , "error" ) == 0 ||
@@ -4361,7 +4361,6 @@ Process a "#pragma GCC ..." construct.
43614361 } else if (gnu_version >= 40400 && strcmp (str , "reset_options" ) == 0 ) {
43624362 process_gnu_options_pragma (ppp , (a_gcc_pragma_kind )gcc_pk_reset_options );
43634363 } else if (strcmp (str , "diagnostic" ) == 0 ) {
4364- ignore_in_back_end = FALSE;
43654364 recognized = process_gnu_diagnostic_pragma (ppp );
43664365#if GNU_VECTOR_TYPES_ALLOWED && BUILTIN_FUNCTIONS_ENABLED
43674366 } else if (target_is_arm_based () && target_is_64_bits () &&
0 commit comments