This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: is #pragma interface still needed ?


> A long time ago:
> #pragma interface
> was needed in our g++ header files.
> The pragma was documented as a pragma soon to go away because it wouldn't be  
> needed at a future date.
> 
> Does that pragma do anything in egcs?

I think it still does what it originally was designed to do
(controlling generation of virtual tables and the like), and now does
a little more, as well (controlling generation of template
instantiations).

Yet, it is not needed at all, anymore, on at least ELF targets (Linux,
Solaris), at least with the GNU linker. GCC is much smarter now than
it used to be to avoid emitting unneeded code, and the remaining
duplicates are removed by the linker.

So I think you can safely remove the pragmas from your source. 

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]