Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/c99-left-shift-3.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-std=iso9899:1999 -pedantic-errors -Wno-shift-overflow" } */ | |
3 | |
4 #define INTM1 (sizeof (int) * __CHAR_BIT__ - 1) | |
5 | |
6 enum { A = 1 << INTM1 }; /* { dg-error "constant expression" } */ | |
7 int k = 1 << INTM1; /* { dg-error "constant expression" } */ | |
8 | |
9 void | |
10 fn (int i) | |
11 { | |
12 switch (i) | |
13 case 1 << INTM1: break; /* { dg-error "constant expression" } */ | |
14 } |