8220690: ATTRIBUTE_ALIGNED requires GNU extensions enabled
authorkbarrett
Tue, 19 Mar 2019 14:08:20 -0400
changeset 54190 021448dc442c
parent 54189 dfde3bb48c03
child 54194 c2238a12f259
8220690: ATTRIBUTE_ALIGNED requires GNU extensions enabled Summary: Use __typeof__(x) instead of typeof(x). Reviewed-by: shade, sgehwolf
src/hotspot/share/utilities/globalDefinitions_gcc.hpp
--- a/src/hotspot/share/utilities/globalDefinitions_gcc.hpp	Tue Mar 19 10:47:17 2019 -0400
+++ b/src/hotspot/share/utilities/globalDefinitions_gcc.hpp	Tue Mar 19 14:08:20 2019 -0400
@@ -270,8 +270,8 @@
 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53017
 //
 // GCC versions older than 4.6.4 would fail even with "+0", and needs additional
-// cast to typeof(x) to work around the similar bug.
+// cast to __typeof__(x) to work around the similar bug.
 //
-#define ATTRIBUTE_ALIGNED(x) __attribute__((aligned((typeof(x))x+0)))
+#define ATTRIBUTE_ALIGNED(x) __attribute__((aligned((__typeof__(x))x+0)))
 
 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_GCC_HPP