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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [c99-complex-2.c] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
/* Test for _Complex: in C99 only.  Test for increment and decrement.  */
2
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
3
/* { dg-do compile } */
4
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
5
 
6
/* Use of ++ and -- on complex types (both prefix and postfix) is a
7
   C99 constraint violation (6.5.2.4p1, 6.5.3.1p1).
8
*/
9
 
10
_Complex double
11
foo (_Complex double z)
12
{
13
  z++; /* { dg-bogus "warning" "warning in place of error" } */
14
  /* { dg-error "complex" "postinc" { target *-*-* } 13 } */
15
  ++z; /* { dg-bogus "warning" "warning in place of error" } */
16
  /* { dg-error "complex" "preinc" { target *-*-* } 15 } */
17
  z--; /* { dg-bogus "warning" "warning in place of error" } */
18
  /* { dg-error "complex" "postdec" { target *-*-* } 17 } */
19
  --z; /* { dg-bogus "warning" "warning in place of error" } */
20
  /* { dg-error "complex" "predec" { target *-*-* } 19 } */
21
  return z;
22
}

powered by: WebSVN 2.1.0

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