view gcc/testsuite/g++.dg/pr71973-2.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

// { dg-do compile }
// { dg-options "-Wall -fdump-tree-eh" }

typedef __SIZE_TYPE__ size_t;
struct tm;

extern "C"
size_t strftime (char*, size_t, const char*, const struct tm*)
__attribute__ ((__nothrow__));

void foo () throw ()
{
  strftime (0,0,0,0); // { dg-warning "null argument where non-null required" }
  // { dg-warning "too many arguments for format" "" { target *-*-* } .-1 }
}

// { dg-final { scan-tree-dump-not "eh_dispatch" "eh" } }
// { dg-final { scan-tree-dump-not "resx" "eh" } }