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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [declspec-3.c] - Blame information for rev 154

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Test declaration specifiers.  Test diagnosis of storage class
2
   specifiers not at start.  */
3
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
4
/* { dg-do compile } */
5
/* { dg-options "-W" } */
6
 
7
static int x0;
8
int static x1; /* { dg-warning "not at beginning" } */
9
 
10
extern int x2;
11
int extern x3; /* { dg-warning "not at beginning" } */
12
 
13
typedef int x4;
14
int typedef x5; /* { dg-warning "not at beginning" } */
15
 
16
void g (int);
17
 
18
void
19
f (void)
20
{
21
  auto int x6 = 0;
22
  int auto x7 = 0; /* { dg-warning "not at beginning" } */
23
  register int x8 = 0;
24
  int register x9 = 0; /* { dg-warning "not at beginning" } */
25
  g (x6 + x7 + x8 + x9);
26
}
27
 
28
const static int x10; /* { dg-warning "not at beginning" } */
29
 
30
/* Attributes are OK before storage class specifiers, since some
31
   attributes are like such specifiers themselves.  */
32
 
33
__attribute__((format(printf, 1, 2))) static void h (const char *, ...);
34
__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.