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/09/01 10:05:03 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request, #6983: compiler.h: Rename inline_function to always_inline_function

xiaoxiang781216 opened a new pull request, #6983:
URL: https://github.com/apache/incubator-nuttx/pull/6983

   ## Summary
   reserve inline_function macro for inline keyword
   
   ## Impact
   Minor
   
   ## Testing
   Pass CI
   


-- 
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] easonxiang commented on pull request #6983: compiler.h: Rename inline_function to always_inline_function

Posted by GitBox <gi...@apache.org>.
easonxiang commented on PR #6983:
URL: https://github.com/apache/incubator-nuttx/pull/6983#issuecomment-1236149634

   > After more thought, it's wrong to change the macro to always_inline since if user use this in source code directly:
   > 
   > ```
   > __attribute__ ((always_inline))
   > ```
   > 
   > the marco expanse it to the invalid statement:
   > 
   > ```
   > __attribute__ ((__attribute__ ((always_inline, no_instrument_function))))
   > ```
   > 
   > So, it's better to keep in the current form. @easonxiang @pkarashchenko
   
   Yes, It's unavailable to define the same name with gcc key words. We can add some symbol, such as start with `_` or some similar.


-- 
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 merged pull request #6983: compiler.h: Rename inline_function to always_inline_function

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #6983:
URL: https://github.com/apache/incubator-nuttx/pull/6983


-- 
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 #6983: compiler.h: Rename inline_function to always_inline_function

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6983:
URL: https://github.com/apache/incubator-nuttx/pull/6983#issuecomment-1238846972

   @pkarashchenko could you merge it?


-- 
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] easonxiang commented on pull request #6983: compiler.h: Rename inline_function to always_inline_function

Posted by GitBox <gi...@apache.org>.
easonxiang commented on PR #6983:
URL: https://github.com/apache/incubator-nuttx/pull/6983#issuecomment-1236237876

   It seems there is no standard or rules to redefine the gcc features.
   If possible to add some unify prefix to these macros, it may be more clear to the users.


-- 
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 #6983: compiler.h: Rename inline_function to always_inline_function

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6983:
URL: https://github.com/apache/incubator-nuttx/pull/6983#issuecomment-1236106960

   That could be, but not relate to this change. inline_function map to always_inline is very strange which should be fixed anyway.


-- 
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 #6983: compiler.h: Rename inline_function to always_inline_function

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6983:
URL: https://github.com/apache/incubator-nuttx/pull/6983#issuecomment-1236240169

   > It seems there is no standard or rules to redefine the gcc features. If possible to add some unify prefix to these macros, it may be more clear to the users.
   
   it isn't gcc specific feature, many attribute support by other compiler too, just the grammar is different.


-- 
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 #6983: compiler.h: Rename inline_function to always_inline_function

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6983:
URL: https://github.com/apache/incubator-nuttx/pull/6983#issuecomment-1236143928

   After more thought, it's wrong to change the macro to always_inline since if user use this in source code directly:
   ```
   __attribute__ ((always_inline))
   ```
   the marco expanse it to the invalid statement:
   ```
   __attribute__ ((__attribute__ ((always_inline, no_instrument_function))))
   ```
   So, it's better to keep in the current form. @easonxiang @pkarashchenko 


-- 
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 #6983: compiler.h: Rename inline_function to always_inline_function

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6983:
URL: https://github.com/apache/incubator-nuttx/pull/6983#issuecomment-1236150435

   If so, I prefer add _function suffix like other similar macros


-- 
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 #6983: compiler.h: Rename inline_function to always_inline_function

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6983:
URL: https://github.com/apache/incubator-nuttx/pull/6983#issuecomment-1236131695

   > This change looks much better for understanding, but it increase the length of the line. How about use always_inline instead, since it must be a function if it was defined by inline.
   
   I am fine with either, @pkarashchenko what's your opinion?
   
   


-- 
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 #6983: compiler.h: Rename inline_function to always_inline_function

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #6983:
URL: https://github.com/apache/incubator-nuttx/pull/6983#issuecomment-1236136888

   always_inline should be fine


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