view gcc/testsuite/g++.dg/diagnostic/disable.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

// { dg-options "-Wtemplates -Wmultiple-inheritance -Wvirtual-inheritance -Wnamespaces" }

#include <iostream>
#include <algorithm>

namespace foo { } // { dg-warning "namespace" }

template <typename X> X Foo (); // { dg-warning "template" }

struct B1 {};
struct B2 {};
struct V {};

struct D :  B1, B2 {}; //  { dg-warning "multiple" }

struct E : virtual V {};  // { dg-warning "virtual" }

struct F1 : E {};

struct F2 : D {};

void Baz (int a, int b)
{
  std::swap (a, b);
}