This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Tweak diagnostic-token.ranges.c testcase (PR testsuite/71865)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>, Marek Polacek <polacek at redhat dot com>, David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 14 Jul 2016 16:55:41 +0200
- Subject: [PATCH] Tweak diagnostic-token.ranges.c testcase (PR testsuite/71865)
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
As mentioned in the PR, this testcase behaves differently on
powerpc*/spu/s390* targets, because in non-iso modes they predefine
conditional macros like bool and that affects the behavior of the
suggestions.
We should certainly discuss what to do with the conditional macros,
but in the mean time IMHO it doesn't hurt to just avoid this
problem.
Tested on x86_64-linux and i686-linux, ok for trunk?
2016-07-14 Jakub Jelinek <jakub@redhat.com>
PR testsuite/71865
* gcc.dg/diagnostic-token-ranges.c: Add -std=c11 to dg-options.
(wide_string_literal_in_asm): Use __asm instead of asm, adjust
expected diagnostics.
--- gcc/testsuite/gcc.dg/diagnostic-token-ranges.c.jj 2016-07-14 11:06:23.000000000 +0200
+++ gcc/testsuite/gcc.dg/diagnostic-token-ranges.c 2016-07-14 14:47:50.399907380 +0200
@@ -1,4 +1,4 @@
-/* { dg-options "-fdiagnostics-show-caret -Wc++-compat" } */
+/* { dg-options "-fdiagnostics-show-caret -Wc++-compat -std=c11" } */
/* Verify that various diagnostics show source code ranges. */
@@ -68,11 +68,11 @@ foo (unknown_type param); /* { dg-error
void wide_string_literal_in_asm (void)
{
- asm (L"nop"); /* { dg-error "wide string literal in 'asm'" } */
+ __asm (L"nop"); /* { dg-error "wide string literal in 'asm'" } */
/*
{ dg-begin-multiline-output "" }
- asm (L"nop");
- ^~~~~~
+ __asm (L"nop");
+ ^~~~~~
{ dg-end-multiline-output "" }
*/
}
Jakub