view gcc/testsuite/g++.dg/spellcheck-macro-ordering.C @ 111:04ced10e8804

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

// PR c++/72786

/* Example of a macro-ordering issue, where the use is before the defn.  */

class DocTargetDriver {
  virtual void clone() const OVERRIDE { }
  /* Offering "OVERRIDE" as a spelling suggestion for "OVERRIDE" would be
     nonsensical.  */
  // { dg-bogus "did you mean" "" { target *-*-* } .-3 }
  // { dg-error "expected .;. at end of member declaration" "" { target *-*-* } .-4 }
  // { dg-error ".OVERRIDE. does not name a type" "" { target *-*-* } .-5 }
};

#define OVERRIDE override