[Lldb-commits] [lldb] r192578 - Suppress "using extended field designator is an extension" warning in use of offsetof.

Andy Gibbs andyg1001 at hotmail.co.uk
Mon Oct 14 03:00:11 PDT 2013


Author: andyg
Date: Mon Oct 14 05:00:11 2013
New Revision: 192578

URL: http://llvm.org/viewvc/llvm-project?rev=192578&view=rev
Log:
Suppress "using extended field designator is an extension" warning in use of offsetof.

Modified:
    lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h
    lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h

Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h?rev=192578&r1=192577&r2=192578&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_i386.h Mon Oct 14 05:00:11 2013
@@ -6,21 +6,22 @@
 // License. See LICENSE.TXT for details.
 //
 //===---------------------------------------------------------------------===//
+#include "llvm/Support/Compiler.h"
 
 #ifdef DECLARE_REGISTER_INFOS_I386_STRUCT
 
 // Computes the offset of the given GPR in the user data area.
 #define GPR_OFFSET(regname) \
-    (offsetof(GPR, regname))
+    (LLVM_EXTENSION offsetof(GPR, regname))
 
 // Computes the offset of the given FPR in the extended data area.
 #define FPR_OFFSET(regname)  \
-    (offsetof(FPR, xstate) + \
-     offsetof(FXSAVE, regname))
+    (LLVM_EXTENSION offsetof(FPR, xstate) + \
+     LLVM_EXTENSION offsetof(FXSAVE, regname))
 
 // Computes the offset of the YMM register assembled from register halves.
 #define YMM_OFFSET(regname) \
-    (offsetof(YMM, regname))
+    (LLVM_EXTENSION offsetof(YMM, regname))
 
 // Number of bytes needed to represent a FPR.
 #define FPR_SIZE(reg) sizeof(((FXSAVE*)NULL)->reg)

Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h?rev=192578&r1=192577&r2=192578&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterInfos_x86_64.h Mon Oct 14 05:00:11 2013
@@ -6,19 +6,20 @@
 // License. See LICENSE.TXT for details.
 //
 //===---------------------------------------------------------------------===//
+#include "llvm/Support/Compiler.h"
 
 // Computes the offset of the given GPR in the user data area.
 #define GPR_OFFSET(regname) \
-    (offsetof(GPR, regname))
+    (LLVM_EXTENSION offsetof(GPR, regname))
 
 // Computes the offset of the given FPR in the extended data area.
 #define FPR_OFFSET(regname) \
-    (offsetof(FPR, xstate) + \
-     offsetof(FXSAVE, regname))
+    (LLVM_EXTENSION offsetof(FPR, xstate) + \
+     LLVM_EXTENSION offsetof(FXSAVE, regname))
 
 // Computes the offset of the YMM register assembled from register halves.
 #define YMM_OFFSET(regname) \
-    (offsetof(YMM, regname))
+    (LLVM_EXTENSION offsetof(YMM, regname))
 
 #ifdef DECLARE_REGISTER_INFOS_X86_64_STRUCT
 





More information about the lldb-commits mailing list