view gcc/testsuite/gcc.dg/decl-9.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-do compile } */
/* { dg-options "-std=gnu89" } */

w *x; /* { dg-error "unknown type name 'w'" } */

int z;    /* { dg-message "previous declaration of 'z'" } */
y         /* { dg-error "unknown type name 'y'" } */
  * z;    /* { dg-error "conflicting " } */

int f1()
{
  int d, e;
  d * e; /* { dg-bogus "unknown type name 'd'" } */
  g * h; /* { dg-error "unknown type name 'g'" } */
  g i;   /* { dg-error "unknown type name 'g'" } */
}

typedef int a;

int f2()
{
b: a: ; /* { dg-bogus "a label can only be part of a statement" } */
c: d e; /* { dg-error "a label can only be part of a statement" } */
/* { dg-error "unknown type name 'd'" "unknown type name" { target *-*-* } .-1 } */
   ;
}

void *f3()
{
  return x; /* { dg-bogus "'x' undeclared" } */
}