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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [pr15360-1.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
/* Static declarations followed by extern are OK even if the extern
2
   declaration is initialized.  Bug 15360 from hozelda at
3
   yahoo.com.  */
4
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
5
/* { dg-do compile } */
6
/* { dg-options "" } */
7
 
8
static int a;
9
static int a;
10
extern int a;
11
static int a;
12
 
13
static int b;
14
extern int b = 1; /* { dg-warning "initialized and declared" "extern init warning" } */
15
static int b;
16
static int b;
17
 
18
static int c; /* { dg-error "previous declaration" "" } */
19
int c; /* { dg-error "non-static" "correct error" } */
20
 
21
static int d; /* { dg-error "previous declaration" "" } */
22
int d = 1; /* { dg-error "non-static" "correct error" } */
23
 
24
void foo (void) { extern int e = 1; } /* { dg-error "has both" "extern init in function" } */

powered by: WebSVN 2.1.0

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