view gcc/testsuite/g++.dg/parse/semicolon4.C @ 111:04ced10e8804

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

// PR c++/46890
// { dg-do compile }

struct OK1
{
  int i;
} const *ok1_var;		// No complains

struct OK2;
extern OK2 ok2a_var;

struct OK2
{
  int i;
} const &ok2_var = ok2a_var;	// No complains

struct OK3
{
  int i;
} volatile (ok3_var);		// No complains

struct E1
{
  int i;
} const;			// { dg-error "'const' can only be specified for objects and functions" }

void foo (
struct E2
{				// { dg-error "types may not be defined in parameter types" }
  int i;
} volatile);

void bar (
struct E3
{				// { dg-error "types may not be defined in parameter types" }
  int i;
} const, int);