aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/rfg10.C
blob: 75680748e0130e82358566358266da373e9dc0dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// { dg-do assemble  }
// { dg-options "-pedantic-errors -std=c++98" }
// Bug: g++ doesn't notice the overflow in the enum values.

#include <limits.h>
 
enum COLOR
{
    red,
    green = ULONG_MAX,
    blue		     // { dg-error "too large for .unsigned long|overflow" }
};