-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiler: add HAVE_EXPRESSION_STATEMENT macro for gcc #14580
base: master
Are you sure you want to change the base?
Conversation
b58f0b6
to
cb39a9b
Compare
[Experimental Bot, please feedback here] No, this PR does not fully meet the NuttX requirements as described. While it provides a summary of the change, it lacks crucial details. Here's a breakdown: Missing Information:
Example of Improved Summary & Impact:
By providing the missing details and explicitly addressing each point in the template, the PR will be much clearer and easier to review, ultimately increasing the chances of it being accepted. |
@@ -185,8 +185,10 @@ | |||
|
|||
#if (MSEC_PER_TICK * USEC_PER_MSEC) == USEC_PER_TICK | |||
# define MSEC2TICK(msec) div_const_roundup(msec, MSEC_PER_TICK) | |||
# define MSEC2TICKSLOW(msec) (((msec)+(MSEC_PER_TICK/2))/MSEC_PER_TICK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why need slow version
this will open fast version of div_const which defined in: include/nuttx/lib/math32.h when meet 64/32 when use gcc compiling Signed-off-by: ligd <[email protected]>
In file included from /home/ligd/platform/mainline/nuttx/include/nuttx/clock.h:38, from sam_automount.c:35: sam_automount.c:92:19: error: braced-group within expression allowed only inside a function 92 | .ddelay = MSEC2TICK(CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_DDELAY), | ^~~~~~~~~ sam_automount.c:93:19: error: braced-group within expression allowed only inside a function 93 | .udelay = MSEC2TICK(CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_UDELAY), | ^~~~~~~~~ Signed-off-by: ligd <[email protected]>
Summary
compiler: add HAVE_EXPRESSION_STATEMENT macro for gcc
this will open fast version of div_const when meet 64/32 when use gcc compiling
Impact
div_const in
include/nuttx/lib/math32.h
Testing
CI