]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Make embed-10.c test more robust
authorJakub Jelinek <jakub@redhat.com>
Fri, 17 Jan 2025 20:00:50 +0000 (21:00 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 17 Jan 2025 20:00:50 +0000 (21:00 +0100)
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.

2025-01-17  Jakub Jelinek  <jakub@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

index a358384ae3d4ef862dfa623a5a37125d9526cf4f..e797f795ea57ab3d35549be2ddfc1bdf17f7cdb4 100644 (file)
@@ -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 } */