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


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


 


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