/*
* For http://stackoverflow.com/a/15448781/545027
* -- Eldar
*/
#define __type_is_void(expr) __builtin_types_compatible_p(typeof(expr), void)
#define __expr_or_zero(expr) __builtin_choose_expr(__type_is_void(expr), 0, (expr))
#define DO(expr) \
__builtin_choose_expr(__type_is_void(expr), \
__DO_VOID(expr), \
__DO(__expr_or_zero(expr)))
#define __DO(expr) \
({ typeof(expr) __ret; __ret = (expr); __ret; })
#define __DO_VOID(expr) \
(void) (expr)
void foo(void) { }
int bar(void) { return 1; }
int main(void) {
DO(foo());
DO(bar());
return 0;
}
LyoKICogRm9yIGh0dHA6Ly9zdGFja292ZXJmbG93LmNvbS9hLzE1NDQ4NzgxLzU0NTAyNwogKiAgIC0tIEVsZGFyCiAqLwoKI2RlZmluZSBfX3R5cGVfaXNfdm9pZChleHByKSBfX2J1aWx0aW5fdHlwZXNfY29tcGF0aWJsZV9wKHR5cGVvZihleHByKSwgdm9pZCkKI2RlZmluZSBfX2V4cHJfb3JfemVybyhleHByKSBfX2J1aWx0aW5fY2hvb3NlX2V4cHIoX190eXBlX2lzX3ZvaWQoZXhwciksIDAsIChleHByKSkKCiNkZWZpbmUgRE8oZXhwcikgXAogICAgX19idWlsdGluX2Nob29zZV9leHByKF9fdHlwZV9pc192b2lkKGV4cHIpLCBcCgkJX19ET19WT0lEKGV4cHIpLCBcCgkJX19ETyhfX2V4cHJfb3JfemVybyhleHByKSkpCgojZGVmaW5lIF9fRE8oZXhwcikgXAoJKHsgdHlwZW9mKGV4cHIpIF9fcmV0OyBfX3JldCA9IChleHByKTsgX19yZXQ7IH0pCgojZGVmaW5lIF9fRE9fVk9JRChleHByKSBcCgkodm9pZCkgKGV4cHIpCgp2b2lkIGZvbyh2b2lkKSB7IH0KaW50IGJhcih2b2lkKSB7IHJldHVybiAxOyB9CgppbnQgbWFpbih2b2lkKSB7CglETyhmb28oKSk7CglETyhiYXIoKSk7CglyZXR1cm4gMDsKfQo=