[linux-audio-dev] [ot] [rant] gcc, you let me down one time too many

Clemens Ladisch clemens at ladisch.de
Mon Jun 6 07:37:08 UTC 2005


Tim Goetze wrote:
> Enter gcc version 3, which drops multi-line inline assembly support.

The following compiles fine with gcc 3.3.3:

void f()
{
        __asm__ ("nop\n"
                 "nop\n");
}

> Enter gcc version 3, moving the vtable member to memory offset 0 of a
> derived type even if the base type is in C which doesn't know about
> vtables.

There are no memory layout guarantees for non-POD types.

If your external functions use the correct type (i.e., a pointer to
the base type), the compiler will automatically cast class pointers in
the correct way.  Otherwise, you have to cast to the base type
yourself whenever you 'export' a pointer.

> Enter gcc version 4, which requires the templated types' constructor
> code be rewritten in the most nonsensical, misleading and ugly fashion
> possibly imaginable this side of Hungary and Redmond, WA, according to
> our (now not so very young anymore) hero.

Could you show some details?  Probably the old code wasn't quite
correct according to The Standard(TM).


Regards,
Clemens




More information about the Linux-audio-dev mailing list