view gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C @ 152:2b5abeee2509

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

/* nodiscard attribute tests  */
/* { dg-do compile { target c++2a } } */
/* { dg-options "-O -ftrack-macro-expansion=0" } */

[[nodiscard(123)]] int check1 (void); /* { dg-error "nodiscard\[^\n\r]*must be a string constant" } */

void
test (void)
{
  check1 ();
  (void) check1 ();
}