From 9df15c1b5e7d8773d67c50e5856ad2a116e3640d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 16 Jan 2018 23:04:51 +0100 Subject: [PATCH 1/2] ir: Give more info for the non-floating type complex type message. --- src/ir/context.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ir/context.rs b/src/ir/context.rs index 258c6a0cc3..d22bde04ac 100644 --- a/src/ir/context.rs +++ b/src/ir/context.rs @@ -1970,7 +1970,13 @@ impl BindgenContext { CXType_Float => FloatKind::Float, CXType_Double => FloatKind::Double, CXType_LongDouble => FloatKind::LongDouble, - _ => panic!("Non floating-type complex?"), + _ => { + panic!( + "Non floating-type complex? {:?}, {:?}", + ty, + float_type, + ) + }, }; TypeKind::Complex(float_kind) } From ea603ce59a26b21e15850c6d6024ebd74c4bde3a Mon Sep 17 00:00:00 2001 From: cris-b Date: Fri, 19 Jan 2018 15:12:14 +0100 Subject: [PATCH 2/2] ir: Handle _Complex _Float128 correctly. Unfortunately we can't test it for the same alignment issues that "long double" has. Fixes #1087 --- src/ir/context.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ir/context.rs b/src/ir/context.rs index d22bde04ac..1be14a5fe4 100644 --- a/src/ir/context.rs +++ b/src/ir/context.rs @@ -1970,6 +1970,7 @@ impl BindgenContext { CXType_Float => FloatKind::Float, CXType_Double => FloatKind::Double, CXType_LongDouble => FloatKind::LongDouble, + CXType_Float128 => FloatKind::Float128, _ => { panic!( "Non floating-type complex? {:?}, {:?}",