zero sized initializers with side effects discarded
Olivier Hainque
hainque@adacore.com
Fri Sep 9 14:27:00 GMT 2005
Daniel Berlin wrote:
> > spinlock_t lock = (spinlock_t) { .raw_lock = one_raw_spinlock() };
>
> What exactly is this code expected to do?
> Call one_raw_spinlock and then throw away the result?
Yes. As you said, the result is nothing anyway, but the function should
still be called IMO.
> If so, feel free to change gimplify_init_ctor_eval to do that.
Thanks :)
Thanks for your feedback.
Olivier
More information about the Gcc
mailing list