anonymous struct problems
llewelly@xmission.com
llewelly@xmission.com
Thu Apr 1 02:06:00 GMT 2004
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