summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/error27.C
blob: 90cb231c0ac8c5a20e6a955dfe637eb532da57ad (plain)
1
2
3
4
5
6
7
8
// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" }
// PR c++/20152

struct KrSelectionMode {  virtual void init() = 0; }; // { dg-error "8:previous definition of 'struct KrSelectionMode'" }
struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "8:previous definition of 'struct KrKDESelectionMode'" }
struct KrSelectionMode {  virtual void init() = 0; }; // { dg-error "8:redefinition of 'struct KrSelectionMode'" }
struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "8:redefinition of 'struct KrKDESelectionMode'" }
KrKDESelectionMode krKDESelectionMode;