Re: [webkit-dev] Use of [[maybe_unused]]

2020-01-14 Thread Alex Christensen
I think that would still use 1 extra byte per object, which isn’t ideal but we may be ok with that. In general [[maybe_unused]] tells the compiler to stop telling us about potential speedups. Usually that speedup is just a value in a register or on the stack, which has a relatively small

Re: [webkit-dev] Use of [[maybe_unused]]

2020-01-14 Thread Suzuki, Basuke
> > `sessionID` is used in RELEASE_LOG_IF_ALLOWED() and we have empty > > implementation of RELEASE_LOG() so that it's ended up with unused > > parameter warning of sessionID. We can add UNUSED_PARAM(sessionID) in > > this case, but [[maybe_unused]] is more correct choice to describe the code > >

Re: [webkit-dev] Use of [[maybe_unused]]

2020-01-13 Thread Alex Christensen
> On Jan 13, 2020, at 4:08 PM, Suzuki, Basuke wrote: > > `sessionID` is used in RELEASE_LOG_IF_ALLOWED() and we have empty > implementation of RELEASE_LOG() so that it's ended up with unused parameter > warning of sessionID. We can add UNUSED_PARAM(sessionID) in this case, but >

[webkit-dev] Use of [[maybe_unused]]

2020-01-13 Thread Suzuki, Basuke
Hi WebKit-dev, I'm asking about whether we can use C++ 17's new attribute [[maybe_unused]]. These are situations I cannot solve well with UNUSED_PARAM(). Case 1: The function parameter is only used in RELEASE_LOG macro which is empty in some platform