Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/c90-const-expr-4.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* Test for constant expressions: const variable with value 0 is not a |
2 null pointer constant so the conditional expression should have | |
3 type void * and the assignment is OK. */ | |
4 /* Origin: Joseph Myers <joseph@codesourcery.com> */ | |
5 /* { dg-do compile } */ | |
6 /* { dg-options "-std=iso9899:1990 -O2" } */ | |
7 int *p; | |
8 long *q; | |
9 static void *const n = 0; | |
10 int j; | |
11 void f(void) { q = j ? p : n; } |