OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [declspec-3-Wextra.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* See declspec-3.c . Test -Wold-style-declaration is enabled by -Wextra. */
/* See declspec-3.c . Test -Wold-style-declaration is enabled by -Wextra. */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-Wextra" } */
/* { dg-options "-Wextra" } */
 
 
static int x0;
static int x0;
int static x1; /* { dg-warning "not at beginning" } */
int static x1; /* { dg-warning "not at beginning" } */
 
 
extern int x2;
extern int x2;
int extern x3; /* { dg-warning "not at beginning" } */
int extern x3; /* { dg-warning "not at beginning" } */
 
 
typedef int x4;
typedef int x4;
int typedef x5; /* { dg-warning "not at beginning" } */
int typedef x5; /* { dg-warning "not at beginning" } */
 
 
void g (int);
void g (int);
 
 
void
void
f (void)
f (void)
{
{
  auto int x6 = 0;
  auto int x6 = 0;
  int auto x7 = 0; /* { dg-warning "not at beginning" } */
  int auto x7 = 0; /* { dg-warning "not at beginning" } */
  register int x8 = 0;
  register int x8 = 0;
  int register x9 = 0; /* { dg-warning "not at beginning" } */
  int register x9 = 0; /* { dg-warning "not at beginning" } */
  g (x6 + x7 + x8 + x9);
  g (x6 + x7 + x8 + x9);
}
}
 
 
const static int x10; /* { dg-warning "not at beginning" } */
const static int x10; /* { dg-warning "not at beginning" } */
 
 
/* Attributes are OK before storage class specifiers, since some
/* Attributes are OK before storage class specifiers, since some
   attributes are like such specifiers themselves.  */
   attributes are like such specifiers themselves.  */
 
 
__attribute__((format(printf, 1, 2))) static void h (const char *, ...);
__attribute__((format(printf, 1, 2))) static void h (const char *, ...);
__attribute__((format(printf, 1, 2))) void static i (const char *, ...); /* { dg-warning "not at beginning" } */
__attribute__((format(printf, 1, 2))) void static i (const char *, ...); /* { dg-warning "not at beginning" } */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.