anonymous struct problems
Ben Guthro
bguthro@sequelimaging.com
Thu Apr 1 13:02:00 GMT 2004
excellent. thanks for this pointer, that worked.
For future reference on this list, this flag seems to be mutually
exclusive to the -pedantic flag,
as well as the (naturally) -ansi flag, both of which are enabled by
default in KDevelop.
Ben
llewelly@xmission.com wrote:
>Ben Guthro <bguthro@sequelimaging.com> writes:
>
>
>
>>I'm running into a problem that I did not have in previous versions of
>>gcc
>>(I'm running 3.3.2-1 - shipped with Redhat Fedora Core1)
>>
>>
>>previous versions of gcc only gave me warnings on this code:
>>
>>typedef struct DigitalMonitorPhotometry
>>{
>> union
>> {
>> struct
>> {
>> DMC Brightness;
>> DMC Contrast;
>> DMC RedGain;
>> DMC GreenGain;
>> DMC BlueGain;
>> DMC RedBias;
>> DMC GreenBias;
>> DMC BlueBias;
>> };
>> struct
>> {
>> DMC dmp[8];
>> };
>> };
>>}DM_PHOTOMETRYSETUP;
>>
>>
>>However, now I get:
>>error: ISO C++ prohibits anonymous structs
>>
>>This used to be a worning under previous gcc versions.
>>
>>
>
>If you really need this feature, try adding -fms-extensions to your
> CFLAGS. fsf gcc 3.3.3 will compile your code with -fms-extensions
> and 'typedef char DMC;', on i386 freebsd 5.2p2 .
>
>See http://xrl.us/budy and search for '-fms-extensions'.
>
>
>
>
>
>
More information about the Gcc-help
mailing list