• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Disable C++ vtable generate for interface classes (pure virtual, abstract)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Disable C++ vtable generate for interface classes (pure virtual, abstract)


  • Subject: Disable C++ vtable generate for interface classes (pure virtual, abstract)
  • From: "Shawn Erickson" <email@hidden>
  • Date: Tue, 6 Nov 2007 09:31:51 -0800

We have a strong requirement to minimize the size of our product and
to that end the Windows version of our product uses a MS compiler
inline attribute to disable the generation of vtables for C++ classes
that are abstract (never instantiated at runtime directly). This
removes unneeded bulk from our product.

The Windows guys use the following...

#define INTERFACE    struct __declspec(novtable)
#define ABSTRACT     class __declspec(novtable)

INTERFACE ISomeClassName {
...
};

See <http://msdn.microsoft.com/msdnmag/issues/0300/c/> for more information.

Anyway... so far in my searching I haven't found a matching feature in gcc...

Does gcc / Apple gcc have such a capability?
Any suggestions on how to strip these vtables out after the fact? etc.

We do use dead code stripping for our Mac builds but that doesn't
appear to remove the vtable entries (assuming I am reading nm / otool
output correctly).

-Shawn
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: double compile messages
  • Next by Date: Can I build with GCC 3.3 and xCode 3.0?
  • Previous by thread: Resource Changes Not Copied
  • Next by thread: Can I build with GCC 3.3 and xCode 3.0?
  • Index(es):
    • Date
    • Thread