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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [binary-constants-4.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* Test for binary integer constants: random errors.  */
2
 
3
/* Origin: Joerg Wunsch <j.gnu@uriah.heep.sax.de>.  */
4
/* { dg-do compile } */
5
/* { dg-options "-std=gnu99" } */
6
 
7
void
8
foo(void)
9
{
10
  double d;
11
  int i;
12
 
13
  d = 0b1101;
14
  d = 0b1101p1; /* { dg-error "invalid suffix \"p1\" on integer constant" } */
15
  d = 0x1101p1;
16
  i = 0b3011;   /* { dg-error "invalid suffix \"b3011\" on integer constant" } */
17
  i = 0b113;    /* { dg-error "invalid digit \"3\" in binary constant" } */
18
}

powered by: WebSVN 2.1.0

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