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-const-expr-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Test for constraints on constant expressions.  In C90 it is clear that
2
   certain constructs are not permitted in unevaluated parts of an
3
   expression (except in sizeof); in C99 it might fall within implementation
4
   latitude; and if the operands are suitable, diagnostics should not be
5
   issued.
6
*/
7
/* Origin: Joseph Myers <jsm28@cam.ac.uk>; inspired by
8
   http://deja.com/getdoc.xp?AN=524271595&fmt=text by Peter Seebach.
9
*/
10
/* { dg-do compile } */
11
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
12
 
13
/* The comma operator is in a subexpression that is not evaluated, so OK
14
   by C99.  In C90 a diagnostic is required since it is not in a sizeof.
15
*/
16
int i = (1 ? 0 : (2, 3));

powered by: WebSVN 2.1.0

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