Example with Clang and Pelles C modified headers:
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c
(27,2): warning: format specifies type 'int' but the argument has type 'unsigned long long' [-Wformat]
PRINTSIZE(GDIPLUSSTARTUPINPUT);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(14,58): note: expanded from macro 'PRINTSIZE'
#define PRINTSIZE(x) printf("\n%-16s %d %Xh bytes\n",#x,sizeof(x),sizeof(x));
~~ ^~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(27,2): warning: format specifies type 'unsigned int' but the argument has type 'unsigned long long' [-Wformat]
PRINTSIZE(GDIPLUSSTARTUPINPUT);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(14,68): note: expanded from macro 'PRINTSIZE'
#define PRINTSIZE(x) printf("\n%-16s %d %Xh bytes\n",#x,sizeof(x),sizeof(x));
~~ ^~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(28,2): warning: cast to smaller integer type 'LONG' (aka 'long') from 'UINT32 *' (aka 'unsigned int *') [-Wpointer-to-int-cast]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,GdiplusVersion);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,67): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(28,2): warning: format specifies type 'unsigned int' but the argument has type 'LONG' (aka 'long') [-Wformat]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,GdiplusVersion);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,67): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(28,2): warning: format specifies type 'unsigned int' but the argument has type 'unsigned long long' [-Wformat]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,GdiplusVersion);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,95): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(29,2): warning: cast to smaller integer type 'LONG' (aka 'long') from 'void **' [-Wpointer-to-int-cast]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,DebugEventCallback);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,67): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(29,2): warning: format specifies type 'unsigned int' but the argument has type 'LONG' (aka 'long') [-Wformat]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,DebugEventCallback);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,67): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(29,2): warning: format specifies type 'unsigned int' but the argument has type 'unsigned long long' [-Wformat]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,DebugEventCallback);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,95): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(30,2): warning: cast to smaller integer type 'LONG' (aka 'long') from 'BOOL *' (aka 'int *') [-Wpointer-to-int-cast]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,SuppressBackgroundThread);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,67): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(30,2): warning: format specifies type 'unsigned int' but the argument has type 'LONG' (aka 'long') [-Wformat]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,SuppressBackgroundThread);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,67): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(30,2): warning: format specifies type 'unsigned int' but the argument has type 'unsigned long long' [-Wformat]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,SuppressBackgroundThread);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,95): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(31,2): warning: cast to smaller integer type 'LONG' (aka 'long') from 'BOOL *' (aka 'int *') [-Wpointer-to-int-cast]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,SuppressExternalCodecs);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,67): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(31,2): warning: format specifies type 'unsigned int' but the argument has type 'LONG' (aka 'long') [-Wformat]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,SuppressExternalCodecs);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,67): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(31,2): warning: format specifies type 'unsigned int' but the argument has type 'unsigned long long' [-Wformat]
PRINTOFSSIZE(GDIPLUSSTARTUPINPUT,SuppressExternalCodecs);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\code\PellesC\_Forum\_test\StructInfo_GDI+.c(15,95): note: expanded from macro 'PRINTOFSSIZE'
#define PRINTOFSSIZE(type,field) printf("%-16s +%Xh %Xh\n",#field,(LONG)&(((type *)0)->field),sizeof(((type *)0)->field));
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
24
warnings and 2 errors generated.
Done.