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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [warn/] [oldcast1.C] - Blame information for rev 307

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

Line No. Rev Author Line
1 301 jeremybenn
// { dg-do compile }
2
// { dg-options "-ansi -pedantic-errors -Wold-style-cast" }
3
 
4
// Copyright (C) 2001 Free Software Foundation, Inc.
5
// Contributed by Nathan Sidwell 26 Dec 2001 
6
 
7
// PR 5089. old style cast to void should be permitted (think assert)
8
 
9
void foo ()
10
{
11
  int i;
12
  float f = (float)i;  // { dg-warning "use of old-style cast" "" }
13
 
14
  (void)i;
15
}
16
 

powered by: WebSVN 2.1.0

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