Hi. This fixes follow-up which is caused by differences in between C and C++ FE:
./objdir/gcc/xgcc -Bobjdir/gcc /home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/ubsan/attrib-5.c -c /home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/ubsan/attrib-5.c:6:1: warning: ‘foobar’ attribute directive ignored [-Wattributes] float_cast2 (void) { /* { dg-warning "attribute directive ignored" } */ ^~~~~~~~~~~ ./objdir/gcc/xg++ -Bobjdir/gcc /home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/ubsan/attrib-5.c -c /home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/ubsan/attrib-5.c:6:18: warning: ‘foobar’ attribute directive ignored [-Wattributes] float_cast2 (void) { /* { dg-warning "attribute directive ignored" } */ ^ I'll install it as obvious. Thanks, Martin
>From fc7fd410d2836776c8e49fa6755a5d58beb24901 Mon Sep 17 00:00:00 2001 From: marxin <mli...@suse.cz> Date: Mon, 16 Oct 2017 21:27:52 +0200 Subject: [PATCH] Fix attrib-5.c test-case. gcc/testsuite/ChangeLog: 2017-10-16 Martin Liska <mli...@suse.cz> * c-c++-common/ubsan/attrib-5.c (float_cast2): Fix warning scan so that it will work for both C and C++ FEs. --- gcc/testsuite/c-c++-common/ubsan/attrib-5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/testsuite/c-c++-common/ubsan/attrib-5.c b/gcc/testsuite/c-c++-common/ubsan/attrib-5.c index fee1df1c433..209b5dd7d2b 100644 --- a/gcc/testsuite/c-c++-common/ubsan/attrib-5.c +++ b/gcc/testsuite/c-c++-common/ubsan/attrib-5.c @@ -3,8 +3,7 @@ __attribute__((no_sanitize("foobar"))) static void -float_cast2 (void) -{ /* { dg-warning "attribute directive ignored" } */ +float_cast2 (void) { /* { dg-warning "attribute directive ignored" } */ volatile double d = 300; volatile signed char c; c = d; -- 2.14.2