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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [init/] [struct3.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* PR c++/23180.  */
2
/* Initialize a global variable with an expression that attempts to use
3
   pointer arithmetic to calculate a structure field offset.  */
4
 
5
struct Track {
6
  char soundName[15];
7
};
8
 
9
struct SaveLoadEntry {
10
  int offs;
11
  int type;
12
  int size;
13
};
14
 
15
int foobar = ((long) (& ((Track *) 42)->soundName[0])) - 42;

powered by: WebSVN 2.1.0

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