You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/08/04 07:03:31 UTC
[GitHub] [incubator-nuttx] github-liyi opened a new pull request, #6779: optimize UNUSED macro
github-liyi opened a new pull request, #6779:
URL: https://github.com/apache/incubator-nuttx/pull/6779
Signed-off-by: liyi <li...@xiaomi.com>
## Summary
optimize UNUSED macro to fit more type of input parameter, for example, a structure
## Impact
macro UNUSED can fit more types.
## Testing
before change
![image](https://user-images.githubusercontent.com/38680504/182783930-6612eca7-1a68-43c0-98f8-2cc221a032a3.png)
when input parameter of UNUSED is not a integer, the compile will fail!
after change, it can work well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #6779: optimize UNUSED macro
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #6779:
URL: https://github.com/apache/incubator-nuttx/pull/6779
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6779: optimize UNUSED macro
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6779:
URL: https://github.com/apache/incubator-nuttx/pull/6779#issuecomment-1204892664
> I'm not sure about this change. For example if the parameter is `int` then would this change force the compiler to use the stack to obtain the parameter address (I mean when parameters are passed via registers)?
Shouldn't, since first expression(1) short cut the second expression evaluation.
> Could you please add a few simple examples for assembly generated with and without this change?
Here is an example: https://github.com/apache/incubator-nuttx-apps/pull/1248
`gip6` is a structure, `(void)a` is an invalid construction in this case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #6779: optimize UNUSED macro
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #6779:
URL: https://github.com/apache/incubator-nuttx/pull/6779#issuecomment-1204923543
If we are sure that there is no stack impact, then I'm fully fine with this change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org