view gcc/testsuite/g++.dg/expr/static_cast7.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// Regression test for bug 39415 (and its duplicate 44916).
struct S {};
struct T : S {};
int f(const T*) { return 0; }
void f(T*);
int main() {
  S* s(0);
  int a = f(static_cast<const T*>(s));
  int b = f(static_cast<const T*>(0));
}