From 57ea6e8c9f204be6d38177024d3b8f1aba4e05b2 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 13 Sep 2017 00:17:19 -0400 Subject: fix up msvc stuff to make it work on linux and macos too --- src/codegen.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index 5a273375f5..3d34eaacbf 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -5194,8 +5194,7 @@ void codegen_add_object(CodeGen *g, Buf *object_path) { g->link_objects.append(object_path); } -#if defined(_MSVC) -// MSVC doesn't seem to support "designators" for array initialization +// Must be coordinated with with CIntType enum static const char *c_int_type_names[] = { "short", "unsigned short", @@ -5206,18 +5205,6 @@ static const char *c_int_type_names[] = { "long long", "unsigned long long", }; -#else -static const char *c_int_type_names[] = { - [CIntTypeShort] = "short", - [CIntTypeUShort] = "unsigned short", - [CIntTypeInt] = "int", - [CIntTypeUInt] = "unsigned int", - [CIntTypeLong] = "long", - [CIntTypeULong] = "unsigned long", - [CIntTypeLongLong] = "long long", - [CIntTypeULongLong] = "unsigned long long", -}; -#endif static void get_c_type(CodeGen *g, TypeTableEntry *type_entry, Buf *out_buf) { assert(type_entry); -- cgit v1.2.3