From 25a1019f18d089c60c0d150e679ec0ac7a18c4f2 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 3 Sep 1993 19:02:27 -0400 Subject: (build_enumerator): Apply default conversion to constant-expression. From-SVN: r5258 --- gcc/c-decl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/c-decl.c b/gcc/c-decl.c index eca89fa..4d9424f 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -5607,7 +5607,10 @@ build_enumerator (name, value) if (value != 0) { if (TREE_CODE (value) == INTEGER_CST) - constant_expression_warning (value); + { + value = default_conversion (value); + constant_expression_warning (value); + } else { error ("enumerator value for `%s' not integer constant", -- cgit v1.1