OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [dllimport4.C] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
//  Report error if dllimport attribute in definition itself.
2
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
3
 
4
__attribute__((dllimport))  void bar () { }     // { dg-error "definition" }
5
 
6
__attribute__((dllimport))  int foo = 1;        // { dg-error "definition" }
7
 
8
void faz()
9
{
10
  __attribute__((dllimport)) int faa = 1;       // { dg-error "definition" }
11
  faa++;
12
}
13
 
14
__attribute__((dllimport)) int fee (1);         // { dg-error "definition" }
15
 
16
 
17
// In-class initialization of a static data member is not a definition.
18
struct  F
19
{
20
  __attribute__ ((dllimport)) static const int i = 1;  // OK
21
};
22
 
23
// Reference the dllimport'd static data member.
24
void f ()
25
{
26
  const int* j = &F::i;
27
}
28
 
29
struct  G
30
{
31
  __attribute__ ((dllimport)) static const int i = 1;
32
};
33
 
34
// Define the static data member _without_ the dllimport.
35
// This should override the prior declaration with dllimport.
36
 
37
const int G::i;         //  { dg-warning "dllimport ignored" }
38
 

powered by: WebSVN 2.1.0

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