[Openmp-commits] [PATCH] D12403: Fix GCC warning 'always_inline function might not be inlinable'

Jonas Hahnfeld via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 27 04:07:35 PDT 2015


Hahnfeld created this revision.
Hahnfeld added a reviewer: jlpeyton.
Hahnfeld added a subscriber: openmp-commits.
Hahnfeld set the repository for this revision to rL LLVM.

The function has to be marked inline which wasn't the case if __STRICT_ANSI__.

Compile tested with GCC 4.9 and 5.2, Intel 15.0 and clang 3.8.0 (from trunk). Now builds completely warning free in the default configuration.

Repository:
  rL LLVM

http://reviews.llvm.org/D12403

Files:
  runtime/src/thirdparty/ittnotify/ittnotify.h
  runtime/src/thirdparty/ittnotify/ittnotify_config.h
  runtime/src/thirdparty/ittnotify/legacy/ittnotify.h

Index: runtime/src/thirdparty/ittnotify/legacy/ittnotify.h
===================================================================
--- runtime/src/thirdparty/ittnotify/legacy/ittnotify.h
+++ runtime/src/thirdparty/ittnotify/legacy/ittnotify.h
@@ -116,11 +116,7 @@
  * For functions declared inline, this attribute inlines the function even
  * if no optimization level was specified.
  */
-#ifdef __STRICT_ANSI__
-#define ITT_INLINE           static
-#else  /* __STRICT_ANSI__ */
 #define ITT_INLINE           static inline
-#endif /* __STRICT_ANSI__ */
 #define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused))
 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
 /** @endcond */
Index: runtime/src/thirdparty/ittnotify/ittnotify_config.h
===================================================================
--- runtime/src/thirdparty/ittnotify/ittnotify_config.h
+++ runtime/src/thirdparty/ittnotify/ittnotify_config.h
@@ -111,11 +111,7 @@
  * For functions declared inline, this attribute inlines the function even
  * if no optimization level was specified.
  */
-#ifdef __STRICT_ANSI__
-#define ITT_INLINE           static
-#else  /* __STRICT_ANSI__ */
 #define ITT_INLINE           static inline
-#endif /* __STRICT_ANSI__ */
 #define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused))
 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
 /** @endcond */
Index: runtime/src/thirdparty/ittnotify/ittnotify.h
===================================================================
--- runtime/src/thirdparty/ittnotify/ittnotify.h
+++ runtime/src/thirdparty/ittnotify/ittnotify.h
@@ -177,11 +177,7 @@
  * For functions declared inline, this attribute inlines the function even
  * if no optimization level was specified.
  */
-#ifdef __STRICT_ANSI__
-#define ITT_INLINE           static
-#else  /* __STRICT_ANSI__ */
 #define ITT_INLINE           static inline
-#endif /* __STRICT_ANSI__ */
 #define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused))
 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
 /** @endcond */


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12403.33310.patch
Type: text/x-patch
Size: 2025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20150827/3f3f730c/attachment.bin>


More information about the Openmp-commits mailing list