This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: zero sized initializers with side effects discarded


>    int main(void)
>    {
>      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?
If so, feel free to change gimplify_init_ctor_eval to do that.

But again, if you expect "real" sets of zero sized fields to do
something, you are going to run into major issues.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]