https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91101

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems systemd abuses compound literals even in cases where they make no sense,
perhaps one of those in a short function like that is no longer optimized away
completely and that is why it triggers all the __asan_malloc_0 calls in there
where formerly it got away without that.
E.g.
#define assert_cc(expr)                                                 \
        struct CONCATENATE(_assert_struct_, __COUNTER__) {              \
                char x[(expr) ? 0 : -1];                                \
};
doesn't make any sense to me, why not say
do { extern char CONCATENATE(_assert_var_, __COUNTER__) [(expr) ? 0 : -1]; }
while (0)
instead?
The IN_SET macro has another compound literal:
assert_cc((sizeof((long double[]){__VA_ARGS__})/sizeof(long double)) <= 20);
It would surprise me if you can't do such counting without resorting to
compound literals.

Reply via email to