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/02/05 15:26:01 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #5399: Add CONFIG_NDEBUG Kconfig to control NDEBUG definition

xiaoxiang781216 commented on pull request #5399:
URL: https://github.com/apache/incubator-nuttx/pull/5399#issuecomment-1030644415


   > @xiaoxiang781216
   > 
   > > > This still feels wrong to me.
   > 
   > > > If I place "assert(...)" in a file I expect not have to also enabled it, but that it will be enabled unless I define NDEBUG in that file or globally.
   > 
   > > Yes, this behavior is strange to me(that's why I provide this patch), but it is defined by standard and then we have to follow.
   > 
   > > Ok, I name the new option to CONFIG_NDEBUG and default to y.
   > 
   > Why did you disable assert by default?
   
   All debug facility should be disabled by default to follow the convention:
   https://github.com/apache/incubator-nuttx/blob/master/Kconfig#L558-L1955
   You can see all debugging option in above Kconfig snippet is in the off state.
   It's very bad that some debugging facility is on , but other is off  by default.
   If you like all debugging option on by default, please create a new PR to change them.
   
   > That is counter to where you agreed above.
   
   I agree to add an option to decouple assert from DEBUG_ASSERT, can you point out where I agree that the default setting is enable assert?


-- 
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