summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr15236.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr15236.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr15236.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr15236.c b/gcc/testsuite/gcc.dg/pr15236.c
new file mode 100644
index 000000000..b01a4e858
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr15236.c
@@ -0,0 +1,9 @@
+/* PR 15236: pedantic switch modifies treatment of non-ISO compliant
+ enumerations. */
+/* { dg-do compile } */
+/* { dg-options "-Wall -Wextra -pedantic-errors -Wconversion" } */
+typedef enum OMX_ERRORTYPE
+{
+ OMX_ErrorNone = 0,
+ OMX_ErrorInsufficientResources = 0x80001000 /* { dg-error "ISO C restricts enumerator values to range of .int." } */
+} OMX_ERRORTYPE;