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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [alias-1.c] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do compile }
2
// { dg-options "-Wstrict-aliasing -fstrict-aliasing" }
3
 
4
// Copyright (C) 2002 Free Software Foundation, Inc.
5
// Contributed by Nathan Sidwell 29 Sep 2002 <nathan@codesourcery.com>
6
 
7
// 8083. warn about odd casts
8
 
9
typedef int YYSTYPE;
10
typedef struct tDefEntry
11
{
12
  unsigned t;
13
 
14
} tDefEntry;
15
struct incomplete;
16
 
17
 
18
YYSTYPE
19
 addSibMacro(
20
         YYSTYPE  list )
21
 {
22
     tDefEntry** ppT   = (tDefEntry**)&list; // { dg-warning "type-punned pointer will" "" }
23
 
24
     struct incomplete *p = (struct incomplete *)&list; // { dg-warning "type-punning to incomplete" "" }
25
 
26
     return list;
27
 }
28
 

powered by: WebSVN 2.1.0

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