view gcc/testsuite/g++.dg/diagnostic/disable.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

// { 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);
}