Open
Description
opened on Sep 16, 2017
I am using this script https://gist.github.com/fitzgen/187381e358f60efa8194d0b276b4d11a.
The hashtag for my bindgen version is 4dd4ac7 .
The header file compiles with clang++ -std=c++11
$ ./b.sh bindgen abc.h
clang-4.0: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
abc.h:2:11: error: no member named 'c' in 'a<int>::(anonymous union at abc.h:3:3)'
abc.h:6:18: note: in instantiation of member function 'a<int>::a' requested here
abc.h:2:11: error: no member named 'c' in 'a<int>::(anonymous union at abc.h:3:3)', err: true
thread 'main' panicked at 'Unable to generate bindings: ()', /checkout/src/libcore/result.rs:860:4
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at /checkout/src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at /checkout/src/libstd/sys_common/backtrace.rs:60
at /checkout/src/libstd/panicking.rs:380
3: std::panicking::default_hook
at /checkout/src/libstd/panicking.rs:396
4: std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:611
5: std::panicking::begin_panic_new
at /checkout/src/libstd/panicking.rs:553
6: std::panicking::begin_panic_fmt
at /checkout/src/libstd/panicking.rs:521
7: rust_begin_unwind
at /checkout/src/libstd/panicking.rs:497
8: core::panicking::panic_fmt
at /checkout/src/libcore/panicking.rs:92
9: core::result::unwrap_failed
at /checkout/src/libcore/macros.rs:41
10: <core::result::Result<T, E>>::expect
at /checkout/src/libcore/result.rs:762
11: bindgen::main::{{closure}}
at src/main.rs:55
12: std::panicking::try::do_call
at /checkout/src/libstd/panicking.rs:479
13: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
14: std::panicking::try
at /checkout/src/libstd/panicking.rs:458
15: std::panic::catch_unwind
at /checkout/src/libstd/panic.rs:361
16: bindgen::main
at src/main.rs:54
17: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
18: std::rt::lang_start
at /checkout/src/libstd/panicking.rs:458
at /checkout/src/libstd/panic.rs:361
at /checkout/src/libstd/rt.rs:59
19: main
20: __libc_start_main
21: _start
Interesting: bindgen failed to generate bindings for the test case!
$ cat abc.h
template <typename = int> struct a {
a() { b.c; }
union {
} b;
};
a<> d() { return {}; }
Activity