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/04/26 07:08:41 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6132: compiler.h: optimization option is not supported before GCC 4.6

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


##########
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:
   1. -fno-builtin-xxx is specific to gcc/clang. Yes, no_builtin is also gcc/clang specific, but c macro is more simple.
   2. do you want to apply -fno-builtin-xxx for individual file.
   



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