Hi!

With the https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673945.html
hack we get slightly different error wording in one of the errors, given that
the test actually does use #embed, I think both wordings are just fine and
we should accept them.

Tested on x86_64-linux, committed to trunk as obvious.

2025-01-17  Jakub Jelinek  <ja...@redhat.com>

        * c-c++-common/cpp/embed-10.c: Allow a different error wording for
        C++.

--- gcc/testsuite/c-c++-common/cpp/embed-10.c.jj        2024-09-12 
11:05:22.000000000 +0200
+++ gcc/testsuite/c-c++-common/cpp/embed-10.c   2025-01-17 10:00:20.769854161 
+0100
@@ -7,4 +7,4 @@ const char *p =
 /* { dg-error "makes pointer from integer without a cast" "" { target c } .-2 
} */
 /* { dg-error "expected identifier" "" { target c } .-3 } */
 /* { dg-error "invalid conversion" "" { target c++ } .-4 } */
-/* { dg-error "expected unqualified-id before numeric constant" "" { target 
c++ } .-5 } */
+/* { dg-error "expected unqualified-id before (?:numeric constant|'#embed')" 
"" { target c++ } .-5 } */


        Jakub

Reply via email to