pkarashchenko commented on code in PR #6132:
URL: https://github.com/apache/incubator-nuttx/pull/6132#discussion_r858438817


##########
include/nuttx/compiler.h:
##########
@@ -379,9 +379,11 @@
 
 #  if defined(__clang__)
 #    define no_builtin(n) __attribute__((no_builtin(n)))
-#  else
+#  elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4)
 #    define no_builtin(n) 
__attribute__((__optimize__("-fno-tree-loop-distribute-patterns")))

Review Comment:
   Those are not an easy questions :)
   1. I'm thinking that the more compiler specific can be moved to make 
subsystem the better it is. But that is only my personal opinion.
   2. Here it depends what should be the behaviour of the final system. I see 
reasonable to apply it to all the files because it is not logical to me that 
NuttX provides implementation for `memcpy`, but some parts of the system use it 
while other use builtin version. I mean that we can have an option either to 
use NuttX `memcpy` or builtin `memcpy` but not the mix. But again this is a 
point for discussion and maybe I'm missing the bigger picture.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to