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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [offsetof3.C] - Blame information for rev 717

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

Line No. Rev Author Line
1 693 jeremybenn
/* Verify that offsetof warns if given a non-standard-layout class */
2
/* Copyright (C) 2003 Free Software Foundation, Inc. */
3
/* Contributed by Matt Austern  15 May 2003 */
4
/* { dg-do compile } */
5
 
6
struct X
7
{
8
  int x, y;
9
protected:
10
  int z;
11
};
12
 
13
typedef X* pX;
14
typedef __SIZE_TYPE__ size_t;
15
 
16
size_t yoff = size_t(&(pX(0)->y)); /* { dg-warning "invalid access" "" } */
17
/* { dg-warning "macro was used incorrectly" "macro" { target *-*-* } 16 } */

powered by: WebSVN 2.1.0

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