view gcc/testsuite/c-c++-common/Wformat-pr88257.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 1830386684a0
children
line wrap: on
line source

/* { dg-options "-Wformat -fdiagnostics-show-caret" } */

#include "Wformat-pr88257.h"

void test (const char *msg)
{
  __builtin_printf ("size: %" PRIu32 "\n", msg); /* { dg-warning "expects argument of type" } */
  /* { dg-begin-multiline-output "" }
   __builtin_printf ("size: %" PRIu32 "\n", msg);
                     ^~~~~~~~~              ~~~
                                            |
                                            const char *
     { dg-end-multiline-output "" { target c } } */
  /* { dg-begin-multiline-output "" }
 # define PRIu32  "u"
     { dg-end-multiline-output "" { target c } } */
  /* { dg-begin-multiline-output "" }
   __builtin_printf ("size: %" PRIu32 "\n", msg);
                     ^~~~~~~~~~~~~~~~~~~~~  ~~~
                                            |
                                            const char*
     { dg-end-multiline-output "" { target c++ } } */
}