With this simple code I see that PellesC SAPI.H is throwing some warnings, yes I could suppress with pragma, but documenting here for future improvement consideration.
Building speech.obj.
C:\Program Files\PellesC_V10\Include\Win\sapi.h(3207): warning #2197: [ISO] 'SPEVENTENUM (aka enum SPEVENTENUM)' is not a standard bit-field type.
C:\Program Files\PellesC_V10\Include\Win\sapi.h(3208): warning #2197: [ISO] 'SPEVENTLPARAMTYPE (aka enum SPEVENTLPARAMTYPE)' is not a standard bit-field type.
C:\Program Files\PellesC_V10\Include\Win\sapi.h(3216): warning #2197: [ISO] 'SPEVENTENUM (aka enum SPEVENTENUM)' is not a standard bit-field type.
C:\Program Files\PellesC_V10\Include\Win\sapi.h(3217): warning #2197: [ISO] 'SPEVENTLPARAMTYPE (aka enum SPEVENTLPARAMTYPE)' is not a standard bit-field type.
C:\Program Files\PellesC_V10\Include\Win\sapi.h(3225): warning #2197: [ISO] 'SPEVENTENUM (aka enum SPEVENTENUM)' is not a standard bit-field type.
C:\Program Files\PellesC_V10\Include\Win\sapi.h(3226): warning #2197: [ISO] 'SPEVENTLPARAMTYPE (aka enum SPEVENTLPARAMTYPE)' is not a standard bit-field type.
All of the 'offending' lines are of the form SPEVENTENUM eEventId : 16;
SPEVENTLPARAMTYPE elParamType : 16;
John Z
You
have to use pragmas to suppress those warnings, or
set warning level 1.
The warning refers to the ISO standard "
ยง6.7.2.1 Structure and union specifiers" in constraints, point 5, where says:
A bit-field shall have a type that is a qualified or unqualified version of _Bool, signed int, unsigned int, or some other implementation-defined type.
Microsoft apply bit-fielfs to almost all types available while strict ISO compliance allows only the integer types above.
The warning, on pedantic level 2, informs you that the bit-field is an implementation extension and therefore your
code could be not portable.