This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: is #pragma interface still needed ?
- To: dyoung at vviuh221 dot vvi dot com
- Subject: Re: is #pragma interface still needed ?
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Sat, 6 Nov 1999 23:06:43 +0100
- CC: gcc at gcc dot gnu dot org
- References: <9911051316.AA05819@vviuh221.vvi.com>
> 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