From 39af18acb8afc4120c631003c11bdfdddc4e5764 Mon Sep 17 00:00:00 2001 From: Evan Haas Date: Thu, 1 Aug 2024 12:12:16 -0700 Subject: [PATCH] Type: allow `double long` and `_Complex double long` Fixes #736 --- src/aro/Type.zig | 2 ++ test/cases/double long.c | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 test/cases/double long.c diff --git a/src/aro/Type.zig b/src/aro/Type.zig index f48560c0..f03a01fc 100644 --- a/src/aro/Type.zig +++ b/src/aro/Type.zig @@ -2091,6 +2091,7 @@ pub const Builder = struct { }, .long => b.specifier = switch (b.specifier) { .none => .long, + .double => .long_double, .long => .long_long, .unsigned => .ulong, .signed => .long, @@ -2103,6 +2104,7 @@ pub const Builder = struct { .complex_long => .complex_long_long, .complex_slong => .complex_slong_long, .complex_ulong => .complex_ulong_long, + .complex_double => .complex_long_double, else => return b.cannotCombine(p, source_tok), }, .int128 => b.specifier = switch (b.specifier) { diff --git a/test/cases/double long.c b/test/cases/double long.c new file mode 100644 index 00000000..d95c4ad7 --- /dev/null +++ b/test/cases/double long.c @@ -0,0 +1,2 @@ +_Complex double long x; +double long y;