I'm sorry, but this is unacceptable (union members and ctors)

mark@mark.mielke.cc mark@mark.mielke.cc
Fri Jun 29 02:24:00 GMT 2007


> Mark Mielke wrote "Why not This?":
> >     class Rectangle {
> >         Vector2d position;
> >         Vector2d size;
> >     };
> > ... rectangle.position.x = ... ...

On Thu, Jun 28, 2007 at 03:00:07AM -0700, michael.a wrote:
> My foremost personal requirement is that no code need change outside the
> object definition files. And besides it is ridiculous to jump through two
> hoops, when one would suffice.
> ...
> Have you read the thread? (not that you should -- but before making such an
> assessment)

You find it unacceptable that GCC implements the C++ spec, and fails to compile
your software that was not implemented according to the C++ spec.

You find it unacceptable that you would need to change your code to
match the spec, but would instead rather modify GCC and have your patch
to GCC rushed out so that you can release your product on Linux.

You find it unacceptable that union members not be allowed to contain
struct with constructors, because you believe that the practice is safe,
and valid, because the designer knows best. You believe the spec should
be changed and that Microsoft has lead the way in this regard.

Do I have this right?

Is there a reason that this discovery did not occur until late in your
development cycle? It seems to me that the first mistake on your part
was not testing on Linux/GCC when writing the original code, if you
knew that this was an intended port.

Cheers,
mark

P.S. I apologize for getting confused on my last post. I was tired + ill
     and stupidly posting after midnight. Perhaps this one will be more relevant
     and effective?

-- 
mark@mielke.cc / markm@ncf.ca / markm@nortel.com     __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

  One ring to rule them all, one ring to find them, one ring to bring them all
                       and in the darkness bind them...

                           http://mark.mielke.cc/



More information about the Gcc mailing list