Subject: [Nel] gcc and non-ANSI

From: Vincent Caron <[email-masked]>
Date: Tue, 23 Jan 2001 14:19:00 +0100

I'm using gcc/g++ 2.95.3, and it seems that it doesn't like anonymous structures
(see gcc output below). I read that it's definitively not a standard feature,
and was orginally a MS VC++ extension, that was more or less adopted by others.
Seems that the gcc guy didn't approved it, but I didn't checked in depth. I
guess others are using the egcs c++ (1.1.2) frontend ?
I personnaly don't approve being able to acces a member without naming the
structure ...

In file included from driver_opengl.h:43,
                 from driver_opengl.cpp:45:
../../../../include/nel/3d/material.h:264: anonymous class type not used to
declare any objects
../../../../include/nel/3d/material.h: In method `void
NL3D::CMaterial::CTexEnv::setDefault()':
../../../../include/nel/3d/material.h:273: `union
NL3D::CMaterial::CTexEnv::{anonymous}' has no member named `OpRGB'
[...]

---

From: "Vianney Lecroart" <[email-masked]>
Date: Tue, 23 Jan 2001 14:27:21 +0100

> NL3D::CMaterial::CTexEnv::{anonymous}' has no member named `OpRGB'

Yes, we know that. In fact, it compiles with no warning with gcc 2.96.
If you could give me a link to a document that say it s not ANSI, i ll be
glad.

Regards,

Vianney Lecroart

---

From: "Lionel Berenguier" <[email-masked]>
Date: Tue, 23 Jan 2001 16:02:36 +0100

> I personnaly don't approve being able to acces a member without naming the

You're right.  Fixed... :o)

regards

---

From: Vincent Caron <[email-masked]>
Date: Tue, 23 Jan 2001 16:08:50 +0100

> If you could give me a link to a document that say it s not ANSI, i ll be

I only happend to find a two years old mail from a mingw32 developer :
  http://gcc.gnu.org/ml/gcc/1998-11/msg00729.html

I guess the correct answer would be to read carefully the C++ ANSI draft,
but it's boooorring :)
  http://www.cygnus.com/misc/wp/dec96pub/